SYMBOL INDEX (60948 symbols across 2502 files) FILE: mplsandbox/analyzetools.py class AnalyzeTools (line 29) | class AnalyzeTools: method __init__ (line 30) | def __init__( method __enter__ (line 52) | def __enter__(self): method __exit__ (line 56) | def __exit__(self, *args, **kwargs): method _validate_inputs (line 59) | def _validate_inputs(self, image, dockerfile, lang): method _create_docker_client (line 67) | def _create_docker_client(self): method open (line 72) | def open(self): method _build_image_from_dockerfile (line 80) | def _build_image_from_dockerfile(self): method _pull_image_if_needed (line 96) | def _pull_image_if_needed(self): method _get_existing_container (line 111) | def _get_existing_container(self): method _check_container_exists (line 117) | def _check_container_exists(self, container_id): method _run_container (line 124) | def _run_container(self): method close (line 144) | def close(self): method _commit_container (line 148) | def _commit_container(self): method _remove_container (line 152) | def _remove_container(self): method _remove_image_if_needed (line 156) | def _remove_image_if_needed(self): method _remove_image (line 166) | def _remove_image(self): method _build_sh (line 174) | def _build_sh(self, code_dest_file, unit_input): method run (line 186) | def run(self, code: str, unit_input: str = None, libraries: Optional[L... method _ensure_session_is_open (line 205) | def _ensure_session_is_open(self): method _install_libraries_if_needed (line 211) | def _install_libraries_if_needed(self, libraries): method _install_libraries (line 219) | def _install_libraries(self, libraries): method _prepare_go_environment (line 228) | def _prepare_go_environment(self): method _prepare_code_file (line 233) | def _prepare_code_file(self, code): method _prepare_sh_file (line 241) | def _prepare_sh_file(self, sh): method _copy_code_to_container (line 248) | def _copy_code_to_container(self, src, dest): method _execute_code_in_container (line 251) | def _execute_code_in_container(self, code_dest_file, unit_input=None): method _execute_sh_in_container (line 267) | def _execute_sh_in_container(self, sh_dest_file): method copy_from_runtime (line 281) | def copy_from_runtime(self, src: str, dest: str): method _extract_file_from_container (line 287) | def _extract_file_from_container(self, src, dest): method copy_to_runtime (line 295) | def copy_to_runtime(self, src: str, dest: str): method _create_directory_if_needed (line 300) | def _create_directory_if_needed(self, dest): method _create_directory_if_needed_tmp (line 309) | def _create_directory_if_needed_tmp(self, dest): method _copy_file_to_container (line 316) | def _copy_file_to_container(self, src, dest): method _add_directory_to_tar (line 323) | def _add_directory_to_tar(self,tar, path, arcname): method copy_directory_to_container (line 332) | def copy_directory_to_container(self, src_dir): method execute_command (line 348) | def execute_command( method _validate_command (line 357) | def _validate_command(self, command): method _run_command_in_container (line 361) | def _run_command_in_container(self, command, workdir): method _increase_memory_and_rerun (line 383) | def _increase_memory_and_rerun(self, code, unit_input, libraries): method call_tool_python (line 389) | def call_tool_python(self, code, unit_inputs, analysis) -> str: FILE: mplsandbox/const.py class Language (line 4) | class Language: class FILE_EXTENSION_MAPPING (line 16) | class FILE_EXTENSION_MAPPING: class CONTAINER_LANGUAGE_MAPPING (line 29) | class CONTAINER_LANGUAGE_MAPPING: class DefaultImage (line 52) | class DefaultImage: class CodeType (line 63) | class CodeType: FILE: mplsandbox/sandbox.py class Sandbox (line 24) | class Sandbox: method __init__ (line 25) | def __init__( method __enter__ (line 47) | def __enter__(self): method __exit__ (line 51) | def __exit__(self, *args, **kwargs): method _validate_inputs (line 54) | def _validate_inputs(self, image, dockerfile, lang): method _create_docker_client (line 62) | def _create_docker_client(self): method open (line 67) | def open(self): method _build_image_from_dockerfile (line 81) | def _build_image_from_dockerfile(self): method _pull_image_if_needed (line 97) | def _pull_image_if_needed(self): method _get_existing_container (line 112) | def _get_existing_container(self): method _check_container_exists (line 118) | def _check_container_exists(self, container_id): method _run_container (line 150) | def _run_container(self): method close (line 170) | def close(self): method _commit_container (line 178) | def _commit_container(self): method _remove_container (line 182) | def _remove_container(self): method _remove_image_if_needed (line 186) | def _remove_image_if_needed(self): method _remove_image (line 204) | def _remove_image(self): method _build_sh (line 212) | def _build_sh(self, code_dest_file, unit_input): method run (line 239) | def run(self, code: str, unit_input: str = None, libraries: Optional[L... method _ensure_session_is_open (line 258) | def _ensure_session_is_open(self): method _install_libraries_if_needed (line 264) | def _install_libraries_if_needed(self, libraries): method _install_libraries (line 272) | def _install_libraries(self, libraries): method _prepare_go_environment (line 281) | def _prepare_go_environment(self): method _prepare_code_file (line 286) | def _prepare_code_file(self, code): method _prepare_sh_file (line 293) | def _prepare_sh_file(self, sh): method _copy_code_to_container (line 300) | def _copy_code_to_container(self, src, dest): method _execute_code_in_container (line 312) | def _execute_code_in_container(self, code_dest_file, unit_input=None): method _execute_sh_in_container (line 328) | def _execute_sh_in_container(self, sh_dest_file): method copy_from_runtime (line 343) | def copy_from_runtime(self, src: str, dest: str): method _extract_file_from_container (line 349) | def _extract_file_from_container(self, src, dest): method copy_to_runtime (line 357) | def copy_to_runtime(self, src: str, dest: str): method _create_directory_if_needed (line 362) | def _create_directory_if_needed(self, dest): method _copy_file_to_container (line 369) | def _copy_file_to_container(self, src, dest): method execute_command (line 376) | def execute_command( method _validate_command (line 385) | def _validate_command(self, command): method _run_command_in_container (line 389) | def _run_command_in_container(self, command, workdir): method _increase_memory_and_rerun (line 411) | def _increase_memory_and_rerun(self, code, unit_input, libraries): FILE: mplsandbox/tool.py class MPLSANDBOX (line 12) | class MPLSANDBOX: method __init__ (line 13) | def __init__(self, *args, **kwargs): method process_config (line 27) | def process_config(self): method get_basic_info (line 54) | def get_basic_info(self, show_per_unit_feedback=False): method code_analyze_feedback (line 98) | def code_analyze_feedback(self, analysis_type): method run (line 146) | def run(self,analysis_type="all"): function main (line 154) | def main(): FILE: mplsandbox/utils.py class ConsoleOutput (line 13) | class ConsoleOutput: method __init__ (line 14) | def __init__(self, text: str): method text (line 18) | def text(self): method __str__ (line 21) | def __str__(self): function image_exists (line 24) | def image_exists(client: DockerClient, image: str) -> bool: function get_libraries_installation_command (line 38) | def get_libraries_installation_command(lang: str, library: str) -> Optio... function get_code_file_extension (line 59) | def get_code_file_extension(lang: str) -> str: function get_code_execution_command (line 80) | def get_code_execution_command(lang: str, code_file: str) -> list: function raise_error_templete (line 104) | def raise_error_templete(error_message: str, number: int, app=False): function extract_libraries (line 110) | def extract_libraries(code: str, language: str) -> list: function generate_install_commands (line 130) | def generate_install_commands(language: str, libraries: list) -> str: function detect_language_via_file_extension (line 149) | def detect_language_via_file_extension(file_extension: str) -> str: function detect_language (line 152) | def detect_language(code: str) -> str: function remove_ansi_codes (line 159) | def remove_ansi_codes(text): function output_answer_check (line 163) | def output_answer_check(answer, output): function read_code_file (line 170) | def read_code_file(code_file_path): function read_unit_file (line 174) | def read_unit_file(unit_file_path): function read_libraries_file (line 178) | def read_libraries_file(library_file_path): function read_question_file (line 184) | def read_question_file(question_file_path): function get_reward (line 188) | def get_reward(output, lang, if_correct): function get_completion_from_messages (line 208) | def get_completion_from_messages(api_key, messages, model, temperature=0): FILE: mplsandbox_for_rl/config.py function parse_args (line 3) | def parse_args(*args): FILE: mplsandbox_for_rl/data_helper.py class DummyDataset (line 13) | class DummyDataset(IterableDataset): method __iter__ (line 14) | def __iter__(self): method __len__ (line 18) | def __len__(self): class BaseDataset (line 21) | class BaseDataset(IterableDataset): method __init__ (line 22) | def __init__(self, opt: Namespace, accelerator: Accelerator, mode: str... method tokenizer_class (line 50) | def tokenizer_class(self): method _load_data (line 53) | def _load_data(self, dpath: str): method _get_bot_mask (line 79) | def _get_bot_mask(self, text_vec: List[int], sep_i: int): method _encode_sample (line 86) | def _encode_sample(self, sample: Tuple[List[str], str]) -> Dict[str, A... method _get_sample_len (line 151) | def _get_sample_len(self, sample: Dict[str, Any]): method _get_allowed_max_len (line 154) | def _get_allowed_max_len(self): method _batchify (line 157) | def _batchify(self, batch_samples: List[Dict[str, Any]]) -> Dict[str, ... method sample_generator (line 187) | def sample_generator(self) -> Generator[Dict[str, Any], None, None]: method batch_generator (line 192) | def batch_generator(self) -> Generator[List[Dict[str, Any]], None, None]: method dynamic_batch_generator (line 214) | def dynamic_batch_generator(self) -> Generator[List[Dict[str, Any]], N... method final_generator (line 278) | def final_generator(self) -> Generator[Dict[str, Any], None, None]: method __iter__ (line 289) | def __iter__(self): class DialogDataset (line 292) | class DialogDataset(BaseDataset): method __init__ (line 295) | def __init__(self, opt, accelerator, mode: str='train', **kwargs) -> N... method sample_generator (line 323) | def sample_generator(self): method __len__ (line 339) | def __len__(self): class CodeDataset (line 342) | class CodeDataset(BaseDataset): method __init__ (line 345) | def __init__(self, opt, accelerator, mode: str='train', **kwargs) -> N... method _load_data (line 373) | def _load_data(self, dpath: str): method _encode_sample (line 387) | def _encode_sample(self, sample:Dict[str, Any]) -> Dict[str, Any]: method sample_generator (line 435) | def sample_generator(self): method __len__ (line 451) | def __len__(self): class ChunkDataset (line 455) | class ChunkDataset(BaseDataset): method __init__ (line 458) | def __init__(self, opt, accelerator, mode: str='train', **kwargs) -> N... method __len__ (line 476) | def __len__(self): method _load_chunk (line 479) | def _load_chunk(self, chunk_i): method sample_generator (line 483) | def sample_generator(self): function get_dataloader (line 517) | def get_dataloader(dataset: IterableDataset, opt): FILE: mplsandbox_for_rl/generate_utils.py function top_p_logits (line 9) | def top_p_logits(logits: torch.Tensor, topp: float=0., filter_value: flo... function get_banned_ngrams (line 25) | def get_banned_ngrams(prev_input_ids: torch.LongTensor, n=4, init_ngrams... function get_blacklist_ngrams (line 37) | def get_blacklist_ngrams(blacklist_fname: str, tokenizer): function sort_value_index (line 53) | def sort_value_index(values: torch.Tensor, indexes: torch.Tensor, descen... class CustomizedGeneration (line 58) | class CustomizedGeneration: method __init__ (line 59) | def __init__(self, model, debug=False) -> None: method _cal_length_penalty (line 74) | def _cal_length_penalty(self, curr_length, beam_length_penalty): method check_value_stability (line 84) | def check_value_stability(self, logits): method _run_fake_forward (line 89) | def _run_fake_forward(self): method generate (line 93) | def generate(self, batch, **kwargs): method _generate (line 104) | def _generate(self, batch, **kwargs): FILE: mplsandbox_for_rl/llama/llama_model.py class Llama (line 10) | class Llama(LlamaForCausalLM): method __init__ (line 11) | def __init__(self, config, opt: Dict[str, Any], dict: LlamaPretrainedT... method forward (line 27) | def forward(self, decoder_input: torch.LongTensor, incr_state: torch.T... method reorder_encoder_states (line 43) | def reorder_encoder_states(self, encoder_states, indices): method reorder_decoder_incremental_state (line 47) | def reorder_decoder_incremental_state(self, incremental_state, inds): method _preprocess_context (line 50) | def _preprocess_context(self, context: Union[str, List[str]], **kwargs): method generate_sentence (line 104) | def generate_sentence(self, context: Union[str, List[str]], **kwargs): method generate (line 123) | def generate(self, batch: Dict[str, Any], **kwargs): FILE: mplsandbox_for_rl/llama/llama_trainer.py class LlamaTrainer (line 13) | class LlamaTrainer(Seq2SeqTrainer): method __init__ (line 15) | def __init__(self, opt, model: Llama, reward_model: nn.Module, acceler... method _criterion (line 20) | def _criterion(self, model_output: Tuple[torch.Tensor, ...], batch: Di... method _tokenizer_class (line 31) | def _tokenizer_class(self): method _dataset_class (line 34) | def _dataset_class(self): method _prompt_dataset_class (line 50) | def _prompt_dataset_class(self): method _strip_pad (line 53) | def _strip_pad(self, seq: List[int]): method _extract_context_candidates (line 56) | def _extract_context_candidates(self, context: List[List[int]], candid... method _build_metrics (line 72) | def _build_metrics(self, mode='train'): method evaluate (line 84) | def evaluate(self, datatype='valid', **kwargs) -> Tuple[float, List]: method inference (line 136) | def inference(self, datatype, reward_model, **kwargs) -> Tuple[float, ... FILE: mplsandbox_for_rl/llama/modeling_moe.py function _make_causal_mask (line 43) | def _make_causal_mask( function _expand_mask (line 61) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class LlamaRMSNorm (line 75) | class LlamaRMSNorm(nn.Module): method __init__ (line 76) | def __init__(self, hidden_size, eps=1e-6): method forward (line 84) | def forward(self, hidden_states): class LlamaRotaryEmbedding (line 92) | class LlamaRotaryEmbedding(torch.nn.Module): method __init__ (line 93) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 107) | def forward(self, x, seq_len=None): function rotate_half (line 124) | def rotate_half(x): function apply_rotary_pos_emb (line 131) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): class LlamaMLP (line 142) | class LlamaMLP(nn.Module): method __init__ (line 143) | def __init__( method forward (line 155) | def forward(self, x): class LlamaAttention (line 159) | class LlamaAttention(nn.Module): method __init__ (line 162) | def __init__(self, config: LlamaConfig): method _shape (line 181) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 184) | def forward( class LlamaDecoderLayer (line 252) | class LlamaDecoderLayer(nn.Module): method __init__ (line 253) | def __init__(self, config: LlamaConfig): method forward (line 265) | def forward( class LlamaPreTrainedModel (line 341) | class LlamaPreTrainedModel(PreTrainedModel): method _init_weights (line 349) | def _init_weights(self, module): method _set_gradient_checkpointing (line 360) | def _set_gradient_checkpointing(self, module, value=False): class LlamaModel (line 433) | class LlamaModel(LlamaPreTrainedModel): method __init__ (line 441) | def __init__(self, config: LlamaConfig): method get_input_embeddings (line 454) | def get_input_embeddings(self): method set_input_embeddings (line 457) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 461) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 485) | def forward( class LlamaForCausalLM (line 613) | class LlamaForCausalLM(LlamaPreTrainedModel): method __init__ (line 614) | def __init__(self, config): method get_input_embeddings (line 623) | def get_input_embeddings(self): method set_input_embeddings (line 626) | def set_input_embeddings(self, value): method get_output_embeddings (line 629) | def get_output_embeddings(self): method set_output_embeddings (line 632) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 635) | def set_decoder(self, decoder): method get_decoder (line 638) | def get_decoder(self): method forward (line 643) | def forward( method prepare_inputs_for_generation (line 729) | def prepare_inputs_for_generation( method _reorder_cache (line 760) | def _reorder_cache(past_key_values, beam_idx): class LlamaForSequenceClassification (line 787) | class LlamaForSequenceClassification(LlamaPreTrainedModel): method __init__ (line 790) | def __init__(self, config): method get_input_embeddings (line 799) | def get_input_embeddings(self): method set_input_embeddings (line 802) | def set_input_embeddings(self, value): method forward (line 806) | def forward( FILE: mplsandbox_for_rl/llama/reward/llama_reward_model.py class LlamaCriticModel (line 12) | class LlamaCriticModel(LlamaForCausalLM): method __init__ (line 13) | def __init__(self, config, opt: Dict[str, Any], dict: LlamaPretrainedT... method forward (line 26) | def forward(self, decoder_input: torch.LongTensor, rank_all=False): method reward (line 45) | def reward(self, context: Union[str, List[str], List[int]], is_encoded... method batch_reward (line 52) | def batch_reward(self, context: Union[List[str], List[List[str]], List... class LlamaRewardModel (line 59) | class LlamaRewardModel(): method __init__ (line 60) | def __init__(self, opt: Dict[str, Any], dict: LlamaPretrainedTokenizer... method process_answer (line 68) | def process_answer(self, text): method write_tmp (line 89) | def write_tmp(self, code, tmp_file): method find_test (line 124) | def find_test(self, code): method find_test_type (line 140) | def find_test_type(self, code): method execute_code (line 159) | def execute_code(self, code, inputs, outputs, tmp_file,has_args, has_p... method get_reward (line 194) | def get_reward(self, resp, inputs, outputs, tmp_file): method get_reward_via_mplsandbox (line 271) | def get_reward_via_mplsandbox(self, resp, inputs, outputs, tmp_file): method forward (line 341) | def forward(self, resp_vec_sampled: List[List[int]], resps: List[str],... FILE: mplsandbox_for_rl/metric.py class Metric (line 18) | class Metric: method __init__ (line 19) | def __init__(self) -> None: method add (line 22) | def add(self, val): method val (line 25) | def val(self) -> float: method reset (line 28) | def reset(self): method compute (line 31) | def compute(self, val: Any): method __add__ (line 34) | def __add__(self, other): method __radd__ (line 37) | def __radd__(self, other): class ExponentialMovingAverageMetric (line 41) | class ExponentialMovingAverageMetric(Metric): method __init__ (line 42) | def __init__(self, factor, val=None, denom=1): method add (line 49) | def add(self, val): method val (line 55) | def val(self) -> float: method sync (line 60) | def sync(self, val): method reset (line 64) | def reset(self): method __add__ (line 67) | def __add__(self, other: 'ExponentialMovingAverageMetric'): class SpanSumMetric (line 71) | class SpanSumMetric(Metric): method __init__ (line 72) | def __init__(self, size, buffer=None, sum_=0, denom=1) -> None: method add (line 79) | def add(self, val): method val (line 86) | def val(self) -> float: method reset (line 89) | def reset(self): method __add__ (line 94) | def __add__(self, other: 'SpanSumMetric'): class MeanMetric (line 98) | class MeanMetric(Metric): method __init__ (line 99) | def __init__(self, num=0, denom=0): method add (line 103) | def add(self, val: Any): method many (line 107) | def many(self, vals: List[Any], denoms: Optional[List[int]] = None): method val (line 116) | def val(self): method reset (line 121) | def reset(self): method __add__ (line 124) | def __add__(self, other: 'MeanMetric'): class SumMetric (line 129) | class SumMetric(Metric): method __init__ (line 130) | def __init__(self, sum_=0): method add (line 133) | def add(self, val): method many (line 136) | def many(self, vals: List[Any]): method val (line 139) | def val(self): method reset (line 142) | def reset(self): method __add__ (line 145) | def __add__(self, other: 'SumMetric'): class RealtimeMetric (line 149) | class RealtimeMetric(Metric): method __init__ (line 150) | def __init__(self, val=0): method add (line 153) | def add(self, val): method many (line 156) | def many(self, vals: List[Any]): method val (line 159) | def val(self): method reset (line 162) | def reset(self): method __add__ (line 165) | def __add__(self, other): class CIDErDMetric (line 168) | class CIDErDMetric(Metric): method __init__ (line 169) | def __init__(self, lang, ngram=4, sigma=15, guesses=None, answers=None... method add (line 177) | def add(self, val: Tuple[str, List[str]]): method reset (line 186) | def reset(self): method val (line 190) | def val(self) -> float: method __add__ (line 198) | def __add__(self, other: 'CIDErDMetric'): class BleuMetric (line 204) | class BleuMetric(MeanMetric): method __init__ (line 206) | def __init__(self, b=4, backend='sacre', lang='zh'): method compute (line 219) | def compute(self, val: Tuple[str, List[str]]): class CorpusBleuMetric (line 239) | class CorpusBleuMetric(Metric): method __init__ (line 240) | def __init__(self, b=4, backend='sacre', lang='zh', guesses=None, answ... method reset (line 257) | def reset(self): method add (line 261) | def add(self, val: Tuple[str, List[str]]): method val (line 266) | def val(self) -> float: method __add__ (line 277) | def __add__(self, other: 'CorpusBleuMetric'): class RougeMetric (line 282) | class RougeMetric(MeanMetric): method __init__ (line 283) | def __init__(self, r, lang='zh'): method compute (line 290) | def compute(self, val: Tuple[str, List[str]]): class F1Metric (line 305) | class F1Metric(MeanMetric): method __init__ (line 306) | def __init__(self, lang='zh'): method _prec_recall_f1_score (line 311) | def _prec_recall_f1_score(pred_items, gold_items): method compute (line 329) | def compute(self, val: Tuple[str, List[str]]): class InterDistinctMetric (line 340) | class InterDistinctMetric(Metric): method __init__ (line 341) | def __init__(self, d, lang='zh', counts: Optional[TCounter] = None): method _ngram (line 348) | def _ngram(seq: List[str], n): method add (line 352) | def add(self, val: Any): method many (line 355) | def many(self, vals: List[Any]): method compute (line 359) | def compute(self, val: str): method val (line 363) | def val(self): method __add__ (line 366) | def __add__(self, other: 'InterDistinctMetric'): method reset (line 369) | def reset(self): class PPLMetric (line 373) | class PPLMetric(MeanMetric): method val (line 374) | def val(self): method __add__ (line 381) | def __add__(self, other): class Metrics (line 384) | class Metrics(): method __init__ (line 394) | def __init__(self, opt: Dict[str, Any], accelerator: Accelerator, mode... method add_additional_metric (line 415) | def add_additional_metric(self, metric_name: str, metric_obj: Metric): method remove_useless_metric (line 419) | def remove_useless_metric(self, metric_name: str): method record_metric (line 423) | def record_metric(self, metric_name: str, val: Any): method record_metric_many (line 426) | def record_metric_many(self, metric_name: str, vals: List[Any], counts... method get_metric (line 434) | def get_metric(self, metric_name: str): method reset (line 437) | def reset(self, no_reset: List[str] = ['total_exs']): method all_gather_metrics (line 442) | def all_gather_metrics(self) -> Dict[str, float]: method write_tensorboard (line 463) | def write_tensorboard(self, global_step: int, gathered_metrics: Dict[s... method flush (line 470) | def flush(self): method display (line 474) | def display(self, global_step: int, data_size: Optional[int] = None, g... method _get_metric_obj (line 493) | def _get_metric_obj(self, metric_name: str): function normalize_answer (line 522) | def normalize_answer(s, lang: str) -> str: function add (line 539) | def add(a, b): FILE: mplsandbox_for_rl/metric_utils.py function precook (line 12) | def precook(s, n=4, out=False): function cook_refs (line 29) | def cook_refs(refs, n=4): ## lhuang: oracle will call with "average" function cook_test (line 39) | def cook_test(test, n=4): function sim (line 48) | def sim(vec_hyp, vec_ref, norm_hyp, norm_ref, length_hyp, length_ref, n=... class CiderScorer (line 77) | class CiderScorer(object): method copy (line 81) | def copy(self): method copy_empty (line 88) | def copy_empty(self): method __init__ (line 95) | def __init__(self, df_mode="corpus", test=None, refs=None, n=4, sigma=... method clear (line 110) | def clear(self): method cook_append (line 114) | def cook_append(self, test, refs): method size (line 124) | def size(self): method __iadd__ (line 128) | def __iadd__(self, other): method compute_doc_freq (line 139) | def compute_doc_freq(self): method counts2vec (line 152) | def counts2vec(self, cnts): method compute_cider (line 178) | def compute_cider(self): method compute_score (line 207) | def compute_score(self, option=None, verbose=0): method my_get_cider (line 222) | def my_get_cider(self, gts, res): method my_get_self_cider (line 242) | def my_get_self_cider(self, res): class CiderD (line 261) | class CiderD: method __init__ (line 266) | def __init__(self, n=4, sigma=6.0, df="corpus"): method compute_score (line 275) | def compute_score(self, gts, res): method my_compute_score (line 302) | def my_compute_score(self, gts, res, avg_refs=True): method my_self_cider (line 325) | def my_self_cider(self, res): method method (line 338) | def method(self): FILE: mplsandbox_for_rl/ppo/ppo_datahelper.py class Cell (line 9) | class Cell: class Archive (line 14) | class Archive(): method __init__ (line 15) | def __init__(self): method add (line 21) | def add(self, state: str, score: float): method update (line 29) | def update(self, state: str, score: float): class DialogPromptDataset (line 46) | class DialogPromptDataset(DialogDataset): method __init__ (line 47) | def __init__(self, opt, accelerator, mode: str = 'train', **kwargs) ->... method _load_data (line 57) | def _load_data(self, dpath: str): method _encode_sample (line 71) | def _encode_sample(self, sample:Dict[str, Any]) -> Dict[str, Any]: method _get_allowed_max_len (line 129) | def _get_allowed_max_len(self): method _get_sample_len (line 132) | def _get_sample_len(self, sample: Dict[str, Any]): method batch_generator (line 135) | def batch_generator(self) -> Generator[List[Dict[str, Any]], None, None]: method dynamic_batch_generator (line 143) | def dynamic_batch_generator(self) -> Generator[List[Dict[str, Any]], N... method _batchify (line 146) | def _batchify(self, batch_samples: List[Dict[str, Any]]) -> Dict[str, ... class DialogReplayDataset (line 163) | class DialogReplayDataset(DialogDataset): method __init__ (line 164) | def __init__(self, data: List[Dict[str, Any]], opt, accelerator, archi... method _load_data (line 174) | def _load_data(self, dpath: str): method _get_advantages_and_returns (line 177) | def _get_advantages_and_returns(self, rewards: List[float], values: Li... method _encode_sample (line 195) | def _encode_sample(self, sample: Dict[str, Any]) -> Dict[str, Any]: method _get_allowed_max_len (line 237) | def _get_allowed_max_len(self): method _get_sample_len (line 240) | def _get_sample_len(self, sample: Dict[str, Any]): method batch_generator (line 243) | def batch_generator(self) -> Generator[List[Dict[str, Any]], None, None]: method dynamic_batch_generator (line 247) | def dynamic_batch_generator(self) -> Generator[List[Dict[str, Any]], N... method _batchify (line 250) | def _batchify(self, batch_samples: List[Dict[str, Any]]) -> Dict[str, ... FILE: mplsandbox_for_rl/ppo/ppo_trainer.py class RLHFTrainableModelWrapper (line 18) | class RLHFTrainableModelWrapper(nn.Module): method __init__ (line 19) | def __init__(self, policy_model: nn.Module, critic_model: nn.Module, r... method forward (line 34) | def forward(self, inputs, **kwargs): method train (line 37) | def train(self, mode=True): method eval (line 41) | def eval(self): class PPOTrainer (line 50) | class PPOTrainer(Seq2SeqTrainer): method __init__ (line 51) | def __init__(self, opt, policy_model: nn.Module, ref_model: nn.Module,... method _build_metrics (line 120) | def _build_metrics(self, mode='train'): method _group_optim_params (line 149) | def _group_optim_params(self, no_decay_name_list=["bias", "LayerNorm.w... method _build_optimizer (line 179) | def _build_optimizer(self): method _build_dataloader (line 184) | def _build_dataloader(self, mode): method _prompt_dataset_class (line 187) | def _prompt_dataset_class(self): method _replay_dataset_class (line 190) | def _replay_dataset_class(self): method _strip_pad (line 193) | def _strip_pad(self, seq: List[int]): method _run_reward_forward (line 196) | def _run_reward_forward(self, resp_vec_sampled, resps, batch, bsz, **k... method _run_policy_forward (line 199) | def _run_policy_forward(self, inputs, **kwargs): method _run_ref_forward (line 205) | def _run_ref_forward(self, inputs, **kwargs): method _run_critic_forward (line 208) | def _run_critic_forward(self, inputs, **kwargs): method _run_forward (line 211) | def _run_forward(self, batch: Dict[str, Any], **kwargs): method _extract_context_candidates (line 214) | def _extract_context_candidates(self, context: List[List[int]], candid... method _record_batch_info (line 229) | def _record_batch_info(self, batch, mode): method _save_checkpoint (line 234) | def _save_checkpoint(self, is_best: bool, total_steps: int, **kwargs): method _format_experience_log (line 278) | def _format_experience_log(self, log): method make_experiences (line 287) | def make_experiences(self): method _criterion (line 382) | def _criterion(self, model_output: Tuple[torch.Tensor, ...], batch: Di... method evaluate (line 446) | def evaluate(self, datatype='valid', **kwargs) -> Tuple[float, List]: method _pre_epoch (line 497) | def _pre_epoch(self): method _post_epoch (line 506) | def _post_epoch(self): method train (line 512) | def train(self): FILE: mplsandbox_for_rl/ppo/ppo_utils.py function get_global_statistics (line 8) | def get_global_statistics(accelerator: Accelerator, xs: torch.Tensor, ma... function logprobs_from_logits (line 24) | def logprobs_from_logits(logits, labels): function whiten (line 31) | def whiten(xs: torch.Tensor, mask: torch.BoolTensor, shift_mean=True, ac... class RunningMoments (line 44) | class RunningMoments: method __init__ (line 45) | def __init__(self, accelerator: Accelerator): method update (line 57) | def update(self, xs: torch.Tensor) -> Tuple[float, float]: FILE: mplsandbox_for_rl/scheduler.py function invsqrt_scheduler (line 4) | def invsqrt_scheduler(warmup_steps: int): function calculate_noam_lr (line 14) | def calculate_noam_lr(dmodel: int, step: int, factor=1.): function noam_scheduler (line 18) | def noam_scheduler(dmodel: int, warmup_steps: int, factor=1.): function warmup_scheduler (line 31) | def warmup_scheduler(warmup_steps: int, min_factor=0.): FILE: mplsandbox_for_rl/tokenizer.py class HFPretrainedTokenizer (line 5) | class HFPretrainedTokenizer(): method __init__ (line 6) | def __init__(self, opt): method gmask_token (line 29) | def gmask_token(self): method gmask_token_id (line 33) | def gmask_token_id(self): method null_token (line 37) | def null_token(self): method end_token (line 41) | def end_token(self): method unk_token (line 45) | def unk_token(self): method start_token (line 49) | def start_token(self): method null_token_id (line 53) | def null_token_id(self): method end_token_id (line 57) | def end_token_id(self): method unk_token_id (line 61) | def unk_token_id(self): method start_token_id (line 65) | def start_token_id(self): method override_special_tokens (line 69) | def override_special_tokens(self): method txt2vec (line 72) | def txt2vec(self, text: str): method vec2txt (line 77) | def vec2txt(self, vector: List[int], skip_special=False): FILE: mplsandbox_for_rl/train_ppo.py function additional_args (line 13) | def additional_args(parser): FILE: mplsandbox_for_rl/trainer.py class CustomTrainerStates (line 20) | class CustomTrainerStates: method __init__ (line 21) | def __init__(self) -> None: method state_dict (line 27) | def state_dict(self): method load_state_dict (line 35) | def load_state_dict(self, state_dict): class Seq2SeqTrainer (line 42) | class Seq2SeqTrainer(): method __init__ (line 43) | def __init__(self, opt, model: nn.Module, accelerator: Accelerator, ev... method post_init (line 97) | def post_init(self): method _load_checkpoint (line 100) | def _load_checkpoint(self, load_path, strict=True, target_model: nn.Mo... method _save_checkpoint (line 131) | def _save_checkpoint(self, is_best: bool, total_steps: int): method _dataset_class (line 164) | def _dataset_class(self): method _tokenizer_class (line 170) | def _tokenizer_class(self): method _custom_states_class (line 173) | def _custom_states_class(self): method _build_dataloader (line 176) | def _build_dataloader(self, mode='train'): method _build_metrics (line 181) | def _build_metrics(self, mode='train'): method _optimizer_class (line 185) | def _optimizer_class(self): method _build_optimizer (line 191) | def _build_optimizer(self): method _build_scheduler (line 202) | def _build_scheduler(self): method _build_loss_fn (line 229) | def _build_loss_fn(self): method _get_metric_obj (line 232) | def _get_metric_obj(self, training=True): method _record_batch_info (line 238) | def _record_batch_info(self, batch, mode='train'): method _criterion (line 255) | def _criterion(self, model_output: Tuple[torch.Tensor, ...], batch: Di... method _run_forward (line 286) | def _run_forward(self, batch: Dict[str, Any], **kwargs): method _run_fake_forward (line 290) | def _run_fake_forward(self): method _train_step (line 294) | def _train_step(self, batch: Dict[str, Any], **kwargs): method generate_sentence (line 319) | def generate_sentence(self, context: Union[str, List[str]], **kwargs): method _on_stop_train (line 322) | def _on_stop_train(self): method _pre_epoch (line 325) | def _pre_epoch(self): method _post_epoch (line 329) | def _post_epoch(self): method train (line 333) | def train(self): method get_generate_batch (line 395) | def get_generate_batch(self, batch: Dict[str, Any]): method evaluate (line 401) | def evaluate(self, datatype='valid', **kwargs) -> Tuple[float, List]: method _get_extra_inference_info (line 464) | def _get_extra_inference_info(self, batch: Dict[str, Any]) -> Tuple[Li... method _parse_extra_inference_info (line 468) | def _parse_extra_inference_info(self, others: List[Any]) -> Tuple[Any,... method inference (line 472) | def inference(self, datatype='test', num_examples: int=999999) -> List: FILE: mplsandbox_for_rl/transformers/.circleci/create_circleci_config.py class EmptyJob (line 39) | class EmptyJob: method to_dict (line 42) | def to_dict(self): class CircleCIJob (line 50) | class CircleCIJob: method __post_init__ (line 66) | def __post_init__(self): method to_dict (line 90) | def to_dict(self): method job_name (line 222) | def job_name(self): function create_circleci_config (line 447) | def create_circleci_config(folder=None): FILE: mplsandbox_for_rl/transformers/.circleci/parse_test_outputs.py function parse_pytest_output (line 4) | def parse_pytest_output(file_path): function parse_pytest_failure_output (line 18) | def parse_pytest_failure_output(file_path): function parse_pytest_errors_output (line 34) | def parse_pytest_errors_output(file_path): function main (line 51) | def main(): FILE: mplsandbox_for_rl/transformers/benchmark/benchmark.py function checkout_commit (line 45) | def checkout_commit(repo: Repo, commit_id: str): function summarize (line 62) | def summarize(run_dir, metrics, expand_metrics=False): function combine_summaries (line 151) | def combine_summaries(summaries): function list_str (line 202) | def list_str(values): FILE: mplsandbox_for_rl/transformers/benchmark/optimum_benchmark_wrapper.py function main (line 5) | def main(config_dir, config_name, args): FILE: mplsandbox_for_rl/transformers/conftest.py function pytest_configure (line 87) | def pytest_configure(config): function pytest_collection_modifyitems (line 101) | def pytest_collection_modifyitems(items): function pytest_addoption (line 107) | def pytest_addoption(parser): function pytest_terminal_summary (line 113) | def pytest_terminal_summary(terminalreporter): function pytest_sessionfinish (line 121) | def pytest_sessionfinish(session, exitstatus): class CustomOutputChecker (line 133) | class CustomOutputChecker(OutputChecker): method check_output (line 134) | def check_output(self, want, got, optionflags): FILE: mplsandbox_for_rl/transformers/examples/diff-conversion/diff_dummy.py function _pre_process_input (line 11) | def _pre_process_input(input_ids): class DummyModel (line 17) | class DummyModel(LlamaModel): method forward (line 18) | def forward( FILE: mplsandbox_for_rl/transformers/examples/diff-conversion/diff_my_new_model.py class MyNewModelConfig (line 6) | class MyNewModelConfig(LlamaConfig): method __init__ (line 11) | def __init__(self, mlp_bias=True, new_param=0, **super_kwargs): FILE: mplsandbox_for_rl/transformers/examples/diff-conversion/diff_my_new_model2.py class MyNewModel2Config (line 6) | class MyNewModel2Config(LlamaConfig): class MyNewModel2ForSequenceClassification (line 30) | class MyNewModel2ForSequenceClassification(GemmaForSequenceClassification): FILE: mplsandbox_for_rl/transformers/examples/diff-conversion/diff_new_model.py class NewModelConfig (line 6) | class NewModelConfig(GemmaConfig): method __init__ (line 7) | def __init__( FILE: mplsandbox_for_rl/transformers/examples/diff-conversion/diff_super.py class SuperModel (line 11) | class SuperModel(LlamaModel): method forward (line 12) | def forward( FILE: mplsandbox_for_rl/transformers/examples/flax/conftest.py function pytest_addoption (line 34) | def pytest_addoption(parser): function pytest_terminal_summary (line 40) | def pytest_terminal_summary(terminalreporter): FILE: mplsandbox_for_rl/transformers/examples/flax/image-captioning/create_model_from_encoder_decoder_models.py class ModelArguments (line 29) | class ModelArguments: function main (line 61) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/image-captioning/run_image_captioning_flax.py function shift_tokens_right (line 73) | def shift_tokens_right(input_ids: np.ndarray, pad_token_id: int, decoder... class TrainingArguments (line 86) | class TrainingArguments: method __post_init__ (line 140) | def __post_init__(self): method to_dict (line 144) | def to_dict(self): class ModelArguments (line 161) | class ModelArguments: class DataTrainingArguments (line 207) | class DataTrainingArguments: method __post_init__ (line 305) | def __post_init__(self): class TrainState (line 326) | class TrainState(train_state.TrainState): method replicate (line 329) | def replicate(self): function data_loader (line 333) | def data_loader(rng: jax.random.PRNGKey, dataset: Dataset, batch_size: i... function write_metric (line 360) | def write_metric(summary_writer, metrics, train_time, step, metric_key_p... function create_learning_rate_fn (line 375) | def create_learning_rate_fn( function main (line 389) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/language-modeling/run_bart_dlm_flax.py class TrainingArguments (line 70) | class TrainingArguments: method __post_init__ (line 111) | def __post_init__(self): method to_dict (line 115) | def to_dict(self): class ModelArguments (line 132) | class ModelArguments: class DataTrainingArguments (line 183) | class DataTrainingArguments: method __post_init__ (line 249) | def __post_init__(self): class FlaxDataCollatorForBartDenoisingLM (line 264) | class FlaxDataCollatorForBartDenoisingLM: method __post_init__ (line 290) | def __post_init__(self): method __call__ (line 297) | def __call__(self, examples: List[Dict[str, List[int]]]) -> BatchEncod... method permute_sentences (line 323) | def permute_sentences(self, input_ids): method span_mask_tokens (line 357) | def span_mask_tokens(self, input_ids, labels, do_permute): function generate_batch_splits (line 432) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int, drop... function write_train_metric (line 448) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 458) | def write_eval_metric(summary_writer, eval_metrics, step): function main (line 463) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/language-modeling/run_clm_flax.py class TrainingArguments (line 71) | class TrainingArguments: method __post_init__ (line 112) | def __post_init__(self): method to_dict (line 116) | def to_dict(self): class ModelArguments (line 133) | class ModelArguments: class DataTrainingArguments (line 194) | class DataTrainingArguments: method __post_init__ (line 255) | def __post_init__(self): class TrainState (line 269) | class TrainState(train_state.TrainState): method replicate (line 272) | def replicate(self): function data_loader (line 276) | def data_loader(rng: jax.random.PRNGKey, dataset: Dataset, batch_size: i... function write_train_metric (line 302) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 312) | def write_eval_metric(summary_writer, eval_metrics, step): function create_learning_rate_fn (line 317) | def create_learning_rate_fn( function main (line 331) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/language-modeling/run_mlm_flax.py class TrainingArguments (line 71) | class TrainingArguments: method __post_init__ (line 118) | def __post_init__(self): method to_dict (line 122) | def to_dict(self): class ModelArguments (line 139) | class ModelArguments: class DataTrainingArguments (line 200) | class DataTrainingArguments: method __post_init__ (line 263) | def __post_init__(self): class FlaxDataCollatorForLanguageModeling (line 276) | class FlaxDataCollatorForLanguageModeling: method __post_init__ (line 298) | def __post_init__(self): method __call__ (line 305) | def __call__(self, examples: List[Dict[str, np.ndarray]], pad_to_multi... method mask_tokens (line 317) | def mask_tokens( function generate_batch_splits (line 347) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int, drop... function write_train_metric (line 363) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 373) | def write_eval_metric(summary_writer, eval_metrics, step): function main (line 378) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/language-modeling/run_t5_mlm_flax.py class TrainingArguments (line 71) | class TrainingArguments: method __post_init__ (line 112) | def __post_init__(self): method to_dict (line 116) | def to_dict(self): class ModelArguments (line 133) | class ModelArguments: class DataTrainingArguments (line 184) | class DataTrainingArguments: method __post_init__ (line 248) | def __post_init__(self): function compute_input_and_target_lengths (line 260) | def compute_input_and_target_lengths(inputs_length, noise_density, mean_... class FlaxDataCollatorForT5MLM (line 308) | class FlaxDataCollatorForT5MLM: method __call__ (line 341) | def __call__(self, examples: List[Dict[str, np.ndarray]]) -> BatchEnco... method create_sentinel_ids (line 378) | def create_sentinel_ids(self, mask_indices): method filter_input_ids (line 393) | def filter_input_ids(self, input_ids, sentinel_ids): method random_spans_noise_mask (line 409) | def random_spans_noise_mask(self, length): function generate_batch_splits (line 474) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int, drop... function write_train_metric (line 490) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 500) | def write_eval_metric(summary_writer, eval_metrics, step): function main (line 505) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/language-modeling/t5_tokenizer_model.py class SentencePieceUnigramTokenizer (line 11) | class SentencePieceUnigramTokenizer(BaseTokenizer): method __init__ (line 19) | def __init__( method train (line 73) | def train( method train_from_iterator (line 93) | def train_from_iterator( method add_unk_id (line 111) | def add_unk_id(self): FILE: mplsandbox_for_rl/transformers/examples/flax/question-answering/run_qa.py class TrainingArguments (line 73) | class TrainingArguments: method __post_init__ (line 115) | def __post_init__(self): method to_dict (line 119) | def to_dict(self): class ModelArguments (line 136) | class ModelArguments: class DataTrainingArguments (line 189) | class DataTrainingArguments: method __post_init__ (line 292) | def __post_init__(self): function create_train_state (line 316) | def create_train_state( function create_learning_rate_fn (line 383) | def create_learning_rate_fn( function train_data_collator (line 401) | def train_data_collator(rng: PRNGKey, dataset: Dataset, batch_size: int): function eval_data_collator (line 420) | def eval_data_collator(dataset: Dataset, batch_size: int): function main (line 438) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/question-answering/utils_qa.py function postprocess_qa_predictions (line 32) | def postprocess_qa_predictions( function postprocess_qa_predictions_with_beam_search (line 253) | def postprocess_qa_predictions_with_beam_search( FILE: mplsandbox_for_rl/transformers/examples/flax/speech-recognition/run_flax_speech_recognition_seq2seq.py class ModelArguments (line 71) | class ModelArguments: class DataTrainingArguments (line 128) | class DataTrainingArguments: function shift_tokens_right (line 251) | def shift_tokens_right(label_ids: np.array, decoder_start_token_id: int)... class FlaxDataCollatorSpeechSeq2SeqWithPadding (line 263) | class FlaxDataCollatorSpeechSeq2SeqWithPadding: method __call__ (line 306) | def __call__(self, features: List[Dict[str, Union[List[int], np.ndarra... class TrainState (line 351) | class TrainState(train_state.TrainState): method replicate (line 354) | def replicate(self): function write_metric (line 358) | def write_metric(summary_writer, train_metrics, eval_metrics, train_time... function create_learning_rate_fn (line 371) | def create_learning_rate_fn( function main (line 383) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/summarization/run_summarization_flax.py class TrainingArguments (line 80) | class TrainingArguments: method __post_init__ (line 131) | def __post_init__(self): method to_dict (line 135) | def to_dict(self): class ModelArguments (line 152) | class ModelArguments: class DataTrainingArguments (line 213) | class DataTrainingArguments: method __post_init__ (line 320) | def __post_init__(self): class TrainState (line 357) | class TrainState(train_state.TrainState): method replicate (line 360) | def replicate(self): function data_loader (line 364) | def data_loader(rng: jax.random.PRNGKey, dataset: Dataset, batch_size: i... function write_metric (line 390) | def write_metric(summary_writer, train_metrics, eval_metrics, train_time... function create_learning_rate_fn (line 403) | def create_learning_rate_fn( function main (line 417) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/test_flax_examples.py function get_setup_file (line 57) | def get_setup_file(): function get_results (line 64) | def get_results(output_dir, split="eval"): class ExamplesTests (line 76) | class ExamplesTests(TestCasePlus): method test_run_glue (line 77) | def test_run_glue(self): method test_run_clm (line 100) | def test_run_clm(self): method test_run_summarization (line 124) | def test_run_summarization(self): method test_run_mlm (line 154) | def test_run_mlm(self): method test_run_t5_mlm (line 178) | def test_run_t5_mlm(self): method test_run_ner (line 202) | def test_run_ner(self): method test_run_qa (line 232) | def test_run_qa(self): method test_run_flax_speech_recognition_seq2seq (line 259) | def test_run_flax_speech_recognition_seq2seq(self): FILE: mplsandbox_for_rl/transformers/examples/flax/text-classification/run_flax_glue.py class ModelArguments (line 80) | class ModelArguments: class DataTrainingArguments (line 134) | class DataTrainingArguments: method __post_init__ (line 206) | def __post_init__(self): function create_train_state (line 219) | def create_train_state( function create_learning_rate_fn (line 290) | def create_learning_rate_fn( function glue_train_data_collator (line 304) | def glue_train_data_collator(rng: PRNGKey, dataset: Dataset, batch_size:... function glue_eval_data_collator (line 319) | def glue_eval_data_collator(dataset: Dataset, batch_size: int): function main (line 333) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/token-classification/run_flax_ner.py class TrainingArguments (line 70) | class TrainingArguments: method __post_init__ (line 111) | def __post_init__(self): method to_dict (line 115) | def to_dict(self): class ModelArguments (line 132) | class ModelArguments: class DataTrainingArguments (line 182) | class DataTrainingArguments: method __post_init__ (line 268) | def __post_init__(self): function create_train_state (line 281) | def create_train_state( function create_learning_rate_fn (line 342) | def create_learning_rate_fn( function train_data_collator (line 356) | def train_data_collator(rng: PRNGKey, dataset: Dataset, batch_size: int): function eval_data_collator (line 371) | def eval_data_collator(dataset: Dataset, batch_size: int): function main (line 385) | def main(): FILE: mplsandbox_for_rl/transformers/examples/flax/vision/run_image_classification.py class TrainingArguments (line 68) | class TrainingArguments: method __post_init__ (line 109) | def __post_init__(self): method to_dict (line 113) | def to_dict(self): class ModelArguments (line 130) | class ModelArguments: class DataTrainingArguments (line 184) | class DataTrainingArguments: class TrainState (line 223) | class TrainState(train_state.TrainState): method replicate (line 226) | def replicate(self): function write_metric (line 230) | def write_metric(summary_writer, train_metrics, eval_metrics, train_time... function create_learning_rate_fn (line 243) | def create_learning_rate_fn( function main (line 257) | def main(): FILE: mplsandbox_for_rl/transformers/examples/legacy/benchmarking/plot_csv_file.py function list_field (line 27) | def list_field(default=None, metadata=None): class PlotArguments (line 32) | class PlotArguments: function can_convert_to_int (line 67) | def can_convert_to_int(string): function can_convert_to_float (line 75) | def can_convert_to_float(string): class Plot (line 83) | class Plot: method __init__ (line 84) | def __init__(self, args): method plot (line 105) | def plot(self): function main (line 170) | def main(): FILE: mplsandbox_for_rl/transformers/examples/legacy/benchmarking/run_benchmark.py function main (line 22) | def main(): FILE: mplsandbox_for_rl/transformers/examples/legacy/multiple_choice/run_multiple_choice.py function simple_accuracy (line 44) | def simple_accuracy(preds, labels): class ModelArguments (line 49) | class ModelArguments: class DataTrainingArguments (line 70) | class DataTrainingArguments: function main (line 91) | def main(): function _mp_fn (line 238) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/legacy/multiple_choice/utils_multiple_choice.py class InputExample (line 37) | class InputExample: class InputFeatures (line 58) | class InputFeatures: class Split (line 71) | class Split(Enum): class MultipleChoiceDataset (line 81) | class MultipleChoiceDataset(Dataset): method __init__ (line 89) | def __init__( method __len__ (line 136) | def __len__(self): method __getitem__ (line 139) | def __getitem__(self, i) -> InputFeatures: class TFMultipleChoiceDataset (line 146) | class TFMultipleChoiceDataset: method __init__ (line 154) | def __init__( method get_dataset (line 219) | def get_dataset(self): method __len__ (line 224) | def __len__(self): method __getitem__ (line 227) | def __getitem__(self, i) -> InputFeatures: class DataProcessor (line 231) | class DataProcessor: method get_train_examples (line 234) | def get_train_examples(self, data_dir): method get_dev_examples (line 238) | def get_dev_examples(self, data_dir): method get_test_examples (line 242) | def get_test_examples(self, data_dir): method get_labels (line 246) | def get_labels(self): class RaceProcessor (line 251) | class RaceProcessor(DataProcessor): method get_train_examples (line 254) | def get_train_examples(self, data_dir): method get_dev_examples (line 263) | def get_dev_examples(self, data_dir): method get_test_examples (line 272) | def get_test_examples(self, data_dir): method get_labels (line 281) | def get_labels(self): method _read_txt (line 285) | def _read_txt(self, input_dir): method _create_examples (line 295) | def _create_examples(self, lines, set_type): class SynonymProcessor (line 318) | class SynonymProcessor(DataProcessor): method get_train_examples (line 321) | def get_train_examples(self, data_dir): method get_dev_examples (line 326) | def get_dev_examples(self, data_dir): method get_test_examples (line 331) | def get_test_examples(self, data_dir): method get_labels (line 337) | def get_labels(self): method _read_csv (line 341) | def _read_csv(self, input_file): method _create_examples (line 345) | def _create_examples(self, lines: List[List[str]], type: str): class SwagProcessor (line 364) | class SwagProcessor(DataProcessor): method get_train_examples (line 367) | def get_train_examples(self, data_dir): method get_dev_examples (line 372) | def get_dev_examples(self, data_dir): method get_test_examples (line 377) | def get_test_examples(self, data_dir): method get_labels (line 386) | def get_labels(self): method _read_csv (line 390) | def _read_csv(self, input_file): method _create_examples (line 394) | def _create_examples(self, lines: List[List[str]], type: str): class ArcProcessor (line 415) | class ArcProcessor(DataProcessor): method get_train_examples (line 418) | def get_train_examples(self, data_dir): method get_dev_examples (line 423) | def get_dev_examples(self, data_dir): method get_test_examples (line 428) | def get_test_examples(self, data_dir): method get_labels (line 432) | def get_labels(self): method _read_json (line 436) | def _read_json(self, input_file): method _create_examples (line 441) | def _create_examples(self, lines, type): function convert_examples_to_features (line 506) | def convert_examples_to_features( FILE: mplsandbox_for_rl/transformers/examples/legacy/pytorch-lightning/lightning_base.py class BaseTransformer (line 63) | class BaseTransformer(pl.LightningModule): method __init__ (line 64) | def __init__( method load_hf_checkpoint (line 118) | def load_hf_checkpoint(self, *args, **kwargs): method get_lr_scheduler (line 121) | def get_lr_scheduler(self): method configure_optimizers (line 129) | def configure_optimizers(self): method test_step (line 158) | def test_step(self, batch, batch_nb): method test_epoch_end (line 161) | def test_epoch_end(self, outputs): method total_steps (line 164) | def total_steps(self) -> int: method setup (line 170) | def setup(self, mode): method get_dataloader (line 177) | def get_dataloader(self, type_path: str, batch_size: int, shuffle: boo... method train_dataloader (line 180) | def train_dataloader(self): method val_dataloader (line 183) | def val_dataloader(self): method test_dataloader (line 186) | def test_dataloader(self): method _feature_file (line 189) | def _feature_file(self, mode): method on_save_checkpoint (line 200) | def on_save_checkpoint(self, checkpoint: Dict[str, Any]) -> None: method add_model_specific_args (line 207) | def add_model_specific_args(parser, root_dir): class LoggingCallback (line 269) | class LoggingCallback(pl.Callback): method on_batch_end (line 270) | def on_batch_end(self, trainer, pl_module): method on_validation_end (line 275) | def on_validation_end(self, trainer: pl.Trainer, pl_module: pl.Lightni... method on_test_end (line 283) | def on_test_end(self, trainer: pl.Trainer, pl_module: pl.LightningModu... function add_generic_args (line 295) | def add_generic_args(parser, root_dir) -> None: function generic_train (line 341) | def generic_train( FILE: mplsandbox_for_rl/transformers/examples/legacy/pytorch-lightning/run_glue.py class GLUETransformer (line 22) | class GLUETransformer(BaseTransformer): method __init__ (line 25) | def __init__(self, hparams): method forward (line 33) | def forward(self, **inputs): method training_step (line 36) | def training_step(self, batch, batch_idx): method prepare_data (line 49) | def prepare_data(self): method get_dataloader (line 76) | def get_dataloader(self, mode: str, batch_size: int, shuffle: bool = F... method validation_step (line 99) | def validation_step(self, batch, batch_idx): method _eval_end (line 112) | def _eval_end(self, outputs) -> tuple: method validation_epoch_end (line 131) | def validation_epoch_end(self, outputs: list) -> dict: method test_epoch_end (line 136) | def test_epoch_end(self, outputs) -> dict: method add_model_specific_args (line 143) | def add_model_specific_args(parser, root_dir): function main (line 176) | def main(): FILE: mplsandbox_for_rl/transformers/examples/legacy/pytorch-lightning/run_ner.py class NERTransformer (line 20) | class NERTransformer(BaseTransformer): method __init__ (line 27) | def __init__(self, hparams): method forward (line 43) | def forward(self, **inputs): method training_step (line 46) | def training_step(self, batch, batch_num): method prepare_data (line 59) | def prepare_data(self): method get_dataloader (line 88) | def get_dataloader(self, mode: int, batch_size: int, shuffle: bool = F... method validation_step (line 105) | def validation_step(self, batch, batch_nb): method _eval_end (line 118) | def _eval_end(self, outputs): method validation_epoch_end (line 147) | def validation_epoch_end(self, outputs): method test_epoch_end (line 153) | def test_epoch_end(self, outputs): method add_model_specific_args (line 165) | def add_model_specific_args(parser, root_dir): FILE: mplsandbox_for_rl/transformers/examples/legacy/question-answering/run_squad.py function set_seed (line 63) | def set_seed(args): function to_list (line 71) | def to_list(tensor): function train (line 75) | def train(args, train_dataset, model, tokenizer): function evaluate (line 268) | def evaluate(args, model, tokenizer, prefix=""): function load_and_cache_examples (line 402) | def load_and_cache_examples(args, tokenizer, evaluate=False, output_exam... function main (line 472) | def main(): FILE: mplsandbox_for_rl/transformers/examples/legacy/question-answering/run_squad_trainer.py class ModelArguments (line 43) | class ModelArguments: function main (line 66) | def main(): function _mp_fn (line 180) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/legacy/run_camembert.py function fill_mask (line 7) | def fill_mask(masked_input, model, tokenizer, topk=5): FILE: mplsandbox_for_rl/transformers/examples/legacy/run_chinese_ref.py function _is_chinese_char (line 11) | def _is_chinese_char(cp): function is_chinese (line 36) | def is_chinese(word: str): function get_chinese_word (line 45) | def get_chinese_word(tokens: List[str]): function add_sub_symbol (line 56) | def add_sub_symbol(bert_tokens: List[str], chinese_word_set: set()): function prepare_ref (line 80) | def prepare_ref(lines: List[str], ltp_tokenizer: LTP, bert_tokenizer: Be... function main (line 117) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/legacy/run_language_modeling.py class ModelArguments (line 62) | class ModelArguments: class DataTrainingArguments (line 93) | class DataTrainingArguments: function get_dataset (line 162) | def get_dataset( function main (line 198) | def main(): function _mp_fn (line 368) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/legacy/run_openai_gpt.py function accuracy (line 59) | def accuracy(out, labels): function load_rocstories_dataset (line 64) | def load_rocstories_dataset(dataset_path): function pre_process_datasets (line 75) | def pre_process_datasets(encoded_datasets, input_len, cap_length, start_... function main (line 106) | def main(): FILE: mplsandbox_for_rl/transformers/examples/legacy/run_swag.py class SwagExample (line 55) | class SwagExample(object): method __init__ (line 58) | def __init__(self, swag_id, context_sentence, start_ending, ending_0, ... method __str__ (line 70) | def __str__(self): method __repr__ (line 73) | def __repr__(self): class InputFeatures (line 90) | class InputFeatures(object): method __init__ (line 91) | def __init__(self, example_id, choices_features, label): function read_swag_examples (line 100) | def read_swag_examples(input_file, is_training=True): function convert_examples_to_features (line 126) | def convert_examples_to_features(examples, tokenizer, max_seq_length, is... function _truncate_seq_pair (line 198) | def _truncate_seq_pair(tokens_a, tokens_b, max_length): function accuracy (line 215) | def accuracy(out, labels): function select_field (line 220) | def select_field(features, field): function set_seed (line 224) | def set_seed(args): function load_and_cache_examples (line 232) | def load_and_cache_examples(args, tokenizer, evaluate=False, output_exam... function train (line 277) | def train(args, train_dataset, model, tokenizer): function evaluate (line 415) | def evaluate(args, model, tokenizer, prefix=""): function main (line 475) | def main(): FILE: mplsandbox_for_rl/transformers/examples/legacy/run_transfo_xl.py function main (line 40) | def main(): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/convert_model_to_fp16.py function convert (line 23) | def convert(src_path: str, map_location: str = "cpu", save_path: Union[s... FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/download_wmt.py function download_wmt_dataset (line 22) | def download_wmt_dataset(src_lang="ro", tgt_lang="en", dataset="wmt16", ... FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/finetune_trainer.py class ModelArguments (line 56) | class ModelArguments: class DataTrainingArguments (line 79) | class DataTrainingArguments: function handle_metrics (line 141) | def handle_metrics(split, metrics, output_dir): function main (line 157) | def main(): function _mp_fn (line 369) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/minify_dataset.py function minify (line 21) | def minify(src_dir: str, dest_dir: str, n: int): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/old_test_calculate_rouge.py function test_disaggregated_scores_are_determinstic (line 52) | def test_disaggregated_scores_are_determinstic(): function test_newline_cnn_improvement (line 62) | def test_newline_cnn_improvement(): function test_newline_irrelevant_for_other_metrics (line 69) | def test_newline_irrelevant_for_other_metrics(): function test_single_sent_scores_dont_depend_on_newline_sep (line 76) | def test_single_sent_scores_dont_depend_on_newline_sep(): function test_pegasus_newline (line 89) | def test_pegasus_newline(): function test_rouge_cli (line 102) | def test_rouge_cli(): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/old_test_datasets.py function _dump_articles (line 41) | def _dump_articles(path: Path, articles: list): function make_test_data_dir (line 46) | def make_test_data_dir(tmp_dir): class TestAll (line 53) | class TestAll(TestCasePlus): method test_seq2seq_dataset_truncation (line 64) | def test_seq2seq_dataset_truncation(self, tok_name): method test_legacy_dataset_truncation (line 103) | def test_legacy_dataset_truncation(self, tok): method test_pack_dataset (line 127) | def test_pack_dataset(self): method test_dynamic_batch_size (line 145) | def test_dynamic_batch_size(self): method test_sortish_sampler_reduces_padding (line 169) | def test_sortish_sampler_reduces_padding(self): method _get_dataset (line 186) | def _get_dataset(self, n_obs=1000, max_len=128): method test_distributed_sortish_sampler_splits_indices_between_procs (line 208) | def test_distributed_sortish_sampler_splits_indices_between_procs(self): method test_dataset_kwargs (line 223) | def test_dataset_kwargs(self, tok_name): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/old_test_fsmt_bleu_score.py class ModelEvalTester (line 33) | class ModelEvalTester(unittest.TestCase): method get_tokenizer (line 34) | def get_tokenizer(self, mname): method get_model (line 37) | def get_model(self, mname): method test_bleu_scores (line 52) | def test_bleu_scores(self, pair, min_bleu_score): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/old_test_seq2seq_examples.py function _dump_articles (line 33) | def _dump_articles(path: Path, articles: list): class TestTheRest (line 47) | class TestTheRest(TestCasePlus): method run_eval_tester (line 48) | def run_eval_tester(self, model): method test_run_eval (line 75) | def test_run_eval(self): method test_run_eval_slow (line 81) | def test_run_eval_slow(self, model): method test_run_eval_search (line 87) | def test_run_eval_search(self, model): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/old_test_seq2seq_examples_multi_gpu.py class TestSummarizationDistillerMultiGPU (line 25) | class TestSummarizationDistillerMultiGPU(TestCasePlus): method setUpClass (line 27) | def setUpClass(cls): method test_distributed_eval (line 32) | def test_distributed_eval(self): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/old_test_tatoeba_conversion.py class TatoebaConversionTester (line 25) | class TatoebaConversionTester(unittest.TestCase): method resolver (line 27) | def resolver(self): method test_resolver (line 32) | def test_resolver(self): method test_model_card (line 36) | def test_model_card(self): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/pack_dataset.py function pack_examples (line 31) | def pack_examples(tok, src_examples, tgt_examples, max_tokens=1024): function pack_data_dir (line 58) | def pack_data_dir(tok, data_dir: Path, max_tokens, save_path): function packer_cli (line 75) | def packer_cli(): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/rouge_cli.py function calculate_rouge_path (line 20) | def calculate_rouge_path(pred_path, tgt_path, save_path=None, **kwargs): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/run_distributed_eval.py function eval_data_dir (line 46) | def eval_data_dir( function run_generate (line 119) | def run_generate(): function combine_partial_results (line 230) | def combine_partial_results(partial_results) -> List: function gather_results_from_each_node (line 240) | def gather_results_from_each_node(num_replicas, save_dir, timeout) -> Li... FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/run_eval.py function generate_summaries_or_translations (line 38) | def generate_summaries_or_translations( function datetime_now (line 82) | def datetime_now(): function run_generate (line 86) | def run_generate(verbose=True): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/run_eval_search.py function parse_search_arg (line 35) | def parse_search_arg(search): function run_search (line 44) | def run_search(): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/save_len_file.py function save_len_file (line 24) | def save_len_file( FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/save_randomly_initialized_model.py function save_randomly_initialized_version (line 21) | def save_randomly_initialized_version(config_name: str, save_dir: str, *... FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/sentence_splitter.py function add_newline_to_end_of_each_sentence (line 31) | def add_newline_to_end_of_each_sentence(x: str) -> str: FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/seq2seq_trainer.py class Seq2SeqTrainer (line 50) | class Seq2SeqTrainer(Trainer): method __init__ (line 51) | def __init__(self, config=None, data_args=None, *args, **kwargs): method create_optimizer_and_scheduler (line 86) | def create_optimizer_and_scheduler(self, num_training_steps: int): method _get_lr_scheduler (line 123) | def _get_lr_scheduler(self, num_training_steps): method _get_train_sampler (line 135) | def _get_train_sampler(self) -> Optional[torch.utils.data.Sampler]: method _compute_loss (line 153) | def _compute_loss(self, model, inputs, labels): method compute_loss (line 169) | def compute_loss(self, model, inputs): method prediction_step (line 174) | def prediction_step( method _pad_tensors_to_max_len (line 236) | def _pad_tensors_to_max_len(self, tensor, max_length): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/seq2seq_training_args.py class Seq2SeqTrainingArguments (line 28) | class Seq2SeqTrainingArguments(TrainingArguments): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/test_data/fsmt/build-eval-data.py function get_all_data (line 18) | def get_all_data(pairs, n_objs): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/utils.py function label_smoothed_nll_loss (line 49) | def label_smoothed_nll_loss(lprobs, target, epsilon, ignore_index=-100): function lmap (line 70) | def lmap(f: Callable, x: Iterable) -> List: function calculate_bleu (line 75) | def calculate_bleu(output_lns, refs_lns, **kwargs) -> dict: function build_compute_metrics_fn (line 80) | def build_compute_metrics_fn(task_name: str, tokenizer: PreTrainedTokeni... function trim_batch (line 112) | def trim_batch( class AbstractSeq2SeqDataset (line 125) | class AbstractSeq2SeqDataset(Dataset): method __init__ (line 126) | def __init__( method __len__ (line 159) | def __len__(self): method get_char_lens (line 163) | def get_char_lens(data_file): method tgt_lens (line 167) | def tgt_lens(self): method make_sortish_sampler (line 171) | def make_sortish_sampler(self, batch_size, distributed=False, shuffle=... method make_dynamic_sampler (line 177) | def make_dynamic_sampler(self, max_tokens_per_batch=1024, **kwargs): method __getitem__ (line 202) | def __getitem__(self, item): method collate_fn (line 205) | def collate_fn(self, batch): class LegacySeq2SeqDataset (line 209) | class LegacySeq2SeqDataset(AbstractSeq2SeqDataset): method __getitem__ (line 210) | def __getitem__(self, index) -> Dict[str, torch.Tensor]: method encode_line (line 229) | def encode_line(self, tokenizer, line, max_length, pad_to_max_length=T... method collate_fn (line 240) | def collate_fn(self, batch) -> Dict[str, torch.Tensor]: class Seq2SeqDataset (line 255) | class Seq2SeqDataset(AbstractSeq2SeqDataset): method __getitem__ (line 258) | def __getitem__(self, index) -> Dict[str, str]: method collate_fn (line 266) | def collate_fn(self, batch) -> Dict[str, torch.Tensor]: class Seq2SeqDataCollator (line 280) | class Seq2SeqDataCollator: method __init__ (line 281) | def __init__(self, tokenizer, data_args, decoder_start_token_id, tpu_n... method __call__ (line 296) | def __call__(self, batch) -> Dict[str, torch.Tensor]: method _shift_right_t5 (line 325) | def _shift_right_t5(self, input_ids): method _encode (line 332) | def _encode(self, batch) -> Dict[str, torch.Tensor]: class SortishSampler (line 345) | class SortishSampler(Sampler): method __init__ (line 348) | def __init__(self, data, batch_size, shuffle=True): method __len__ (line 351) | def __len__(self) -> int: method __iter__ (line 354) | def __iter__(self): function sortish_sampler_indices (line 358) | def sortish_sampler_indices(data: List, bs: int, shuffle=True) -> np.array: class DistributedSortishSampler (line 379) | class DistributedSortishSampler(Sampler): method __init__ (line 382) | def __init__(self, dataset, batch_size, num_replicas=None, rank=None, ... method __iter__ (line 405) | def __iter__(self) -> Iterable: method available_indices (line 416) | def available_indices(self) -> np.array: method __len__ (line 425) | def __len__(self): method set_epoch (line 428) | def set_epoch(self, epoch): function use_task_specific_params (line 435) | def use_task_specific_params(model, task): function pickle_load (line 446) | def pickle_load(path): function pickle_save (line 452) | def pickle_save(obj, path): function flatten_list (line 458) | def flatten_list(summary_ids: List[List]): function save_git_info (line 462) | def save_git_info(folder_path: str) -> None: function save_json (line 468) | def save_json(content, path, indent=4, **json_dump_kwargs): function load_json (line 473) | def load_json(path): function get_git_info (line 478) | def get_git_info(): function extract_rouge_mid_statistics (line 500) | def extract_rouge_mid_statistics(dct): function calculate_rouge (line 508) | def calculate_rouge( function freeze_params (line 559) | def freeze_params(model: nn.Module): function freeze_embeds (line 565) | def freeze_embeds(model): function grad_status (line 584) | def grad_status(model: nn.Module) -> Iterable: function any_requires_grad (line 588) | def any_requires_grad(model: nn.Module) -> bool: function assert_all_frozen (line 592) | def assert_all_frozen(model): function assert_not_all_frozen (line 599) | def assert_not_all_frozen(model): function parse_numeric_n_bool_cl_kwargs (line 605) | def parse_numeric_n_bool_cl_kwargs(unparsed_args: List[str]) -> Dict[str... function write_txt_file (line 630) | def write_txt_file(ordered_tgt, path): function chunks (line 637) | def chunks(lst, n): function check_output_dir (line 643) | def check_output_dir(args, expected_items=0): FILE: mplsandbox_for_rl/transformers/examples/legacy/seq2seq/xla_spawn.py function parse_args (line 34) | def parse_args(): function main (line 66) | def main(): FILE: mplsandbox_for_rl/transformers/examples/legacy/token-classification/run_ner.py class ModelArguments (line 49) | class ModelArguments: class DataTrainingArguments (line 76) | class DataTrainingArguments: function main (line 102) | def main(): function _mp_fn (line 319) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/legacy/token-classification/tasks.py class NER (line 12) | class NER(TokenClassificationTask): method __init__ (line 13) | def __init__(self, label_idx=-1): method read_examples_from_file (line 17) | def read_examples_from_file(self, data_dir, mode: Union[Split, str]) -... method write_predictions_to_file (line 45) | def write_predictions_to_file(self, writer: TextIO, test_input_reader:... method get_labels (line 58) | def get_labels(self, path: str) -> List[str]: class Chunk (line 69) | class Chunk(NER): method __init__ (line 70) | def __init__(self): method get_labels (line 74) | def get_labels(self, path: str) -> List[str]: class POS (line 107) | class POS(TokenClassificationTask): method read_examples_from_file (line 108) | def read_examples_from_file(self, data_dir, mode: Union[Split, str]) -... method write_predictions_to_file (line 128) | def write_predictions_to_file(self, writer: TextIO, test_input_reader:... method get_labels (line 139) | def get_labels(self, path: str) -> List[str]: FILE: mplsandbox_for_rl/transformers/examples/legacy/token-classification/utils_ner.py class InputExample (line 33) | class InputExample: class InputFeatures (line 50) | class InputFeatures: class Split (line 62) | class Split(Enum): class TokenClassificationTask (line 68) | class TokenClassificationTask: method read_examples_from_file (line 70) | def read_examples_from_file(data_dir, mode: Union[Split, str]) -> List... method get_labels (line 74) | def get_labels(path: str) -> List[str]: method convert_examples_to_features (line 78) | def convert_examples_to_features( class TokenClassificationDataset (line 211) | class TokenClassificationDataset(Dataset): method __init__ (line 222) | def __init__( method __len__ (line 270) | def __len__(self): method __getitem__ (line 273) | def __getitem__(self, i) -> InputFeatures: class TFTokenClassificationDataset (line 280) | class TFTokenClassificationDataset: method __init__ (line 291) | def __init__( method get_dataset (line 362) | def get_dataset(self): method __len__ (line 367) | def __len__(self): method __getitem__ (line 370) | def __getitem__(self, i) -> InputFeatures: FILE: mplsandbox_for_rl/transformers/examples/pytorch/audio-classification/run_audio_classification.py function random_subsample (line 53) | def random_subsample(wav: np.ndarray, max_length: float, sample_rate: in... class DataTrainingArguments (line 63) | class DataTrainingArguments: class ModelArguments (line 127) | class ModelArguments: method __post_init__ (line 182) | def __post_init__(self): function main (line 198) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/conftest.py function pytest_addoption (line 34) | def pytest_addoption(parser): function pytest_terminal_summary (line 40) | def pytest_terminal_summary(terminalreporter): FILE: mplsandbox_for_rl/transformers/examples/pytorch/contrastive-image-text/run_clip.py class ModelArguments (line 63) | class ModelArguments: class DataTrainingArguments (line 117) | class DataTrainingArguments: method __post_init__ (line 183) | def __post_init__(self): class Transform (line 205) | class Transform(torch.nn.Module): method __init__ (line 206) | def __init__(self, image_size, mean, std): method forward (line 215) | def forward(self, x) -> torch.Tensor: function collate_fn (line 222) | def collate_fn(examples): function main (line 234) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/image-classification/run_image_classification.py function pil_loader (line 67) | def pil_loader(path: str): class DataTrainingArguments (line 74) | class DataTrainingArguments: method __post_init__ (line 122) | def __post_init__(self): class ModelArguments (line 130) | class ModelArguments: function main (line 179) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/image-classification/run_image_classification_no_trainer.py function parse_args (line 59) | def parse_args(): function main (line 222) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/image-pretraining/run_mae.py class DataTrainingArguments (line 52) | class DataTrainingArguments: method __post_init__ (line 103) | def __post_init__(self): class ModelArguments (line 113) | class ModelArguments: class CustomTrainingArguments (line 164) | class CustomTrainingArguments(TrainingArguments): function collate_fn (line 170) | def collate_fn(examples): function main (line 175) | def main(): function _mp_fn (line 402) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/image-pretraining/run_mim.py class DataTrainingArguments (line 60) | class DataTrainingArguments: method __post_init__ (line 106) | def __post_init__(self): class ModelArguments (line 116) | class ModelArguments: class MaskGenerator (line 197) | class MaskGenerator: method __init__ (line 205) | def __init__(self, input_size=192, mask_patch_size=32, model_patch_siz... method __call__ (line 222) | def __call__(self): function collate_fn (line 233) | def collate_fn(examples): function main (line 239) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/image-pretraining/run_mim_no_trainer.py function parse_args (line 64) | def parse_args(): class MaskGenerator (line 334) | class MaskGenerator: method __init__ (line 342) | def __init__(self, input_size=192, mask_patch_size=32, model_patch_siz... method __call__ (line 359) | def __call__(self): function collate_fn (line 370) | def collate_fn(examples): function main (line 376) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/instance-segmentation/run_instance_segmentation.py class Arguments (line 55) | class Arguments: function augment_and_transform_batch (line 103) | def augment_and_transform_batch( function collate_fn (line 144) | def collate_fn(examples): class ModelOutput (line 155) | class ModelOutput: function nested_cpu (line 160) | def nested_cpu(tensors): class Evaluator (line 171) | class Evaluator: method __init__ (line 176) | def __init__( method get_metric (line 196) | def get_metric(self): method reset_metric (line 200) | def reset_metric(self): method postprocess_target_batch (line 203) | def postprocess_target_batch(self, target_batch) -> List[Dict[str, tor... method get_target_sizes (line 217) | def get_target_sizes(self, post_processed_targets) -> List[List[int]]: method postprocess_prediction_batch (line 223) | def postprocess_prediction_batch(self, prediction_batch, target_sizes)... method __call__ (line 254) | def __call__(self, evaluation_results: EvalPrediction, compute_result:... function setup_logging (line 300) | def setup_logging(training_args: TrainingArguments) -> None: function find_last_checkpoint (line 320) | def find_last_checkpoint(training_args: TrainingArguments) -> Optional[s... function main (line 342) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/instance-segmentation/run_instance_segmentation_no_trainer.py function parse_args (line 60) | def parse_args(): function augment_and_transform_batch (line 221) | def augment_and_transform_batch( function collate_fn (line 262) | def collate_fn(examples): function nested_cpu (line 272) | def nested_cpu(tensors): function evaluation_loop (line 283) | def evaluation_loop(model, image_processor, accelerator: Accelerator, da... function setup_logging (line 358) | def setup_logging(accelerator: Accelerator) -> None: function handle_repository_creation (line 376) | def handle_repository_creation(accelerator: Accelerator, args: argparse.... function main (line 402) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/language-modeling/run_clm.py class ModelArguments (line 70) | class ModelArguments: method __post_init__ (line 153) | def __post_init__(self): class DataTrainingArguments (line 161) | class DataTrainingArguments: method __post_init__ (line 223) | def __post_init__(self): function main (line 238) | def main(): function _mp_fn (line 651) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/language-modeling/run_clm_no_trainer.py function parse_args (line 70) | def parse_args(): function main (line 262) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/language-modeling/run_fim.py class ModelArguments (line 73) | class ModelArguments: method __post_init__ (line 168) | def __post_init__(self): class DataTrainingArguments (line 176) | class DataTrainingArguments: method __post_init__ (line 290) | def __post_init__(self): function main (line 305) | def main(): function _mp_fn (line 858) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/language-modeling/run_fim_no_trainer.py function parse_args (line 73) | def parse_args(): function main (line 324) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/language-modeling/run_mlm.py class ModelArguments (line 67) | class ModelArguments: method __post_init__ (line 150) | def __post_init__(self): class DataTrainingArguments (line 158) | class DataTrainingArguments: method __post_init__ (line 232) | def __post_init__(self): function main (line 249) | def main(): function _mp_fn (line 685) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/language-modeling/run_mlm_no_trainer.py function parse_args (line 68) | def parse_args(): function main (line 269) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/language-modeling/run_plm.py class ModelArguments (line 58) | class ModelArguments: method __post_init__ (line 117) | def __post_init__(self): class DataTrainingArguments (line 125) | class DataTrainingArguments: method __post_init__ (line 217) | def __post_init__(self): function main (line 229) | def main(): function _mp_fn (line 578) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/multiple-choice/run_swag.py class ModelArguments (line 56) | class ModelArguments: class DataTrainingArguments (line 104) | class DataTrainingArguments: method __post_init__ (line 159) | def __post_init__(self): class DataCollatorForMultipleChoice (line 169) | class DataCollatorForMultipleChoice: method __call__ (line 200) | def __call__(self, features): function main (line 225) | def main(): function _mp_fn (line 494) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/multiple-choice/run_swag_no_trainer.py function parse_args (line 67) | def parse_args(): class DataCollatorForMultipleChoice (line 230) | class DataCollatorForMultipleChoice: method __call__ (line 261) | def __call__(self, features): function main (line 286) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/object-detection/run_object_detection.py class ModelOutput (line 57) | class ModelOutput: function format_image_annotations_as_coco (line 62) | def format_image_annotations_as_coco( function convert_bbox_yolo_to_pascal (line 97) | def convert_bbox_yolo_to_pascal(boxes: torch.Tensor, image_size: Tuple[i... function augment_and_transform_batch (line 119) | def augment_and_transform_batch( function collate_fn (line 151) | def collate_fn(batch: List[BatchFeature]) -> Mapping[str, Union[torch.Te... function compute_metrics (line 161) | def compute_metrics( class DataTrainingArguments (line 233) | class DataTrainingArguments: class ModelArguments (line 277) | class ModelArguments: function main (line 324) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/object-detection/run_object_detection_no_trainer.py function format_image_annotations_as_coco (line 63) | def format_image_annotations_as_coco( function convert_bbox_yolo_to_pascal (line 99) | def convert_bbox_yolo_to_pascal(boxes: torch.Tensor, image_size: Tuple[i... function augment_and_transform_batch (line 122) | def augment_and_transform_batch( function collate_fn (line 155) | def collate_fn(batch: List[BatchFeature]) -> Mapping[str, Union[torch.Te... function nested_to_cpu (line 164) | def nested_to_cpu(objects): function evaluation_loop (line 177) | def evaluation_loop( function parse_args (line 228) | def parse_args(): function main (line 393) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/old_test_xla_examples.py function get_results (line 32) | def get_results(output_dir): class TorchXLAExamplesTests (line 48) | class TorchXLAExamplesTests(TestCasePlus): method test_run_glue (line 49) | def test_run_glue(self): method test_trainer_tpu (line 85) | def test_trainer_tpu(self): FILE: mplsandbox_for_rl/transformers/examples/pytorch/question-answering/run_qa.py class ModelArguments (line 61) | class ModelArguments: class DataTrainingArguments (line 105) | class DataTrainingArguments: method __post_init__ (line 208) | def __post_init__(self): function main (line 228) | def main(): function _mp_fn (line 709) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/question-answering/run_qa_beam_search.py class ModelArguments (line 59) | class ModelArguments: class DataTrainingArguments (line 93) | class DataTrainingArguments: method __post_init__ (line 206) | def __post_init__(self): function main (line 226) | def main(): function _mp_fn (line 736) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/question-answering/run_qa_beam_search_no_trainer.py function save_prefixed_metrics (line 66) | def save_prefixed_metrics(results, output_dir, file_name: str = "all_res... function parse_args (line 89) | def parse_args(): function main (line 301) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/question-answering/run_qa_no_trainer.py function save_prefixed_metrics (line 70) | def save_prefixed_metrics(results, output_dir, file_name: str = "all_res... function parse_args (line 93) | def parse_args(): function main (line 339) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/question-answering/run_seq2seq_qa.py class ModelArguments (line 57) | class ModelArguments: class DataTrainingArguments (line 105) | class DataTrainingArguments: method __post_init__ (line 246) | def __post_init__(self): function main (line 273) | def main(): function _mp_fn (line 737) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/question-answering/trainer_qa.py class QuestionAnsweringTrainer (line 31) | class QuestionAnsweringTrainer(Trainer): method __init__ (line 32) | def __init__(self, *args, eval_examples=None, post_process_function=No... method evaluate (line 37) | def evaluate(self, eval_dataset=None, eval_examples=None, ignore_keys=... method predict (line 94) | def predict(self, predict_dataset, predict_examples, ignore_keys=None,... FILE: mplsandbox_for_rl/transformers/examples/pytorch/question-answering/trainer_seq2seq_qa.py class QuestionAnsweringSeq2SeqTrainer (line 34) | class QuestionAnsweringSeq2SeqTrainer(Seq2SeqTrainer): method __init__ (line 35) | def __init__(self, *args, eval_examples=None, post_process_function=No... method evaluate (line 41) | def evaluate( method predict (line 117) | def predict( FILE: mplsandbox_for_rl/transformers/examples/pytorch/question-answering/utils_qa.py function postprocess_qa_predictions (line 32) | def postprocess_qa_predictions( function postprocess_qa_predictions_with_beam_search (line 253) | def postprocess_qa_predictions_with_beam_search( FILE: mplsandbox_for_rl/transformers/examples/pytorch/semantic-segmentation/run_semantic_segmentation.py function reduce_labels_transform (line 59) | def reduce_labels_transform(labels: np.ndarray, **kwargs) -> np.ndarray: class DataTrainingArguments (line 75) | class DataTrainingArguments: method __post_init__ (line 121) | def __post_init__(self): class ModelArguments (line 135) | class ModelArguments: function main (line 176) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py function reduce_labels_transform (line 60) | def reduce_labels_transform(labels: np.ndarray, **kwargs) -> np.ndarray: function parse_args (line 75) | def parse_args(): function main (line 241) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/speech-pretraining/run_wav2vec2_pretraining_no_trainer.py function parse_args (line 52) | def parse_args(): class DataCollatorForWav2Vec2Pretraining (line 289) | class DataCollatorForWav2Vec2Pretraining: method __call__ (line 332) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function multiply_grads (line 377) | def multiply_grads(params, c): function get_grad_norm (line 386) | def get_grad_norm(params, scale=1): function main (line 397) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py function list_field (line 61) | def list_field(default=None, metadata=None): class ModelArguments (line 66) | class ModelArguments: class DataTrainingArguments (line 151) | class DataTrainingArguments: class DataCollatorCTCWithPadding (line 290) | class DataCollatorCTCWithPadding: method __call__ (line 321) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function create_vocabulary_from_data (line 353) | def create_vocabulary_from_data( function main (line 395) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/speech-recognition/run_speech_recognition_ctc_adapter.py function list_field (line 64) | def list_field(default=None, metadata=None): class ModelArguments (line 69) | class ModelArguments: class DataTrainingArguments (line 130) | class DataTrainingArguments: class DataCollatorCTCWithPadding (line 273) | class DataCollatorCTCWithPadding: method __call__ (line 303) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function create_vocabulary_from_data (line 333) | def create_vocabulary_from_data( function main (line 375) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py class ModelArguments (line 59) | class ModelArguments: class DataTrainingArguments (line 135) | class DataTrainingArguments: class DataCollatorSpeechSeq2SeqWithPadding (line 234) | class DataCollatorSpeechSeq2SeqWithPadding: method __call__ (line 250) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function main (line 277) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/summarization/run_summarization.py class ModelArguments (line 76) | class ModelArguments: class DataTrainingArguments (line 133) | class DataTrainingArguments: method __post_init__ (line 274) | def __post_init__(self): function main (line 312) | def main(): function _mp_fn (line 767) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/summarization/run_summarization_no_trainer.py function parse_args (line 93) | def parse_args(): function main (line 324) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/test_accelerate_examples.py function get_setup_file (line 43) | def get_setup_file(): function get_results (line 50) | def get_results(output_dir): class ExamplesTestsNoTrainer (line 65) | class ExamplesTestsNoTrainer(TestCasePlus): method setUpClass (line 67) | def setUpClass(cls): method tearDownClass (line 75) | def tearDownClass(cls): method test_run_glue_no_trainer (line 79) | def test_run_glue_no_trainer(self): method test_run_clm_no_trainer (line 104) | def test_run_clm_no_trainer(self): method test_run_mlm_no_trainer (line 132) | def test_run_mlm_no_trainer(self): method test_run_ner_no_trainer (line 152) | def test_run_ner_no_trainer(self): method test_run_squad_no_trainer (line 180) | def test_run_squad_no_trainer(self): method test_run_swag_no_trainer (line 208) | def test_run_swag_no_trainer(self): method test_run_summarization_no_trainer (line 231) | def test_run_summarization_no_trainer(self): method test_run_translation_no_trainer (line 259) | def test_run_translation_no_trainer(self): method test_run_semantic_segmentation_no_trainer (line 288) | def test_run_semantic_segmentation_no_trainer(self): method test_run_image_classification_no_trainer (line 310) | def test_run_image_classification_no_trainer(self): method test_run_object_detection_no_trainer (line 338) | def test_run_object_detection_no_trainer(self): method test_run_instance_segmentation_no_trainer (line 362) | def test_run_instance_segmentation_no_trainer(self): FILE: mplsandbox_for_rl/transformers/examples/pytorch/test_pytorch_examples.py function get_results (line 86) | def get_results(output_dir): class ExamplesTests (line 101) | class ExamplesTests(TestCasePlus): method test_run_glue (line 102) | def test_run_glue(self): method test_run_clm (line 130) | def test_run_clm(self): method test_run_clm_config_overrides (line 159) | def test_run_clm_config_overrides(self): method test_run_mlm (line 184) | def test_run_mlm(self): method test_run_ner (line 207) | def test_run_ner(self): method test_run_squad (line 238) | def test_run_squad(self): method test_run_squad_seq2seq (line 263) | def test_run_squad_seq2seq(self): method test_run_swag (line 292) | def test_run_swag(self): method test_generation (line 315) | def test_generation(self): method test_run_summarization (line 330) | def test_run_summarization(self): method test_run_translation (line 358) | def test_run_translation(self): method test_run_image_classification (line 387) | def test_run_image_classification(self): method test_run_speech_recognition_ctc (line 418) | def test_run_speech_recognition_ctc(self): method test_run_speech_recognition_ctc_adapter (line 449) | def test_run_speech_recognition_ctc_adapter(self): method test_run_speech_recognition_seq2seq (line 482) | def test_run_speech_recognition_seq2seq(self): method test_run_audio_classification (line 513) | def test_run_audio_classification(self): method test_run_wav2vec2_pretraining (line 546) | def test_run_wav2vec2_pretraining(self): method test_run_vit_mae_pretraining (line 570) | def test_run_vit_mae_pretraining(self): method test_run_semantic_segmentation (line 599) | def test_run_semantic_segmentation(self): method test_run_object_detection (line 625) | def test_run_object_detection(self): method test_run_instance_segmentation (line 653) | def test_run_instance_segmentation(self): FILE: mplsandbox_for_rl/transformers/examples/pytorch/text-classification/run_classification.py class DataTrainingArguments (line 59) | class DataTrainingArguments: method __post_init__ (line 194) | def __post_init__(self): class ModelArguments (line 208) | class ModelArguments: function get_label_list (line 259) | def get_label_list(raw_dataset, split="train") -> List[str]: function main (line 272) | def main(): function _mp_fn (line 747) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/text-classification/run_glue.py class DataTrainingArguments (line 71) | class DataTrainingArguments: method __post_init__ (line 146) | def __post_init__(self): class ModelArguments (line 165) | class ModelArguments: function main (line 216) | def main(): function _mp_fn (line 631) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/text-classification/run_glue_no_trainer.py function parse_args (line 71) | def parse_args(): function main (line 221) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/text-classification/run_xnli.py class DataTrainingArguments (line 59) | class DataTrainingArguments: class ModelArguments (line 119) | class ModelArguments: function main (line 180) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/text-generation/run_generation.py function prepare_ctrl_input (line 95) | def prepare_ctrl_input(args, _, tokenizer, prompt_text): function prepare_xlm_input (line 105) | def prepare_xlm_input(args, model, tokenizer, prompt_text): function prepare_xlnet_input (line 131) | def prepare_xlnet_input(args, _, tokenizer, prompt_text): function prepare_transfoxl_input (line 137) | def prepare_transfoxl_input(args, _, tokenizer, prompt_text): function adjust_length_to_model (line 151) | def adjust_length_to_model(length, max_sequence_length): function sparse_model_config (line 161) | def sparse_model_config(model_config): function generate_past_key_values (line 190) | def generate_past_key_values(model, batch_size, seq_len): function prepare_jit_inputs (line 219) | def prepare_jit_inputs(inputs, model, tokenizer): class _ModelFallbackWrapper (line 237) | class _ModelFallbackWrapper(GenerationMixin): method __init__ (line 240) | def __init__(self, optimized, default): method __call__ (line 244) | def __call__(self, *args, **kwargs): method __getattr__ (line 263) | def __getattr__(self, item): method prepare_inputs_for_generation (line 266) | def prepare_inputs_for_generation( method _reorder_cache (line 273) | def _reorder_cache( function main (line 284) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/text-generation/run_generation_contrastive_search.py function main (line 39) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/token-classification/run_ner.py class ModelArguments (line 60) | class ModelArguments: class DataTrainingArguments (line 108) | class DataTrainingArguments: method __post_init__ (line 204) | def __post_init__(self): function main (line 217) | def main(): function _mp_fn (line 645) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/token-classification/run_ner_no_trainer.py function parse_args (line 69) | def parse_args(): function main (line 273) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/translation/run_translation.py class ModelArguments (line 66) | class ModelArguments: class DataTrainingArguments (line 114) | class DataTrainingArguments: method __post_init__ (line 241) | def __post_init__(self): function main (line 261) | def main(): function _mp_fn (line 691) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/pytorch/translation/run_translation_no_trainer.py function parse_args (line 71) | def parse_args(): function main (line 315) | def main(): FILE: mplsandbox_for_rl/transformers/examples/pytorch/xla_spawn.py function parse_args (line 34) | def parse_args(): function main (line 66) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/adversarial/run_hans.py class ModelArguments (line 45) | class ModelArguments: class DataTrainingArguments (line 66) | class DataTrainingArguments: function hans_data_collator (line 91) | def hans_data_collator(features: List[InputFeatures]) -> Dict[str, torch... function main (line 100) | def main(): function _mp_fn (line 236) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/research_projects/adversarial/utils_hans.py class InputExample (line 42) | class InputExample: class InputFeatures (line 65) | class InputFeatures: class HansDataset (line 93) | class HansDataset(Dataset): method __init__ (line 101) | def __init__( method __len__ (line 152) | def __len__(self): method __getitem__ (line 155) | def __getitem__(self, i) -> InputFeatures: method get_labels (line 158) | def get_labels(self): class TFHansDataset (line 165) | class TFHansDataset: method __init__ (line 173) | def __init__( method get_dataset (line 235) | def get_dataset(self): method __len__ (line 238) | def __len__(self): method __getitem__ (line 241) | def __getitem__(self, i) -> InputFeatures: method get_labels (line 244) | def get_labels(self): class HansProcessor (line 248) | class HansProcessor(DataProcessor): method get_train_examples (line 251) | def get_train_examples(self, data_dir): method get_dev_examples (line 255) | def get_dev_examples(self, data_dir): method get_labels (line 259) | def get_labels(self): method _create_examples (line 267) | def _create_examples(self, lines, set_type): function hans_convert_examples_to_features (line 282) | def hans_convert_examples_to_features( FILE: mplsandbox_for_rl/transformers/examples/research_projects/bert-loses-patience/pabee/modeling_pabee_albert.py class AlbertTransformerWithPabee (line 36) | class AlbertTransformerWithPabee(AlbertTransformer): method adaptive_forward (line 37) | def adaptive_forward(self, hidden_states, current_layer, attention_mas... class AlbertModelWithPabee (line 62) | class AlbertModelWithPabee(AlbertModel): method __init__ (line 63) | def __init__(self, config): method set_regression_threshold (line 75) | def set_regression_threshold(self, threshold): method set_patience (line 78) | def set_patience(self, patience): method reset_stats (line 81) | def reset_stats(self): method log_stats (line 85) | def log_stats(self): method forward (line 94) | def forward( class AlbertForSequenceClassificationWithPabee (line 223) | class AlbertForSequenceClassificationWithPabee(AlbertPreTrainedModel): method __init__ (line 224) | def __init__(self, config): method forward (line 237) | def forward( FILE: mplsandbox_for_rl/transformers/examples/research_projects/bert-loses-patience/pabee/modeling_pabee_bert.py class BertEncoderWithPabee (line 37) | class BertEncoderWithPabee(BertEncoder): method adaptive_forward (line 38) | def adaptive_forward(self, hidden_states, current_layer, attention_mas... class BertModelWithPabee (line 50) | class BertModelWithPabee(BertModel): method __init__ (line 67) | def __init__(self, config): method set_regression_threshold (line 79) | def set_regression_threshold(self, threshold): method set_patience (line 82) | def set_patience(self, patience): method reset_stats (line 85) | def reset_stats(self): method log_stats (line 89) | def log_stats(self): method forward (line 98) | def forward( class BertForSequenceClassificationWithPabee (line 246) | class BertForSequenceClassificationWithPabee(BertPreTrainedModel): method __init__ (line 247) | def __init__(self, config): method forward (line 260) | def forward( FILE: mplsandbox_for_rl/transformers/examples/research_projects/bert-loses-patience/run_glue_with_pabee.py function set_seed (line 65) | def set_seed(args): function train (line 73) | def train(args, train_dataset, model, tokenizer): function evaluate (line 263) | def evaluate(args, model, tokenizer, prefix="", patience=0): function load_and_cache_examples (line 353) | def load_and_cache_examples(args, task, tokenizer, evaluate=False): function main (line 408) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/bert-loses-patience/test_run_glue_with_pabee.py function get_setup_file (line 16) | def get_setup_file(): class PabeeTests (line 23) | class PabeeTests(TestCasePlus): method test_run_glue (line 24) | def test_run_glue(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/bertabs/configuration_bertabs.py class BertAbsConfig (line 31) | class BertAbsConfig(PretrainedConfig): method __init__ (line 67) | def __init__( FILE: mplsandbox_for_rl/transformers/examples/research_projects/bertabs/convert_bertabs_original_pytorch_checkpoint.py function convert_bertabs_checkpoints (line 64) | def convert_bertabs_checkpoints(path_to_checkpoints, dump_path): FILE: mplsandbox_for_rl/transformers/examples/research_projects/bertabs/modeling_bertabs.py class BertAbsPreTrainedModel (line 37) | class BertAbsPreTrainedModel(PreTrainedModel): class BertAbs (line 43) | class BertAbs(BertAbsPreTrainedModel): method __init__ (line 44) | def __init__(self, args, checkpoint=None, bert_extractive_checkpoint=N... method init_weights (line 88) | def init_weights(self): method forward (line 103) | def forward( class Bert (line 122) | class Bert(nn.Module): method __init__ (line 125) | def __init__(self): method forward (line 130) | def forward(self, input_ids, attention_mask=None, token_type_ids=None,... class TransformerDecoder (line 139) | class TransformerDecoder(nn.Module): method __init__ (line 154) | def __init__(self, num_layers, d_model, heads, d_ff, dropout, embeddin... method forward (line 173) | def forward( method init_decoder_state (line 249) | def init_decoder_state(self, src, memory_bank, with_cache=False): class PositionalEncoding (line 257) | class PositionalEncoding(nn.Module): method __init__ (line 258) | def __init__(self, dropout, dim, max_len=5000): method forward (line 270) | def forward(self, emb, step=None): method get_emb (line 280) | def get_emb(self, emb): class TransformerDecoderLayer (line 284) | class TransformerDecoderLayer(nn.Module): method __init__ (line 296) | def __init__(self, d_model, heads, d_ff, dropout): method forward (line 311) | def forward( method _get_attn_subsequent_mask (line 368) | def _get_attn_subsequent_mask(self, size): class MultiHeadedAttention (line 386) | class MultiHeadedAttention(nn.Module): method __init__ (line 428) | def __init__(self, head_count, model_dim, dropout=0.1, use_final_linea... method forward (line 445) | def forward( class DecoderState (line 560) | class DecoderState: method detach (line 569) | def detach(self): method beam_update (line 574) | def beam_update(self, idx, positions, beam_size): method map_batch_fn (line 586) | def map_batch_fn(self, fn): class TransformerDecoderState (line 590) | class TransformerDecoderState(DecoderState): method __init__ (line 593) | def __init__(self, src): method _all (line 605) | def _all(self): method detach (line 614) | def detach(self): method update_state (line 621) | def update_state(self, new_input, previous_layer_inputs): method _init_cache (line 627) | def _init_cache(self, memory_bank, num_layers): method repeat_beam_size_times (line 636) | def repeat_beam_size_times(self, beam_size): method map_batch_fn (line 640) | def map_batch_fn(self, fn): function gelu (line 654) | def gelu(x): class PositionwiseFeedForward (line 658) | class PositionwiseFeedForward(nn.Module): method __init__ (line 668) | def __init__(self, d_model, d_ff, dropout=0.1): method forward (line 677) | def forward(self, x): function build_predictor (line 690) | def build_predictor(args, tokenizer, symbols, model, logger=None): class GNMTGlobalScorer (line 697) | class GNMTGlobalScorer: method __init__ (line 707) | def __init__(self, alpha, length_penalty): method score (line 712) | def score(self, beam, logprobs): class PenaltyBuilder (line 720) | class PenaltyBuilder: method __init__ (line 729) | def __init__(self, length_pen): method length_penalty (line 732) | def length_penalty(self): method length_wu (line 744) | def length_wu(self, beam, logprobs, alpha=0.0): method length_average (line 753) | def length_average(self, beam, logprobs, alpha=0.0): method length_none (line 759) | def length_none(self, beam, logprobs, alpha=0.0, beta=0.0): class Translator (line 766) | class Translator: method __init__ (line 784) | def __init__(self, args, model, vocab, symbols, global_scorer=None, lo... method translate (line 800) | def translate(self, batch, step, attn_debug=False): method translate_batch (line 808) | def translate_batch(self, batch, fast=False): method _fast_translate_batch (line 823) | def _fast_translate_batch(self, batch, max_length, min_length=0): method from_batch (line 956) | def from_batch(self, translation_batch): function tile (line 982) | def tile(x, count, dim=0): class BertSumOptimizer (line 1005) | class BertSumOptimizer: method __init__ (line 1016) | def __init__(self, model, lr, warmup_steps, beta_1=0.99, beta_2=0.999,... method _update_rate (line 1040) | def _update_rate(self, stack): method zero_grad (line 1043) | def zero_grad(self): method step (line 1047) | def step(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/bertabs/run_summarization.py function evaluate (line 31) | def evaluate(args): function save_summaries (line 100) | def save_summaries(summaries, path, original_document_name): function format_summary (line 126) | def format_summary(translation): function format_rouge_scores (line 145) | def format_rouge_scores(scores): function save_rouge_scores (line 175) | def save_rouge_scores(str_scores): function build_data_iterator (line 185) | def build_data_iterator(args, tokenizer): function load_and_cache_examples (line 202) | def load_and_cache_examples(args, tokenizer): function collate (line 207) | def collate(data, tokenizer, block_size, device): function decode_summary (line 237) | def decode_summary(summary_tokens, tokenizer): function main (line 248) | def main(): function documents_dir_is_valid (line 335) | def documents_dir_is_valid(path): FILE: mplsandbox_for_rl/transformers/examples/research_projects/bertabs/test_utils_summarization.py class SummarizationDataProcessingTest (line 23) | class SummarizationDataProcessingTest(unittest.TestCase): method setUp (line 24) | def setUp(self): method test_fit_to_block_sequence_too_small (line 27) | def test_fit_to_block_sequence_too_small(self): method test_fit_to_block_sequence_fit_exactly (line 33) | def test_fit_to_block_sequence_fit_exactly(self): method test_fit_to_block_sequence_too_big (line 39) | def test_fit_to_block_sequence_too_big(self): method test_process_story_no_highlights (line 45) | def test_process_story_no_highlights(self): method test_process_empty_story (line 53) | def test_process_empty_story(self): method test_process_story_with_missing_period (line 60) | def test_process_story_with_missing_period(self): method test_build_mask_no_padding (line 77) | def test_build_mask_no_padding(self): method test_build_mask (line 82) | def test_build_mask(self): method test_build_mask_with_padding_equal_to_one (line 87) | def test_build_mask_with_padding_equal_to_one(self): method test_compute_token_type_ids (line 92) | def test_compute_token_type_ids(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/bertabs/utils_summarization.py class CNNDMDataset (line 13) | class CNNDMDataset(Dataset): method __init__ (line 33) | def __init__(self, path="", prefix="train"): method __len__ (line 49) | def __len__(self): method __getitem__ (line 53) | def __getitem__(self, idx): function process_story (line 62) | def process_story(raw_story): function _add_missing_period (line 96) | def _add_missing_period(line): function truncate_or_pad (line 110) | def truncate_or_pad(sequence, block_size, pad_token_id): function build_mask (line 121) | def build_mask(sequence, pad_token_id): function encode_for_summarization (line 130) | def encode_for_summarization(story_lines, summary_lines, tokenizer): function compute_token_type_ids (line 143) | def compute_token_type_ids(batch, separator_token_id): FILE: mplsandbox_for_rl/transformers/examples/research_projects/bertology/run_bertology.py function entropy (line 53) | def entropy(p): function print_2d_tensor (line 60) | def print_2d_tensor(tensor): function compute_heads_importance (line 70) | def compute_heads_importance( function mask_heads (line 156) | def mask_heads(args, model, eval_dataloader): function prune_heads (line 207) | def prune_heads(args, model, eval_dataloader, head_mask): function main (line 254) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/bertology/run_prune_gpt.py function save_model (line 23) | def save_model(model, dirpath): function entropy (line 39) | def entropy(p, unlogit=False): function print_2d_tensor (line 49) | def print_2d_tensor(tensor): function compute_heads_importance (line 59) | def compute_heads_importance( function mask_heads (line 133) | def mask_heads(args, model, eval_dataloader): function prune_heads (line 183) | def prune_heads(args, model, eval_dataloader, head_mask): function main (line 236) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/examples/train_complexity_predictor.py function get_args (line 19) | def get_args(): function compute_metrics (line 38) | def compute_metrics(eval_pred): class CustomCallback (line 44) | class CustomCallback(TrainerCallback): method __init__ (line 45) | def __init__(self, trainer) -> None: method on_epoch_end (line 49) | def on_epoch_end(self, args, state, control, **kwargs): function main (line 56) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/scripts/arguments.py class TrainingArguments (line 6) | class TrainingArguments: class EvaluationArguments (line 57) | class EvaluationArguments: class HumanEvalArguments (line 77) | class HumanEvalArguments: class PreprocessingArguments (line 120) | class PreprocessingArguments: class TokenizerTrainingArguments (line 169) | class TokenizerTrainingArguments: class PretokenizationArguments (line 190) | class PretokenizationArguments: class InitializationArguments (line 208) | class InitializationArguments: FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/scripts/bpe_training.py function batch_iterator (line 10) | def batch_iterator(batch_size=10): FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/scripts/codeparrot_training.py class ConstantLengthDataset (line 23) | class ConstantLengthDataset(IterableDataset): method __init__ (line 36) | def __init__( method __iter__ (line 62) | def __iter__(self): method shuffle (line 94) | def shuffle(self, buffer_size=1000): function setup_logging (line 98) | def setup_logging(args): function create_dataloaders (line 124) | def create_dataloaders(args): function get_grouped_params (line 141) | def get_grouped_params(model, args, no_decay=["bias", "ln_1.weight", "ln... function log_metrics (line 154) | def log_metrics(step, metrics): function compute_tflops (line 160) | def compute_tflops(elapsed_time, accelerator, args): function evaluate (line 175) | def evaluate(args): function get_lr (line 239) | def get_lr(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/scripts/human_eval.py class TokenizedDataset (line 23) | class TokenizedDataset(IterableDataset): method __init__ (line 29) | def __init__(self, tokenizer, dataset, n_tasks=None, n_copies=1): method __iter__ (line 35) | def __iter__(self): class EndOfFunctionCriteria (line 50) | class EndOfFunctionCriteria(StoppingCriteria): method __init__ (line 53) | def __init__(self, start_length, eof_strings, tokenizer): method __call__ (line 58) | def __call__(self, input_ids, scores, **kwargs): function remove_last_block (line 67) | def remove_last_block(string): function complete_code (line 74) | def complete_code(accelerator, model, tokenizer, dataloader, n_tasks, ba... function main (line 140) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/scripts/minhash_deduplication.py function get_min_hash (line 20) | def get_min_hash(tokens: List[str]) -> Optional[MinHash]: function get_tokens (line 30) | def get_tokens(code: str) -> Set[str]: class DuplicationIndex (line 35) | class DuplicationIndex: method __init__ (line 36) | def __init__( method add (line 47) | def add(self, code_key: Tuple, min_hash: MinHash) -> None: method get_duplicate_clusters (line 72) | def get_duplicate_clusters(self) -> List[List[Dict]]: method save (line 89) | def save(self, filepath) -> None: function _compute_min_hash (line 95) | def _compute_min_hash(element): function minhash_iter (line 102) | def minhash_iter(dataset_iterator: Type[Dataset]): function make_duplicate_clusters (line 113) | def make_duplicate_clusters(dataset_iterator: Type[Dataset], jaccard_thr... function jaccard_similarity (line 129) | def jaccard_similarity(code1: str, code2: str) -> float: function _find_cluster_extremes_shared (line 139) | def _find_cluster_extremes_shared(cluster, jaccard_threshold): function find_extremes (line 173) | def find_extremes(cluster_list, dataset, jaccard_threshold): function deduplicate_dataset (line 209) | def deduplicate_dataset( FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/scripts/preprocessing.py function get_hash (line 22) | def get_hash(example): function line_stats (line 27) | def line_stats(example): function alpha_stats (line 33) | def alpha_stats(example): function check_uniques (line 39) | def check_uniques(example, uniques): function is_autogenerated (line 48) | def is_autogenerated(example, scan_width=5): function is_config_or_test (line 60) | def is_config_or_test(example, scan_width=5, coeff=0.05): function has_no_keywords (line 86) | def has_no_keywords(example): function has_few_assignments (line 97) | def has_few_assignments(example, minimum=4): function char_token_ratio (line 108) | def char_token_ratio(example): function preprocess (line 115) | def preprocess(example): function filter (line 129) | def filter(example, uniques, args): function compress_file (line 153) | def compress_file(file_path): FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/scripts/pretokenizing.py function tokenize (line 10) | def tokenize(example): FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/scripts/tests/test_deduplicate.py function get_dataset (line 7) | def get_dataset(): class MakeDuplicateClustersTest (line 17) | class MakeDuplicateClustersTest(TestCase): method test_make_duplicate_clusters (line 18) | def test_make_duplicate_clusters(self): method test_deduplicate_dataset (line 23) | def test_deduplicate_dataset(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/codeparrot/scripts/validation_loss.py class ConstantLengthDataset (line 13) | class ConstantLengthDataset(IterableDataset): method __init__ (line 14) | def __init__(self, tokenizer, dataset, seq_length=1024, num_of_sequenc... method __iter__ (line 21) | def __iter__(self): function create_dataloader (line 45) | def create_dataloader(args): function evaluate (line 53) | def evaluate(args): FILE: mplsandbox_for_rl/transformers/examples/research_projects/decision_transformer/run_decision_transformer.py function get_action (line 12) | def get_action(model, states, actions, rewards, returns_to_go, timesteps): FILE: mplsandbox_for_rl/transformers/examples/research_projects/deebert/run_glue_deebert.py function set_seed (line 51) | def set_seed(args): function get_wanted_result (line 59) | def get_wanted_result(result): function train (line 73) | def train(args, train_dataset, model, tokenizer, train_highway=False): function evaluate (line 240) | def evaluate(args, model, tokenizer, prefix="", output_layer=-1, eval_hi... function load_and_cache_examples (line 335) | def load_and_cache_examples(args, task, tokenizer, evaluate=False): function main (line 395) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/deebert/src/modeling_highway_bert.py function entropy (line 16) | def entropy(x): class DeeBertEncoder (line 24) | class DeeBertEncoder(nn.Module): method __init__ (line 25) | def __init__(self, config): method set_early_exit_entropy (line 34) | def set_early_exit_entropy(self, x): method init_highway_pooler (line 41) | def init_highway_pooler(self, pooler): method forward (line 47) | def forward( class DeeBertModel (line 109) | class DeeBertModel(BertPreTrainedModel): method __init__ (line 110) | def __init__(self, config): method init_highway_pooler (line 120) | def init_highway_pooler(self): method get_input_embeddings (line 123) | def get_input_embeddings(self): method set_input_embeddings (line 126) | def set_input_embeddings(self, value): method _prune_heads (line 129) | def _prune_heads(self, heads_to_prune): method forward (line 138) | def forward( class HighwayException (line 239) | class HighwayException(Exception): method __init__ (line 240) | def __init__(self, message, exit_layer): class BertHighway (line 245) | class BertHighway(nn.Module): method __init__ (line 250) | def __init__(self, config): method forward (line 256) | def forward(self, encoder_outputs): class DeeBertForSequenceClassification (line 280) | class DeeBertForSequenceClassification(BertPreTrainedModel): method __init__ (line 281) | def __init__(self, config): method forward (line 293) | def forward( FILE: mplsandbox_for_rl/transformers/examples/research_projects/deebert/src/modeling_highway_roberta.py class DeeRobertaModel (line 21) | class DeeRobertaModel(DeeBertModel): method __init__ (line 25) | def __init__(self, config): class DeeRobertaForSequenceClassification (line 37) | class DeeRobertaForSequenceClassification(BertPreTrainedModel): method __init__ (line 41) | def __init__(self, config): method forward (line 51) | def forward( FILE: mplsandbox_for_rl/transformers/examples/research_projects/deebert/test_glue_deebert.py function get_setup_file (line 16) | def get_setup_file(): class DeeBertTests (line 23) | class DeeBertTests(TestCasePlus): method setup (line 24) | def setup(self) -> None: method run_and_check (line 28) | def run_and_check(self, args): method test_glue_deebert_train (line 48) | def test_glue_deebert_train(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/distillation/distiller.py class Distiller (line 43) | class Distiller: method __init__ (line 44) | def __init__( method prepare_batch_mlm (line 189) | def prepare_batch_mlm(self, batch): method prepare_batch_clm (line 254) | def prepare_batch_clm(self, batch): method round_batch (line 283) | def round_batch(self, x: torch.tensor, lengths: torch.tensor): method train (line 330) | def train(self): method step (line 372) | def step(self, input_ids: torch.tensor, attention_mask: torch.tensor, ... method optimize (line 466) | def optimize(self, loss): method iter (line 500) | def iter(self): method log_tensorboard (line 513) | def log_tensorboard(self): method end_epoch (line 574) | def end_epoch(self): method save_checkpoint (line 592) | def save_checkpoint(self, checkpoint_name: str = "checkpoint.pth"): FILE: mplsandbox_for_rl/transformers/examples/research_projects/distillation/grouped_batch_sampler.py function _quantize (line 27) | def _quantize(x, bins): function create_lengths_groups (line 34) | def create_lengths_groups(lengths, k=0): class GroupedBatchSampler (line 45) | class GroupedBatchSampler(BatchSampler): method __init__ (line 60) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 69) | def __iter__(self): method __len__ (line 104) | def __len__(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/distillation/lm_seqs_dataset.py class LmSeqsDataset (line 26) | class LmSeqsDataset(Dataset): method __init__ (line 37) | def __init__(self, params, data): method __getitem__ (line 50) | def __getitem__(self, index): method __len__ (line 53) | def __len__(self): method check (line 56) | def check(self): method remove_long_sequences (line 63) | def remove_long_sequences(self): method remove_empty_sequences (line 103) | def remove_empty_sequences(self): method remove_unknown_sequences (line 114) | def remove_unknown_sequences(self): method print_statistics (line 130) | def print_statistics(self): method batch_sequences (line 145) | def batch_sequences(self, batch): FILE: mplsandbox_for_rl/transformers/examples/research_projects/distillation/run_squad_w_distillation.py function set_seed (line 81) | def set_seed(args): function to_list (line 89) | def to_list(tensor): function train (line 93) | def train(args, train_dataset, model, tokenizer, teacher=None): function evaluate (line 308) | def evaluate(args, model, tokenizer, prefix=""): function load_and_cache_examples (line 427) | def load_and_cache_examples(args, tokenizer, evaluate=False, output_exam... function main (line 489) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/distillation/scripts/binarized_data.py function main (line 36) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/distillation/train.py function sanity_checks (line 56) | def sanity_checks(args): function freeze_pos_embeddings (line 86) | def freeze_pos_embeddings(student, args): function freeze_token_type_embeddings (line 93) | def freeze_token_type_embeddings(student, args): function main (line 98) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/distillation/utils.py function git_log (line 37) | def git_log(folder_path: str): function init_gpu_params (line 52) | def init_gpu_params(params): function set_seed (line 127) | def set_seed(args): FILE: mplsandbox_for_rl/transformers/examples/research_projects/fsner/src/fsner/model.py class FSNERModel (line 6) | class FSNERModel(torch.nn.Module): method __init__ (line 13) | def __init__(self, pretrained_model_name_or_path="sayef/fsner-bert-bas... method BERT (line 20) | def BERT(self, **inputs): method VectorSum (line 23) | def VectorSum(self, token_embeddings): method Atten (line 26) | def Atten(self, q_rep, S_rep, T=1): method forward (line 29) | def forward(self, W_query, W_supports): FILE: mplsandbox_for_rl/transformers/examples/research_projects/fsner/src/fsner/tokenizer_utils.py class FSNERTokenizerUtils (line 6) | class FSNERTokenizerUtils: method __init__ (line 7) | def __init__(self, pretrained_model_name_or_path): method tokenize (line 10) | def tokenize(self, x): method extract_entity_from_scores (line 57) | def extract_entity_from_scores(self, query, W_query, p_start, p_end, t... FILE: mplsandbox_for_rl/transformers/examples/research_projects/information-gain-filtration/igf/igf.py function set_seed (line 21) | def set_seed(seed): function compute_perplexity (line 35) | def compute_perplexity(model, test_data, context_len): function load_gpt2 (line 72) | def load_gpt2(model_name="openai-community/gpt2"): function recopy_gpt2 (line 89) | def recopy_gpt2(orig_model, device, max_steps): function intermittent_save (line 121) | def intermittent_save(contexts, real_perps, past_perps, filename): function collect_objective_set (line 143) | def collect_objective_set( function generate_datasets (line 222) | def generate_datasets( function train_secondary_learner (line 269) | def train_secondary_learner( class SecondaryLearner (line 364) | class SecondaryLearner(nn.Module): method __init__ (line 369) | def __init__(self, model): method forward (line 383) | def forward(self, context): method from_pretrained (line 399) | def from_pretrained(cls, state_path, model): FILE: mplsandbox_for_rl/transformers/examples/research_projects/information-gain-filtration/run_clm_igf.py function generate_n_pairs (line 49) | def generate_n_pairs( function training_secondary_learner (line 100) | def training_secondary_learner( function finetune (line 145) | def finetune( function main (line 268) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/big_bird/bigbird_flax.py class FlaxBigBirdForNaturalQuestionsModule (line 23) | class FlaxBigBirdForNaturalQuestionsModule(FlaxBigBirdForQuestionAnsweri... method setup (line 34) | def setup(self): method __call__ (line 38) | def __call__(self, *args, **kwargs): class FlaxBigBirdForNaturalQuestions (line 44) | class FlaxBigBirdForNaturalQuestions(FlaxBigBirdForQuestionAnswering): function calculate_loss_for_nq (line 48) | def calculate_loss_for_nq(start_logits, start_labels, end_logits, end_la... class Args (line 71) | class Args: method __post_init__ (line 93) | def __post_init__(self): class DataCollator (line 100) | class DataCollator: method __call__ (line 104) | def __call__(self, batch): method collate_fn (line 109) | def collate_fn(self, features): method fetch_inputs (line 120) | def fetch_inputs(self, input_ids: list): method _fetch_inputs (line 124) | def _fetch_inputs(self, input_ids: list): function get_batched_dataset (line 132) | def get_batched_dataset(dataset, batch_size, seed=None): function train_step (line 141) | def train_step(state, drp_rng, **model_inputs): function val_step (line 170) | def val_step(state, **model_inputs): class TrainState (line 183) | class TrainState(train_state.TrainState): class Trainer (line 188) | class Trainer: method create_state (line 197) | def create_state(self, model, tx, num_train_steps, ckpt_dir=None): method train (line 229) | def train(self, state, tr_dataset, val_dataset): method evaluate (line 262) | def evaluate(self, state, dataset): method save_checkpoint (line 274) | def save_checkpoint(self, save_dir, state): function restore_checkpoint (line 287) | def restore_checkpoint(save_dir, state): function scheduler_fn (line 306) | def scheduler_fn(lr, init_lr, warmup_steps, num_train_steps): function build_tx (line 314) | def build_tx(lr, init_lr, warmup_steps, num_train_steps, weight_decay): FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/big_bird/evaluate.py function get_sub_answers (line 13) | def get_sub_answers(answers, begin=0, end=None): function expand_to_aliases (line 17) | def expand_to_aliases(given_answers, make_sub_answers=False): function get_best_valid_start_end_idx (line 32) | def get_best_valid_start_end_idx(start_scores, end_scores, top_k=1, max_... function format_dataset (line 44) | def format_dataset(sample): function main (line 90) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/big_bird/prepare_natural_questions.py function _get_single_answer (line 15) | def _get_single_answer(example): function get_context_and_ans (line 59) | def get_context_and_ans(example, assertion=False): function get_strided_contexts_and_ans (line 137) | def get_strided_contexts_and_ans(example, tokenizer, doc_stride=2048, ma... function prepare_inputs (line 270) | def prepare_inputs(example, tokenizer, doc_stride=2048, max_length=4096,... function save_to_disk (line 282) | def save_to_disk(hf_data, file_name): FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/dataset-streaming/run_mlm_flax_stream.py class ModelArguments (line 71) | class ModelArguments: class DataTrainingArguments (line 113) | class DataTrainingArguments: method __post_init__ (line 184) | def __post_init__(self): class FlaxDataCollatorForLanguageModeling (line 197) | class FlaxDataCollatorForLanguageModeling: method __post_init__ (line 219) | def __post_init__(self): method __call__ (line 226) | def __call__(self, examples: List[Dict[str, np.ndarray]]) -> Dict[str,... method mask_tokens (line 238) | def mask_tokens( function generate_batch_splits (line 268) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int) -> n... function advance_iter_and_group_samples (line 279) | def advance_iter_and_group_samples(train_iterator, num_samples, max_seq_... function write_train_metric (line 310) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 320) | def write_eval_metric(summary_writer, eval_metrics, step): function tokenize_function (line 410) | def tokenize_function(examples): function decay_mask_fn (line 475) | def decay_mask_fn(params): function train_step (line 494) | def train_step(state, batch, dropout_rng): function eval_step (line 526) | def eval_step(params, batch): FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/hybrid_clip/configuration_hybrid_clip.py class HybridCLIPConfig (line 10) | class HybridCLIPConfig(PretrainedConfig): method __init__ (line 57) | def __init__(self, projection_dim=512, **kwargs): method from_text_vision_configs (line 89) | def from_text_vision_configs(cls, text_config: PretrainedConfig, visio... method to_dict (line 100) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/hybrid_clip/modeling_hybrid_clip.py class FlaxHybridCLIPModule (line 33) | class FlaxHybridCLIPModule(nn.Module): method setup (line 37) | def setup(self): method __call__ (line 65) | def __call__( class FlaxHybridCLIP (line 126) | class FlaxHybridCLIP(FlaxPreTrainedModel): method __init__ (line 130) | def __init__( method init_weights (line 144) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 158) | def __call__( method get_text_features (line 206) | def get_text_features( method get_image_features (line 269) | def get_image_features( method from_text_vision_pretrained (line 304) | def from_text_vision_pretrained( FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/hybrid_clip/run_hybrid_clip.py class ModelArguments (line 73) | class ModelArguments: class DataTrainingArguments (line 123) | class DataTrainingArguments: method __post_init__ (line 171) | def __post_init__(self): class Transform (line 185) | class Transform(torch.nn.Module): method __init__ (line 186) | def __init__(self, image_size): method forward (line 195) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ImageTextDataset (line 201) | class ImageTextDataset(VisionDataset): method __init__ (line 219) | def __init__( method _load_image (line 241) | def _load_image(self, idx: int): method _load_target (line 245) | def _load_target(self, idx): method __getitem__ (line 248) | def __getitem__(self, index: int): method __len__ (line 257) | def __len__(self) -> int: class TrainState (line 261) | class TrainState(train_state.TrainState): method replicate (line 264) | def replicate(self): function write_metric (line 268) | def write_metric(summary_writer, train_metrics, eval_metrics, train_time... function create_learning_rate_fn (line 281) | def create_learning_rate_fn( function main (line 295) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/model_parallel/partitions.py function _match (line 34) | def _match(qs, ks): function _replacement_rules (line 45) | def _replacement_rules(rules): function _get_partition_rules (line 57) | def _get_partition_rules(): function set_partitions (line 79) | def set_partitions(in_dict): FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/model_parallel/run_clm_mp.py class ModelArguments (line 64) | class ModelArguments: class DataTrainingArguments (line 106) | class DataTrainingArguments: method __post_init__ (line 164) | def __post_init__(self): function data_loader (line 176) | def data_loader(rng: jax.random.PRNGKey, dataset: Dataset, batch_size: i... function write_train_metric (line 197) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 207) | def write_eval_metric(summary_writer, eval_metrics, step): function create_learning_rate_fn (line 212) | def create_learning_rate_fn( function main (line 226) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/jax-projects/wav2vec2/run_wav2vec2_pretrain_flax.py class ModelArguments (line 36) | class ModelArguments: class DataTrainingArguments (line 76) | class DataTrainingArguments: class FlaxDataCollatorForWav2Vec2Pretraining (line 137) | class FlaxDataCollatorForWav2Vec2Pretraining: method __call__ (line 171) | def __call__(self, features: List[Dict[str, Union[List[int], np.ndarra... function configure_logger (line 213) | def configure_logger(model_args: ModelArguments, training_args: Training... function write_train_metric (line 225) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 235) | def write_eval_metric(summary_writer, eval_metrics, step): function generate_batch_splits (line 240) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int) -> n... function compute_contrastive_loss (line 251) | def compute_contrastive_loss( function main (line 283) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/layoutlmv3/run_funsd_cord.py class ModelArguments (line 57) | class ModelArguments: class DataTrainingArguments (line 92) | class DataTrainingArguments: method __post_init__ (line 179) | def __post_init__(self): function main (line 192) | def main(): function _mp_fn (line 527) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/research_projects/longform-qa/eli5_app.py function load_models (line 24) | def load_models(): function load_indexes (line 45) | def load_indexes(): function load_train_data (line 65) | def load_train_data(): function find_nearest_training (line 81) | def find_nearest_training(question, n_results=10): function make_support (line 88) | def make_support(question, source="wiki40b", method="dense", n_results=10): function answer_question (line 116) | def answer_question( FILE: mplsandbox_for_rl/transformers/examples/research_projects/longform-qa/eli5_utils.py function make_es_index_snippets (line 28) | def make_es_index_snippets(es_client, passages_dset, index_name="english... function query_es_index (line 62) | def query_es_index(question, es_client, index_name="english_wiki_kilt_sn... class ELI5DatasetQARetriver (line 93) | class ELI5DatasetQARetriver(Dataset): method __init__ (line 94) | def __init__(self, examples_array, extra_answer_threshold=3, min_answe... method __len__ (line 101) | def __len__(self): method make_example (line 104) | def make_example(self, idx): method __getitem__ (line 116) | def __getitem__(self, idx): class RetrievalQAEmbedder (line 120) | class RetrievalQAEmbedder(nn.Module): method __init__ (line 121) | def __init__(self, sent_encoder, dim): method embed_sentences_checkpointed (line 129) | def embed_sentences_checkpointed(self, input_ids, attention_mask, chec... method embed_questions (line 167) | def embed_questions(self, q_ids, q_mask, checkpoint_batch_size=-1): method embed_answers (line 171) | def embed_answers(self, a_ids, a_mask, checkpoint_batch_size=-1): method forward (line 175) | def forward(self, q_ids, q_mask, a_ids, a_mask, checkpoint_batch_size=... function make_qa_retriever_model (line 186) | def make_qa_retriever_model(model_name="google/bert_uncased_L-8_H-512_A-... function make_qa_retriever_batch (line 202) | def make_qa_retriever_batch(qa_list, tokenizer, max_len=64, device="cuda... function train_qa_retriever_epoch (line 218) | def train_qa_retriever_epoch(model, dataset, tokenizer, optimizer, sched... function train_qa_retriever_joint_epoch (line 257) | def train_qa_retriever_joint_epoch(model, dataset_list, tokenizer, optim... function evaluate_qa_retriever (line 300) | def evaluate_qa_retriever(model, dataset, tokenizer, args): function train_qa_retriever (line 318) | def train_qa_retriever(qar_model, qar_tokenizer, qar_train_dset, qar_val... class ELI5DatasetS2S (line 341) | class ELI5DatasetS2S(Dataset): method __init__ (line 342) | def __init__( method __len__ (line 361) | def __len__(self): method make_example (line 364) | def make_example(self, idx): method __getitem__ (line 380) | def __getitem__(self, idx): function make_qa_s2s_model (line 384) | def make_qa_s2s_model(model_name="facebook/bart-large", from_file=None, ... function make_qa_s2s_batch (line 393) | def make_qa_s2s_batch(qa_list, tokenizer, max_len=64, max_a_len=360, dev... function train_qa_s2s_epoch (line 417) | def train_qa_s2s_epoch(model, dataset, tokenizer, optimizer, scheduler, ... function eval_qa_s2s_epoch (line 459) | def eval_qa_s2s_epoch(model, dataset, tokenizer, args): function train_qa_s2s (line 495) | def train_qa_s2s(qa_s2s_model, qa_s2s_tokenizer, s2s_train_dset, s2s_val... function qa_s2s_generate (line 524) | def qa_s2s_generate( function embed_passages_for_retrieval (line 568) | def embed_passages_for_retrieval(passages, tokenizer, qa_embedder, max_l... function embed_questions_for_retrieval (line 579) | def embed_questions_for_retrieval(q_ls, tokenizer, qa_embedder, device="... function make_qa_dense_index (line 590) | def make_qa_dense_index( function evaluate_retriever (line 611) | def evaluate_retriever(qa_list, retriever_func, scoring_func, n_ret=10, ... function query_qa_dense_index (line 630) | def query_qa_dense_index( function batch_query_qa_dense_index (line 644) | def batch_query_qa_dense_index(questions, qa_embedder, tokenizer, wiki_p... function query_qa_dense_index_nn (line 661) | def query_qa_dense_index_nn(passage, qa_embedder, tokenizer, wiki_passag... function batch_query_qa_dense_index_nn (line 674) | def batch_query_qa_dense_index_nn(passages, qa_embedder, tokenizer, wiki... FILE: mplsandbox_for_rl/transformers/examples/research_projects/luke/luke_utils.py function padding_tensor (line 12) | def padding_tensor(sequences, padding_value, padding_side, sequence_leng... function is_punctuation (line 33) | def is_punctuation(char): class DataCollatorForLukeTokenClassification (line 44) | class DataCollatorForLukeTokenClassification(DataCollatorMixin): method torch_call (line 81) | def torch_call(self, features): FILE: mplsandbox_for_rl/transformers/examples/research_projects/luke/run_luke_ner_no_trainer.py function parse_args (line 55) | def parse_args(): function main (line 229) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/lxmert/extracting_data.py class Extract (line 43) | class Extract: method __init__ (line 44) | def __init__(self, argv=sys.argv[1:]): method _vqa_file_split (line 78) | def _vqa_file_split(self, file): method file_generator (line 84) | def file_generator(self): method __call__ (line 98) | def __call__(self): function tryload (line 128) | def tryload(stream): FILE: mplsandbox_for_rl/transformers/examples/research_projects/lxmert/modeling_frcnn.py function norm_box (line 37) | def norm_box(boxes, raw_sizes): function pad_list_tensors (line 47) | def pad_list_tensors( function do_nms (line 116) | def do_nms(boxes, scores, image_shape, score_thresh, nms_thresh, mind, m... function _clip_box (line 143) | def _clip_box(tensor, box_size: Tuple[int, int]): function _nonempty_boxes (line 152) | def _nonempty_boxes(box, threshold: float = 0.0) -> torch.Tensor: function get_norm (line 159) | def get_norm(norm, out_channels): function _create_grid_offsets (line 172) | def _create_grid_offsets(size: List[int], stride: int, offset: float, de... function build_backbone (line 195) | def build_backbone(cfg): function find_top_rpn_proposals (line 255) | def find_top_rpn_proposals( function subsample_labels (line 335) | def subsample_labels(labels, num_samples, positive_fraction, bg_label): function add_ground_truth_to_proposals (line 360) | def add_ground_truth_to_proposals(gt_boxes, proposals): function add_ground_truth_to_proposals_single_image (line 364) | def add_ground_truth_to_proposals_single_image(gt_boxes, proposals): function _fmt_box_list (line 368) | def _fmt_box_list(box_tensor, batch_index: int): function convert_boxes_to_pooler_format (line 378) | def convert_boxes_to_pooler_format(box_lists: List[torch.Tensor]): function assign_boxes_to_levels (line 386) | def assign_boxes_to_levels( class _NewEmptyTensorOp (line 403) | class _NewEmptyTensorOp(torch.autograd.Function): method forward (line 405) | def forward(ctx, x, new_shape): method backward (line 410) | def backward(ctx, grad): class ShapeSpec (line 415) | class ShapeSpec(namedtuple("_ShapeSpec", ["channels", "height", "width",... method __new__ (line 416) | def __new__(cls, *, channels=None, height=None, width=None, stride=None): class Box2BoxTransform (line 420) | class Box2BoxTransform: method __init__ (line 427) | def __init__(self, weights: Tuple[float, float, float, float], scale_c... method get_deltas (line 449) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 483) | def apply_deltas(self, deltas, boxes): class Matcher (line 522) | class Matcher: method __init__ (line 536) | def __init__( method __call__ (line 565) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 603) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): class RPNOutputs (line 625) | class RPNOutputs: method __init__ (line 626) | def __init__( method _get_ground_truth (line 668) | def _get_ground_truth(self): method predict_proposals (line 671) | def predict_proposals(self): method predict_objectness_logits (line 688) | def predict_objectness_logits(self): class Conv2d (line 702) | class Conv2d(nn.Conv2d): method __init__ (line 703) | def __init__(self, *args, **kwargs): method forward (line 711) | def forward(self, x): class LastLevelMaxPool (line 742) | class LastLevelMaxPool(nn.Module): method __init__ (line 747) | def __init__(self): method forward (line 752) | def forward(self, x): class LastLevelP6P7 (line 756) | class LastLevelP6P7(nn.Module): method __init__ (line 761) | def __init__(self, in_channels, out_channels): method forward (line 768) | def forward(self, c5): class BasicStem (line 774) | class BasicStem(nn.Module): method __init__ (line 775) | def __init__(self, in_channels=3, out_channels=64, norm="BN", caffe_ma... method forward (line 789) | def forward(self, x): method out_channels (line 799) | def out_channels(self): method stride (line 803) | def stride(self): class ResNetBlockBase (line 807) | class ResNetBlockBase(nn.Module): method __init__ (line 808) | def __init__(self, in_channels, out_channels, stride): method freeze (line 814) | def freeze(self): class BottleneckBlock (line 820) | class BottleneckBlock(ResNetBlockBase): method __init__ (line 821) | def __init__( method forward (line 880) | def forward(self, x): class Backbone (line 899) | class Backbone(nn.Module, metaclass=ABCMeta): method __init__ (line 900) | def __init__(self): method forward (line 904) | def forward(self): method size_divisibility (line 908) | def size_divisibility(self): method output_shape (line 916) | def output_shape(self): method out_features (line 926) | def out_features(self): method out_feature_strides (line 931) | def out_feature_strides(self): method out_feature_channels (line 936) | def out_feature_channels(self): class ResNet (line 941) | class ResNet(Backbone): method __init__ (line 942) | def __init__(self, stem, stages, num_classes=None, out_features=None): method forward (line 991) | def forward(self, x): method output_shape (line 1007) | def output_shape(self): method make_stage (line 1017) | def make_stage( class ROIPooler (line 1054) | class ROIPooler(nn.Module): method __init__ (line 1060) | def __init__( method forward (line 1091) | def forward(self, feature_maps, boxes): class ROIOutputs (line 1135) | class ROIOutputs: method __init__ (line 1136) | def __init__(self, cfg, training=False): method _predict_boxes (line 1149) | def _predict_boxes(self, proposals, box_deltas, preds_per_image): method _predict_objs (line 1159) | def _predict_objs(self, obj_logits, preds_per_image): method _predict_attrs (line 1164) | def _predict_attrs(self, attr_logits, preds_per_image): method inference (line 1170) | def inference( method training (line 1223) | def training(self, obj_logits, attr_logits, box_deltas, pred_boxes, fe... method __call__ (line 1226) | def __call__( class Res5ROIHeads (line 1249) | class Res5ROIHeads(nn.Module): method __init__ (line 1256) | def __init__(self, cfg, input_shape): method _build_res5_block (line 1309) | def _build_res5_block(self, cfg): method _shared_roi_transform (line 1331) | def _shared_roi_transform(self, features, boxes): method forward (line 1335) | def forward(self, features, proposal_boxes, gt_boxes=None): class AnchorGenerator (line 1350) | class AnchorGenerator(nn.Module): method __init__ (line 1355) | def __init__(self, cfg, input_shape: List[ShapeSpec]): method _calculate_anchors (line 1375) | def _calculate_anchors(self, sizes, aspect_ratios): method box_dim (line 1390) | def box_dim(self): method num_cell_anchors (line 1394) | def num_cell_anchors(self): method grid_anchors (line 1401) | def grid_anchors(self, grid_sizes): method generate_cell_anchors (line 1411) | def generate_cell_anchors(self, sizes=(32, 64, 128, 256, 512), aspect_... method forward (line 1429) | def forward(self, features): class RPNHead (line 1443) | class RPNHead(nn.Module): method __init__ (line 1451) | def __init__(self, cfg, input_shape: List[ShapeSpec]): method forward (line 1483) | def forward(self, features): class RPN (line 1497) | class RPN(nn.Module): method __init__ (line 1502) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): method training (line 1532) | def training(self, images, image_shapes, features, gt_boxes): method inference (line 1535) | def inference(self, outputs, images, image_shapes, features, gt_boxes=... method forward (line 1558) | def forward(self, images, image_shapes, features, gt_boxes=None): class FastRCNNOutputLayers (line 1591) | class FastRCNNOutputLayers(nn.Module): method __init__ (line 1598) | def __init__( method forward (line 1641) | def forward(self, roi_features): class GeneralizedRCNN (line 1658) | class GeneralizedRCNN(nn.Module): method __init__ (line 1659) | def __init__(self, cfg): method from_pretrained (line 1670) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method forward (line 1831) | def forward( method inference (line 1857) | def inference( FILE: mplsandbox_for_rl/transformers/examples/research_projects/lxmert/processing_image.py class ResizeShortestEdge (line 31) | class ResizeShortestEdge: method __init__ (line 32) | def __init__(self, short_edge_length, max_size=sys.maxsize): method __call__ (line 42) | def __call__(self, imgs): class Preprocess (line 76) | class Preprocess: method __init__ (line 77) | def __init__(self, cfg): method pad (line 88) | def pad(self, images): method __call__ (line 102) | def __call__(self, images, single_image=False): function _scale_box (line 139) | def _scale_box(boxes, scale_yx): function _clip_box (line 145) | def _clip_box(tensor, box_size: Tuple[int, int]): FILE: mplsandbox_for_rl/transformers/examples/research_projects/lxmert/utils.py function load_labels (line 79) | def load_labels(objs=OBJECTS, attrs=ATTRIBUTES): function load_checkpoint (line 92) | def load_checkpoint(ckp): class Config (line 106) | class Config: method __init__ (line 109) | def __init__(self, dictionary: dict, name: str = "root", level=0): method __repr__ (line 125) | def __repr__(self): method __setattr__ (line 128) | def __setattr__(self, key, val): method to_dict (line 143) | def to_dict(self): method dump_yaml (line 146) | def dump_yaml(self, data, file_name): method dump_json (line 150) | def dump_json(self, data, file_name): method load_yaml (line 155) | def load_yaml(config): method __str__ (line 160) | def __str__(self): method from_pretrained (line 177) | def from_pretrained(cls, pretrained_model_name_or_path: str, **kwargs): method get_config_dict (line 182) | def get_config_dict(cls, pretrained_model_name_or_path: str, **kwargs): function compare (line 225) | def compare(in_tensor): function is_remote_url (line 240) | def is_remote_url(url_or_filename): function hf_bucket_url (line 245) | def hf_bucket_url(model_id: str, filename: str, use_cdn=True) -> str: function http_get (line 254) | def http_get( function get_from_cache (line 290) | def get_from_cache( function url_to_filename (line 403) | def url_to_filename(url, etag=None): function cached_path (line 419) | def cached_path( function get_data (line 492) | def get_data(query, delim=","): function get_image_from_url (line 512) | def get_image_from_url(url): function load_frcnn_pkl_from_url (line 519) | def load_frcnn_pkl_from_url(url): function get_demo_path (line 536) | def get_demo_path(): function img_tensorize (line 540) | def img_tensorize(im, input_format="RGB"): function chunk (line 553) | def chunk(images, batch=1): FILE: mplsandbox_for_rl/transformers/examples/research_projects/lxmert/visualizing_image.py class SingleImageViz (line 36) | class SingleImageViz: method __init__ (line 37) | def __init__( method add_box (line 89) | def add_box(self, box, color=None): method draw_boxes (line 108) | def draw_boxes(self, boxes, obj_ids=None, obj_scores=None, attr_ids=No... method draw_labels (line 141) | def draw_labels(self, label, box, color): method draw_text (line 163) | def draw_text( method save (line 195) | def save(self, saveas=None): method _create_text_labels_attr (line 206) | def _create_text_labels_attr(self, classes, scores, attr_classes, attr... method _create_text_labels (line 215) | def _create_text_labels(self, classes, scores): method _random_color (line 224) | def _random_color(self, maximum=255): method _get_buffer (line 231) | def _get_buffer(self): method _change_color_brightness (line 259) | def _change_color_brightness(self, color, brightness_factor): FILE: mplsandbox_for_rl/transformers/examples/research_projects/mlm_wwm/run_chinese_ref.py function _is_chinese_char (line 10) | def _is_chinese_char(cp): function is_chinese (line 35) | def is_chinese(word: str): function get_chinese_word (line 44) | def get_chinese_word(tokens: List[str]): function add_sub_symbol (line 55) | def add_sub_symbol(bert_tokens: List[str], chinese_word_set: set()): function prepare_ref (line 79) | def prepare_ref(lines: List[str], ltp_tokenizer: LTP, bert_tokenizer: Be... function main (line 116) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/research_projects/mlm_wwm/run_mlm_wwm.py class ModelArguments (line 56) | class ModelArguments: method __post_init__ (line 110) | def __post_init__(self): class DataTrainingArguments (line 118) | class DataTrainingArguments: method __post_init__ (line 177) | def __post_init__(self): function add_chinese_references (line 186) | def add_chinese_references(dataset, ref_file): function main (line 196) | def main(): function _mp_fn (line 429) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/research_projects/mm-imdb/run_mmimdb.py function set_seed (line 57) | def set_seed(args): function train (line 65) | def train(args, train_dataset, model, tokenizer, criterion): function evaluate (line 234) | def evaluate(args, model, tokenizer, criterion, prefix=""): function load_examples (line 304) | def load_examples(args, tokenizer, evaluate=False): function main (line 312) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/mm-imdb/utils_mmimdb.py class ImageEncoder (line 32) | class ImageEncoder(nn.Module): method __init__ (line 33) | def __init__(self, args): method forward (line 40) | def forward(self, x): class JsonlDataset (line 48) | class JsonlDataset(Dataset): method __init__ (line 49) | def __init__(self, data_path, tokenizer, transforms, labels, max_seq_l... method __len__ (line 59) | def __len__(self): method __getitem__ (line 62) | def __getitem__(self, index): method get_label_frequencies (line 81) | def get_label_frequencies(self): function collate_fn (line 88) | def collate_fn(batch): function get_mmimdb_labels (line 107) | def get_mmimdb_labels(): function get_image_transforms (line 135) | def get_image_transforms(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/movement-pruning/bertarize.py function main (line 28) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/research_projects/movement-pruning/counts_parameters.py function main (line 26) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/research_projects/movement-pruning/emmental/configuration_bert_masked.py class MaskedBertConfig (line 27) | class MaskedBertConfig(PretrainedConfig): method __init__ (line 34) | def __init__( FILE: mplsandbox_for_rl/transformers/examples/research_projects/movement-pruning/emmental/modeling_bert_masked.py class BertEmbeddings (line 38) | class BertEmbeddings(nn.Module): method __init__ (line 41) | def __init__(self, config): method forward (line 52) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class BertSelfAttention (line 77) | class BertSelfAttention(nn.Module): method __init__ (line 78) | def __init__(self, config): method transpose_for_scores (line 115) | def transpose_for_scores(self, x): method forward (line 120) | def forward( class BertSelfOutput (line 174) | class BertSelfOutput(nn.Module): method __init__ (line 175) | def __init__(self, config): method forward (line 187) | def forward(self, hidden_states, input_tensor, threshold): class BertAttention (line 194) | class BertAttention(nn.Module): method __init__ (line 195) | def __init__(self, config): method prune_heads (line 201) | def prune_heads(self, heads): method forward (line 224) | def forward( class BertIntermediate (line 246) | class BertIntermediate(nn.Module): method __init__ (line 247) | def __init__(self, config): method forward (line 261) | def forward(self, hidden_states, threshold): class BertOutput (line 267) | class BertOutput(nn.Module): method __init__ (line 268) | def __init__(self, config): method forward (line 280) | def forward(self, hidden_states, input_tensor, threshold): class BertLayer (line 287) | class BertLayer(nn.Module): method __init__ (line 288) | def __init__(self, config): method forward (line 297) | def forward( class BertEncoder (line 323) | class BertEncoder(nn.Module): method __init__ (line 324) | def __init__(self, config): method forward (line 330) | def forward( class BertPooler (line 370) | class BertPooler(nn.Module): method __init__ (line 371) | def __init__(self, config): method forward (line 376) | def forward(self, hidden_states): class MaskedBertPreTrainedModel (line 385) | class MaskedBertPreTrainedModel(PreTrainedModel): method _init_weights (line 394) | def _init_weights(self, module): class MaskedBertModel (line 468) | class MaskedBertModel(MaskedBertPreTrainedModel): method __init__ (line 475) | def __init__(self, config): method get_input_embeddings (line 486) | def get_input_embeddings(self): method set_input_embeddings (line 489) | def set_input_embeddings(self, value): method _prune_heads (line 492) | def _prune_heads(self, heads_to_prune): method forward (line 501) | def forward( class MaskedBertForSequenceClassification (line 663) | class MaskedBertForSequenceClassification(MaskedBertPreTrainedModel): method __init__ (line 664) | def __init__(self, config): method forward (line 675) | def forward( class MaskedBertForMultipleChoice (line 749) | class MaskedBertForMultipleChoice(MaskedBertPreTrainedModel): method __init__ (line 750) | def __init__(self, config): method forward (line 760) | def forward( class MaskedBertForTokenClassification (line 838) | class MaskedBertForTokenClassification(MaskedBertPreTrainedModel): method __init__ (line 839) | def __init__(self, config): method forward (line 850) | def forward( class MaskedBertForQuestionAnswering (line 925) | class MaskedBertForQuestionAnswering(MaskedBertPreTrainedModel): method __init__ (line 926) | def __init__(self, config): method forward (line 936) | def forward( FILE: mplsandbox_for_rl/transformers/examples/research_projects/movement-pruning/emmental/modules/binarizer.py class ThresholdBinarizer (line 24) | class ThresholdBinarizer(autograd.Function): method forward (line 37) | def forward(ctx, inputs: torch.tensor, threshold: float, sigmoid: bool): method backward (line 65) | def backward(ctx, gradOutput): class TopKBinarizer (line 69) | class TopKBinarizer(autograd.Function): method forward (line 82) | def forward(ctx, inputs: torch.tensor, threshold: float): method backward (line 107) | def backward(ctx, gradOutput): class MagnitudeBinarizer (line 111) | class MagnitudeBinarizer: method apply (line 121) | def apply(inputs: torch.tensor, threshold: float): FILE: mplsandbox_for_rl/transformers/examples/research_projects/movement-pruning/emmental/modules/masked_nn.py class MaskedLinear (line 31) | class MaskedLinear(nn.Linear): method __init__ (line 37) | def __init__( method init_mask (line 77) | def init_mask(self): method forward (line 85) | def forward(self, input: torch.tensor, threshold: float): FILE: mplsandbox_for_rl/transformers/examples/research_projects/movement-pruning/masked_run_glue.py function set_seed (line 61) | def set_seed(args): function schedule_threshold (line 69) | def schedule_threshold( function regularization (line 92) | def regularization(model: nn.Module, mode: str): function train (line 106) | def train(args, train_dataset, model, tokenizer, teacher=None): function evaluate (line 415) | def evaluate(args, model, tokenizer, prefix=""): function load_and_cache_examples (line 506) | def load_and_cache_examples(args, task, tokenizer, evaluate=False): function main (line 561) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/movement-pruning/masked_run_squad.py function set_seed (line 64) | def set_seed(args): function schedule_threshold (line 72) | def schedule_threshold( function regularization (line 95) | def regularization(model: nn.Module, mode: str): function to_list (line 109) | def to_list(tensor): function train (line 113) | def train(args, train_dataset, model, tokenizer, teacher=None): function evaluate (line 436) | def evaluate(args, model, tokenizer, prefix=""): function load_and_cache_examples (line 583) | def load_and_cache_examples(args, tokenizer, evaluate=False, output_exam... function main (line 658) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py function _convert_past_list_to_tuple (line 12) | def _convert_past_list_to_tuple(past_key_values): class EncoderForONNX (line 34) | class EncoderForONNX(torch.nn.Module): method __init__ (line 35) | def __init__(self, encoder): method forward (line 39) | def forward(self, input_ids, attention_mask): class DecoderForONNX (line 47) | class DecoderForONNX(torch.nn.Module): method __init__ (line 48) | def __init__(self, decoder): method forward (line 52) | def forward(self, input_ids, encoder_state, attention_mask, past=None): function _create_traced_encoder (line 72) | def _create_traced_encoder(encoder, input_ids, attention_mask): function _create_traced_decoder (line 79) | def _create_traced_decoder(decoder, input_ids, encoder_state, attention_... class BartConfigTS (line 91) | class BartConfigTS(BartConfig, torch.nn.Module): method __init__ (line 97) | def __init__(self, config): class MinLengthLogitsProcessorTS (line 102) | class MinLengthLogitsProcessorTS(torch.nn.Module): method __init__ (line 113) | def __init__(self, min_length: int, eos_token_id: int): method forward (line 125) | def forward(self, input_ids, scores) -> torch.Tensor: class BARTGenerator (line 132) | class BARTGenerator(torch.nn.Module, GenerationMixin): method __init__ (line 133) | def __init__(self, model): method _trace_modules (line 143) | def _trace_modules(self, model): method _encoder_forward (line 229) | def _encoder_forward(self, input_ids, attention_mask): method _init_sequence_length_for_generation (line 233) | def _init_sequence_length_for_generation( method _decoder_forward (line 242) | def _decoder_forward(self, input_ids, encoder_output, attention_mask, ... method greedy_search (line 257) | def greedy_search( method _prepare_decoder_input_ids_for_generation (line 299) | def _prepare_decoder_input_ids_for_generation( method forward (line 311) | def forward(self, input_ids, attention_mask, max_length, decoder_start... class BeamSearchScorerTS (line 340) | class BeamSearchScorerTS(torch.nn.Module): method __init__ (line 341) | def __init__(self): method is_done (line 358) | def is_done(self) -> torch.Tensor: method init (line 361) | def init( method hypo_len (line 403) | def hypo_len(self, hypo_idx: int): method hypo_add (line 409) | def hypo_add(self, hyp: torch.Tensor, sum_logprobs: float, hypo_idx: i... method hypo_is_done (line 434) | def hypo_is_done(self, hypo_idx: int, best_sum_logprobs: float, cur_le... method process (line 448) | def process( method finalize (line 523) | def finalize( class BARTBeamSearchGenerator (line 586) | class BARTBeamSearchGenerator(BARTGenerator): method __init__ (line 587) | def __init__(self, model): method _expand_inputs_for_generation (line 593) | def _expand_inputs_for_generation( method adjust_logits_during_generation (line 609) | def adjust_logits_during_generation(self, logits, cur_len: int, max_le... method _force_token_id_to_be_generated (line 617) | def _force_token_id_to_be_generated(scores, token_id: int): method _reorder_cache (line 623) | def _reorder_cache(self, past: List[torch.Tensor], beam_idx): method beam_search (line 631) | def beam_search( method forward (line 706) | def forward(self, input_ids, attention_mask, num_beams, max_length, de... FILE: mplsandbox_for_rl/transformers/examples/research_projects/onnx/summarization/bart_onnx/reduce_onnx_size.py function _is_equal_tensor_proto (line 11) | def _is_equal_tensor_proto(a, b): function _node_replace_input_with (line 26) | def _node_replace_input_with(node_proto, name, new_name): function _graph_replace_input_with (line 39) | def _graph_replace_input_with(graph_proto, name, new_name): function _remove_dup_initializers_from_model (line 44) | def _remove_dup_initializers_from_model(model, model_without_ext, ind_to... function remove_dup_initializers (line 61) | def remove_dup_initializers(onnx_file_path): FILE: mplsandbox_for_rl/transformers/examples/research_projects/onnx/summarization/run_onnx_exporter.py function parse_args (line 46) | def parse_args(): function load_model_tokenizer (line 91) | def load_model_tokenizer(model_name, device="cpu"): function export_and_validate_model (line 103) | def export_and_validate_model(model, tokenizer, onnx_file_path, num_beam... function main (line 166) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/performer/modeling_flax_performer.py class FlaxPerformerLayerNorm (line 105) | class FlaxPerformerLayerNorm(nn.Module): method __call__ (line 120) | def __call__(self, x): class FlaxPerformerEmbedding (line 145) | class FlaxPerformerEmbedding(nn.Module): method __call__ (line 156) | def __call__(self, inputs): class FlaxPerformerEmbeddings (line 161) | class FlaxPerformerEmbeddings(nn.Module): method __call__ (line 170) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxPerformerAttention (line 191) | class FlaxPerformerAttention(nn.Module): method __call__ (line 196) | def __call__(self, hidden_state, attention_mask): class FlaxPerformerIntermediate (line 207) | class FlaxPerformerIntermediate(nn.Module): method __call__ (line 212) | def __call__(self, hidden_state): class FlaxPerformerOutput (line 218) | class FlaxPerformerOutput(nn.Module): method __call__ (line 220) | def __call__(self, intermediate_output, attention_output): class FlaxPerformerLayer (line 226) | class FlaxPerformerLayer(nn.Module): method __call__ (line 233) | def __call__(self, hidden_state, attention_mask): class FlaxPerformerLayerCollection (line 245) | class FlaxPerformerLayerCollection(nn.Module): method __call__ (line 257) | def __call__(self, inputs, attention_mask): class FlaxPerformerEncoder (line 272) | class FlaxPerformerEncoder(nn.Module): method __call__ (line 280) | def __call__(self, hidden_state, attention_mask): class FlaxPerformerPooler (line 292) | class FlaxPerformerPooler(nn.Module): method __call__ (line 294) | def __call__(self, hidden_state): class FlaxPerformerModule (line 300) | class FlaxPerformerModule(nn.Module): method __call__ (line 313) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxPerformerModel (line 340) | class FlaxPerformerModel(FlaxBertPreTrainedModel): method convert_from_pytorch (line 353) | def convert_from_pytorch(pt_state: Dict, config: BertConfig) -> Dict: method __init__ (line 420) | def __init__( method module (line 439) | def module(self) -> nn.Module: method __call__ (line 442) | def __call__( class FlaxPerformerForMaskedLM (line 464) | class FlaxPerformerForMaskedLM(FlaxBertPreTrainedModel): method __init__ (line 465) | def __init__( method __call__ (line 483) | def __call__( class FlaxPerformerForMaskedLMModule (line 513) | class FlaxPerformerForMaskedLMModule(nn.Module): method __call__ (line 527) | def __call__( FILE: mplsandbox_for_rl/transformers/examples/research_projects/performer/modeling_flax_performer_utils.py function nonnegative_softmax_kernel_feature_creator (line 40) | def nonnegative_softmax_kernel_feature_creator( function sincos_softmax_kernel_feature_creator (line 94) | def sincos_softmax_kernel_feature_creator( function generalized_kernel_feature_creator (line 144) | def generalized_kernel_feature_creator( function make_fast_softmax_attention (line 182) | def make_fast_softmax_attention( function make_fast_generalized_attention (line 243) | def make_fast_generalized_attention( class RandomMatrix (line 287) | class RandomMatrix: method get_2d_array (line 296) | def get_2d_array(self): class GaussianUnstructuredRandomMatrix (line 300) | class GaussianUnstructuredRandomMatrix(RandomMatrix): method __init__ (line 301) | def __init__(self, nb_rows, nb_columns, key): method get_2d_array (line 306) | def get_2d_array(self): class GaussianOrthogonalRandomMatrix (line 310) | class GaussianOrthogonalRandomMatrix(RandomMatrix): method __init__ (line 316) | def __init__(self, nb_rows, nb_columns, key, scaling=0): method get_2d_array (line 322) | def get_2d_array(self): class FastAttention (line 351) | class FastAttention: method dot_product_attention (line 360) | def dot_product_attention( function _numerator (line 403) | def _numerator(z_slice_shape, precision, unroll=1): function _denominator (line 442) | def _denominator(t_slice_shape, precision, unroll=1): class FastAttentionviaLowRankDecomposition (line 478) | class FastAttentionviaLowRankDecomposition(FastAttention): method __init__ (line 485) | def __init__( method draw_weights (line 505) | def draw_weights(self, key): method dot_product_attention (line 512) | def dot_product_attention( function _invert_perm (line 654) | def _invert_perm(perm): FILE: mplsandbox_for_rl/transformers/examples/research_projects/performer/run_mlm_performer.py class WandbArguments (line 78) | class WandbArguments: class ModelArguments (line 94) | class ModelArguments: class DataTrainingArguments (line 128) | class DataTrainingArguments: method __post_init__ (line 187) | def __post_init__(self): class FlaxDataCollatorForLanguageModeling (line 202) | class FlaxDataCollatorForLanguageModeling: method __post_init__ (line 229) | def __post_init__(self): method __call__ (line 236) | def __call__(self, examples: List[Dict[str, np.ndarray]], pad_to_multi... method mask_tokens (line 253) | def mask_tokens( function create_learning_rate_scheduler (line 283) | def create_learning_rate_scheduler( function compute_metrics (line 337) | def compute_metrics(logits, labels, weights, label_smoothing=0.0): function accuracy (line 346) | def accuracy(logits, targets, weights=None): function cross_entropy (line 366) | def cross_entropy(logits, targets, weights=None, label_smoothing=0.0): function training_step (line 401) | def training_step(optimizer, batch, dropout_rng): function eval_step (line 424) | def eval_step(params, batch): function generate_batch_splits (line 437) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int) -> n... function tokenize_function (line 577) | def tokenize_function(examples): FILE: mplsandbox_for_rl/transformers/examples/research_projects/pplm/pplm_classification_head.py class ClassificationHead (line 4) | class ClassificationHead(nn.Module): method __init__ (line 7) | def __init__(self, class_size, embed_size): method forward (line 15) | def forward(self, hidden_state): FILE: mplsandbox_for_rl/transformers/examples/research_projects/pplm/run_pplm.py function top_k_filter (line 77) | def top_k_filter(logits, k, probs=False): function perturb_past (line 93) | def perturb_past( function get_classifier (line 254) | def get_classifier( function get_bag_of_words_indices (line 295) | def get_bag_of_words_indices(bag_of_words_ids_or_paths: List[str], token... function build_bows_one_hot_vectors (line 308) | def build_bows_one_hot_vectors(bow_indices, tokenizer, device="cuda"): function full_text_generation (line 323) | def full_text_generation( function generate_text_pplm (line 423) | def generate_text_pplm( function set_generic_model_params (line 575) | def set_generic_model_params(discrim_weights, discrim_meta): function run_pplm_example (line 587) | def run_pplm_example( FILE: mplsandbox_for_rl/transformers/examples/research_projects/pplm/run_pplm_discrim_train.py class Discriminator (line 45) | class Discriminator(nn.Module): method __init__ (line 48) | def __init__(self, class_size, pretrained_model="openai-community/gpt2... method get_classifier (line 57) | def get_classifier(self): method train_custom (line 60) | def train_custom(self): method avg_representation (line 65) | def avg_representation(self, x): method forward (line 72) | def forward(self, x): class Dataset (line 84) | class Dataset(data.Dataset): method __init__ (line 85) | def __init__(self, X, y): method __len__ (line 90) | def __len__(self): method __getitem__ (line 93) | def __getitem__(self, index): function collate_fn (line 101) | def collate_fn(data): function cached_collate_fn (line 123) | def cached_collate_fn(data): function train_epoch (line 134) | def train_epoch(data_loader, discriminator, optimizer, epoch=0, log_inte... function evaluate_performance (line 161) | def evaluate_performance(data_loader, discriminator, device="cpu"): function predict (line 184) | def predict(input_sentence, model, classes, cached=False, device="cpu"): function get_cached_data_loader (line 198) | def get_cached_data_loader(dataset, batch_size, discriminator, shuffle=F... function train_discriminator (line 218) | def train_discriminator( FILE: mplsandbox_for_rl/transformers/examples/research_projects/quantization-qdqbert/evaluate-hf-trt-qa.py function model_infer (line 213) | def model_infer(inputs, context, d_inputs, h_output0, h_output1, d_outpu... function prepare_validation_features (line 300) | def prepare_validation_features(examples): function post_processing_function (line 367) | def post_processing_function(examples, features, predictions, stage="eva... function binding_nbytes (line 404) | def binding_nbytes(binding): FILE: mplsandbox_for_rl/transformers/examples/research_projects/quantization-qdqbert/quant_trainer.py function add_arguments (line 35) | def add_arguments(parser): function set_default_quantizers (line 61) | def set_default_quantizers(args): function configure_model (line 81) | def configure_model(model, args, calib=False, eval=False): function enable_calibration (line 116) | def enable_calibration(model): function finish_calibration (line 130) | def finish_calibration(model, args): function fuse_qkv (line 152) | def fuse_qkv(model, args): function clip_gelu (line 180) | def clip_gelu(model, maxval): function expand_amax (line 193) | def expand_amax(model): function recalibrate_weights (line 204) | def recalibrate_weights(model): function print_model_summary (line 222) | def print_model_summary(model, name_width=25, line_width=180, ignore=None): function print_quant_summary (line 255) | def print_quant_summary(model): function set_quantizer (line 266) | def set_quantizer(name, mod, quantizer, k, v): function set_quantizers (line 277) | def set_quantizers(name, mod, which="both", **kwargs): function set_quantizer_by_name (line 290) | def set_quantizer_by_name(model, names, **kwargs): FILE: mplsandbox_for_rl/transformers/examples/research_projects/quantization-qdqbert/run_quant_qa.py class ModelArguments (line 61) | class ModelArguments: class DataTrainingArguments (line 101) | class DataTrainingArguments: method __post_init__ (line 204) | def __post_init__(self): function main (line 224) | def main(): function _mp_fn (line 682) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/research_projects/quantization-qdqbert/trainer_quant_qa.py class QuestionAnsweringTrainer (line 38) | class QuestionAnsweringTrainer(Trainer): method __init__ (line 39) | def __init__(self, *args, eval_examples=None, post_process_function=No... method get_calib_dataloader (line 46) | def get_calib_dataloader(self, calib_dataset=None): method calibrate (line 69) | def calibrate(self, calib_dataset=None): method evaluate (line 91) | def evaluate(self, eval_dataset=None, eval_examples=None, ignore_keys=... method predict (line 132) | def predict(self, predict_dataset, predict_examples, ignore_keys=None,... method save_onnx (line 164) | def save_onnx(self, output_dir="./"): FILE: mplsandbox_for_rl/transformers/examples/research_projects/quantization-qdqbert/utils_qa.py function postprocess_qa_predictions (line 32) | def postprocess_qa_predictions( function postprocess_qa_predictions_with_beam_search (line 249) | def postprocess_qa_predictions_with_beam_search( FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag-end2end-retriever/callbacks_rag.py function count_trainable_parameters (line 12) | def count_trainable_parameters(model): function get_checkpoint_callback (line 21) | def get_checkpoint_callback(output_dir, metric): function get_early_stopping_callback (line 49) | def get_early_stopping_callback(metric, patience): class Seq2SeqLoggingCallback (line 58) | class Seq2SeqLoggingCallback(pl.Callback): method on_batch_end (line 59) | def on_batch_end(self, trainer, pl_module): method _write_logs (line 64) | def _write_logs( method on_train_start (line 100) | def on_train_start(self, trainer, pl_module): method on_test_end (line 111) | def on_test_end(self, trainer: pl.Trainer, pl_module: pl.LightningModu... method on_validation_end (line 116) | def on_validation_end(self, trainer: pl.Trainer, pl_module): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag-end2end-retriever/distributed_ray_retriever.py class RayRetriever (line 13) | class RayRetriever: method __init__ (line 14) | def __init__(self): method create_rag_retriever (line 17) | def create_rag_retriever(self, config, question_encoder_tokenizer, gen... method init_retrieval (line 28) | def init_retrieval(self): method clear_object (line 31) | def clear_object(self): method retrieve (line 36) | def retrieve(self, question_hidden_states, n_docs): class RagRayDistributedRetriever (line 42) | class RagRayDistributedRetriever(RagRetriever): method __init__ (line 70) | def __init__(self, config, question_encoder_tokenizer, generator_token... method init_retrieval (line 98) | def init_retrieval(self): method retrieve (line 113) | def retrieve(self, question_hidden_states, n_docs): method get_tokenizers (line 145) | def get_tokenizers(cls, retriever_name_or_path, indexed_dataset=None, ... method from_pretrained (line 149) | def from_pretrained(cls, retriever_name_or_path, actor_handles, indexe... method re_load (line 169) | def re_load(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag-end2end-retriever/eval_rag.py function infer_model_type (line 27) | def infer_model_type(model_name_or_path): function metric_max_over_ground_truths (line 37) | def metric_max_over_ground_truths(metric_fn, prediction, ground_truths): function get_scores (line 41) | def get_scores(args, preds_path, gold_data_path): function get_precision_at_k (line 67) | def get_precision_at_k(args, preds_path, gold_data_path): function evaluate_batch_retrieval (line 83) | def evaluate_batch_retrieval(args, rag_model, questions): function evaluate_batch_e2e (line 116) | def evaluate_batch_e2e(args, rag_model, questions): function get_args (line 143) | def get_args(): function main (line 257) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag-end2end-retriever/finetune_rag.py class AttrDict (line 78) | class AttrDict(dict): method __init__ (line 79) | def __init__(self, *args, **kwargs): class GenerativeQAModule (line 84) | class GenerativeQAModule(BaseTransformer): method __init__ (line 90) | def __init__(self, hparams, **kwargs): method forward (line 200) | def forward(self, input_ids, **kwargs): method ids_to_clean_text (line 203) | def ids_to_clean_text(self, generated_ids: List[int]): method _step (line 209) | def _step(self, batch: dict) -> Tuple: method pad (line 251) | def pad(self) -> int: method training_step (line 254) | def training_step(self, batch, batch_idx) -> Dict: method validation_step (line 381) | def validation_step(self, batch, batch_idx) -> Dict: method validation_epoch_end (line 384) | def validation_epoch_end(self, outputs, prefix="val") -> Dict: method save_metrics (line 414) | def save_metrics(self, latest_metrics, type_path) -> None: method calc_generative_metrics (line 418) | def calc_generative_metrics(self, preds, target) -> Dict: method _generative_step (line 421) | def _generative_step(self, batch: dict) -> dict: method test_step (line 444) | def test_step(self, batch, batch_idx): method test_epoch_end (line 447) | def test_epoch_end(self, outputs): method get_dataset (line 450) | def get_dataset(self, type_path) -> Seq2SeqDataset: method get_dataloader (line 462) | def get_dataloader(self, type_path: str, batch_size: int, shuffle: boo... method train_dataloader (line 474) | def train_dataloader(self) -> DataLoader: method val_dataloader (line 478) | def val_dataloader(self) -> DataLoader: method test_dataloader (line 481) | def test_dataloader(self) -> DataLoader: method on_save_checkpoint (line 485) | def on_save_checkpoint(self, checkpoint: Dict[str, Any]) -> None: method add_model_specific_args (line 503) | def add_model_specific_args(parser, root_dir): method add_retriever_specific_args (line 609) | def add_retriever_specific_args(parser): method add_ray_specific_args (line 665) | def add_ray_specific_args(parser): function main (line 691) | def main(args=None, model=None) -> GenerativeQAModule: FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag-end2end-retriever/kb_encode_utils.py function split_text (line 11) | def split_text(text, n=100, character=" "): function split_documents (line 17) | def split_documents(documents): function embed_update (line 28) | def embed_update(ctx_encoder, total_processes, device, process_num, shar... function add_index (line 67) | def add_index(shard_dir, index_path): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag-end2end-retriever/lightning_base.py class BaseTransformer (line 63) | class BaseTransformer(pl.LightningModule): method __init__ (line 64) | def __init__( method load_hf_checkpoint (line 118) | def load_hf_checkpoint(self, *args, **kwargs): method get_lr_scheduler (line 121) | def get_lr_scheduler(self): method configure_optimizers (line 129) | def configure_optimizers(self): method test_step (line 160) | def test_step(self, batch, batch_nb): method test_epoch_end (line 163) | def test_epoch_end(self, outputs): method total_steps (line 166) | def total_steps(self) -> int: method setup (line 172) | def setup(self, stage): method get_dataloader (line 179) | def get_dataloader(self, type_path: str, batch_size: int, shuffle: boo... method train_dataloader (line 182) | def train_dataloader(self): method val_dataloader (line 185) | def val_dataloader(self): method test_dataloader (line 188) | def test_dataloader(self): method _feature_file (line 191) | def _feature_file(self, mode): method on_save_checkpoint (line 202) | def on_save_checkpoint(self, checkpoint: Dict[str, Any]) -> None: method add_model_specific_args (line 209) | def add_model_specific_args(parser, root_dir): class InitCallback (line 271) | class InitCallback(pl.Callback): method on_sanity_check_start (line 274) | def on_sanity_check_start(self, trainer, pl_module): class CheckParamCallback (line 281) | class CheckParamCallback(pl.Callback): method on_after_backward (line 283) | def on_after_backward(self, trainer, pl_module): class LoggingCallback (line 290) | class LoggingCallback(pl.Callback): method on_batch_end (line 291) | def on_batch_end(self, trainer, pl_module): method on_validation_end (line 296) | def on_validation_end(self, trainer: pl.Trainer, pl_module: pl.Lightni... method on_test_end (line 304) | def on_test_end(self, trainer: pl.Trainer, pl_module: pl.LightningModu... function add_generic_args (line 316) | def add_generic_args(parser, root_dir) -> None: function generic_train (line 360) | def generic_train( FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag-end2end-retriever/use_own_knowledge_dataset.py function split_text (line 21) | def split_text(text: str, n=100, character=" ") -> List[str]: function split_documents (line 27) | def split_documents(documents: dict) -> dict: function embed (line 38) | def embed(documents: dict, ctx_encoder: DPRContextEncoder, ctx_tokenizer... function main (line 47) | def main( class RagExampleArguments (line 107) | class RagExampleArguments: class ProcessingArguments (line 136) | class ProcessingArguments: class IndexHnswArguments (line 152) | class IndexHnswArguments: FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag-end2end-retriever/utils_rag.py function encode_line (line 21) | def encode_line(tokenizer, line, max_length, padding_side, pad_to_max_le... function trim_batch (line 35) | def trim_batch( class Seq2SeqDataset (line 48) | class Seq2SeqDataset(Dataset): method __init__ (line 49) | def __init__( method __len__ (line 75) | def __len__(self): method __getitem__ (line 78) | def __getitem__(self, index) -> Dict[str, torch.Tensor]: method get_char_lens (line 109) | def get_char_lens(data_file): method collate_fn (line 112) | def collate_fn(self, batch) -> Dict[str, torch.Tensor]: function flatten_list (line 139) | def flatten_list(summary_ids: List[List]): function save_git_info (line 143) | def save_git_info(folder_path: str) -> None: function save_json (line 149) | def save_json(content, path, indent=4, **json_dump_kwargs): function load_json (line 154) | def load_json(path): function get_git_info (line 159) | def get_git_info(): function lmap (line 170) | def lmap(f: Callable, x: Iterable) -> List: function pickle_save (line 175) | def pickle_save(obj, path): function normalize_answer (line 181) | def normalize_answer(s): function f1_score (line 200) | def f1_score(prediction, ground_truth): function exact_match_score (line 213) | def exact_match_score(prediction, ground_truth): function calculate_exact_match (line 217) | def calculate_exact_match(output_lns: List[str], reference_lns: List[str... function is_rag_model (line 227) | def is_rag_model(model_prefix): function set_extra_model_params (line 231) | def set_extra_model_params(extra_params, hparams, config): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/_test_finetune_rag.py class RagFinetuneExampleTests (line 26) | class RagFinetuneExampleTests(TestCasePlus): method _create_dummy_data (line 27) | def _create_dummy_data(self, data_dir): method _run_finetune (line 37) | def _run_finetune(self, gpus: int, distributed_retriever: str = "pytor... method test_finetune_gpu (line 92) | def test_finetune_gpu(self): method test_finetune_multigpu (line 97) | def test_finetune_multigpu(self): method test_finetune_gpu_ray_retrieval (line 103) | def test_finetune_gpu_ray_retrieval(self): method test_finetune_multigpu_ray_retrieval (line 109) | def test_finetune_multigpu_ray_retrieval(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/callbacks_rag.py function count_trainable_parameters (line 12) | def count_trainable_parameters(model): function get_checkpoint_callback (line 21) | def get_checkpoint_callback(output_dir, metric): function get_early_stopping_callback (line 46) | def get_early_stopping_callback(metric, patience): class Seq2SeqLoggingCallback (line 55) | class Seq2SeqLoggingCallback(pl.Callback): method on_batch_end (line 56) | def on_batch_end(self, trainer, pl_module): method _write_logs (line 61) | def _write_logs( method on_train_start (line 97) | def on_train_start(self, trainer, pl_module): method on_test_end (line 108) | def on_test_end(self, trainer: pl.Trainer, pl_module: pl.LightningModu... method on_validation_end (line 113) | def on_validation_end(self, trainer: pl.Trainer, pl_module): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/consolidate_rag_checkpoint.py function consolidate (line 11) | def consolidate( FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/distributed_pytorch_retriever.py class RagPyTorchDistributedRetriever (line 16) | class RagPyTorchDistributedRetriever(RagRetriever): method __init__ (line 34) | def __init__(self, config, question_encoder_tokenizer, generator_token... method init_retrieval (line 44) | def init_retrieval(self, distributed_port: int): method _is_main (line 77) | def _is_main(self): method _scattered (line 80) | def _scattered(self, scatter_list, target_shape, target_type=torch.flo... method _infer_socket_ifname (line 85) | def _infer_socket_ifname(self): method retrieve (line 91) | def retrieve(self, question_hidden_states: np.ndarray, n_docs: int) ->... FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/distributed_ray_retriever.py class RayRetriever (line 13) | class RayRetriever: method __init__ (line 14) | def __init__(self): method create_rag_retriever (line 17) | def create_rag_retriever(self, config, question_encoder_tokenizer, gen... method init_retrieval (line 28) | def init_retrieval(self): method retrieve (line 31) | def retrieve(self, question_hidden_states, n_docs): class RagRayDistributedRetriever (line 36) | class RagRayDistributedRetriever(RagRetriever): method __init__ (line 64) | def __init__(self, config, question_encoder_tokenizer, generator_token... method init_retrieval (line 88) | def init_retrieval(self): method retrieve (line 103) | def retrieve(self, question_hidden_states, n_docs): method get_tokenizers (line 132) | def get_tokenizers(cls, retriever_name_or_path, indexed_dataset=None, ... method from_pretrained (line 136) | def from_pretrained(cls, retriever_name_or_path, actor_handles, indexe... FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/eval_rag.py function infer_model_type (line 27) | def infer_model_type(model_name_or_path): function metric_max_over_ground_truths (line 37) | def metric_max_over_ground_truths(metric_fn, prediction, ground_truths): function get_scores (line 41) | def get_scores(args, preds_path, gold_data_path): function get_precision_at_k (line 67) | def get_precision_at_k(args, preds_path, gold_data_path): function evaluate_batch_retrieval (line 83) | def evaluate_batch_retrieval(args, rag_model, questions): function evaluate_batch_e2e (line 116) | def evaluate_batch_e2e(args, rag_model, questions): function get_args (line 143) | def get_args(): function main (line 257) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/finetune_rag.py class AttrDict (line 70) | class AttrDict(dict): method __init__ (line 71) | def __init__(self, *args, **kwargs): class CustomDDP (line 76) | class CustomDDP(DDPPlugin): method init_ddp_connection (line 77) | def init_ddp_connection(self, global_rank=None, world_size=None) -> None: class GenerativeQAModule (line 97) | class GenerativeQAModule(BaseTransformer): method __init__ (line 103) | def __init__(self, hparams, **kwargs): method forward (line 199) | def forward(self, input_ids, **kwargs): method ids_to_clean_text (line 202) | def ids_to_clean_text(self, generated_ids: List[int]): method _step (line 208) | def _step(self, batch: dict) -> Tuple: method pad (line 251) | def pad(self) -> int: method training_step (line 254) | def training_step(self, batch, batch_idx) -> Dict: method validation_step (line 275) | def validation_step(self, batch, batch_idx) -> Dict: method validation_epoch_end (line 278) | def validation_epoch_end(self, outputs, prefix="val") -> Dict: method save_metrics (line 301) | def save_metrics(self, latest_metrics, type_path) -> None: method calc_generative_metrics (line 305) | def calc_generative_metrics(self, preds, target) -> Dict: method _generative_step (line 308) | def _generative_step(self, batch: dict) -> dict: method test_step (line 331) | def test_step(self, batch, batch_idx): method test_epoch_end (line 334) | def test_epoch_end(self, outputs): method get_dataset (line 337) | def get_dataset(self, type_path) -> Seq2SeqDataset: method get_dataloader (line 349) | def get_dataloader(self, type_path: str, batch_size: int, shuffle: boo... method train_dataloader (line 361) | def train_dataloader(self) -> DataLoader: method val_dataloader (line 365) | def val_dataloader(self) -> DataLoader: method test_dataloader (line 368) | def test_dataloader(self) -> DataLoader: method on_save_checkpoint (line 372) | def on_save_checkpoint(self, checkpoint: Dict[str, Any]) -> None: method add_model_specific_args (line 379) | def add_model_specific_args(parser, root_dir): method add_retriever_specific_args (line 454) | def add_retriever_specific_args(parser): method add_ray_specific_args (line 510) | def add_ray_specific_args(parser): function main (line 536) | def main(args=None, model=None) -> GenerativeQAModule: FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/lightning_base.py class BaseTransformer (line 63) | class BaseTransformer(pl.LightningModule): method __init__ (line 64) | def __init__( method load_hf_checkpoint (line 118) | def load_hf_checkpoint(self, *args, **kwargs): method get_lr_scheduler (line 121) | def get_lr_scheduler(self): method configure_optimizers (line 129) | def configure_optimizers(self): method test_step (line 158) | def test_step(self, batch, batch_nb): method test_epoch_end (line 161) | def test_epoch_end(self, outputs): method total_steps (line 164) | def total_steps(self) -> int: method setup (line 170) | def setup(self, stage): method get_dataloader (line 177) | def get_dataloader(self, type_path: str, batch_size: int, shuffle: boo... method train_dataloader (line 180) | def train_dataloader(self): method val_dataloader (line 183) | def val_dataloader(self): method test_dataloader (line 186) | def test_dataloader(self): method _feature_file (line 189) | def _feature_file(self, mode): method on_save_checkpoint (line 200) | def on_save_checkpoint(self, checkpoint: Dict[str, Any]) -> None: method add_model_specific_args (line 207) | def add_model_specific_args(parser, root_dir): class InitCallback (line 269) | class InitCallback(pl.Callback): method on_sanity_check_start (line 271) | def on_sanity_check_start(self, trainer, pl_module): class LoggingCallback (line 278) | class LoggingCallback(pl.Callback): method on_batch_end (line 279) | def on_batch_end(self, trainer, pl_module): method on_validation_end (line 284) | def on_validation_end(self, trainer: pl.Trainer, pl_module: pl.Lightni... method on_test_end (line 292) | def on_test_end(self, trainer: pl.Trainer, pl_module: pl.LightningModu... function add_generic_args (line 304) | def add_generic_args(parser, root_dir) -> None: function generic_train (line 350) | def generic_train( FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/parse_dpr_relevance_data.py function main (line 13) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/test_distributed_retriever.py function require_distributed_retrieval (line 39) | def require_distributed_retrieval(test_case): class RagRetrieverTest (line 53) | class RagRetrieverTest(TestCase): method setUp (line 54) | def setUp(self): method get_dpr_tokenizer (line 118) | def get_dpr_tokenizer(self) -> DPRQuestionEncoderTokenizer: method get_bart_tokenizer (line 121) | def get_bart_tokenizer(self) -> BartTokenizer: method tearDown (line 124) | def tearDown(self): method get_dummy_dataset (line 127) | def get_dummy_dataset(self): method get_dummy_pytorch_distributed_retriever (line 139) | def get_dummy_pytorch_distributed_retriever( method get_dummy_ray_distributed_retriever (line 159) | def get_dummy_ray_distributed_retriever(self, init_retrieval: bool) ->... method get_dummy_custom_hf_index_pytorch_retriever (line 183) | def get_dummy_custom_hf_index_pytorch_retriever(self, init_retrieval: ... method get_dummy_custom_hf_index_ray_retriever (line 214) | def get_dummy_custom_hf_index_ray_retriever(self, init_retrieval: bool... method distributed_retriever_check (line 258) | def distributed_retriever_check(self, retriever: RagRetriever, hidden_... method test_pytorch_distributed_retriever_retrieve (line 268) | def test_pytorch_distributed_retriever_retrieve(self): method test_custom_hf_index_pytorch_retriever_retrieve (line 278) | def test_custom_hf_index_pytorch_retriever_retrieve(self): method test_custom_pytorch_distributed_retriever_retrieve_from_disk (line 290) | def test_custom_pytorch_distributed_retriever_retrieve_from_disk(self): method test_ray_distributed_retriever_retrieve (line 303) | def test_ray_distributed_retriever_retrieve(self): method test_custom_hf_index_ray_retriever_retrieve (line 315) | def test_custom_hf_index_ray_retriever_retrieve(self): method test_custom_ray_distributed_retriever_retrieve_from_disk (line 329) | def test_custom_ray_distributed_retriever_retrieve_from_disk(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/use_own_knowledge_dataset.py function split_text (line 28) | def split_text(text: str, n=100, character=" ") -> List[str]: function split_documents (line 34) | def split_documents(documents: dict) -> dict: function embed (line 45) | def embed(documents: dict, ctx_encoder: DPRContextEncoder, ctx_tokenizer... function main (line 54) | def main( class RagExampleArguments (line 140) | class RagExampleArguments: class ProcessingArguments (line 169) | class ProcessingArguments: class IndexHnswArguments (line 185) | class IndexHnswArguments: FILE: mplsandbox_for_rl/transformers/examples/research_projects/rag/utils_rag.py function encode_line (line 21) | def encode_line(tokenizer, line, max_length, padding_side, pad_to_max_le... function trim_batch (line 35) | def trim_batch( class Seq2SeqDataset (line 48) | class Seq2SeqDataset(Dataset): method __init__ (line 49) | def __init__( method __len__ (line 75) | def __len__(self): method __getitem__ (line 78) | def __getitem__(self, index) -> Dict[str, torch.Tensor]: method get_char_lens (line 109) | def get_char_lens(data_file): method collate_fn (line 112) | def collate_fn(self, batch) -> Dict[str, torch.Tensor]: function flatten_list (line 139) | def flatten_list(summary_ids: List[List]): function save_git_info (line 143) | def save_git_info(folder_path: str) -> None: function save_json (line 149) | def save_json(content, path, indent=4, **json_dump_kwargs): function load_json (line 154) | def load_json(path): function get_git_info (line 159) | def get_git_info(): function lmap (line 170) | def lmap(f: Callable, x: Iterable) -> List: function pickle_save (line 175) | def pickle_save(obj, path): function normalize_answer (line 181) | def normalize_answer(s): function f1_score (line 200) | def f1_score(prediction, ground_truth): function exact_match_score (line 213) | def exact_match_score(prediction, ground_truth): function calculate_exact_match (line 217) | def calculate_exact_match(output_lns: List[str], reference_lns: List[str... function is_rag_model (line 227) | def is_rag_model(model_prefix): function set_extra_model_params (line 231) | def set_extra_model_params(extra_params, hparams, config): FILE: mplsandbox_for_rl/transformers/examples/research_projects/robust-speech-event/eval.py function log_results (line 12) | def log_results(result: Dataset, args: Dict[str, str]): function normalize_text (line 49) | def normalize_text(text: str) -> str: function main (line 66) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/research_projects/robust-speech-event/run_speech_recognition_ctc_bnb.py function list_field (line 62) | def list_field(default=None, metadata=None): class ModelArguments (line 67) | class ModelArguments: class DataTrainingArguments (line 138) | class DataTrainingArguments: class DataCollatorCTCWithPadding (line 264) | class DataCollatorCTCWithPadding: method __call__ (line 294) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function create_vocabulary_from_data (line 322) | def create_vocabulary_from_data( function main (line 364) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/robust-speech-event/run_speech_recognition_ctc_streaming.py function list_field (line 61) | def list_field(default=None, metadata=None): class ModelArguments (line 66) | class ModelArguments: class DataTrainingArguments (line 137) | class DataTrainingArguments: class DataCollatorCTCWithPadding (line 255) | class DataCollatorCTCWithPadding: method __call__ (line 286) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function main (line 319) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/self-training-text-classification/finetuning.py class Split (line 52) | class Split(ExplicitEnum): class FTModelArguments (line 60) | class FTModelArguments: class FTDataArguments (line 77) | class FTDataArguments: class FTTrainingArguments (line 121) | class FTTrainingArguments: function train (line 222) | def train(args, accelerator, model, tokenizer, train_dataloader, optimiz... function evaluate (line 420) | def evaluate(args, accelerator, dataloader, eval_set, model, checkpoint,... function load_from_pretrained (line 499) | def load_from_pretrained(args, pretrained_model_name_or_path): function finetune (line 524) | def finetune(accelerator, model_name_or_path, train_file, output_dir, **... FILE: mplsandbox_for_rl/transformers/examples/research_projects/self-training-text-classification/selftraining.py class STModelArguments (line 42) | class STModelArguments: class STDataArguments (line 55) | class STDataArguments: class STTrainingArguments (line 73) | class STTrainingArguments: function create_pseudo_labeled_data (line 124) | def create_pseudo_labeled_data(args, infer_input, infer_output, eval_res... function selftrain (line 151) | def selftrain(model_name_or_path, train_file, infer_file, output_dir, **... FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/_test_bash_script.py class TestMbartCc25Enro (line 23) | class TestMbartCc25Enro(TestCasePlus): method setUp (line 24) | def setUp(self): method test_model_download (line 35) | def test_model_download(self): method test_train_mbart_cc25_enro_script (line 42) | def test_train_mbart_cc25_enro_script(self): class TestDistilMarianNoTeacher (line 126) | class TestDistilMarianNoTeacher(TestCasePlus): method test_opus_mt_distill_script (line 130) | def test_opus_mt_distill_script(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/_test_make_student.py class MakeStudentTester (line 16) | class MakeStudentTester(unittest.TestCase): method teacher_config (line 18) | def teacher_config(self): method test_valid_t5 (line 21) | def test_valid_t5(self): method test_asymmetric_t5 (line 25) | def test_asymmetric_t5(self): method test_same_decoder_small_encoder (line 28) | def test_same_decoder_small_encoder(self): method test_small_enc_small_dec (line 33) | def test_small_enc_small_dec(self): method test_raises_assert (line 38) | def test_raises_assert(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/_test_seq2seq_examples.py function _dump_articles (line 95) | def _dump_articles(path: Path, articles: list): function make_test_data_dir (line 115) | def make_test_data_dir(tmp_dir): class TestSummarizationDistiller (line 122) | class TestSummarizationDistiller(TestCasePlus): method setUpClass (line 124) | def setUpClass(cls): method test_hub_configs (line 130) | def test_hub_configs(self): method test_distill_no_teacher (line 147) | def test_distill_no_teacher(self): method test_distill_checkpointing_with_teacher (line 151) | def test_distill_checkpointing_with_teacher(self): method test_loss_fn (line 175) | def test_loss_fn(self): method test_distill_mbart (line 195) | def test_distill_mbart(self): method test_distill_t5 (line 219) | def test_distill_t5(self): method test_distill_different_base_models (line 230) | def test_distill_different_base_models(self): method _test_distiller_cli (line 239) | def _test_distiller_cli(self, updates, check_contents=True): class TestTheRest (line 281) | class TestTheRest(TestCasePlus): method test_finetune (line 285) | def test_finetune(self, model): method test_finetune_extra_model_args (line 336) | def test_finetune_extra_model_args(self): method test_finetune_lr_schedulers (line 386) | def test_finetune_lr_schedulers(self): FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/_test_seq2seq_examples_multi_gpu.py function _dump_articles (line 82) | def _dump_articles(path: Path, articles: list): function make_test_data_dir (line 87) | def make_test_data_dir(tmp_dir): class TestSummarizationDistillerMultiGPU (line 94) | class TestSummarizationDistillerMultiGPU(TestCasePlus): method setUpClass (line 96) | def setUpClass(cls): method test_multi_gpu (line 100) | def test_multi_gpu(self): method _test_distiller_cli_fork (line 110) | def _test_distiller_cli_fork(self, updates, check_contents=True): FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/callbacks.py function count_trainable_parameters (line 13) | def count_trainable_parameters(model): class Seq2SeqLoggingCallback (line 22) | class Seq2SeqLoggingCallback(pl.Callback): method on_batch_end (line 23) | def on_batch_end(self, trainer, pl_module): method _write_logs (line 28) | def _write_logs( method on_train_start (line 64) | def on_train_start(self, trainer, pl_module): method on_test_end (line 75) | def on_test_end(self, trainer: pl.Trainer, pl_module: pl.LightningModu... method on_validation_end (line 80) | def on_validation_end(self, trainer: pl.Trainer, pl_module): function get_checkpoint_callback (line 86) | def get_checkpoint_callback(output_dir, metric, save_top_k=1, lower_is_b... function get_early_stopping_callback (line 110) | def get_early_stopping_callback(metric, patience): FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/convert_pl_checkpoint_to_hf.py function remove_prefix (line 17) | def remove_prefix(text: str, prefix: str): function sanitize (line 23) | def sanitize(sd): function average_state_dicts (line 27) | def average_state_dicts(state_dicts: List[Dict[str, torch.Tensor]]): function convert_pl_to_hf (line 37) | def convert_pl_to_hf(pl_ckpt_path: str, hf_src_model_dir: str, save_path... FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/distillation.py class SummarizationDistiller (line 27) | class SummarizationDistiller(SummarizationModule): method __init__ (line 32) | def __init__(self, hparams): method calc_ce_loss (line 114) | def calc_ce_loss(self, mask, s_logits, t_logits): method add_model_specific_args (line 134) | def add_model_specific_args(parser, root_dir): method _step (line 139) | def _step(self, batch: dict) -> tuple: method calc_hidden_loss (line 222) | def calc_hidden_loss(attention_mask, hidden_states, hidden_states_T, m... function add_distill_args (line 240) | def add_distill_args(parser): class TranslationDistiller (line 259) | class TranslationDistiller(SummarizationDistiller): method __init__ (line 266) | def __init__(self, hparams, **kwargs): method calc_generative_metrics (line 275) | def calc_generative_metrics(self, preds, target) -> dict: method add_model_specific_args (line 279) | def add_model_specific_args(parser, root_dir): function create_module (line 285) | def create_module(args): function distill_main (line 296) | def distill_main(args): FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/finetune.py class SummarizationModule (line 51) | class SummarizationModule(BaseTransformer): method __init__ (line 57) | def __init__(self, hparams, **kwargs): method save_readable_batch (line 119) | def save_readable_batch(self, batch: Dict[str, torch.Tensor]) -> Dict[... method forward (line 130) | def forward(self, input_ids, **kwargs): method ids_to_clean_text (line 133) | def ids_to_clean_text(self, generated_ids: List[int]): method _step (line 139) | def _step(self, batch: dict) -> Tuple: method pad (line 167) | def pad(self) -> int: method training_step (line 170) | def training_step(self, batch, batch_idx) -> Dict: method validation_step (line 182) | def validation_step(self, batch, batch_idx) -> Dict: method validation_epoch_end (line 185) | def validation_epoch_end(self, outputs, prefix="val") -> Dict: method calc_generative_metrics (line 209) | def calc_generative_metrics(self, preds, target) -> Dict: method _generative_step (line 212) | def _generative_step(self, batch: dict) -> dict: method test_step (line 234) | def test_step(self, batch, batch_idx): method test_epoch_end (line 237) | def test_epoch_end(self, outputs): method get_dataset (line 240) | def get_dataset(self, type_path) -> Seq2SeqDataset: method get_dataloader (line 252) | def get_dataloader(self, type_path: str, batch_size: int, shuffle: boo... method train_dataloader (line 288) | def train_dataloader(self) -> DataLoader: method val_dataloader (line 292) | def val_dataloader(self) -> DataLoader: method test_dataloader (line 295) | def test_dataloader(self) -> DataLoader: method add_model_specific_args (line 299) | def add_model_specific_args(parser, root_dir): class TranslationModule (line 372) | class TranslationModule(SummarizationModule): method __init__ (line 378) | def __init__(self, hparams, **kwargs): method calc_generative_metrics (line 383) | def calc_generative_metrics(self, preds, target) -> dict: function main (line 387) | def main(args, model=None) -> SummarizationModule: FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/lightning_base.py class BaseTransformer (line 63) | class BaseTransformer(pl.LightningModule): method __init__ (line 64) | def __init__( method load_hf_checkpoint (line 118) | def load_hf_checkpoint(self, *args, **kwargs): method get_lr_scheduler (line 121) | def get_lr_scheduler(self): method configure_optimizers (line 129) | def configure_optimizers(self): method test_step (line 158) | def test_step(self, batch, batch_nb): method test_epoch_end (line 161) | def test_epoch_end(self, outputs): method total_steps (line 164) | def total_steps(self) -> int: method setup (line 170) | def setup(self, mode): method get_dataloader (line 177) | def get_dataloader(self, type_path: str, batch_size: int, shuffle: boo... method train_dataloader (line 180) | def train_dataloader(self): method val_dataloader (line 183) | def val_dataloader(self): method test_dataloader (line 186) | def test_dataloader(self): method _feature_file (line 189) | def _feature_file(self, mode): method on_save_checkpoint (line 200) | def on_save_checkpoint(self, checkpoint: Dict[str, Any]) -> None: method add_model_specific_args (line 207) | def add_model_specific_args(parser, root_dir): class LoggingCallback (line 269) | class LoggingCallback(pl.Callback): method on_batch_end (line 270) | def on_batch_end(self, trainer, pl_module): method on_validation_end (line 275) | def on_validation_end(self, trainer: pl.Trainer, pl_module: pl.Lightni... method on_test_end (line 283) | def on_test_end(self, trainer: pl.Trainer, pl_module: pl.LightningModu... function add_generic_args (line 295) | def add_generic_args(parser, root_dir) -> None: function generic_train (line 341) | def generic_train( FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/make_student.py function copy_layers (line 15) | def copy_layers(src_layers: nn.ModuleList, dest_layers: nn.ModuleList, l... function pick_layers_to_copy (line 54) | def pick_layers_to_copy(n_student, n_teacher): function get_layers_to_supervise (line 67) | def get_layers_to_supervise(n_student, n_teacher) -> List[int]: function create_student_by_copying_alternating_layers (line 79) | def create_student_by_copying_alternating_layers( FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/run_eval.py function generate_summaries_or_translations (line 25) | def generate_summaries_or_translations( function datetime_now (line 69) | def datetime_now(): function run_generate (line 73) | def run_generate(verbose=True): FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/sentence_splitter.py function add_newline_to_end_of_each_sentence (line 18) | def add_newline_to_end_of_each_sentence(x: str) -> str: FILE: mplsandbox_for_rl/transformers/examples/research_projects/seq2seq-distillation/utils.py function label_smoothed_nll_loss (line 35) | def label_smoothed_nll_loss(lprobs, target, epsilon, ignore_index=-100): function lmap (line 56) | def lmap(f: Callable, x: Iterable) -> List: function calculate_bleu (line 61) | def calculate_bleu(output_lns, refs_lns, **kwargs) -> dict: function build_compute_metrics_fn (line 66) | def build_compute_metrics_fn(task_name: str, tokenizer: PreTrainedTokeni... function trim_batch (line 95) | def trim_batch( class AbstractSeq2SeqDataset (line 108) | class AbstractSeq2SeqDataset(Dataset): method __init__ (line 109) | def __init__( method __len__ (line 142) | def __len__(self): method get_char_lens (line 146) | def get_char_lens(data_file): method tgt_lens (line 150) | def tgt_lens(self): method make_sortish_sampler (line 154) | def make_sortish_sampler(self, batch_size, distributed=False, shuffle=... method make_dynamic_sampler (line 160) | def make_dynamic_sampler(self, max_tokens_per_batch=1024, **kwargs): method __getitem__ (line 185) | def __getitem__(self, item): method collate_fn (line 188) | def collate_fn(self, batch): class LegacySeq2SeqDataset (line 192) | class LegacySeq2SeqDataset(AbstractSeq2SeqDataset): method __getitem__ (line 193) | def __getitem__(self, index) -> Dict[str, torch.Tensor]: method encode_line (line 212) | def encode_line(self, tokenizer, line, max_length, pad_to_max_length=T... method collate_fn (line 223) | def collate_fn(self, batch) -> Dict[str, torch.Tensor]: class Seq2SeqDataset (line 238) | class Seq2SeqDataset(AbstractSeq2SeqDataset): method __getitem__ (line 241) | def __getitem__(self, index) -> Dict[str, str]: method collate_fn (line 249) | def collate_fn(self, batch) -> Dict[str, torch.Tensor]: class Seq2SeqDataCollator (line 263) | class Seq2SeqDataCollator: method __init__ (line 264) | def __init__(self, tokenizer, data_args, tpu_num_cores=None): method __call__ (line 278) | def __call__(self, batch) -> Dict[str, torch.Tensor]: method _shift_right_t5 (line 307) | def _shift_right_t5(self, input_ids): method _encode (line 314) | def _encode(self, batch) -> Dict[str, torch.Tensor]: class SortishSampler (line 327) | class SortishSampler(Sampler): method __init__ (line 330) | def __init__(self, data, batch_size, shuffle=True): method __len__ (line 333) | def __len__(self) -> int: method __iter__ (line 336) | def __iter__(self): function sortish_sampler_indices (line 340) | def sortish_sampler_indices(data: List, bs: int, shuffle=True) -> np.array: class DistributedSortishSampler (line 361) | class DistributedSortishSampler(Sampler): method __init__ (line 364) | def __init__(self, dataset, batch_size, num_replicas=None, rank=None, ... method __iter__ (line 387) | def __iter__(self) -> Iterable: method available_indices (line 398) | def available_indices(self) -> np.array: method __len__ (line 407) | def __len__(self): method set_epoch (line 410) | def set_epoch(self, epoch): function use_task_specific_params (line 417) | def use_task_specific_params(model, task): function pickle_load (line 427) | def pickle_load(path): function pickle_save (line 433) | def pickle_save(obj, path): function flatten_list (line 439) | def flatten_list(summary_ids: List[List]): function save_git_info (line 443) | def save_git_info(folder_path: str) -> None: function save_json (line 449) | def save_json(content, path, indent=4, **json_dump_kwargs): function load_json (line 454) | def load_json(path): function get_git_info (line 459) | def get_git_info(): function extract_rouge_mid_statistics (line 481) | def extract_rouge_mid_statistics(dct): function calculate_rouge (line 489) | def calculate_rouge( function freeze_params (line 540) | def freeze_params(model: nn.Module): function freeze_embeds (line 546) | def freeze_embeds(model): function grad_status (line 565) | def grad_status(model: nn.Module) -> Iterable: function any_requires_grad (line 569) | def any_requires_grad(model: nn.Module) -> bool: function assert_all_frozen (line 573) | def assert_all_frozen(model): function assert_not_all_frozen (line 580) | def assert_not_all_frozen(model): function parse_numeric_n_bool_cl_kwargs (line 586) | def parse_numeric_n_bool_cl_kwargs(unparsed_args: List[str]) -> Dict[str... function write_txt_file (line 611) | def write_txt_file(ordered_tgt, path): function chunks (line 618) | def chunks(lst, n): function check_output_dir (line 624) | def check_output_dir(args, expected_items=0): FILE: mplsandbox_for_rl/transformers/examples/research_projects/tapex/run_tabfact_with_tapex.py class DataTrainingArguments (line 61) | class DataTrainingArguments: method __post_init__ (line 133) | def __post_init__(self): class ModelArguments (line 148) | class ModelArguments: function main (line 185) | def main(): function _mp_fn (line 465) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/research_projects/tapex/run_wikisql_with_tapex.py class ModelArguments (line 71) | class ModelArguments: class DataTrainingArguments (line 115) | class DataTrainingArguments: method __post_init__ (line 232) | def __post_init__(self): function main (line 246) | def main(): function _mp_fn (line 643) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/research_projects/tapex/run_wikitablequestions_with_tapex.py class ModelArguments (line 69) | class ModelArguments: class DataTrainingArguments (line 113) | class DataTrainingArguments: method __post_init__ (line 230) | def __post_init__(self): function main (line 244) | def main(): function _mp_fn (line 619) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/examples/research_projects/tapex/wikisql_utils.py function _split_thousands (line 31) | def _split_thousands(delimiter, value): function convert_to_float (line 36) | def convert_to_float(value): function _normalize_float (line 76) | def _normalize_float(answer): class _Aggregation (line 94) | class _Aggregation(enum.Enum): class _Operator (line 105) | class _Operator(enum.Enum): class _Condition (line 114) | class _Condition: function _normalize_for_match (line 125) | def _normalize_for_match(x): function _compare (line 129) | def _compare(operator, src, tgt): function _parse_value (line 139) | def _parse_value(table, column, cell_value): function _is_string (line 145) | def _is_string(x): function _respect_conditions (line 149) | def _respect_conditions(table, row, conditions): function _get_float_answer (line 168) | def _get_float_answer(table, answer_coordinates, aggregation_op): function _get_answer_coordinates (line 204) | def _get_answer_coordinates(table, sql_query): function _get_answer_text (line 244) | def _get_answer_text(table, answer_coordinates, float_answer): function retrieve_wikisql_query_answer_tapas (line 250) | def retrieve_wikisql_query_answer_tapas(table, example) -> List: FILE: mplsandbox_for_rl/transformers/examples/research_projects/token-healing/run_token_healing.py function generate (line 6) | def generate(inputs, model, tokenizer, token_healing): function main (line 18) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/visual_bert/extracting_data.py class Extract (line 43) | class Extract: method __init__ (line 44) | def __init__(self, argv=sys.argv[1:]): method _vqa_file_split (line 78) | def _vqa_file_split(self, file): method file_generator (line 84) | def file_generator(self): method __call__ (line 98) | def __call__(self): function tryload (line 128) | def tryload(stream): FILE: mplsandbox_for_rl/transformers/examples/research_projects/visual_bert/modeling_frcnn.py function norm_box (line 37) | def norm_box(boxes, raw_sizes): function pad_list_tensors (line 47) | def pad_list_tensors( function do_nms (line 116) | def do_nms(boxes, scores, image_shape, score_thresh, nms_thresh, mind, m... function _clip_box (line 143) | def _clip_box(tensor, box_size: Tuple[int, int]): function _nonempty_boxes (line 152) | def _nonempty_boxes(box, threshold: float = 0.0) -> torch.Tensor: function get_norm (line 159) | def get_norm(norm, out_channels): function _create_grid_offsets (line 172) | def _create_grid_offsets(size: List[int], stride: int, offset: float, de... function build_backbone (line 195) | def build_backbone(cfg): function find_top_rpn_proposals (line 255) | def find_top_rpn_proposals( function subsample_labels (line 335) | def subsample_labels(labels, num_samples, positive_fraction, bg_label): function add_ground_truth_to_proposals (line 360) | def add_ground_truth_to_proposals(gt_boxes, proposals): function add_ground_truth_to_proposals_single_image (line 364) | def add_ground_truth_to_proposals_single_image(gt_boxes, proposals): function _fmt_box_list (line 368) | def _fmt_box_list(box_tensor, batch_index: int): function convert_boxes_to_pooler_format (line 378) | def convert_boxes_to_pooler_format(box_lists: List[torch.Tensor]): function assign_boxes_to_levels (line 386) | def assign_boxes_to_levels( class _NewEmptyTensorOp (line 403) | class _NewEmptyTensorOp(torch.autograd.Function): method forward (line 405) | def forward(ctx, x, new_shape): method backward (line 410) | def backward(ctx, grad): class ShapeSpec (line 415) | class ShapeSpec(namedtuple("_ShapeSpec", ["channels", "height", "width",... method __new__ (line 416) | def __new__(cls, *, channels=None, height=None, width=None, stride=None): class Box2BoxTransform (line 420) | class Box2BoxTransform: method __init__ (line 427) | def __init__(self, weights: Tuple[float, float, float, float], scale_c... method get_deltas (line 449) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 483) | def apply_deltas(self, deltas, boxes): class Matcher (line 522) | class Matcher: method __init__ (line 536) | def __init__( method __call__ (line 565) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 603) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): class RPNOutputs (line 625) | class RPNOutputs: method __init__ (line 626) | def __init__( method _get_ground_truth (line 668) | def _get_ground_truth(self): method predict_proposals (line 671) | def predict_proposals(self): method predict_objectness_logits (line 688) | def predict_objectness_logits(self): class Conv2d (line 702) | class Conv2d(nn.Conv2d): method __init__ (line 703) | def __init__(self, *args, **kwargs): method forward (line 711) | def forward(self, x): class LastLevelMaxPool (line 742) | class LastLevelMaxPool(nn.Module): method __init__ (line 747) | def __init__(self): method forward (line 752) | def forward(self, x): class LastLevelP6P7 (line 756) | class LastLevelP6P7(nn.Module): method __init__ (line 761) | def __init__(self, in_channels, out_channels): method forward (line 768) | def forward(self, c5): class BasicStem (line 774) | class BasicStem(nn.Module): method __init__ (line 775) | def __init__(self, in_channels=3, out_channels=64, norm="BN", caffe_ma... method forward (line 789) | def forward(self, x): method out_channels (line 799) | def out_channels(self): method stride (line 803) | def stride(self): class ResNetBlockBase (line 807) | class ResNetBlockBase(nn.Module): method __init__ (line 808) | def __init__(self, in_channels, out_channels, stride): method freeze (line 814) | def freeze(self): class BottleneckBlock (line 820) | class BottleneckBlock(ResNetBlockBase): method __init__ (line 821) | def __init__( method forward (line 880) | def forward(self, x): class Backbone (line 899) | class Backbone(nn.Module, metaclass=ABCMeta): method __init__ (line 900) | def __init__(self): method forward (line 904) | def forward(self): method size_divisibility (line 908) | def size_divisibility(self): method output_shape (line 916) | def output_shape(self): method out_features (line 926) | def out_features(self): method out_feature_strides (line 931) | def out_feature_strides(self): method out_feature_channels (line 936) | def out_feature_channels(self): class ResNet (line 941) | class ResNet(Backbone): method __init__ (line 942) | def __init__(self, stem, stages, num_classes=None, out_features=None): method forward (line 991) | def forward(self, x): method output_shape (line 1007) | def output_shape(self): method make_stage (line 1017) | def make_stage( class ROIPooler (line 1054) | class ROIPooler(nn.Module): method __init__ (line 1060) | def __init__( method forward (line 1091) | def forward(self, feature_maps, boxes): class ROIOutputs (line 1135) | class ROIOutputs: method __init__ (line 1136) | def __init__(self, cfg, training=False): method _predict_boxes (line 1149) | def _predict_boxes(self, proposals, box_deltas, preds_per_image): method _predict_objs (line 1159) | def _predict_objs(self, obj_logits, preds_per_image): method _predict_attrs (line 1164) | def _predict_attrs(self, attr_logits, preds_per_image): method inference (line 1170) | def inference( method training (line 1223) | def training(self, obj_logits, attr_logits, box_deltas, pred_boxes, fe... method __call__ (line 1226) | def __call__( class Res5ROIHeads (line 1249) | class Res5ROIHeads(nn.Module): method __init__ (line 1256) | def __init__(self, cfg, input_shape): method _build_res5_block (line 1309) | def _build_res5_block(self, cfg): method _shared_roi_transform (line 1331) | def _shared_roi_transform(self, features, boxes): method forward (line 1335) | def forward(self, features, proposal_boxes, gt_boxes=None): class AnchorGenerator (line 1350) | class AnchorGenerator(nn.Module): method __init__ (line 1355) | def __init__(self, cfg, input_shape: List[ShapeSpec]): method _calculate_anchors (line 1375) | def _calculate_anchors(self, sizes, aspect_ratios): method box_dim (line 1390) | def box_dim(self): method num_cell_anchors (line 1394) | def num_cell_anchors(self): method grid_anchors (line 1401) | def grid_anchors(self, grid_sizes): method generate_cell_anchors (line 1411) | def generate_cell_anchors(self, sizes=(32, 64, 128, 256, 512), aspect_... method forward (line 1429) | def forward(self, features): class RPNHead (line 1443) | class RPNHead(nn.Module): method __init__ (line 1451) | def __init__(self, cfg, input_shape: List[ShapeSpec]): method forward (line 1483) | def forward(self, features): class RPN (line 1497) | class RPN(nn.Module): method __init__ (line 1502) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): method training (line 1532) | def training(self, images, image_shapes, features, gt_boxes): method inference (line 1535) | def inference(self, outputs, images, image_shapes, features, gt_boxes=... method forward (line 1558) | def forward(self, images, image_shapes, features, gt_boxes=None): class FastRCNNOutputLayers (line 1591) | class FastRCNNOutputLayers(nn.Module): method __init__ (line 1598) | def __init__( method forward (line 1641) | def forward(self, roi_features): class GeneralizedRCNN (line 1658) | class GeneralizedRCNN(nn.Module): method __init__ (line 1659) | def __init__(self, cfg): method from_pretrained (line 1670) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method forward (line 1831) | def forward( method inference (line 1857) | def inference( FILE: mplsandbox_for_rl/transformers/examples/research_projects/visual_bert/processing_image.py class ResizeShortestEdge (line 31) | class ResizeShortestEdge: method __init__ (line 32) | def __init__(self, short_edge_length, max_size=sys.maxsize): method __call__ (line 42) | def __call__(self, imgs): class Preprocess (line 76) | class Preprocess: method __init__ (line 77) | def __init__(self, cfg): method pad (line 88) | def pad(self, images): method __call__ (line 102) | def __call__(self, images, single_image=False): function _scale_box (line 139) | def _scale_box(boxes, scale_yx): function _clip_box (line 145) | def _clip_box(tensor, box_size: Tuple[int, int]): FILE: mplsandbox_for_rl/transformers/examples/research_projects/visual_bert/utils.py function load_labels (line 79) | def load_labels(objs=OBJECTS, attrs=ATTRIBUTES): function load_checkpoint (line 92) | def load_checkpoint(ckp): class Config (line 106) | class Config: method __init__ (line 109) | def __init__(self, dictionary: dict, name: str = "root", level=0): method __repr__ (line 125) | def __repr__(self): method __setattr__ (line 128) | def __setattr__(self, key, val): method to_dict (line 143) | def to_dict(self): method dump_yaml (line 146) | def dump_yaml(self, data, file_name): method dump_json (line 150) | def dump_json(self, data, file_name): method load_yaml (line 155) | def load_yaml(config): method __str__ (line 160) | def __str__(self): method from_pretrained (line 177) | def from_pretrained(cls, pretrained_model_name_or_path: str, **kwargs): method get_config_dict (line 182) | def get_config_dict(cls, pretrained_model_name_or_path: str, **kwargs): function compare (line 225) | def compare(in_tensor): function is_remote_url (line 240) | def is_remote_url(url_or_filename): function hf_bucket_url (line 245) | def hf_bucket_url(model_id: str, filename: str, use_cdn=True) -> str: function http_get (line 254) | def http_get( function get_from_cache (line 290) | def get_from_cache( function url_to_filename (line 403) | def url_to_filename(url, etag=None): function cached_path (line 419) | def cached_path( function get_data (line 492) | def get_data(query, delim=","): function get_image_from_url (line 512) | def get_image_from_url(url): function load_frcnn_pkl_from_url (line 519) | def load_frcnn_pkl_from_url(url): function get_demo_path (line 536) | def get_demo_path(): function img_tensorize (line 540) | def img_tensorize(im, input_format="RGB"): function chunk (line 553) | def chunk(images, batch=1): FILE: mplsandbox_for_rl/transformers/examples/research_projects/visual_bert/visualizing_image.py class SingleImageViz (line 36) | class SingleImageViz: method __init__ (line 37) | def __init__( method add_box (line 89) | def add_box(self, box, color=None): method draw_boxes (line 108) | def draw_boxes(self, boxes, obj_ids=None, obj_scores=None, attr_ids=No... method draw_labels (line 141) | def draw_labels(self, label, box, color): method draw_text (line 163) | def draw_text( method save (line 195) | def save(self, saveas=None): method _create_text_labels_attr (line 206) | def _create_text_labels_attr(self, classes, scores, attr_classes, attr... method _create_text_labels (line 215) | def _create_text_labels(self, classes, scores): method _random_color (line 224) | def _random_color(self, maximum=255): method _get_buffer (line 231) | def _get_buffer(self): method _change_color_brightness (line 259) | def _change_color_brightness(self, color, brightness_factor): FILE: mplsandbox_for_rl/transformers/examples/research_projects/vqgan-clip/VQGAN_CLIP.py class ProcessorGradientFlow (line 17) | class ProcessorGradientFlow: method __init__ (line 24) | def __init__(self, device: str = "cpu", clip_model: str = "openai/clip... method preprocess_img (line 33) | def preprocess_img(self, images): method __call__ (line 39) | def __call__(self, text=None, images=None, **kwargs): class VQGAN_CLIP (line 46) | class VQGAN_CLIP(nn.Module): method __init__ (line 47) | def __init__( method make_animation (line 91) | def make_animation(self, input_path=None, output_path=None, total_dura... method _get_latent (line 121) | def _get_latent(self, path=None, img=None): method _add_vector (line 131) | def _add_vector(self, transform_vector): method _get_clip_similarity (line 141) | def _get_clip_similarity(self, prompts, image, weights=None): method _get_clip_loss (line 149) | def _get_clip_loss(self, pos_prompts, neg_prompts, image): method _optimize_CLIP (line 158) | def _optimize_CLIP(self, original_img, pos_prompts, neg_prompts): method _init_logging (line 177) | def _init_logging(self, positive_prompts, negative_prompts, image_path): method process_prompts (line 187) | def process_prompts(self, prompts): method generate (line 211) | def generate( FILE: mplsandbox_for_rl/transformers/examples/research_projects/vqgan-clip/img_processing.py function preprocess (line 9) | def preprocess(img, target_image_size=256): function preprocess_vqgan (line 23) | def preprocess_vqgan(x): function custom_to_pil (line 28) | def custom_to_pil(x, process=True, mode="RGB"): function post_process_tensor (line 41) | def post_process_tensor(x): function loop_post_process (line 48) | def loop_post_process(x): FILE: mplsandbox_for_rl/transformers/examples/research_projects/vqgan-clip/loaders.py function load_config (line 9) | def load_config(config_path, display=False): function load_vqgan (line 16) | def load_vqgan(device, conf_path=None, ckpt_path=None): function reconstruct_with_vqgan (line 32) | def reconstruct_with_vqgan(x, model): function get_obj_from_str (line 39) | def get_obj_from_str(string, reload=False): function instantiate_from_config (line 47) | def instantiate_from_config(config): function load_model_from_config (line 53) | def load_model_from_config(config, sd, gpu=True, eval_mode=True): function load_model (line 64) | def load_model(config, ckpt, gpu, eval_mode): FILE: mplsandbox_for_rl/transformers/examples/research_projects/vqgan-clip/utils.py function freeze_module (line 7) | def freeze_module(module): function get_device (line 12) | def get_device(): function show_pil (line 25) | def show_pil(img): function get_timestamp (line 32) | def get_timestamp(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/wav2vec2/alignment.py class Wav2Vec2Aligner (line 15) | class Wav2Vec2Aligner: method __init__ (line 16) | def __init__(self, model_name, input_wavs_sr, cuda): method speech_file_to_array_fn (line 33) | def speech_file_to_array_fn(self, wav_path): method align_single_sample (line 38) | def align_single_sample(self, item): method align_data (line 178) | def align_data(self, wav_dir, text_file, output_dir): function main (line 202) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/wav2vec2/run_asr.py class ModelArguments (line 42) | class ModelArguments: function configure_logger (line 63) | def configure_logger(model_args: ModelArguments, training_args: Training... class DataTrainingArguments (line 78) | class DataTrainingArguments: class Orthography (line 142) | class Orthography: method from_name (line 169) | def from_name(cls, name: str): method preprocess_for_training (line 192) | def preprocess_for_training(self, text: str) -> str: method create_processor (line 202) | def create_processor(self, model_args: ModelArguments) -> Wav2Vec2Proc... class DataCollatorCTCWithPadding (line 224) | class DataCollatorCTCWithPadding: method __call__ (line 256) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... class CTCTrainer (line 285) | class CTCTrainer(Trainer): method training_step (line 286) | def training_step(self, model: nn.Module, inputs: Dict[str, Union[torc... function main (line 338) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/wav2vec2/run_common_voice.py function list_field (line 43) | def list_field(default=None, metadata=None): class ModelArguments (line 48) | class ModelArguments: class DataTrainingArguments (line 93) | class DataTrainingArguments: class DataCollatorCTCWithPadding (line 143) | class DataCollatorCTCWithPadding: method __call__ (line 175) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... class CTCTrainer (line 204) | class CTCTrainer(Trainer): method training_step (line 205) | def training_step(self, model: nn.Module, inputs: Dict[str, Union[torc... function main (line 257) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/wav2vec2/run_pretrain.py class ModelArguments (line 38) | class ModelArguments: function configure_logger (line 68) | def configure_logger(model_args: ModelArguments, training_args: Training... class DataTrainingArguments (line 83) | class DataTrainingArguments: class DataCollatorForWav2Vec2Pretraining (line 135) | class DataCollatorForWav2Vec2Pretraining: method __call__ (line 169) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... class Wav2Vec2PreTrainer (line 212) | class Wav2Vec2PreTrainer(Trainer): method __init__ (line 217) | def __init__(self, *args, max_gumbel_temp=1, min_gumbel_temp=0, gumbel... method training_step (line 224) | def training_step(self, model: nn.Module, inputs: Dict[str, Union[torc... function main (line 287) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/wav2vec2/test_wav2vec2_deepspeed.py function custom_name_func (line 61) | def custom_name_func(func, param_num, param): class TestDeepSpeedWav2Vec2 (line 75) | class TestDeepSpeedWav2Vec2(TestCasePlus): method test_fp32_non_distributed (line 77) | def test_fp32_non_distributed(self, stage, model): method test_fp32_distributed (line 87) | def test_fp32_distributed(self, stage, model): method test_fp16_non_distributed (line 96) | def test_fp16_non_distributed(self, stage, model): method test_fp16_distributed (line 106) | def test_fp16_distributed(self, stage, model): method do_checks (line 114) | def do_checks(self, output_dir): method run_and_check (line 120) | def run_and_check( method run_trainer (line 144) | def run_trainer( method get_launcher (line 193) | def get_launcher(self, distributed=False): FILE: mplsandbox_for_rl/transformers/examples/research_projects/xtreme-s/run_xtreme_s.py function list_field (line 61) | def list_field(default=None, metadata=None): class ModelArguments (line 77) | class ModelArguments: class DataTrainingArguments (line 154) | class DataTrainingArguments: class SpeechDataCollatorWithPadding (line 329) | class SpeechDataCollatorWithPadding: method __call__ (line 337) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function create_vocabulary_from_data (line 376) | def create_vocabulary_from_data( function main (line 420) | def main(): FILE: mplsandbox_for_rl/transformers/examples/research_projects/zero-shot-distillation/distill_classifier.py class TeacherModelArguments (line 36) | class TeacherModelArguments: class StudentModelArguments (line 67) | class StudentModelArguments: class DataTrainingArguments (line 74) | class DataTrainingArguments: class DistillTrainingArguments (line 84) | class DistillTrainingArguments(TrainingArguments): class DistillationTrainer (line 117) | class DistillationTrainer(Trainer): method compute_loss (line 118) | def compute_loss(self, model, inputs, return_outputs=False): function read_lines (line 131) | def read_lines(path): function get_premise_hypothesis_pairs (line 141) | def get_premise_hypothesis_pairs(examples, class_names, hypothesis_templ... function get_entailment_id (line 151) | def get_entailment_id(config): function get_teacher_predictions (line 159) | def get_teacher_predictions( function main (line 216) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/benchmarking/plot_csv_file.py function list_field (line 27) | def list_field(default=None, metadata=None): class PlotArguments (line 32) | class PlotArguments: function can_convert_to_int (line 67) | def can_convert_to_int(string): function can_convert_to_float (line 75) | def can_convert_to_float(string): class Plot (line 83) | class Plot: method __init__ (line 84) | def __init__(self, args): method plot (line 105) | def plot(self): function main (line 170) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/benchmarking/run_benchmark_tf.py function main (line 22) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/contrastive-image-text/run_clip.py class ModelArguments (line 62) | class ModelArguments: class DataTrainingArguments (line 123) | class DataTrainingArguments: method __post_init__ (line 189) | def __post_init__(self): function crop_to_square (line 209) | def crop_to_square(image): function load_as_tf_dataset (line 218) | def load_as_tf_dataset(dataset, image_column, image_size, mean, std, bat... function main (line 244) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/image-classification/run_image_classification.py function pil_loader (line 66) | def pil_loader(path: str): class DataTrainingArguments (line 73) | class DataTrainingArguments: method __post_init__ (line 129) | def __post_init__(self): class ModelArguments (line 137) | class ModelArguments: function center_crop (line 186) | def center_crop(image, size): function random_crop (line 198) | def random_crop(image, scale=(0.08, 1.0), ratio=(3.0 / 4.0, 4.0 / 3.0)): function random_resized_crop (line 221) | def random_resized_crop(image, size, scale=(0.08, 1.0), ratio=(3.0 / 4.0... function main (line 228) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/language-modeling-tpu/prepare_tfrecord_shards.py function parse_args (line 32) | def parse_args(): function tokenize_function (line 93) | def tokenize_function(tokenizer): function get_serialized_examples (line 100) | def get_serialized_examples(tokenized_data): function main (line 116) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/language-modeling-tpu/run_mlm.py function parse_args (line 55) | def parse_args(): function initialize_tpu (line 169) | def initialize_tpu(args): function count_samples (line 189) | def count_samples(file_list): function prepare_dataset (line 200) | def prepare_dataset(records, decode_fn, mask_fn, batch_size, shuffle, sh... function main (line 218) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/language-modeling-tpu/train_unigram.py function parse_args (line 33) | def parse_args(): function main (line 80) | def main(args): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/language-modeling/run_clm.py class ModelArguments (line 71) | class ModelArguments: method __post_init__ (line 135) | def __post_init__(self): class DataTrainingArguments (line 143) | class DataTrainingArguments: method __post_init__ (line 208) | def __post_init__(self): function main (line 223) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/language-modeling/run_mlm.py class ModelArguments (line 69) | class ModelArguments: method __post_init__ (line 133) | def __post_init__(self): class DataTrainingArguments (line 141) | class DataTrainingArguments: method __post_init__ (line 214) | def __post_init__(self): function main (line 229) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/multiple-choice/run_swag.py class DataCollatorForMultipleChoice (line 62) | class DataCollatorForMultipleChoice: method __call__ (line 93) | def __call__(self, features): class ModelArguments (line 123) | class ModelArguments: class DataTrainingArguments (line 171) | class DataTrainingArguments: method __post_init__ (line 226) | def __post_init__(self): function main (line 238) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/question-answering/run_qa.py class ModelArguments (line 72) | class ModelArguments: class DataTrainingArguments (line 116) | class DataTrainingArguments: method __post_init__ (line 219) | def __post_init__(self): class SavePretrainedCallback (line 243) | class SavePretrainedCallback(keras.callbacks.Callback): method __init__ (line 247) | def __init__(self, output_dir, **kwargs): method on_epoch_end (line 251) | def on_epoch_end(self, epoch, logs=None): function main (line 258) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/question-answering/utils_qa.py function postprocess_qa_predictions (line 32) | def postprocess_qa_predictions( function postprocess_qa_predictions_with_beam_search (line 253) | def postprocess_qa_predictions_with_beam_search( FILE: mplsandbox_for_rl/transformers/examples/tensorflow/summarization/run_summarization.py class ModelArguments (line 76) | class ModelArguments: class DataTrainingArguments (line 124) | class DataTrainingArguments: method __post_init__ (line 252) | def __post_init__(self): function main (line 286) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/test_tensorflow_examples.py function get_setup_file (line 78) | def get_setup_file(): function get_results (line 85) | def get_results(output_dir): function is_cuda_available (line 96) | def is_cuda_available(): class ExamplesTests (line 104) | class ExamplesTests(TestCasePlus): method test_run_text_classification (line 106) | def test_run_text_classification(self): method test_run_clm (line 136) | def test_run_clm(self): method test_run_mlm (line 162) | def test_run_mlm(self): method test_run_ner (line 184) | def test_run_ner(self): method test_run_squad (line 211) | def test_run_squad(self): method test_run_swag (line 236) | def test_run_swag(self): method test_run_summarization (line 260) | def test_run_summarization(self): method test_run_translation (line 287) | def test_run_translation(self): method test_run_image_classification (line 314) | def test_run_image_classification(self): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/text-classification/run_glue.py class DataTrainingArguments (line 69) | class DataTrainingArguments: method __post_init__ (line 134) | def __post_init__(self): class ModelArguments (line 141) | class ModelArguments: function main (line 191) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/text-classification/run_text_classification.py class SavePretrainedCallback (line 66) | class SavePretrainedCallback(keras.callbacks.Callback): method __init__ (line 70) | def __init__(self, output_dir, **kwargs): method on_epoch_end (line 74) | def on_epoch_end(self, epoch, logs=None): class DataTrainingArguments (line 83) | class DataTrainingArguments: method __post_init__ (line 150) | def __post_init__(self): class ModelArguments (line 165) | class ModelArguments: function main (line 211) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/token-classification/run_ner.py class ModelArguments (line 56) | class ModelArguments: class DataTrainingArguments (line 100) | class DataTrainingArguments: method __post_init__ (line 188) | def __post_init__(self): function main (line 204) | def main(): FILE: mplsandbox_for_rl/transformers/examples/tensorflow/translation/run_translation.py class ModelArguments (line 70) | class ModelArguments: class DataTrainingArguments (line 118) | class DataTrainingArguments: method __post_init__ (line 250) | def __post_init__(self): function main (line 267) | def main(): FILE: mplsandbox_for_rl/transformers/hubconf.py function config (line 39) | def config(*args, **kwargs): function tokenizer (line 59) | def tokenizer(*args, **kwargs): function model (line 73) | def model(*args, **kwargs): function modelForCausalLM (line 92) | def modelForCausalLM(*args, **kwargs): function modelForMaskedLM (line 110) | def modelForMaskedLM(*args, **kwargs): function modelForSequenceClassification (line 129) | def modelForSequenceClassification(*args, **kwargs): function modelForQuestionAnswering (line 148) | def modelForQuestionAnswering(*args, **kwargs): FILE: mplsandbox_for_rl/transformers/scripts/benchmark/trainer-benchmark.py class Tee (line 125) | class Tee: method __init__ (line 132) | def __init__(self, filename): method __getattr__ (line 136) | def __getattr__(self, attr): method write (line 139) | def write(self, msg): function get_original_command (line 145) | def get_original_command(max_width=80, full_python_path=False): function get_base_command (line 183) | def get_base_command(args, output_dir): function process_run_single (line 199) | def process_run_single(id, cmd, variation, output_dir, target_metric_key... function process_run (line 239) | def process_run( function get_versions (line 282) | def get_versions(): function process_results (line 298) | def process_results(results, target_metric_key, report_metric_keys, base... function main (line 345) | def main(): FILE: mplsandbox_for_rl/transformers/scripts/check_tokenizers.py function check_diff (line 24) | def check_diff(spm_diff, tok_diff, slow, fast): function check_LTR_mark (line 45) | def check_LTR_mark(line, idx, fast): function check_details (line 55) | def check_details(line, spm_ids, tok_ids, slow, fast): function test_string (line 114) | def test_string(slow, fast, text): function test_tokenizer (line 146) | def test_tokenizer(slow, fast): FILE: mplsandbox_for_rl/transformers/scripts/distributed/torch-distributed-gpu-test.py function printflock (line 53) | def printflock(*msgs): FILE: mplsandbox_for_rl/transformers/scripts/fsmt/gen-card-allenai-wmt16.py function write_model_card (line 23) | def write_model_card(model_card_dir, src_lang, tgt_lang, model_name): FILE: mplsandbox_for_rl/transformers/scripts/fsmt/gen-card-allenai-wmt19.py function write_model_card (line 23) | def write_model_card(model_card_dir, src_lang, tgt_lang, model_name): FILE: mplsandbox_for_rl/transformers/scripts/fsmt/gen-card-facebook-wmt19.py function write_model_card (line 23) | def write_model_card(model_card_dir, src_lang, tgt_lang): FILE: mplsandbox_for_rl/transformers/scripts/stale.py function main (line 35) | def main(): FILE: mplsandbox_for_rl/transformers/setup.py function deps_list (line 220) | def deps_list(*pkgs): class DepsTableUpdateCommand (line 224) | class DepsTableUpdateCommand(Command): method initialize_options (line 236) | def initialize_options(self): method finalize_options (line 239) | def finalize_options(self): method run (line 242) | def run(self): FILE: mplsandbox_for_rl/transformers/src/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 MishActivation (line 140) | class MishActivation(nn.Module): method __init__ (line 146) | def __init__(self): method _mish_python (line 153) | def _mish_python(self, input: Tensor) -> Tensor: method forward (line 156) | def forward(self, input: Tensor) -> Tensor: class LinearActivation (line 160) | class LinearActivation(nn.Module): method forward (line 165) | def forward(self, input: Tensor) -> Tensor: class LaplaceActivation (line 169) | class LaplaceActivation(nn.Module): method forward (line 177) | def forward(self, input, mu=0.707107, sigma=0.282095): class ReLUSquaredActivation (line 182) | class ReLUSquaredActivation(nn.Module): method forward (line 187) | def forward(self, input): class ClassInstantier (line 193) | class ClassInstantier(OrderedDict): method __getitem__ (line 194) | def __getitem__(self, key): function get_activation (line 224) | def get_activation(activation_string): FILE: mplsandbox_for_rl/transformers/src/transformers/activations_tf.py function _gelu (line 34) | def _gelu(x): function _gelu_new (line 47) | def _gelu_new(x): function mish (line 65) | def mish(x): function gelu_fast (line 71) | def gelu_fast(x): function quick_gelu (line 79) | def quick_gelu(x): function gelu_10 (line 85) | def gelu_10(x): function glu (line 99) | def glu(x, axis=-1): function approximate_gelu_wrap (line 117) | def approximate_gelu_wrap(x): function get_tf_activation (line 143) | def get_tf_activation(activation_string): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/agent_types.py class AgentType (line 43) | class AgentType: method __init__ (line 54) | def __init__(self, value): method __str__ (line 57) | def __str__(self): method to_raw (line 60) | def to_raw(self): method to_string (line 66) | def to_string(self) -> str: class AgentText (line 73) | class AgentText(AgentType, str): method to_raw (line 78) | def to_raw(self): method to_string (line 81) | def to_string(self): class AgentImage (line 85) | class AgentImage(AgentType, ImageType): method __init__ (line 90) | def __init__(self, value): method _ipython_display_ (line 112) | def _ipython_display_(self, include=None, exclude=None): method to_raw (line 120) | def to_raw(self): method to_string (line 135) | def to_string(self): method save (line 162) | def save(self, output_bytes, format, **params): class AgentAudio (line 174) | class AgentAudio(AgentType, str): method __init__ (line 179) | def __init__(self, value, samplerate=16_000): method _ipython_display_ (line 199) | def _ipython_display_(self, include=None, exclude=None): method to_raw (line 207) | def to_raw(self): method to_string (line 219) | def to_string(self): function handle_agent_inputs (line 241) | def handle_agent_inputs(*args, **kwargs): function handle_agent_outputs (line 247) | def handle_agent_outputs(output, output_type=None): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/agents.py class CustomFormatter (line 55) | class CustomFormatter(logging.Formatter): method format (line 76) | def format(self, record): function parse_json_blob (line 89) | def parse_json_blob(json_blob: str) -> Dict[str, str]: function parse_code_blob (line 111) | def parse_code_blob(code_blob: str) -> str: function parse_json_tool_call (line 129) | def parse_json_tool_call(json_blob: str) -> Tuple[str, Dict[str, str]]: function parse_text_tool_call (line 142) | def parse_text_tool_call(text: str) -> Tuple[str, Union[str, Dict[str, s... function to_text (line 163) | def to_text(input: Union[List[Dict[str, str]], Dict[str, str], str]) -> ... class Toolbox (line 176) | class Toolbox: method __init__ (line 188) | def __init__(self, tools: List[Tool], add_base_tools: bool = False): method add_base_tools (line 194) | def add_base_tools(self, add_python_interpreter: bool = False): method tools (line 206) | def tools(self) -> Dict[str, Tool]: method show_tool_descriptions (line 210) | def show_tool_descriptions(self, tool_description_template: str = None... method add_tool (line 222) | def add_tool(self, tool: Tool): method remove_tool (line 234) | def remove_tool(self, tool_name: str): method update_tool (line 248) | def update_tool(self, tool: Tool): method clear_toolbox (line 262) | def clear_toolbox(self): method _load_tools_if_needed (line 266) | def _load_tools_if_needed(self): method __repr__ (line 272) | def __repr__(self): class AgentError (line 279) | class AgentError(Exception): method __init__ (line 282) | def __init__(self, message): class AgentParsingError (line 287) | class AgentParsingError(AgentError): class AgentExecutionError (line 293) | class AgentExecutionError(AgentError): class AgentMaxIterationsError (line 299) | class AgentMaxIterationsError(AgentError): class AgentGenerationError (line 305) | class AgentGenerationError(AgentError): function format_prompt_with_tools (line 311) | def format_prompt_with_tools(toolbox: Toolbox, prompt_template: str, too... function format_prompt_with_imports (line 320) | def format_prompt_with_imports(prompt_template: str, authorized_imports:... class Agent (line 326) | class Agent: method __init__ (line 327) | def __init__( method toolbox (line 380) | def toolbox(self) -> Toolbox: method initialize_for_run (line 384) | def initialize_for_run(self): method write_inner_memory_from_logs (line 401) | def write_inner_memory_from_logs(self, summary_mode: Optional[bool] = ... method get_succinct_logs (line 458) | def get_succinct_logs(self): method extract_action (line 461) | def extract_action(self, llm_output: str, split_token: str) -> str: method execute_tool_call (line 482) | def execute_tool_call(self, tool_name: str, arguments: Dict[str, str])... method log_code_action (line 512) | def log_code_action(self, code_action: str) -> None: method run (line 522) | def run(self, **kwargs): class CodeAgent (line 527) | class CodeAgent(Agent): method __init__ (line 532) | def __init__( method parse_code_blob (line 563) | def parse_code_blob(self, result: str) -> str: method run (line 570) | def run(self, task: str, return_generated_code: bool = False, **kwargs): class ReactAgent (line 648) | class ReactAgent(Agent): method __init__ (line 655) | def __init__( method provide_final_answer (line 678) | def provide_final_answer(self, task) -> str: method run (line 700) | def run(self, task: str, stream: bool = False, reset: bool = True, **k... method stream_run (line 727) | def stream_run(self, task: str): method direct_run (line 756) | def direct_run(self, task: str): method planning_step (line 785) | def planning_step(self, task, is_first_step: bool = False, iteration: ... class ReactJsonAgent (line 879) | class ReactJsonAgent(ReactAgent): method __init__ (line 886) | def __init__( method step (line 906) | def step(self): class ReactCodeAgent (line 985) | class ReactCodeAgent(ReactAgent): method __init__ (line 992) | def __init__( method step (line 1026) | def step(self): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/default_tools.py function custom_print (line 31) | def custom_print(*args): class PreTool (line 91) | class PreTool: function get_remote_tools (line 106) | def get_remote_tools(logger, organization="huggingface-tools"): function setup_default_tools (line 131) | def setup_default_tools(logger): class PythonInterpreterTool (line 151) | class PythonInterpreterTool(Tool): method __init__ (line 158) | def __init__(self, *args, authorized_imports=None, **kwargs): method forward (line 174) | def forward(self, code): class FinalAnswerTool (line 181) | class FinalAnswerTool(Tool): method forward (line 187) | def forward(self, answer): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/document_question_answering.py class DocumentQuestionAnsweringTool (line 32) | class DocumentQuestionAnsweringTool(PipelineTool): method __init__ (line 48) | def __init__(self, *args, **kwargs): method encode (line 54) | def encode(self, document: "Image", question: str): method forward (line 68) | def forward(self, inputs): method decode (line 82) | def decode(self, outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/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 224) | def get_theoretical_tools(agent_answer, theoretical_answer, code_answer): function evaluate_code (line 240) | def evaluate_code(code, inputs=None, state=None, verbose=False, return_i... function score_code (line 267) | def score_code(agent_answer, theoretical_answer, verbose: bool = False): function evaluate_one_result (line 286) | def evaluate_one_result(code, agent_answer, theoretical_answer, answer, ... function evaluate_agent (line 329) | def evaluate_agent(agent, batch_size=8, verbose=False, return_errors=Fal... FILE: mplsandbox_for_rl/transformers/src/transformers/agents/image_question_answering.py class ImageQuestionAnsweringTool (line 26) | class ImageQuestionAnsweringTool(PipelineTool): method __init__ (line 45) | def __init__(self, *args, **kwargs): method encode (line 49) | def encode(self, image: "Image", question: str): method forward (line 52) | def forward(self, inputs): method decode (line 56) | def decode(self, outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/llm_engine.py class MessageRole (line 24) | class MessageRole(str, Enum): method roles (line 32) | def roles(cls): function get_clean_message_list (line 36) | def get_clean_message_list(message_list: List[Dict[str, str]], role_conv... class HfEngine (line 68) | class HfEngine: method __init__ (line 69) | def __init__(self, model: str = "meta-llama/Meta-Llama-3.1-8B-Instruct"): method __call__ (line 73) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/agents/monitoring.py function pull_message (line 21) | def pull_message(step_log: dict): function stream_to_gradio (line 49) | def stream_to_gradio(agent: ReactAgent, task: str, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/prompts.py function download_prompt (line 33) | def download_prompt(prompt_or_repo_id, agent_name, mode="run"): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/python_interpreter.py class InterpreterError (line 33) | class InterpreterError(ValueError): class BreakException (line 66) | class BreakException(Exception): class ContinueException (line 70) | class ContinueException(Exception): class ReturnException (line 74) | class ReturnException(Exception): method __init__ (line 75) | def __init__(self, value): function get_iterable (line 79) | def get_iterable(obj): function evaluate_unaryop (line 88) | def evaluate_unaryop(expression, state, static_tools, custom_tools): function evaluate_lambda (line 102) | def evaluate_lambda(lambda_expression, state, static_tools, custom_tools): function evaluate_while (line 114) | def evaluate_while(while_loop, state, static_tools, custom_tools): function create_function (line 131) | def create_function(func_def, state, static_tools, custom_tools): function create_class (line 179) | def create_class(class_name, class_bases, class_body): function evaluate_function_def (line 186) | def evaluate_function_def(func_def, state, static_tools, custom_tools): function evaluate_class_def (line 191) | def evaluate_class_def(class_def, state, static_tools, custom_tools): function evaluate_augassign (line 213) | def evaluate_augassign(expression, state, static_tools, custom_tools): function evaluate_boolop (line 274) | def evaluate_boolop(node, state, static_tools, custom_tools): function evaluate_binop (line 287) | def evaluate_binop(binop, state, static_tools, custom_tools): function evaluate_assign (line 321) | def evaluate_assign(assign, state, static_tools, custom_tools): function set_value (line 340) | def set_value(target, value, state, static_tools, custom_tools): function evaluate_call (line 364) | def evaluate_call(call, state, static_tools, custom_tools): function evaluate_subscript (line 443) | def evaluate_subscript(subscript, state, static_tools, custom_tools): function evaluate_name (line 473) | def evaluate_name(name, state, static_tools, custom_tools): function evaluate_condition (line 486) | def evaluate_condition(condition, state, static_tools, custom_tools): function evaluate_if (line 527) | def evaluate_if(if_statement, state, static_tools, custom_tools): function evaluate_for (line 543) | def evaluate_for(for_loop, state, static_tools, custom_tools): function evaluate_listcomp (line 563) | def evaluate_listcomp(listcomp, state, static_tools, custom_tools): function evaluate_try (line 584) | def evaluate_try(try_node, state, static_tools, custom_tools): function evaluate_raise (line 610) | def evaluate_raise(raise_node, state, static_tools, custom_tools): function evaluate_assert (line 628) | def evaluate_assert(assert_node, state, static_tools, custom_tools): function evaluate_with (line 640) | def evaluate_with(with_node, state, static_tools, custom_tools): function import_modules (line 663) | def import_modules(expression, state, authorized_imports): function evaluate_dictcomp (line 689) | def evaluate_dictcomp(dictcomp, state, static_tools, custom_tools): function evaluate_ast (line 703) | def evaluate_ast( function evaluate_python_code (line 849) | def evaluate_python_code( FILE: mplsandbox_for_rl/transformers/src/transformers/agents/speech_to_text.py class SpeechToTextTool (line 22) | class SpeechToTextTool(PipelineTool): method encode (line 32) | def encode(self, audio): method forward (line 35) | def forward(self, inputs): method decode (line 38) | def decode(self, outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/text_to_speech.py class TextToSpeechTool (line 29) | class TextToSpeechTool(PipelineTool): method setup (line 42) | def setup(self): method encode (line 47) | def encode(self, text, speaker_embeddings=None): method forward (line 61) | def forward(self, inputs): method decode (line 65) | def decode(self, outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/tools.py function get_repo_type (line 61) | def get_repo_type(repo_id, repo_type=None, **hub_kwargs): class Tool (line 87) | class Tool: method __init__ (line 114) | def __init__(self, *args, **kwargs): method validate_attributes (line 117) | def validate_attributes(self): method forward (line 129) | def forward(self, *args, **kwargs): method __call__ (line 132) | def __call__(self, *args, **kwargs): method setup (line 137) | def setup(self): method save (line 144) | def save(self, output_dir): method from_hub (line 205) | def from_hub( method push_to_hub (line 316) | def push_to_hub( method from_gradio (line 374) | def from_gradio(gradio_tool): method from_langchain (line 396) | def from_langchain(langchain_tool): function get_tool_description_with_args (line 427) | def get_tool_description_with_args(tool: Tool, description_template: str... function compile_jinja_template (line 436) | def compile_jinja_template(template): class PipelineTool (line 455) | class PipelineTool(Tool): method __init__ (line 502) | def __init__( method setup (line 539) | def setup(self): method encode (line 565) | def encode(self, raw_inputs): method forward (line 571) | def forward(self, inputs): method decode (line 578) | def decode(self, outputs): method __call__ (line 584) | def __call__(self, *args, **kwargs): function launch_gradio_demo (line 603) | def launch_gradio_demo(tool_class: Tool): function load_tool (line 656) | def load_tool(task_or_repo_id, model_repo_id=None, token=None, **kwargs): function add_description (line 705) | def add_description(description): class EndpointClient (line 719) | class EndpointClient: method __init__ (line 720) | def __init__(self, endpoint_url: str, token: Optional[str] = None): method encode_image (line 728) | def encode_image(image): method decode_image (line 735) | def decode_image(raw_image): method __call__ (line 747) | def __call__( function parse_langchain_args (line 771) | def parse_langchain_args(args: Dict[str, str]) -> Dict[str, str]: class ToolCollection (line 780) | class ToolCollection: method __init__ (line 806) | def __init__(self, collection_slug: str, token: Optional[str] = None): FILE: mplsandbox_for_rl/transformers/src/transformers/agents/translation.py class TranslationTool (line 229) | class TranslationTool(PipelineTool): method encode (line 264) | def encode(self, text, src_lang, tgt_lang): method forward (line 275) | def forward(self, inputs): method decode (line 278) | def decode(self, outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/audio_utils.py function hertz_to_mel (line 26) | def hertz_to_mel(freq: Union[float, np.ndarray], mel_scale: str = "htk")... function mel_to_hertz (line 62) | def mel_to_hertz(mels: Union[float, np.ndarray], mel_scale: str = "htk")... function hertz_to_octave (line 98) | def hertz_to_octave( function _create_triangular_filter_bank (line 121) | def _create_triangular_filter_bank(fft_freqs: np.ndarray, filter_freqs: ... function chroma_filter_bank (line 143) | def chroma_filter_bank( function mel_filter_bank (line 218) | def mel_filter_bank( function optimal_fft_length (line 306) | def optimal_fft_length(window_length: int) -> int: function window_function (line 319) | def window_function( function spectrogram (line 383) | def spectrogram( function spectrogram_batch (line 584) | def spectrogram_batch( function power_to_db (line 791) | def power_to_db( function power_to_db_batch (line 842) | def power_to_db_batch( function amplitude_to_db (line 891) | def amplitude_to_db( function amplitude_to_db_batch (line 940) | def amplitude_to_db_batch( function get_mel_filter_banks (line 988) | def get_mel_filter_banks( function fram_wave (line 1012) | def fram_wave(waveform: np.array, hop_length: int = 160, fft_window_size... function stft (line 1068) | def stft(frames: np.array, windowing_function: np.array, fft_window_size... FILE: mplsandbox_for_rl/transformers/src/transformers/benchmark/benchmark.py class PyTorchBenchmark (line 49) | class PyTorchBenchmark(Benchmark): method framework_version (line 55) | def framework_version(self): method _inference_speed (line 58) | def _inference_speed(self, model_name: str, batch_size: int, sequence_... method _inference_memory (line 62) | def _inference_memory( method _train_speed (line 68) | def _train_speed(self, model_name: str, batch_size: int, sequence_leng... method _train_memory (line 72) | def _train_memory( method _prepare_inference_func (line 78) | def _prepare_inference_func(self, model_name: str, batch_size: int, se... method _prepare_train_func (line 137) | def _prepare_train_func(self, model_name: str, batch_size: int, sequen... method _measure_speed (line 197) | def _measure_speed(self, func) -> float: method _measure_memory (line 225) | def _measure_memory(self, func: Callable[[], None]) -> [Memory, Memory... FILE: mplsandbox_for_rl/transformers/src/transformers/benchmark/benchmark_args.py class PyTorchBenchmarkArguments (line 42) | class PyTorchBenchmarkArguments(BenchmarkArguments): method __init__ (line 53) | def __init__(self, **kwargs): method _setup_devices (line 85) | def _setup_devices(self) -> Tuple["torch.device", int]: method is_tpu (line 103) | def is_tpu(self): method device_idx (line 107) | def device_idx(self) -> int: method device (line 113) | def device(self) -> "torch.device": method n_gpu (line 118) | def n_gpu(self): method is_gpu (line 123) | def is_gpu(self): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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) -> List[str]: method do_multi_processing (line 159) | def do_multi_processing(self): FILE: mplsandbox_for_rl/transformers/src/transformers/benchmark/benchmark_tf.py function run_with_tf_optimizations (line 50) | 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 96) | def _train_speed(self, model_name: str, batch_size: int, sequence_leng... method _inference_memory (line 103) | def _inference_memory( method _train_memory (line 115) | def _train_memory( method _prepare_inference_func (line 127) | def _prepare_inference_func(self, model_name: str, batch_size: int, se... method _prepare_train_func (line 168) | def _prepare_train_func(self, model_name: str, batch_size: int, sequen... method _measure_speed (line 216) | def _measure_speed(self, func) -> float: method _measure_memory (line 235) | def _measure_memory(self, func: Callable[[], None]) -> [Memory, Memory... FILE: mplsandbox_for_rl/transformers/src/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 322) | def start_memory_tracing( function stop_memory_tracing (line 474) | def stop_memory_tracing( function bytes_to_mega_bytes (line 590) | def bytes_to_mega_bytes(memory_amount: int) -> int: class Benchmark (line 595) | class Benchmark(ABC): method __init__ (line 605) | def __init__(self, args: BenchmarkArguments = None, configs: Pretraine... method print_fn (line 632) | def print_fn(self): method framework_version (line 648) | def framework_version(self): method _inference_speed (line 652) | def _inference_speed(self, model_name: str, batch_size: int, sequence_... method _train_speed (line 656) | def _train_speed(self, model_name: str, batch_size: int, sequence_leng... method _inference_memory (line 660) | def _inference_memory( method _train_memory (line 666) | def _train_memory( method inference_speed (line 671) | def inference_speed(self, *args, **kwargs) -> float: method train_speed (line 674) | def train_speed(self, *args, **kwargs) -> float: method inference_memory (line 677) | def inference_memory(self, *args, **kwargs) -> [Memory, Optional[Memor... method train_memory (line 680) | def train_memory(self, *args, **kwargs) -> [Memory, Optional[MemorySum... method run (line 683) | def run(self): method environment_info (line 783) | def environment_info(self): method print_results (line 841) | def print_results(self, result_dict, type_label): method print_memory_trace_statistics (line 863) | def print_memory_trace_statistics(self, summary: MemorySummary): method save_to_csv (line 887) | def save_to_csv(self, result_dict, filename): FILE: mplsandbox_for_rl/transformers/src/transformers/cache_utils.py class Cache (line 26) | class Cache(torch.nn.Module): method __init__ (line 31) | def __init__(self): method update (line 34) | def update( method get_seq_length (line 60) | def get_seq_length(self, layer_idx: Optional[int] = 0) -> int: method get_max_length (line 65) | def get_max_length(self) -> Optional[int]: method get_usable_length (line 69) | def get_usable_length(self, new_seq_length: int, layer_idx: Optional[i... method reorder_cache (line 80) | def reorder_cache(self, beam_idx: torch.LongTensor): method seen_tokens (line 89) | def seen_tokens(self): class CacheConfig (line 101) | class CacheConfig: method from_dict (line 109) | def from_dict(cls, config_dict, **kwargs): method to_json_file (line 130) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method to_dict (line 148) | def to_dict(self) -> Dict[str, Any]: method __iter__ (line 156) | def __iter__(self): method __repr__ (line 162) | def __repr__(self): method to_json_string (line 165) | def to_json_string(self): method update (line 174) | def update(self, **kwargs): class QuantizedCacheConfig (line 198) | class QuantizedCacheConfig(CacheConfig): method __init__ (line 223) | def __init__( method validate (line 243) | def validate(self): class DynamicCache (line 296) | class DynamicCache(Cache): method __init__ (line 320) | def __init__(self) -> None: method __getitem__ (line 326) | def __getitem__(self, layer_idx: int) -> List[Tuple[torch.Tensor]]: method __iter__ (line 336) | def __iter__(self): method __len__ (line 344) | def __len__(self): method update (line 351) | def update( method get_seq_length (line 388) | def get_seq_length(self, layer_idx: Optional[int] = 0) -> int: method get_max_length (line 395) | def get_max_length(self) -> Optional[int]: method to_legacy_cache (line 399) | def to_legacy_cache(self) -> Tuple[Tuple[torch.Tensor], Tuple[torch.Te... method from_legacy_cache (line 408) | def from_legacy_cache(cls, past_key_values: Optional[Tuple[Tuple[torch... method crop (line 418) | def crop(self, max_length: int): method batch_split (line 433) | def batch_split(self, full_batch_size: int, split_size: int) -> List["... method from_batch_splits (line 446) | def from_batch_splits(cls, splits: List["DynamicCache"]) -> "DynamicCa... method batch_repeat_interleave (line 456) | def batch_repeat_interleave(self, repeats: int): method batch_select_indices (line 462) | def batch_select_indices(self, indices: torch.Tensor): class OffloadedCache (line 469) | class OffloadedCache(DynamicCache): method __init__ (line 482) | def __init__(self) -> None: method prefetch_layer (line 490) | def prefetch_layer(self, layer_idx: int): method evict_previous_layer (line 499) | def evict_previous_layer(self, layer_idx: int): method __getitem__ (line 507) | def __getitem__(self, layer_idx: int) -> List[Tuple[torch.Tensor]]: method reorder_cache (line 529) | def reorder_cache(self, beam_idx: torch.LongTensor): method update (line 536) | def update( class QuantizedCache (line 581) | class QuantizedCache(DynamicCache): method __init__ (line 595) | def __init__(self, cache_config: QuantizedCacheConfig) -> None: method update (line 610) | def update( method get_seq_length (line 651) | def get_seq_length(self, layer_idx: Optional[int] = 0) -> int: method _quantize (line 660) | def _quantize(self, tensor, axis): method _dequantize (line 664) | def _dequantize(self, q_tensor): class QuantoQuantizedCache (line 669) | class QuantoQuantizedCache(QuantizedCache): method __init__ (line 696) | def __init__(self, cache_config: CacheConfig) -> None: method _quantize (line 719) | def _quantize(self, tensor, axis): method _dequantize (line 724) | def _dequantize(self, qtensor): class HQQQuantizedCache (line 728) | class HQQQuantizedCache(QuantizedCache): method __init__ (line 755) | def __init__(self, cache_config: CacheConfig) -> None: method _quantize (line 770) | def _quantize(self, tensor, axis): method _dequantize (line 783) | def _dequantize(self, qtensor): class SinkCache (line 789) | class SinkCache(Cache): method __init__ (line 821) | def __init__(self, window_length: int, num_sink_tokens: int) -> None: method _rotate_half (line 833) | def _rotate_half(x): method _apply_key_rotary_pos_emb (line 838) | def _apply_key_rotary_pos_emb( method _get_rerotation_cos_sin (line 844) | def _get_rerotation_cos_sin( method get_seq_length (line 866) | def get_seq_length(self, layer_idx: Optional[int] = 0) -> int: method get_max_length (line 874) | def get_max_length(self) -> Optional[int]: method update (line 878) | def update( class StaticCache (line 973) | class StaticCache(Cache): method __init__ (line 1010) | def __init__( method update (line 1062) | def update( method get_seq_length (line 1110) | def get_seq_length(self, layer_idx: Optional[int] = 0) -> int: method get_max_length (line 1117) | def get_max_length(self) -> Optional[int]: method reset (line 1121) | def reset(self): class SlidingWindowCache (line 1129) | class SlidingWindowCache(StaticCache): method __init__ (line 1179) | def __init__( method update (line 1205) | def update( method get_max_length (line 1253) | def get_max_length(self) -> Optional[int]: method reset (line 1257) | def reset(self): class EncoderDecoderCache (line 1264) | class EncoderDecoderCache(Cache): method __init__ (line 1289) | def __init__(self, self_attention_cache: Cache, cross_attention_cache:... method __getitem__ (line 1298) | def __getitem__(self, layer_idx: int) -> List[Tuple[torch.Tensor]]: method __len__ (line 1313) | def __len__(self): method to_legacy_cache (line 1320) | def to_legacy_cache(self) -> Tuple[Tuple[torch.Tensor], Tuple[torch.Te... method from_legacy_cache (line 1333) | def from_legacy_cache( method get_seq_length (line 1348) | def get_seq_length(self, layer_idx: Optional[int] = 0) -> int: method reset (line 1354) | def reset(self): method reorder_cache (line 1369) | def reorder_cache(self, beam_idx: torch.LongTensor): method check_dynamic_cache (line 1374) | def check_dynamic_cache(self, method: str): method crop (line 1385) | def crop(self, maximum_length: int): method batch_split (line 1391) | def batch_split(self, full_batch_size: int, split_size: int) -> "List[... method from_batch_splits (line 1404) | def from_batch_splits(cls, splits: List["EncoderDecoderCache"]) -> "En... method batch_repeat_interleave (line 1419) | def batch_repeat_interleave(self, repeats: int): method batch_select_indices (line 1425) | def batch_select_indices(self, indices: torch.Tensor): class HybridCache (line 1432) | class HybridCache(Cache): method __init__ (line 1471) | def __init__( method _sliding_update (line 1526) | def _sliding_update(self, cache_position, layer_idx, key_states, value... method _static_update (line 1554) | def _static_update(self, cache_position, layer_idx, key_states, value_... method update (line 1562) | def update( method get_max_length (line 1590) | def get_max_length(self) -> Optional[int]: method get_seq_length (line 1595) | def get_seq_length(self, layer_idx: Optional[int] = 0): method reset (line 1598) | def reset(self): class MambaCache (line 1606) | class MambaCache: method __init__ (line 1653) | def __init__( method update_conv_state (line 1692) | def update_conv_state( method update_ssm_state (line 1704) | def update_ssm_state(self, layer_idx: int, new_ssm_state: torch.Tensor): method reset (line 1708) | def reset(self): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/commands/add_new_model_like.py class ModelPatterns (line 43) | class ModelPatterns: method __post_init__ (line 88) | def __post_init__(self): function is_empty_line (line 121) | def is_empty_line(line: str) -> bool: function find_indent (line 128) | def find_indent(line: str) -> int: function parse_module_content (line 138) | def parse_module_content(content: str) -> List[str]: function extract_block (line 178) | def extract_block(content: str, indent_level: int = 0) -> str: function add_content_to_text (line 228) | def add_content_to_text( function add_content_to_file (line 286) | def add_content_to_file( function replace_model_patterns (line 324) | def replace_model_patterns( function simplify_replacements (line 390) | def simplify_replacements(replacements): function get_module_from_file (line 427) | def get_module_from_file(module_file: Union[str, os.PathLike]) -> str: function remove_attributes (line 457) | def remove_attributes(obj, target_attr): function duplicate_module (line 497) | def duplicate_module( function filter_framework_files (line 568) | def filter_framework_files( function get_model_files (line 601) | def get_model_files(model_type: str, frameworks: Optional[List[str]] = N... function find_base_model_checkpoint (line 646) | def find_base_model_checkpoint( function get_default_frameworks (line 680) | def get_default_frameworks(): function retrieve_model_classes (line 697) | def retrieve_model_classes(model_type: str, frameworks: Optional[List[st... function retrieve_info_for_model (line 738) | def retrieve_info_for_model(model_type, frameworks: Optional[List[str]] ... function clean_frameworks_in_init (line 815) | def clean_frameworks_in_init( function add_model_to_main_init (line 894) | def add_model_to_main_init( function insert_tokenizer_in_auto_module (line 983) | def insert_tokenizer_in_auto_module(old_model_patterns: ModelPatterns, n... function add_model_to_auto_classes (line 1045) | def add_model_to_auto_classes( function duplicate_doc_file (line 1130) | def duplicate_doc_file( function insert_model_in_doc_toc (line 1228) | def insert_model_in_doc_toc(old_model_patterns, new_model_patterns): function create_new_model_like (line 1278) | def create_new_model_like( function add_new_model_like_command_factory (line 1455) | def add_new_model_like_command_factory(args: Namespace): class AddNewModelLikeCommand (line 1459) | class AddNewModelLikeCommand(BaseTransformersCLICommand): method register_subcommand (line 1461) | def register_subcommand(parser: ArgumentParser): method __init__ (line 1471) | def __init__(self, config_file=None, path_to_repo=None, *args): method run (line 1491) | def run(self): function get_user_field (line 1509) | def get_user_field( function convert_to_bool (line 1561) | def convert_to_bool(x: str) -> bool: function get_user_input (line 1572) | def get_user_input(): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 42) | def __init__(self, model: str, cache: str, force: bool, trust_remote_c... method run (line 48) | def run(self): FILE: mplsandbox_for_rl/transformers/src/transformers/commands/env.py function info_command_factory (line 34) | def info_command_factory(_): function download_command_factory (line 38) | def download_command_factory(args): class EnvironmentCommand (line 42) | class EnvironmentCommand(BaseTransformersCLICommand): method register_subcommand (line 44) | def register_subcommand(parser: ArgumentParser): method __init__ (line 54) | def __init__(self, accelerate_config_file, *args) -> None: method run (line 57) | def run(self): method format_dict (line 151) | def format_dict(d): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/commands/transformers_cli.py function main (line 29) | def main(): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/configuration_utils.py class PretrainedConfig (line 50) | class PretrainedConfig(PushToHubMixin): method __setattr__ (line 256) | def __setattr__(self, key, value): method __getattribute__ (line 261) | def __getattribute__(self, key): method __init__ (line 266) | def __init__(self, **kwargs): method name_or_path (line 379) | def name_or_path(self) -> str: method name_or_path (line 383) | def name_or_path(self, value): method use_return_dict (line 387) | def use_return_dict(self) -> bool: method num_labels (line 395) | def num_labels(self) -> int: method num_labels (line 402) | def num_labels(self, num_labels: int): method _attn_implementation (line 408) | def _attn_implementation(self): method _attn_implementation (line 420) | def _attn_implementation(self, value): method save_pretrained (line 423) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method _set_token_in_kwargs (line 484) | def _set_token_in_kwargs(kwargs, token=None): method from_pretrained (line 511) | def from_pretrained( method get_config_dict (line 613) | def get_config_dict( method _get_config_dict (line 646) | def _get_config_dict( method from_dict (line 746) | def from_dict(cls, config_dict: Dict[str, Any], **kwargs) -> "Pretrain... method from_json_file (line 807) | def from_json_file(cls, json_file: Union[str, os.PathLike]) -> "Pretra... method _dict_from_json_file (line 823) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method __eq__ (line 828) | def __eq__(self, other): method __repr__ (line 831) | def __repr__(self): method to_diff_dict (line 834) | def to_diff_dict(self) -> Dict[str, Any]: method to_dict (line 891) | def to_dict(self) -> Dict[str, Any]: method to_json_string (line 933) | def to_json_string(self, use_diff: bool = True) -> str: method to_json_file (line 951) | def to_json_file(self, json_file_path: Union[str, os.PathLike], use_di... method update (line 965) | def update(self, config_dict: Dict[str, Any]): method update_from_string (line 975) | def update_from_string(self, update_str: str): method dict_torch_dtype_to_str (line 1013) | def dict_torch_dtype_to_str(self, d: Dict[str, Any]) -> None: method register_for_auto_class (line 1026) | def register_for_auto_class(cls, auto_class="AutoConfig"): method _get_generation_defaults (line 1052) | def _get_generation_defaults() -> Dict[str, Any]: method _has_non_default_generation_parameters (line 1081) | def _has_non_default_generation_parameters(self) -> bool: function get_configuration_file (line 1091) | def get_configuration_file(configuration_files: List[str]) -> str: function recursive_diff_dict (line 1122) | def recursive_diff_dict(dict_a, dict_b, config_obj=None): FILE: mplsandbox_for_rl/transformers/src/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 294) | def convert_tensorflow(nlp: Pipeline, opset: int, output: Path): function convert (line 334) | def convert( function optimize (line 384) | def optimize(onnx_model_path: Path) -> Path: function quantize (line 409) | def quantize(onnx_model_path: Path) -> Path: function verify (line 484) | def verify(path: Path): FILE: mplsandbox_for_rl/transformers/src/transformers/convert_pytorch_checkpoint_to_tf2.py function convert_pt_checkpoint_to_tf (line 254) | def convert_pt_checkpoint_to_tf( function convert_all_pt_checkpoints_to_tf (line 306) | def convert_all_pt_checkpoints_to_tf( FILE: mplsandbox_for_rl/transformers/src/transformers/convert_slow_tokenizer.py function import_protobuf (line 33) | def import_protobuf(error_message=""): function _get_prepend_scheme (line 46) | def _get_prepend_scheme(add_prefix_space: bool, original_tokenizer) -> str: function generate_merges (line 56) | def generate_merges(vocab, vocab_scores): class SentencePieceExtractor (line 75) | class SentencePieceExtractor: method __init__ (line 80) | def __init__(self, model: str): method extract (line 87) | def extract(self, vocab_scores=None) -> Tuple[Dict[str, int], List[Tup... class GemmaSentencePieceExtractor (line 100) | class GemmaSentencePieceExtractor(SentencePieceExtractor): method extract (line 101) | def extract(self, vocab_scores=None) -> Tuple[Dict[str, int], List[Tup... function check_number_comma (line 117) | def check_number_comma(piece: str) -> bool: class Converter (line 121) | class Converter: method __init__ (line 122) | def __init__(self, original_tokenizer): method converted (line 125) | def converted(self) -> Tokenizer: class BertConverter (line 129) | class BertConverter(Converter): method converted (line 130) | def converted(self) -> Tokenizer: class SplinterConverter (line 168) | class SplinterConverter(Converter): method converted (line 169) | def converted(self) -> Tokenizer: class FunnelConverter (line 218) | class FunnelConverter(Converter): method converted (line 219) | def converted(self) -> Tokenizer: class MPNetConverter (line 257) | class MPNetConverter(Converter): method converted (line 258) | def converted(self) -> Tokenizer: class OpenAIGPTConverter (line 296) | class OpenAIGPTConverter(Converter): method converted (line 297) | def converted(self) -> Tokenizer: class GPT2Converter (line 323) | class GPT2Converter(Converter): method converted (line 324) | def converted(self) -> Tokenizer: class HerbertConverter (line 358) | class HerbertConverter(Converter): method converted (line 359) | def converted(self) -> Tokenizer: class Qwen2Converter (line 389) | class Qwen2Converter(Converter): method converted (line 390) | def converted(self, vocab: Dict[str, int] = None, merges: List[Tuple[s... class RobertaConverter (line 433) | class RobertaConverter(Converter): method converted (line 434) | def converted(self) -> Tokenizer: class RoFormerConverter (line 462) | class RoFormerConverter(Converter): method converted (line 463) | def converted(self) -> Tokenizer: class DebertaConverter (line 501) | class DebertaConverter(Converter): method converted (line 502) | def converted(self) -> Tokenizer: class SpmConverter (line 532) | class SpmConverter(Converter): method __init__ (line 537) | def __init__(self, *args): method vocab (line 558) | def vocab(self, proto): method unk_id (line 561) | def unk_id(self, proto): method tokenizer (line 564) | def tokenizer(self, proto): method normalizer (line 635) | def normalizer(self, proto): method pre_tokenizer (line 646) | def pre_tokenizer(self, replacement, add_prefix_space): method post_processor (line 650) | def post_processor(self): method decoder (line 653) | def decoder(self, replacement, add_prefix_space): method converted (line 657) | def converted(self) -> Tokenizer: class AlbertConverter (line 682) | class AlbertConverter(SpmConverter): method vocab (line 683) | def vocab(self, proto): method normalizer (line 689) | def normalizer(self, proto): method post_processor (line 708) | def post_processor(self): class BarthezConverter (line 719) | class BarthezConverter(SpmConverter): method unk_id (line 720) | def unk_id(self, proto): method post_processor (line 724) | def post_processor(self): class CamembertConverter (line 735) | class CamembertConverter(SpmConverter): method vocab (line 736) | def vocab(self, proto): method unk_id (line 749) | def unk_id(self, proto): method post_processor (line 753) | def post_processor(self): class DebertaV2Converter (line 764) | class DebertaV2Converter(SpmConverter): method pre_tokenizer (line 765) | def pre_tokenizer(self, replacement, add_prefix_space): method normalizer (line 773) | def normalizer(self, proto): method post_processor (line 786) | def post_processor(self): class MBartConverter (line 797) | class MBartConverter(SpmConverter): method vocab (line 798) | def vocab(self, proto): method unk_id (line 836) | def unk_id(self, proto): method post_processor (line 839) | def post_processor(self): class MBart50Converter (line 850) | class MBart50Converter(SpmConverter): method vocab (line 851) | def vocab(self, proto): method unk_id (line 863) | def unk_id(self, proto): method post_processor (line 866) | def post_processor(self): class NllbConverter (line 877) | class NllbConverter(SpmConverter): method vocab (line 878) | def vocab(self, proto): method unk_id (line 888) | def unk_id(self, proto): method post_processor (line 891) | def post_processor(self): class SeamlessM4TConverter (line 902) | class SeamlessM4TConverter(SpmConverter): method vocab (line 903) | def vocab(self, proto): method unk_id (line 913) | def unk_id(self, proto): method post_processor (line 916) | def post_processor(self): class XLMRobertaConverter (line 927) | class XLMRobertaConverter(SpmConverter): method vocab (line 928) | def vocab(self, proto): method unk_id (line 939) | def unk_id(self, proto): method post_processor (line 943) | def post_processor(self): class XLNetConverter (line 954) | class XLNetConverter(SpmConverter): method vocab (line 955) | def vocab(self, proto): method normalizer (line 961) | def normalizer(self, proto): method post_processor (line 980) | def post_processor(self): class ReformerConverter (line 991) | class ReformerConverter(SpmConverter): class RemBertConverter (line 995) | class RemBertConverter(SpmConverter): method normalizer (line 997) | def normalizer(self, proto): method post_processor (line 1016) | def post_processor(self): class BertGenerationConverter (line 1027) | class BertGenerationConverter(SpmConverter): class PegasusConverter (line 1031) | class PegasusConverter(SpmConverter): method vocab (line 1032) | def vocab(self, proto): method unk_id (line 1051) | def unk_id(self, proto): method pre_tokenizer (line 1054) | def pre_tokenizer(self, replacement, add_prefix_space): method post_processor (line 1063) | def post_processor(self): class T5Converter (line 1071) | class T5Converter(SpmConverter): method vocab (line 1072) | def vocab(self, proto): method post_processor (line 1078) | def post_processor(self): class UdopConverter (line 1088) | class UdopConverter(SpmConverter): method post_processor (line 1089) | def post_processor(self): class WhisperConverter (line 1099) | class WhisperConverter(Converter): method converted (line 1100) | def converted(self) -> Tokenizer: class BigBirdConverter (line 1135) | class BigBirdConverter(SpmConverter): method post_processor (line 1136) | def post_processor(self): class CLIPConverter (line 1147) | class CLIPConverter(Converter): method converted (line 1148) | def converted(self) -> Tokenizer: class LayoutLMv2Converter (line 1190) | class LayoutLMv2Converter(Converter): method converted (line 1191) | def converted(self) -> Tokenizer: class BlenderbotConverter (line 1229) | class BlenderbotConverter(Converter): method converted (line 1230) | def converted(self) -> Tokenizer: class XGLMConverter (line 1258) | class XGLMConverter(SpmConverter): method vocab (line 1259) | def vocab(self, proto): method unk_id (line 1270) | def unk_id(self, proto): method post_processor (line 1274) | def post_processor(self): class GemmaConvert (line 1285) | class GemmaConvert(SpmConverter): method normalizer (line 1301) | def normalizer(self, proto): method vocab (line 1304) | def vocab(self, proto): method pre_tokenizer (line 1318) | def pre_tokenizer(self, replacement, add_prefix_space): method unk_id (line 1321) | def unk_id(self, proto): method decoder (line 1325) | def decoder(self, replacement, add_prefix_space): class LlamaConverter (line 1335) | class LlamaConverter(SpmConverter): method vocab (line 1338) | def vocab(self, proto): method unk_id (line 1347) | def unk_id(self, proto): method decoder (line 1351) | def decoder(self, replacement, add_prefix_space): method normalizer (line 1361) | def normalizer(self, proto): method pre_tokenizer (line 1370) | def pre_tokenizer(self, replacement, add_prefix_space): method post_processor (line 1376) | def post_processor(self): class MarkupLMConverter (line 1381) | class MarkupLMConverter(Converter): method converted (line 1382) | def converted(self) -> Tokenizer: function bytes_to_unicode (line 1420) | def bytes_to_unicode(): class TikTokenConverter (line 1444) | class TikTokenConverter: method __init__ (line 1449) | def __init__( method extract_vocab_merges_from_model (line 1461) | def extract_vocab_merges_from_model(self, tiktoken_url: str): method tokenizer (line 1492) | def tokenizer(self): method converted (line 1499) | def converted(self) -> Tokenizer: function convert_slow_tokenizer (line 1572) | def convert_slow_tokenizer(transformer_tokenizer) -> Tokenizer: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/convert_tf_hub_seq_to_seq_bert_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 32) | def convert_tf_checkpoint_to_pytorch(tf_hub_path, pytorch_dump_path, is_... FILE: mplsandbox_for_rl/transformers/src/transformers/data/data_collator.py class DataCollatorMixin (line 38) | class DataCollatorMixin: method __call__ (line 39) | def __call__(self, features, return_tensors=None): function pad_without_fast_tokenizer_warning (line 52) | def pad_without_fast_tokenizer_warning(tokenizer, *pad_args, **pad_kwargs): function default_data_collator (line 74) | def default_data_collator(features: List[InputDataClass], return_tensors... class DefaultDataCollator (line 100) | class DefaultDataCollator(DataCollatorMixin): method __call__ (line 121) | def __call__(self, features: List[Dict[str, Any]], return_tensors=None... function torch_default_data_collator (line 127) | def torch_default_data_collator(features: List[InputDataClass]) -> Dict[... function tf_default_data_collator (line 163) | def tf_default_data_collator(features: List[InputDataClass]) -> Dict[str... function numpy_default_data_collator (line 204) | def numpy_default_data_collator(features: List[InputDataClass]) -> Dict[... class DataCollatorWithPadding (line 237) | class DataCollatorWithPadding: method __call__ (line 270) | def __call__(self, features: List[Dict[str, Any]]) -> Dict[str, Any]: class DataCollatorForTokenClassification (line 289) | class DataCollatorForTokenClassification(DataCollatorMixin): method torch_call (line 325) | def torch_call(self, features): method tf_call (line 365) | def tf_call(self, features): method numpy_call (line 397) | def numpy_call(self, features): function _torch_collate_batch (line 428) | def _torch_collate_batch(examples, tokenizer, pad_to_multiple_of: Option... function _tf_collate_batch (line 464) | def _tf_collate_batch(examples, tokenizer, pad_to_multiple_of: Optional[... function _numpy_collate_batch (line 502) | def _numpy_collate_batch(examples, tokenizer, pad_to_multiple_of: Option... function tolist (line 534) | def tolist(x): class DataCollatorForSeq2Seq (line 543) | class DataCollatorForSeq2Seq: method __call__ (line 585) | def __call__(self, features, return_tensors=None): class DataCollatorForLanguageModeling (line 679) | class DataCollatorForLanguageModeling(DataCollatorMixin): method __post_init__ (line 713) | def __post_init__(self): method tf_bernoulli (line 725) | def tf_bernoulli(shape, probability): method tf_mask_tokens (line 731) | def tf_mask_tokens( method tf_call (line 762) | def tf_call(self, examples: List[Union[List[int], Any, Dict[str, Any]]... method torch_call (line 803) | def torch_call(self, examples: List[Union[List[int], Any, Dict[str, An... method torch_mask_tokens (line 827) | def torch_mask_tokens(self, inputs: Any, special_tokens_mask: Optional... method numpy_call (line 860) | def numpy_call(self, examples: List[Union[List[int], Any, Dict[str, An... method numpy_mask_tokens (line 884) | def numpy_mask_tokens(self, inputs: Any, special_tokens_mask: Optional... class DataCollatorForWholeWordMask (line 923) | class DataCollatorForWholeWordMask(DataCollatorForLanguageModeling): method torch_call (line 938) | def torch_call(self, examples: List[Union[List[int], Any, Dict[str, An... method tf_call (line 966) | def tf_call(self, examples: List[Union[List[int], Any, Dict[str, Any]]... method numpy_call (line 996) | def numpy_call(self, examples: List[Union[List[int], Any, Dict[str, An... method _whole_word_mask (line 1024) | def _whole_word_mask(self, input_tokens: List[str], max_predictions=512): method torch_mask_tokens (line 1071) | def torch_mask_tokens(self, inputs: Any, mask_labels: Any) -> Tuple[An... method tf_mask_tokens (line 1111) | def tf_mask_tokens(self, inputs: Any, mask_labels: Any) -> Tuple[Any, ... method numpy_mask_tokens (line 1153) | def numpy_mask_tokens(self, inputs: Any, mask_labels: Any) -> Tuple[An... class DataCollatorForSOP (line 1195) | class DataCollatorForSOP(DataCollatorForLanguageModeling): method __init__ (line 1203) | def __init__(self, *args, **kwargs): method __call__ (line 1210) | def __call__(self, examples: List[Dict[str, Any]]) -> Dict[str, Any]: method mask_tokens (line 1233) | def mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any]: class DataCollatorForPermutationLanguageModeling (line 1278) | class DataCollatorForPermutationLanguageModeling(DataCollatorMixin): method torch_call (line 1291) | def torch_call(self, examples: List[Union[List[int], Any, Dict[str, An... method tf_call (line 1298) | def tf_call(self, examples: List[Union[List[int], Any, Dict[str, Any]]... method numpy_call (line 1305) | def numpy_call(self, examples: List[Union[List[int], Any, Dict[str, An... method torch_mask_tokens (line 1312) | def torch_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]: method tf_mask_tokens (line 1411) | def tf_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]: method numpy_mask_tokens (line 1518) | def numpy_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]: class DataCollatorWithFlattening (line 1617) | class DataCollatorWithFlattening(DefaultDataCollator): method __init__ (line 1625) | def __init__(self, *args, return_position_ids=True, **kwargs): method __call__ (line 1633) | def __call__(self, features, return_tensors=None): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/data/metrics/squad_metrics.py function normalize_answer (line 36) | def normalize_answer(s): function get_tokens (line 56) | def get_tokens(s): function compute_exact (line 62) | def compute_exact(a_gold, a_pred): function compute_f1 (line 66) | def compute_f1(a_gold, a_pred): function get_raw_scores (line 82) | def get_raw_scores(examples, preds): function apply_no_ans_threshold (line 108) | def apply_no_ans_threshold(scores, na_probs, qid_to_has_ans, na_prob_thr... function make_eval_dict (line 119) | def make_eval_dict(exact_scores, f1_scores, qid_list=None): function merge_eval (line 140) | def merge_eval(main_eval, new_eval, prefix): function find_best_thresh_v2 (line 145) | def find_best_thresh_v2(preds, scores, na_probs, qid_to_has_ans): function find_all_best_thresh_v2 (line 179) | def find_all_best_thresh_v2(main_eval, preds, exact_raw, f1_raw, na_prob... function find_best_thresh (line 190) | def find_best_thresh(preds, scores, na_probs, qid_to_has_ans): function find_all_best_thresh (line 213) | def find_all_best_thresh(main_eval, preds, exact_raw, f1_raw, na_probs, ... function squad_evaluate (line 223) | def squad_evaluate(examples, preds, no_answer_probs=None, no_answer_prob... function get_final_text (line 254) | def get_final_text(pred_text, orig_text, do_lower_case, verbose_logging=... function _get_best_indexes (line 348) | def _get_best_indexes(logits, n_best_size): function _compute_softmax (line 360) | def _compute_softmax(scores): function compute_predictions_logits (line 383) | def compute_predictions_logits( function compute_predictions_log_probs (line 590) | def compute_predictions_log_probs( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/data/processors/xnli.py class XnliProcessor (line 27) | class XnliProcessor(DataProcessor): method __init__ (line 33) | def __init__(self, language, train_language=None): method get_train_examples (line 37) | def get_train_examples(self, data_dir): method get_test_examples (line 58) | def get_test_examples(self, data_dir): method get_labels (line 81) | def get_labels(self): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/dependency_versions_check.py function dep_version_check (line 62) | def dep_version_check(pkg, hint=None): FILE: mplsandbox_for_rl/transformers/src/transformers/dynamic_module_utils.py function init_hf_modules (line 45) | def init_hf_modules(): function create_dynamic_module (line 61) | def create_dynamic_module(name: Union[str, os.PathLike]): function get_relative_imports (line 83) | def get_relative_imports(module_file: Union[str, os.PathLike]) -> List[s... function get_relative_import_files (line 104) | def get_relative_import_files(module_file: Union[str, os.PathLike]) -> L... function get_imports (line 137) | def get_imports(filename: Union[str, os.PathLike]) -> List[str]: function check_imports (line 166) | def check_imports(filename: Union[str, os.PathLike]) -> List[str]: function get_class_in_module (line 194) | def get_class_in_module(class_name: str, module_path: Union[str, os.Path... function get_cached_module_file (line 220) | def get_cached_module_file( function get_class_from_dynamic_module (line 396) | def get_class_from_dynamic_module( function custom_object_save (line 521) | def custom_object_save(obj: Any, folder: Union[str, os.PathLike], config... function _raise_timeout_error (line 597) | def _raise_timeout_error(signum, frame): function resolve_trust_remote_code (line 607) | def resolve_trust_remote_code(trust_remote_code, model_name, has_local_c... FILE: mplsandbox_for_rl/transformers/src/transformers/feature_extraction_sequence_utils.py class SequenceFeatureExtractor (line 30) | class SequenceFeatureExtractor(FeatureExtractionMixin): method __init__ (line 43) | def __init__(self, feature_size: int, sampling_rate: int, padding_valu... method pad (line 53) | def pad( method _pad (line 227) | def _pad( method _truncate (line 299) | def _truncate( method _get_padding_strategies (line 342) | def _get_padding_strategies(self, padding=False, max_length=None): FILE: mplsandbox_for_rl/transformers/src/transformers/feature_extraction_utils.py class BatchFeature (line 62) | class BatchFeature(UserDict): method __init__ (line 77) | def __init__(self, data: Optional[Dict[str, Any]] = None, tensor_type:... method __getitem__ (line 81) | def __getitem__(self, item: str) -> Union[Any]: method __getattr__ (line 91) | def __getattr__(self, item: str): method __getstate__ (line 97) | def __getstate__(self): method __setstate__ (line 100) | def __setstate__(self, state): method keys (line 105) | def keys(self): method values (line 109) | def values(self): method items (line 113) | def items(self): method _get_is_as_tensor_fns (line 116) | def _get_is_as_tensor_fns(self, tensor_type: Optional[Union[str, Tenso... method convert_to_tensors (line 172) | def convert_to_tensors(self, tensor_type: Optional[Union[str, TensorTy... method to (line 203) | def to(self, *args, **kwargs) -> "BatchFeature": class FeatureExtractionMixin (line 248) | class FeatureExtractionMixin(PushToHubMixin): method __init__ (line 256) | def __init__(self, **kwargs): method _set_processor_class (line 268) | def _set_processor_class(self, processor_class: str): method from_pretrained (line 273) | def from_pretrained( method save_pretrained (line 384) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method get_feature_extractor_dict (line 446) | def get_feature_extractor_dict( method from_dict (line 563) | def from_dict(cls, feature_extractor_dict: Dict[str, Any], **kwargs) -... method to_dict (line 599) | def to_dict(self) -> Dict[str, Any]: method from_json_file (line 613) | def from_json_file(cls, json_file: Union[str, os.PathLike]) -> PreTrai... method to_json_string (line 631) | def to_json_string(self) -> str: method to_json_file (line 652) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method __repr__ (line 663) | def __repr__(self): method register_for_auto_class (line 667) | def register_for_auto_class(cls, auto_class="AutoFeatureExtractor"): FILE: mplsandbox_for_rl/transformers/src/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 64) | def does_advance(self, token_id: int): method update (line 73) | def update(self, token_id: int): method reset (line 98) | def reset(self): method remaining (line 108) | def remaining(self): method copy (line 117) | def copy(self, stateful=False): class PhrasalConstraint (line 132) | class PhrasalConstraint(Constraint): method __init__ (line 141) | def __init__(self, token_ids: List[int]): method advance (line 155) | def advance(self): method does_advance (line 160) | def does_advance(self, token_id: int): method update (line 169) | def update(self, token_id: int): method reset (line 189) | def reset(self): method remaining (line 193) | def remaining(self): method copy (line 196) | def copy(self, stateful=False): class DisjunctiveTrie (line 207) | class DisjunctiveTrie: method __init__ (line 208) | def __init__(self, nested_token_ids: List[List[int]], no_subsets=True): method next_tokens (line 231) | def next_tokens(self, current_seq): method reached_leaf (line 244) | def reached_leaf(self, current_seq): method count_leaves (line 249) | def count_leaves(self, root): method has_subsets (line 256) | def has_subsets(self, trie, nested_token_ids): class DisjunctiveConstraint (line 264) | class DisjunctiveConstraint(Constraint): method __init__ (line 274) | def __init__(self, nested_token_ids: List[List[int]]): method advance (line 296) | def advance(self): method does_advance (line 304) | def does_advance(self, token_id: int): method update (line 312) | def update(self, token_id: int): method reset (line 332) | def reset(self): method remaining (line 336) | def remaining(self): method copy (line 343) | def copy(self, stateful=False): class ConstraintListState (line 354) | class ConstraintListState: method __init__ (line 363) | def __init__(self, constraints: List[Constraint]): method init_state (line 373) | def init_state(self): method get_bank (line 378) | def get_bank(self): method advance (line 386) | def advance(self): method reset (line 421) | def reset(self, token_ids: Optional[List[int]]): method add (line 436) | def add(self, token_id: int): method copy (line 512) | def copy(self, stateful=True): FILE: mplsandbox_for_rl/transformers/src/transformers/generation/beam_search.py class BeamScorer (line 91) | class BeamScorer(ABC): method process (line 99) | def process( method finalize (line 111) | def finalize( class BeamSearchScorer (line 123) | class BeamSearchScorer(BeamScorer): method __init__ (line 162) | def __init__( method is_done (line 212) | def is_done(self) -> bool: method process (line 215) | def process( method finalize (line 320) | def finalize( class ConstrainedBeamSearchScorer (line 419) | class ConstrainedBeamSearchScorer(BeamScorer): method __init__ (line 456) | def __init__( method is_done (line 502) | def is_done(self) -> bool: method make_constraint_states (line 505) | def make_constraint_states(self, n): method check_completes_constraints (line 508) | def check_completes_constraints(self, sequence): method process (line 513) | def process( method step_sentence_constraint (line 672) | def step_sentence_constraint( method finalize (line 813) | def finalize( class BeamHypotheses (line 930) | class BeamHypotheses: method __init__ (line 931) | def __init__(self, num_beams: int, length_penalty: float, early_stoppi... method __len__ (line 948) | def __len__(self): method add (line 954) | def add( method is_done (line 979) | def is_done(self, best_sum_logprobs: float, cur_len: int, decoder_prom... FILE: mplsandbox_for_rl/transformers/src/transformers/generation/candidate_generator.py class CandidateGenerator (line 30) | class CandidateGenerator: method get_candidates (line 33) | def get_candidates(self, input_ids: torch.LongTensor) -> Tuple[torch.L... method update_candidate_strategy (line 50) | def update_candidate_strategy(self, input_ids: torch.LongTensor, score... class AssistedCandidateGenerator (line 69) | class AssistedCandidateGenerator(CandidateGenerator): method __init__ (line 92) | def __init__( method get_candidates (line 177) | def get_candidates(self, input_ids: torch.LongTensor) -> Tuple[torch.L... method update_candidate_strategy (line 232) | def update_candidate_strategy(self, input_ids: torch.LongTensor, score... class PromptLookupCandidateGenerator (line 258) | class PromptLookupCandidateGenerator(CandidateGenerator): method __init__ (line 274) | def __init__( method get_candidates (line 289) | def get_candidates(self, input_ids: torch.LongTensor) -> Tuple[torch.L... method update_candidate_strategy (line 353) | def update_candidate_strategy(self, input_ids: torch.LongTensor, score... function _crop_past_key_values (line 370) | def _crop_past_key_values(model, past_key_values, max_length): function _prepare_attention_mask (line 408) | def _prepare_attention_mask(model_kwargs: Dict[str, Any], new_length: in... function _prepare_token_type_ids (line 425) | def _prepare_token_type_ids(model_kwargs: Dict[str, Any], new_length: in... FILE: mplsandbox_for_rl/transformers/src/transformers/generation/configuration_utils.py class GenerationMode (line 53) | class GenerationMode(ExplicitEnum): class GenerationConfig (line 71) | class GenerationConfig(PushToHubMixin): method __init__ (line 340) | def __init__(self, **kwargs): method __hash__ (line 455) | def __hash__(self): method __eq__ (line 458) | def __eq__(self, other): method __repr__ (line 466) | def __repr__(self): method get_generation_mode (line 469) | def get_generation_mode(self, assistant_model: Optional["PreTrainedMod... method validate (line 527) | def validate(self, is_init=False): method save_pretrained (line 741) | def save_pretrained( method from_pretrained (line 819) | def from_pretrained( method _dict_from_json_file (line 1005) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method from_dict (line 1011) | def from_dict(cls, config_dict: Dict[str, Any], **kwargs) -> "Generati... method dict_torch_dtype_to_str (line 1044) | def dict_torch_dtype_to_str(self, d: Dict[str, Any]) -> None: method to_diff_dict (line 1056) | def to_diff_dict(self) -> Dict[str, Any]: method to_dict (line 1079) | def to_dict(self) -> Dict[str, Any]: method to_json_string (line 1100) | def to_json_string(self, use_diff: bool = True, ignore_metadata: bool ... method to_json_file (line 1144) | def to_json_file(self, json_file_path: Union[str, os.PathLike], use_di... method from_model_config (line 1159) | def from_model_config(cls, model_config: PretrainedConfig) -> "Generat... method update (line 1188) | def update(self, **kwargs): class WatermarkingConfig (line 1215) | class WatermarkingConfig: method __init__ (line 1236) | def __init__( method from_dict (line 1251) | def from_dict(cls, config_dict, **kwargs): method to_json_file (line 1272) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method to_dict (line 1285) | def to_dict(self) -> Dict[str, Any]: method __iter__ (line 1295) | def __iter__(self): method __repr__ (line 1299) | def __repr__(self): method to_json_string (line 1302) | def to_json_string(self): method update (line 1311) | def update(self, **kwargs): method validate (line 1322) | def validate(self): FILE: mplsandbox_for_rl/transformers/src/transformers/generation/flax_logits_process.py class FlaxLogitsProcessor (line 51) | class FlaxLogitsProcessor: method __call__ (line 55) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray) -> jnp... class FlaxLogitsWarper (line 62) | class FlaxLogitsWarper: method __call__ (line 66) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray) -> jnp... class FlaxLogitsProcessorList (line 73) | class FlaxLogitsProcessorList(list): method __call__ (line 81) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxTemperatureLogitsWarper (line 96) | class FlaxTemperatureLogitsWarper(FlaxLogitsWarper): method __init__ (line 105) | def __init__(self, temperature: float): method __call__ (line 111) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxTopPLogitsWarper (line 116) | class FlaxTopPLogitsWarper(FlaxLogitsWarper): method __init__ (line 130) | def __init__(self, top_p: float, filter_value: float = -float("Inf"), ... method __call__ (line 140) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxTopKLogitsWarper (line 160) | class FlaxTopKLogitsWarper(FlaxLogitsWarper): method __init__ (line 173) | def __init__(self, top_k: int, filter_value: float = -float("Inf"), mi... method __call__ (line 180) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxForcedBOSTokenLogitsProcessor (line 195) | class FlaxForcedBOSTokenLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 204) | def __init__(self, bos_token_id: int): method __call__ (line 207) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxForcedEOSTokenLogitsProcessor (line 217) | class FlaxForcedEOSTokenLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 228) | def __init__(self, max_length: int, eos_token_id: int): method __call__ (line 232) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxMinLengthLogitsProcessor (line 242) | class FlaxMinLengthLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 253) | def __init__(self, min_length: int, eos_token_id: int): method __call__ (line 263) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxSuppressTokensAtBeginLogitsProcessor (line 272) | class FlaxSuppressTokensAtBeginLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 285) | def __init__(self, begin_suppress_tokens, begin_index): method __call__ (line 289) | def __call__(self, input_ids, scores, cur_len: int): class FlaxSuppressTokensLogitsProcessor (line 297) | class FlaxSuppressTokensLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 307) | def __init__(self, suppress_tokens: list): method __call__ (line 310) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxForceTokensLogitsProcessor (line 316) | class FlaxForceTokensLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 327) | def __init__(self, force_token_map): method __call__ (line 338) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxWhisperTimeStampLogitsProcessor (line 364) | class FlaxWhisperTimeStampLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 381) | def __init__(self, generate_config, model_config, decoder_input_length): method __call__ (line 398) | def __call__(self, input_ids, scores, cur_len): class FlaxNoRepeatNGramLogitsProcessor (line 461) | class FlaxNoRepeatNGramLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 471) | def __init__(self, ngram_size: int): method get_previous_ngrams (line 476) | def get_previous_ngrams(self, input_ids: jnp.ndarray, vocab_size: int,... method get_banned_tokens_mask (line 510) | def get_banned_tokens_mask(self, latest_tokens: jnp.ndarray, previous_... method __call__ (line 523) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... FILE: mplsandbox_for_rl/transformers/src/transformers/generation/flax_utils.py class FlaxGreedySearchOutput (line 56) | class FlaxGreedySearchOutput(ModelOutput): class FlaxSampleOutput (line 70) | class FlaxSampleOutput(ModelOutput): class FlaxBeamSearchOutput (line 84) | class FlaxBeamSearchOutput(ModelOutput): class GreedyState (line 101) | class GreedyState: class SampleState (line 110) | class SampleState: class BeamSearchState (line 120) | class BeamSearchState: class FlaxGenerationMixin (line 130) | class FlaxGenerationMixin: method prepare_inputs_for_generation (line 147) | def prepare_inputs_for_generation(self, *args, **kwargs): method _run_loop_in_debug (line 153) | def _run_loop_in_debug(cond_fn, body_fn, init_state): method _prepare_encoder_decoder_kwargs_for_generation (line 162) | def _prepare_encoder_decoder_kwargs_for_generation(self, input_ids, pa... method _prepare_decoder_input_ids_for_generation (line 171) | def _prepare_decoder_input_ids_for_generation( method _get_decoder_start_token_id (line 186) | def _get_decoder_start_token_id(self, decoder_start_token_id: int = No... method _expand_to_num_beams (line 216) | def _expand_to_num_beams(tensor, num_beams): method _adapt_logits_for_beam_search (line 219) | def _adapt_logits_for_beam_search(self, logits): method _validate_model_class (line 226) | def _validate_model_class(self): method _validate_model_kwargs (line 250) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method generate (line 268) | def generate( method _get_logits_warper (line 476) | def _get_logits_warper(self, generation_config: GenerationConfig) -> F... method _get_logits_processor (line 492) | def _get_logits_processor( method _merge_criteria_processor_list (line 544) | def _merge_criteria_processor_list( method _greedy_search (line 565) | def _greedy_search( method _sample (line 651) | def _sample( method _beam_search (line 748) | def _beam_search( FILE: mplsandbox_for_rl/transformers/src/transformers/generation/logits_process.py class LogitsProcessor (line 45) | class LogitsProcessor: method __call__ (line 49) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class LogitsWarper (line 55) | class LogitsWarper: method __init__ (line 58) | def __init__(self): method __call__ (line 65) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class LogitsProcessorList (line 71) | class LogitsProcessorList(list): method __call__ (line 78) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MinLengthLogitsProcessor (line 109) | class MinLengthLogitsProcessor(LogitsProcessor): method __init__ (line 148) | def __init__(self, min_length: int, eos_token_id: Union[int, List[int]... method __call__ (line 161) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MinNewTokensLengthLogitsProcessor (line 170) | class MinNewTokensLengthLogitsProcessor(LogitsProcessor): method __init__ (line 207) | def __init__( method __call__ (line 231) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TemperatureLogitsWarper (line 242) | class TemperatureLogitsWarper(LogitsProcessor): method __init__ (line 290) | def __init__(self, temperature: float): method __call__ (line 303) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class RepetitionPenaltyLogitsProcessor (line 308) | class RepetitionPenaltyLogitsProcessor(LogitsProcessor): method __init__ (line 345) | def __init__(self, penalty: float): method __call__ (line 352) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EncoderRepetitionPenaltyLogitsProcessor (line 362) | class EncoderRepetitionPenaltyLogitsProcessor(LogitsProcessor): method __init__ (line 399) | def __init__(self, penalty: float, encoder_input_ids: torch.LongTensor): method __call__ (line 407) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TopPLogitsWarper (line 417) | class TopPLogitsWarper(LogitsProcessor): method __init__ (line 457) | def __init__(self, top_p: float, filter_value: float = -float("Inf"), ... method __call__ (line 469) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TopKLogitsWarper (line 484) | class TopKLogitsWarper(LogitsProcessor): method __init__ (line 521) | def __init__(self, top_k: int, filter_value: float = -float("Inf"), mi... method __call__ (line 529) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MinPLogitsWarper (line 537) | class MinPLogitsWarper(LogitsProcessor): method __init__ (line 584) | def __init__(self, min_p: float, filter_value: float = -float("Inf"), ... method __call__ (line 594) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TypicalLogitsWarper (line 614) | class TypicalLogitsWarper(LogitsProcessor): method __init__ (line 667) | def __init__(self, mass: float = 0.9, filter_value: float = -float("In... method __call__ (line 679) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EpsilonLogitsWarper (line 702) | class EpsilonLogitsWarper(LogitsProcessor): method __init__ (line 742) | def __init__(self, epsilon: float, filter_value: float = -float("Inf")... method __call__ (line 758) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EtaLogitsWarper (line 771) | class EtaLogitsWarper(LogitsProcessor): method __init__ (line 823) | def __init__( method __call__ (line 841) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... function _get_ngrams (line 855) | def _get_ngrams(ngram_size: int, prev_input_ids: torch.Tensor, num_hypos... function _get_generated_ngrams (line 884) | def _get_generated_ngrams(banned_ngrams, prev_input_ids, ngram_size, cur... function _calc_banned_ngram_tokens (line 907) | def _calc_banned_ngram_tokens( class NoRepeatNGramLogitsProcessor (line 922) | class NoRepeatNGramLogitsProcessor(LogitsProcessor): method __init__ (line 964) | def __init__(self, ngram_size: int): method __call__ (line 970) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EncoderNoRepeatNGramLogitsProcessor (line 981) | class EncoderNoRepeatNGramLogitsProcessor(LogitsProcessor): method __init__ (line 1019) | def __init__(self, encoder_ngram_size: int, encoder_input_ids: torch.L... method __call__ (line 1031) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class SequenceBiasLogitsProcessor (line 1050) | class SequenceBiasLogitsProcessor(LogitsProcessor): method __init__ (line 1112) | def __init__(self, sequence_bias: Dict[Tuple[int], float]): method __call__ (line 1122) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... method _prepare_bias_variables (line 1155) | def _prepare_bias_variables(self, scores: torch.FloatTensor): method _validate_arguments (line 1179) | def _validate_arguments(self): class NoBadWordsLogitsProcessor (line 1198) | class NoBadWordsLogitsProcessor(SequenceBiasLogitsProcessor): method __init__ (line 1253) | def __init__( method _validate_arguments (line 1274) | def _validate_arguments(self): class PrefixConstrainedLogitsProcessor (line 1289) | class PrefixConstrainedLogitsProcessor(LogitsProcessor): method __init__ (line 1336) | def __init__(self, prefix_allowed_tokens_fn: Callable[[int, torch.Tens... method __call__ (line 1341) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class HammingDiversityLogitsProcessor (line 1358) | class HammingDiversityLogitsProcessor(LogitsProcessor): method __init__ (line 1432) | def __init__(self, diversity_penalty: float, num_beams: int, num_beam_... method __call__ (line 1445) | def __call__( class ForcedBOSTokenLogitsProcessor (line 1494) | class ForcedBOSTokenLogitsProcessor(LogitsProcessor): method __init__ (line 1526) | def __init__(self, bos_token_id: int): method __call__ (line 1530) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class ForcedEOSTokenLogitsProcessor (line 1539) | class ForcedEOSTokenLogitsProcessor(LogitsProcessor): method __init__ (line 1573) | def __init__(self, max_length: int, eos_token_id: Union[int, List[int]... method __call__ (line 1586) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class InfNanRemoveLogitsProcessor (line 1595) | class InfNanRemoveLogitsProcessor(LogitsProcessor): method __call__ (line 1605) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class ExponentialDecayLengthPenalty (line 1616) | class ExponentialDecayLengthPenalty(LogitsProcessor): method __init__ (line 1684) | def __init__( method __call__ (line 1703) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class LogitNormalization (line 1717) | class LogitNormalization(LogitsProcessor): method __call__ (line 1749) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class SuppressTokensAtBeginLogitsProcessor (line 1754) | class SuppressTokensAtBeginLogitsProcessor(LogitsProcessor): method __init__ (line 1789) | def __init__(self, begin_suppress_tokens, begin_index, device: str = "... method set_begin_index (line 1793) | def set_begin_index(self, begin_index): method __call__ (line 1797) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class SuppressTokensLogitsProcessor (line 1807) | class SuppressTokensLogitsProcessor(LogitsProcessor): method __init__ (line 1836) | def __init__(self, suppress_tokens, device: str = "cpu"): method __call__ (line 1840) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class ForceTokensLogitsProcessor (line 1847) | class ForceTokensLogitsProcessor(LogitsProcessor): method __init__ (line 1855) | def __init__(self, force_token_map: List[List[int]], _has_warned: Opti... method __call__ (line 1865) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class WhisperTimeStampLogitsProcessor (line 1875) | class WhisperTimeStampLogitsProcessor(LogitsProcessor): method __init__ (line 1931) | def __init__( method set_begin_index (line 1957) | def set_begin_index(self, begin_index): method __call__ (line 1961) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class WhisperNoSpeechDetection (line 2011) | class WhisperNoSpeechDetection(LogitsProcessor): method __init__ (line 2014) | def __init__(self, no_speech_token: int, begin_index: int, scores_is_l... method set_model (line 2029) | def set_model(self, model): method set_inputs (line 2032) | def set_inputs(self, inputs): method no_speech_prob (line 2037) | def no_speech_prob(self): method set_begin_index (line 2040) | def set_begin_index(self, begin_index): method __call__ (line 2044) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class ClassifierFreeGuidanceLogitsProcessor (line 2068) | class ClassifierFreeGuidanceLogitsProcessor(LogitsProcessor): method __init__ (line 2107) | def __init__(self, guidance_scale): method __call__ (line 2117) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class AlternatingCodebooksLogitsProcessor (line 2132) | class AlternatingCodebooksLogitsProcessor(LogitsProcessor): method __init__ (line 2153) | def __init__(self, input_start_len: int, semantic_vocab_size: int, cod... method __call__ (line 2161) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class UnbatchedClassifierFreeGuidanceLogitsProcessor (line 2177) | class UnbatchedClassifierFreeGuidanceLogitsProcessor(LogitsProcessor): method __init__ (line 2229) | def __init__( method get_unconditional_logits (line 2247) | def get_unconditional_logits(self, input_ids): method __call__ (line 2283) | def __call__(self, input_ids, scores): class BarkEosPrioritizerLogitsProcessor (line 2295) | class BarkEosPrioritizerLogitsProcessor(LogitsProcessor): method __init__ (line 2312) | def __init__(self, eos_token_id: Union[int, List[int], torch.Tensor], ... method __call__ (line 2327) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class WatermarkLogitsProcessor (line 2342) | class WatermarkLogitsProcessor(LogitsProcessor): method __init__ (line 2404) | def __init__( method set_seed (line 2433) | def set_seed(self, input_seq: torch.LongTensor): method _get_greenlist_ids (line 2443) | def _get_greenlist_ids(self, input_seq: torch.LongTensor) -> torch.Lon... method _score_rejection_sampling (line 2449) | def _score_rejection_sampling(self, input_seq: torch.LongTensor, score... method __call__ (line 2464) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... FILE: mplsandbox_for_rl/transformers/src/transformers/generation/stopping_criteria.py class StoppingCriteria (line 47) | class StoppingCriteria(ABC): method __call__ (line 55) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MaxLengthCriteria (line 59) | class MaxLengthCriteria(StoppingCriteria): method __init__ (line 71) | def __init__(self, max_length: int, max_position_embeddings: Optional[... method __call__ (line 76) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MaxNewTokensCriteria (line 88) | class MaxNewTokensCriteria(StoppingCriteria): method __init__ (line 101) | def __init__(self, start_length: int, max_new_tokens: int): method __call__ (line 113) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MaxTimeCriteria (line 118) | class MaxTimeCriteria(StoppingCriteria): method __init__ (line 131) | def __init__(self, max_time: float, initial_timestamp: Optional[float]... method __call__ (line 136) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class StopStringCriteria (line 141) | class StopStringCriteria(StoppingCriteria): method __init__ (line 272) | def __init__(self, tokenizer: PreTrainedTokenizerBase, stop_strings: U... method clean_and_embed_tokens_with_cache (line 286) | def clean_and_embed_tokens_with_cache(self, token_list, token_indices,... method clean_tokenizer_vocab (line 308) | def clean_tokenizer_vocab(tokenizer, static_prefix="abcdef"): method _stop_string_get_matching_positions (line 329) | def _stop_string_get_matching_positions( method _stop_string_create_embedding_vec (line 370) | def _stop_string_create_embedding_vec(token_list, token_indices, stop_... method __call__ (line 412) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EosTokenCriteria (line 470) | class EosTokenCriteria(StoppingCriteria): method __init__ (line 480) | def __init__(self, eos_token_id: Union[int, List[int], torch.Tensor]): method __call__ (line 488) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class StoppingCriteriaList (line 506) | class StoppingCriteriaList(list): method __call__ (line 508) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... method max_length (line 515) | def max_length(self) -> Optional[int]: function validate_stopping_criteria (line 524) | def validate_stopping_criteria(stopping_criteria: StoppingCriteriaList, ... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 170) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFMinLengthLogitsProcessor (line 202) | class TFMinLengthLogitsProcessor(TFLogitsProcessor): method __init__ (line 213) | def __init__(self, min_length: int, eos_token_id: int): method _apply_eos_token_mask (line 223) | def _apply_eos_token_mask(self, scores: tf.Tensor) -> tf.Tensor: method __call__ (line 228) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFRepetitionPenaltyLogitsProcessor (line 238) | class TFRepetitionPenaltyLogitsProcessor(TFLogitsProcessor): method __init__ (line 248) | def __init__(self, penalty: float): method _create_score_penalties (line 254) | def _create_score_penalties(self, input_ids: tf.Tensor, logits: tf.Ten... method __call__ (line 280) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFNoBadWordsLogitsProcessor (line 288) | class TFNoBadWordsLogitsProcessor(TFLogitsProcessor): method __init__ (line 303) | def __init__(self, bad_words_ids: List[List[int]], eos_token_id: int): method _calc_row_banned_bad_tokens (line 327) | def _calc_row_banned_bad_tokens(self, row_input_ids: tf.Tensor) -> tf.... method __call__ (line 367) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFNoRepeatNGramLogitsProcessor (line 388) | class TFNoRepeatNGramLogitsProcessor(TFLogitsProcessor): method __init__ (line 398) | def __init__(self, ngram_size: int): method calc_banned_ngram_tokens (line 403) | def calc_banned_ngram_tokens(self, input_ids, num_hypos, cur_len): method __call__ (line 427) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFForcedBOSTokenLogitsProcessor (line 448) | class TFForcedBOSTokenLogitsProcessor(TFLogitsProcessor): method __init__ (line 457) | def __init__(self, bos_token_id: int): method __call__ (line 462) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFForcedEOSTokenLogitsProcessor (line 478) | class TFForcedEOSTokenLogitsProcessor(TFLogitsProcessor): method __init__ (line 489) | def __init__(self, max_length: int, eos_token_id: int): method __call__ (line 495) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFSuppressTokensAtBeginLogitsProcessor (line 511) | class TFSuppressTokensAtBeginLogitsProcessor(TFLogitsProcessor): method __init__ (line 518) | def __init__(self, begin_suppress_tokens, begin_index): method __call__ (line 522) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFSuppressTokensLogitsProcessor (line 535) | class TFSuppressTokensLogitsProcessor(TFLogitsProcessor): method __init__ (line 539) | def __init__(self, suppress_tokens): method __call__ (line 542) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFForceTokensLogitsProcessor (line 551) | class TFForceTokensLogitsProcessor(TFLogitsProcessor): method __init__ (line 556) | def __init__(self, force_token_map: List[List[int]]): method __call__ (line 567) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... FILE: mplsandbox_for_rl/transformers/src/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 compute_transition_scores (line 477) | def compute_transition_scores( method _validate_model_class (line 597) | def _validate_model_class(self): method _validate_model_kwargs (line 622) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method generate (line 645) | def generate( method _prepare_attention_mask_for_generation (line 1030) | def _prepare_attention_mask_for_generation( method _prepare_encoder_decoder_kwargs_for_generation (line 1046) | def _prepare_encoder_decoder_kwargs_for_generation( method _prepare_decoder_input_ids_for_generation (line 1076) | def _prepare_decoder_input_ids_for_generation( method _get_decoder_start_token_id (line 1115) | def _get_decoder_start_token_id(self, decoder_start_token_id: int = No... method _expand_inputs_for_generation (line 1134) | def _expand_inputs_for_generation( method _prepare_model_inputs (line 1172) | def _prepare_model_inputs( method _maybe_initialize_input_ids_for_generation (line 1238) | def _maybe_initialize_input_ids_for_generation( method _extract_past_from_model_output (line 1267) | def _extract_past_from_model_output(outputs: ModelOutput): method _update_model_kwargs_for_generation (line 1277) | def _update_model_kwargs_for_generation( method _update_model_kwargs_for_xla_generation (line 1293) | def _update_model_kwargs_for_xla_generation( method _get_logits_warper (line 1420) | def _get_logits_warper( method _get_logits_processor (line 1450) | def _get_logits_processor( method _merge_criteria_processor_list (line 1505) | def _merge_criteria_processor_list( method greedy_search (line 1526) | def greedy_search( method sample (line 1788) | def sample( method _gather_beams (line 2079) | def _gather_beams(nested, beam_indices, batch_axis=0): method beam_search (line 2099) | def beam_search( method contrastive_search (line 2683) | def contrastive_search( function scatter_values_on_batch_indices (line 3091) | def scatter_values_on_batch_indices(values, batch_indices): function sample_without_replacement (line 3101) | def sample_without_replacement(logits, num_samples): function _ranking_fast (line 3111) | def _ranking_fast( FILE: mplsandbox_for_rl/transformers/src/transformers/generation/utils.py class GenerateDecoderOnlyOutput (line 131) | class GenerateDecoderOnlyOutput(ModelOutput): class GenerateEncoderDecoderOutput (line 171) | class GenerateEncoderDecoderOutput(ModelOutput): class GenerateBeamDecoderOnlyOutput (line 223) | class GenerateBeamDecoderOnlyOutput(ModelOutput): class GenerateBeamEncoderDecoderOutput (line 271) | class GenerateBeamEncoderDecoderOutput(ModelOutput): class GenerationMixin (line 358) | class GenerationMixin: method prepare_inputs_for_generation (line 375) | def prepare_inputs_for_generation(self, *args, **kwargs): method _prepare_model_inputs (line 380) | def _prepare_model_inputs( method _maybe_initialize_input_ids_for_generation (line 444) | def _maybe_initialize_input_ids_for_generation( method _prepare_attention_mask_for_generation (line 476) | def _prepare_attention_mask_for_generation( method _prepare_encoder_decoder_kwargs_for_generation (line 512) | def _prepare_encoder_decoder_kwargs_for_generation( method _prepare_decoder_input_ids_for_generation (line 553) | def _prepare_decoder_input_ids_for_generation( method _expand_inputs_for_generation (line 613) | def _expand_inputs_for_generation( method _extract_past_from_model_output (line 643) | def _extract_past_from_model_output(self, outputs: ModelOutput): method _update_model_kwargs_for_generation (line 658) | def _update_model_kwargs_for_generation( method _reorder_cache (line 702) | def _reorder_cache(self, past_key_values, beam_idx): method _get_candidate_generator (line 708) | def _get_candidate_generator( method _get_logits_processor (line 738) | def _get_logits_processor( method _get_stopping_criteria (line 965) | def _get_stopping_criteria( method _merge_criteria_processor_list (line 996) | def _merge_criteria_processor_list( method compute_transition_scores (line 1017) | def compute_transition_scores( method _validate_model_class (line 1139) | def _validate_model_class(self): method _validate_assistant (line 1165) | def _validate_assistant(self, assistant_model): method _validate_model_kwargs (line 1184) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method _validate_generated_length (line 1244) | def _validate_generated_length(self, generation_config, input_ids_leng... method _prepare_generated_length (line 1293) | def _prepare_generated_length( method _prepare_generation_config (line 1343) | def _prepare_generation_config( method _get_initial_cache_position (line 1403) | def _get_initial_cache_position(self, input_ids, model_kwargs): method _get_cache (line 1428) | def _get_cache( method _supports_default_dynamic_cache (line 1490) | def _supports_default_dynamic_cache(self) -> bool: method _prepare_special_tokens (line 1500) | def _prepare_special_tokens( method generate (line 1584) | def generate( method _has_unfinished_sequences (line 2144) | def _has_unfinished_sequences( method heal_tokens (line 2175) | def heal_tokens( method contrastive_search (line 2237) | def contrastive_search(self, *args, **kwargs): method _dola_decoding (line 2244) | def _dola_decoding( method _contrastive_search (line 2453) | def _contrastive_search( method _sample (line 2840) | def _sample( method _temporary_reorder_cache (line 3013) | def _temporary_reorder_cache(self, past_key_values, beam_idx): method _beam_search (line 3039) | def _beam_search( method _group_beam_search (line 3313) | def _group_beam_search( method _constrained_beam_search (line 3600) | def _constrained_beam_search( method _assisted_decoding (line 3835) | def _assisted_decoding( function _speculative_sampling (line 4110) | def _speculative_sampling( function _split_model_outputs (line 4166) | def _split_model_outputs(outputs, new_outputs, cur_len, added_len, is_de... function _ranking_fast (line 4192) | def _ranking_fast( function _split (line 4215) | def _split(data, full_batch_size: int, split_size: int = None): function _split_model_inputs (line 4251) | def _split_model_inputs( function stack_model_outputs (line 4313) | def stack_model_outputs(model_outputs: List[ModelOutput]) -> ModelOutput: function _relative_top_filter (line 4367) | def _relative_top_filter( function _dola_select_contrast (line 4392) | def _dola_select_contrast( FILE: mplsandbox_for_rl/transformers/src/transformers/generation/watermarking.py class WatermarkDetectorOutput (line 38) | class WatermarkDetectorOutput: class WatermarkDetector (line 70) | class WatermarkDetector: method __init__ (line 122) | def __init__( method _get_ngram_score (line 145) | def _get_ngram_score(self, prefix: torch.LongTensor, target: int): method _score_ngrams_in_passage (line 149) | def _score_ngrams_in_passage(self, input_ids: torch.LongTensor): method _compute_z_score (line 179) | def _compute_z_score(self, green_token_count: np.array, total_num_toke... method _compute_pval (line 186) | def _compute_pval(self, x, loc=0, scale=1): method __call__ (line 190) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/hf_argparser.py function string_to_bool (line 35) | def string_to_bool(v): function make_choice_type_function (line 48) | def make_choice_type_function(choices: list) -> Callable[[str], Any]: function HfArg (line 63) | def HfArg( class HfArgumentParser (line 110) | class HfArgumentParser(ArgumentParser): method __init__ (line 121) | def __init__(self, dataclass_types: Union[DataClassType, Iterable[Data... method _parse_dataclass_field (line 140) | def _parse_dataclass_field(parser: ArgumentParser, field: dataclasses.... method _add_dataclass_arguments (line 232) | def _add_dataclass_arguments(self, dtype: DataClassType): method parse_args_into_dataclasses (line 266) | def parse_args_into_dataclasses( method parse_dict (line 352) | def parse_dict(self, args: Dict[str, Any], allow_extra_keys: bool = Fa... method parse_json_file (line 380) | def parse_json_file( method parse_yaml_file (line 404) | def parse_yaml_file( FILE: mplsandbox_for_rl/transformers/src/transformers/hyperparameter_search.py class HyperParamSearchBackendBase (line 39) | class HyperParamSearchBackendBase: method is_available (line 44) | def is_available(): method run (line 47) | def run(self, trainer, n_trials: int, direction: str, **kwargs): method default_hp_space (line 50) | def default_hp_space(self, trial): method ensure_available (line 53) | def ensure_available(self): method pip_install (line 60) | def pip_install(cls): class OptunaBackend (line 64) | class OptunaBackend(HyperParamSearchBackendBase): method is_available (line 68) | def is_available(): method run (line 71) | def run(self, trainer, n_trials: int, direction: str, **kwargs): method default_hp_space (line 74) | def default_hp_space(self, trial): class RayTuneBackend (line 78) | class RayTuneBackend(HyperParamSearchBackendBase): method is_available (line 83) | def is_available(): method run (line 86) | def run(self, trainer, n_trials: int, direction: str, **kwargs): method default_hp_space (line 89) | def default_hp_space(self, trial): class SigOptBackend (line 93) | class SigOptBackend(HyperParamSearchBackendBase): method is_available (line 97) | def is_available(): method run (line 100) | def run(self, trainer, n_trials: int, direction: str, **kwargs): method default_hp_space (line 103) | def default_hp_space(self, trial): class WandbBackend (line 107) | class WandbBackend(HyperParamSearchBackendBase): method is_available (line 111) | def is_available(): method run (line 114) | def run(self, trainer, n_trials: int, direction: str, **kwargs): method default_hp_space (line 117) | def default_hp_space(self, trial): function default_hp_search_backend (line 126) | def default_hp_search_backend() -> str: FILE: mplsandbox_for_rl/transformers/src/transformers/image_processing_base.py class BatchFeature (line 53) | class BatchFeature(BaseBatchFeature): class ImageProcessingMixin (line 69) | class ImageProcessingMixin(PushToHubMixin): method __init__ (line 77) | def __init__(self, **kwargs): method _set_processor_class (line 92) | def _set_processor_class(self, processor_class: str): method from_pretrained (line 97) | def from_pretrained( method save_pretrained (line 210) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method get_image_processor_dict (line 272) | def get_image_processor_dict( method from_dict (line 391) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method to_dict (line 435) | def to_dict(self) -> Dict[str, Any]: method from_json_file (line 448) | def from_json_file(cls, json_file: Union[str, os.PathLike]): method to_json_string (line 466) | def to_json_string(self) -> str: method to_json_file (line 487) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method __repr__ (line 498) | def __repr__(self): method register_for_auto_class (line 502) | def register_for_auto_class(cls, auto_class="AutoImageProcessor"): method fetch_images (line 527) | def fetch_images(self, image_url_or_urls: Union[str, List[str]]): FILE: mplsandbox_for_rl/transformers/src/transformers/image_processing_utils.py class BaseImageProcessor (line 35) | class BaseImageProcessor(ImageProcessingMixin): method __init__ (line 36) | def __init__(self, **kwargs): method __call__ (line 39) | def __call__(self, images, **kwargs) -> BatchFeature: method preprocess (line 43) | def preprocess(self, images, **kwargs) -> BatchFeature: method rescale (line 46) | def rescale( method normalize (line 78) | def normalize( method center_crop (line 115) | def center_crop( method to_dict (line 154) | def to_dict(self): function is_valid_size_dict (line 169) | def is_valid_size_dict(size_dict): function convert_to_size_dict (line 180) | def convert_to_size_dict( function get_size_dict (line 208) | def get_size_dict( function select_best_resolution (line 252) | def select_best_resolution(original_size: tuple, possible_resolutions: l... FILE: mplsandbox_for_rl/transformers/src/transformers/image_processing_utils_fast.py class SizeDict (line 28) | class SizeDict: method __getitem__ (line 40) | def __getitem__(self, key): class BaseImageProcessorFast (line 46) | class BaseImageProcessorFast(BaseImageProcessor): method _build_transforms (line 49) | def _build_transforms(self, **kwargs) -> "Compose": method _validate_params (line 55) | def _validate_params(self, **kwargs) -> None: method get_transforms (line 61) | def get_transforms(self, **kwargs) -> "Compose": method to_dict (line 65) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/image_transforms.py function to_channel_dimension_format (line 58) | def to_channel_dimension_format( function rescale (line 97) | def rescale( function _rescale_for_pil_conversion (line 135) | def _rescale_for_pil_conversion(image): function to_pil_image (line 162) | def to_pil_image( function get_resize_output_image_size (line 214) | def get_resize_output_image_size( function resize (line 281) | def resize( function normalize (line 352) | def normalize( function center_crop (line 413) | def center_crop( function _center_to_corners_format_torch (line 512) | def _center_to_corners_format_torch(bboxes_center: "torch.Tensor") -> "t... function _center_to_corners_format_numpy (line 522) | def _center_to_corners_format_numpy(bboxes_center: np.ndarray) -> np.nda... function _center_to_corners_format_tf (line 532) | def _center_to_corners_format_tf(bboxes_center: "tf.Tensor") -> "tf.Tens... function center_to_corners_format (line 543) | def center_to_corners_format(bboxes_center: TensorType) -> TensorType: function _corners_to_center_format_torch (line 564) | def _corners_to_center_format_torch(bboxes_corners: "torch.Tensor") -> "... function _corners_to_center_format_numpy (line 575) | def _corners_to_center_format_numpy(bboxes_corners: np.ndarray) -> np.nd... function _corners_to_center_format_tf (line 589) | def _corners_to_center_format_tf(bboxes_corners: "tf.Tensor") -> "tf.Ten... function corners_to_center_format (line 603) | def corners_to_center_format(bboxes_corners: TensorType) -> TensorType: function rgb_to_id (line 626) | def rgb_to_id(color): function id_to_rgb (line 637) | def id_to_rgb(id_map): class PaddingMode (line 656) | class PaddingMode(ExplicitEnum): function pad (line 667) | def pad( function convert_to_rgb (line 754) | def convert_to_rgb(image: ImageInput) -> ImageInput: function flip_channel_order (line 774) | def flip_channel_order( function _cast_tensor_to_float (line 812) | def _cast_tensor_to_float(x): class FusedRescaleNormalize (line 818) | class FusedRescaleNormalize: method __init__ (line 823) | def __init__(self, mean, std, rescale_factor: float = 1.0, inplace: bo... method __call__ (line 828) | def __call__(self, image: "torch.Tensor"): class Rescale (line 833) | class Rescale: method __init__ (line 838) | def __init__(self, rescale_factor: float = 1.0): method __call__ (line 841) | def __call__(self, image: "torch.Tensor"): class NumpyToTensor (line 846) | class NumpyToTensor: method __call__ (line 851) | def __call__(self, image: np.ndarray): FILE: mplsandbox_for_rl/transformers/src/transformers/image_utils.py class ChannelDimension (line 95) | class ChannelDimension(ExplicitEnum): class AnnotationFormat (line 100) | class AnnotationFormat(ExplicitEnum): class AnnotionFormat (line 105) | class AnnotionFormat(ExplicitEnum): function is_pil_image (line 113) | def is_pil_image(img): class ImageType (line 117) | class ImageType(ExplicitEnum): function get_image_type (line 125) | def get_image_type(image): function is_valid_image (line 139) | def is_valid_image(img): function valid_images (line 143) | def valid_images(imgs): function is_batched (line 155) | def is_batched(img): function is_scaled_image (line 161) | def is_scaled_image(image: np.ndarray) -> bool: function make_list_of_images (line 172) | def make_list_of_images(images, expected_ndims: int = 3) -> List[ImageIn... function to_numpy_array (line 211) | def to_numpy_array(img) -> np.ndarray: function infer_channel_dimension_format (line 220) | def infer_channel_dimension_format( function get_channel_dimension_axis (line 257) | def get_channel_dimension_axis( function get_image_size (line 281) | def get_image_size(image: np.ndarray, channel_dim: ChannelDimension = No... function is_valid_annotation_coco_detection (line 305) | def is_valid_annotation_coco_detection(annotation: Dict[str, Union[List,... function is_valid_annotation_coco_panoptic (line 320) | def is_valid_annotation_coco_panoptic(annotation: Dict[str, Union[List, ... function valid_coco_detection_annotations (line 336) | def valid_coco_detection_annotations(annotations: Iterable[Dict[str, Uni... function valid_coco_panoptic_annotations (line 340) | def valid_coco_panoptic_annotations(annotations: Iterable[Dict[str, Unio... function load_image (line 344) | def load_image(image: Union[str, "PIL.Image.Image"], timeout: Optional[f... function validate_preprocess_arguments (line 388) | def validate_preprocess_arguments( class ImageFeatureExtractionMixin (line 430) | class ImageFeatureExtractionMixin: method _ensure_format_supported (line 435) | def _ensure_format_supported(self, image): method to_pil_image (line 442) | def to_pil_image(self, image, rescale=None): method convert_rgb (line 472) | def convert_rgb(self, image): method rescale (line 486) | def rescale(self, image: np.ndarray, scale: Union[float, int]) -> np.n... method to_numpy_array (line 493) | def to_numpy_array(self, image, rescale=None, channel_first=True): method expand_dims (line 525) | def expand_dims(self, image): method normalize (line 545) | def normalize(self, image, mean, std, rescale=False): method resize (line 591) | def resize(self, image, size, resample=None, default_to_square=True, m... method center_crop (line 658) | def center_crop(self, image, size): method flip_channel_order (line 733) | def flip_channel_order(self, image): method rotate (line 750) | def rotate(self, image, angle, resample=None, expand=0, center=None, t... function validate_annotations (line 775) | def validate_annotations( function validate_kwargs (line 800) | def validate_kwargs(valid_processor_keys: List[str], captured_kwargs: Li... FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/aqlm.py function replace_with_aqlm_linear (line 23) | def replace_with_aqlm_linear( FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/awq.py function replace_quantization_scales (line 73) | def replace_quantization_scales(model, model_type): function replace_with_awq_linear (line 90) | def replace_with_awq_linear( function get_modules_to_fuse (line 191) | def get_modules_to_fuse(model, quantization_config): function fuse_awq_modules (line 235) | def fuse_awq_modules(model, quantization_config): function _fuse_awq_layernorm (line 296) | def _fuse_awq_layernorm(fuse_module_names, module, target_cls): function _fuse_awq_mlp (line 319) | def _fuse_awq_mlp(model, current_module_name, fuse_module_names, module,... function _fuse_awq_attention_layers (line 363) | def _fuse_awq_attention_layers(model, module, modules_to_fuse, current_m... function post_init_awq_exllama_modules (line 452) | def post_init_awq_exllama_modules(model, exllama_config): FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/bitsandbytes.py function set_module_quantized_tensor_to_device (line 28) | def set_module_quantized_tensor_to_device(module, tensor_name, device, v... function _replace_with_bnb_linear (line 143) | def _replace_with_bnb_linear( function replace_with_bnb_linear (line 221) | def replace_with_bnb_linear(model, modules_to_not_convert=None, current_... function replace_8bit_linear (line 267) | def replace_8bit_linear(*args, **kwargs): function set_module_8bit_tensor_to_device (line 276) | def set_module_8bit_tensor_to_device(*args, **kwargs): function get_keys_to_not_convert (line 284) | def get_keys_to_not_convert(model): function dequantize_bnb_weight (line 335) | def dequantize_bnb_weight(weight: "torch.nn.Parameter", state=None): function _create_accelerate_new_hook (line 367) | def _create_accelerate_new_hook(old_hook): function _dequantize_and_replace (line 384) | def _dequantize_and_replace( function dequantize_and_replace (line 453) | def dequantize_and_replace( FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/deepspeed.py function is_deepspeed_available (line 35) | def is_deepspeed_available(): class HfDeepSpeedConfig (line 59) | class HfDeepSpeedConfig(DeepSpeedConfig): method __init__ (line 76) | def __init__(self, config_file_or_dict): class HfTrainerDeepSpeedConfig (line 84) | class HfTrainerDeepSpeedConfig(HfDeepSpeedConfig): method __init__ (line 90) | def __init__(self, config_file_or_dict): method dtype (line 95) | def dtype(self): method is_auto (line 100) | def is_auto(self, ds_key_long): method fill_match (line 107) | def fill_match(self, ds_key_long, hf_val, hf_key=None, must_match=True): method trainer_config_process (line 135) | def trainer_config_process(self, args, auto_find_batch_size=False): method trainer_config_finalize (line 209) | def trainer_config_finalize(self, args, model, num_training_steps): function set_hf_deepspeed_config (line 275) | def set_hf_deepspeed_config(hf_deepspeed_config_obj): function unset_hf_deepspeed_config (line 283) | def unset_hf_deepspeed_config(): function is_deepspeed_zero3_enabled (line 289) | def is_deepspeed_zero3_enabled(): function deepspeed_config (line 296) | def deepspeed_config(): function deepspeed_optim_sched (line 303) | def deepspeed_optim_sched(trainer, hf_deepspeed_config, args, num_traini... function deepspeed_init (line 364) | def deepspeed_init(trainer, num_training_steps, inference=False): function deepspeed_load_checkpoint (line 421) | def deepspeed_load_checkpoint(deepspeed_engine, checkpoint_path, load_mo... FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/eetq.py function _replace_with_eetq_linear (line 28) | def _replace_with_eetq_linear( function replace_with_eetq_linear (line 79) | def replace_with_eetq_linear( FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/fbgemm_fp8.py class FbgemmFp8Linear (line 31) | class FbgemmFp8Linear(torch.nn.Module): method __init__ (line 32) | def __init__(self, in_features, out_features, bias, weight_dtype=torch... method forward (line 46) | def forward(self, x): function _replace_with_fbgemm_fp8_linear (line 67) | def _replace_with_fbgemm_fp8_linear( function replace_with_fbgemm_fp8_linear (line 122) | def replace_with_fbgemm_fp8_linear( FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/ggml.py function _gguf_parse_value (line 196) | def _gguf_parse_value(_value, data_type): function dequantize_q4_k (line 220) | def dequantize_q4_k(data, n_bytes: int): function dequantize_q4_0 (line 251) | def dequantize_q4_0(data, n_bytes: int): function dequantize_q6_k (line 277) | def dequantize_q6_k(data, n_bytes: int): function dequantize_q8_0 (line 330) | def dequantize_q8_0(data, n_bytes: int): function dequantize_q2_k (line 342) | def dequantize_q2_k(data, n_bytes: int): function dequantize_q3_k (line 382) | def dequantize_q3_k(data, n_bytes: int): function dequantize_q5_k (line 431) | def dequantize_q5_k(data, n_bytes: int): function load_dequant_gguf_tensor (line 490) | def load_dequant_gguf_tensor(shape, ggml_type, data, n_bytes): class GGUFTokenizerSkeleton (line 517) | class GGUFTokenizerSkeleton: method __init__ (line 518) | def __init__(self, dict_): class GGUFLlamaConverter (line 560) | class GGUFLlamaConverter(LlamaConverter): method __init__ (line 561) | def __init__(self, tokenizer_dict): method vocab (line 567) | def vocab(self, proto): method merges (line 570) | def merges(self, proto): method tokenizer (line 573) | def tokenizer(self, proto): method decoder (line 623) | def decoder(self, replacement, add_prefix_space): method converted (line 637) | def converted(self): class GGUFQwen2Converter (line 673) | class GGUFQwen2Converter(Qwen2Converter): method __init__ (line 674) | def __init__(self, tokenizer_dict): method converted (line 678) | def converted(self) -> Tokenizer: function convert_gguf_tokenizer (line 699) | def convert_gguf_tokenizer(architecture, tokenizer_dict) -> Tokenizer: FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/hqq.py function autoname_modules (line 26) | def autoname_modules(model): function name_to_linear_tag (line 32) | def name_to_linear_tag(name): function get_linear_tags (line 37) | def get_linear_tags(model): function _prepare_for_hqq_linear (line 48) | def _prepare_for_hqq_linear(model, patch_params, has_been_replaced, curr... function prepare_for_hqq_linear (line 81) | def prepare_for_hqq_linear(model, quantization_config=None, modules_to_n... FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/integration_utils.py function is_wandb_available (line 97) | def is_wandb_available(): function is_clearml_available (line 108) | def is_clearml_available(): function is_comet_available (line 112) | def is_comet_available(): function is_tensorboard_available (line 145) | def is_tensorboard_available(): function is_optuna_available (line 149) | def is_optuna_available(): function is_ray_available (line 153) | def is_ray_available(): function is_ray_tune_available (line 157) | def is_ray_tune_available(): function is_sigopt_available (line 163) | def is_sigopt_available(): function is_azureml_available (line 167) | def is_azureml_available(): function is_mlflow_available (line 175) | def is_mlflow_available(): function is_dagshub_available (line 181) | def is_dagshub_available(): function is_neptune_available (line 185) | def is_neptune_available(): function is_codecarbon_available (line 189) | def is_codecarbon_available(): function is_flytekit_available (line 193) | def is_flytekit_available(): function is_flyte_deck_standard_available (line 197) | def is_flyte_deck_standard_available(): function is_dvclive_available (line 203) | def is_dvclive_available(): function hp_params (line 207) | def hp_params(trial): function run_hp_search_optuna (line 228) | def run_hp_search_optuna(trainer, n_trials: int, direction: str, **kwarg... function run_hp_search_ray (line 286) | def run_hp_search_ray(trainer, n_trials: int, direction: str, **kwargs) ... function run_hp_search_sigopt (line 420) | def run_hp_search_sigopt(trainer, n_trials: int, direction: str, **kwarg... function run_hp_search_wandb (line 518) | def run_hp_search_wandb(trainer, n_trials: int, direction: str, **kwargs... function get_available_reporting_integrations (line 587) | def get_available_reporting_integrations(): function rewrite_logs (line 612) | def rewrite_logs(d): class TensorBoardCallback (line 628) | class TensorBoardCallback(TrainerCallback): method __init__ (line 637) | def __init__(self, tb_writer=None): method _init_summary_writer (line 660) | def _init_summary_writer(self, args, log_dir=None): method on_train_begin (line 665) | def on_train_begin(self, args, state, control, **kwargs): method on_log (line 687) | def on_log(self, args, state, control, logs=None, **kwargs): method on_train_end (line 708) | def on_train_end(self, args, state, control, **kwargs): function save_model_architecture_to_file (line 714) | def save_model_architecture_to_file(model: Any, output_dir: str): class WandbLogModel (line 730) | class WandbLogModel(str, Enum): method is_enabled (line 738) | def is_enabled(self) -> bool: method _missing_ (line 743) | def _missing_(cls, value: Any) -> "WandbLogModel": class WandbCallback (line 759) | class WandbCallback(TrainerCallback): method __init__ (line 764) | def __init__(self): method setup (line 775) | def setup(self, args, state, model, **kwargs): method on_train_begin (line 891) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_train_end (line 902) | def on_train_end(self, args, state, control, model=None, tokenizer=Non... method on_log (line 941) | def on_log(self, args, state, control, model=None, logs=None, **kwargs): method on_save (line 962) | def on_save(self, args, state, control, **kwargs): method on_predict (line 985) | def on_predict(self, args, state, control, metrics, **kwargs): class CometCallback (line 995) | class CometCallback(TrainerCallback): method __init__ (line 1000) | def __init__(self): method setup (line 1009) | def setup(self, args, state, model): method on_train_begin (line 1101) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_log (line 1105) | def on_log(self, args, state, control, model=None, logs=None, **kwargs): method on_train_end (line 1114) | def on_train_end(self, args, state, control, **kwargs): class AzureMLCallback (line 1129) | class AzureMLCallback(TrainerCallback): method __init__ (line 1134) | def __init__(self, azureml_run=None): method on_init_end (line 1139) | def on_init_end(self, args, state, control, **kwargs): method on_log (line 1145) | def on_log(self, args, state, control, logs=None, **kwargs): class MLflowCallback (line 1152) | class MLflowCallback(TrainerCallback): method __init__ (line 1158) | def __init__(self): method setup (line 1171) | def setup(self, args, state, model): method on_train_begin (line 1268) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_log (line 1272) | def on_log(self, args, state, control, logs, model=None, **kwargs): method on_train_end (line 1293) | def on_train_end(self, args, state, control, **kwargs): method on_save (line 1298) | def on_save(self, args, state, control, **kwargs): method __del__ (line 1309) | def __del__(self): class DagsHubCallback (line 1320) | class DagsHubCallback(MLflowCallback): method __init__ (line 1325) | def __init__(self): method setup (line 1334) | def setup(self, *args, **kwargs): method on_train_end (line 1361) | def on_train_end(self, args, state, control, **kwargs): class NeptuneMissingConfiguration (line 1369) | class NeptuneMissingConfiguration(Exception): method __init__ (line 1370) | def __init__(self): class NeptuneCallback (line 1380) | class NeptuneCallback(TrainerCallback): method __init__ (line 1416) | def __init__( method _stop_run_if_exists (line 1471) | def _stop_run_if_exists(self): method _initialize_run (line 1477) | def _initialize_run(self, **additional_neptune_kwargs): method _use_initial_run (line 1495) | def _use_initial_run(self): method _ensure_run_with_monitoring (line 1501) | def _ensure_run_with_monitoring(self): method _ensure_at_least_run_without_monitoring (line 1515) | def _ensure_at_least_run_without_monitoring(self): method run (line 1530) | def run(self): method _metadata_namespace (line 1536) | def _metadata_namespace(self): method _log_integration_version (line 1539) | def _log_integration_version(self): method _log_trainer_parameters (line 1542) | def _log_trainer_parameters(self, args): method _log_model_parameters (line 1545) | def _log_model_parameters(self, model): method _log_hyper_param_search_parameters (line 1553) | def _log_hyper_param_search_parameters(self, state): method _log_model_checkpoint (line 1560) | def _log_model_checkpoint(self, source_directory: str, checkpoint: str): method on_init_end (line 1584) | def on_init_end(self, args, state, control, **kwargs): method on_train_begin (line 1592) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_train_end (line 1607) | def on_train_end(self, args, state, control, **kwargs): method __del__ (line 1610) | def __del__(self): method on_save (line 1616) | def on_save(self, args, state, control, **kwargs): method on_evaluate (line 1620) | def on_evaluate(self, args, state, control, metrics=None, **kwargs): method get_run (line 1633) | def get_run(cls, trainer): method on_log (line 1640) | def on_log(self, args, state, control, logs: Optional[Dict[str, float]... class CodeCarbonCallback (line 1653) | class CodeCarbonCallback(TrainerCallback): method __init__ (line 1658) | def __init__(self): method on_init_end (line 1673) | def on_init_end(self, args, state, control, **kwargs): method on_train_begin (line 1678) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_train_end (line 1682) | def on_train_end(self, args, state, control, **kwargs): class ClearMLCallback (line 1687) | class ClearMLCallback(TrainerCallback): method __init__ (line 1718) | def __init__(self): method setup (line 1732) | def setup(self, args, state, model, tokenizer, **kwargs): method on_train_begin (line 1831) | def on_train_begin(self, args, state, control, model=None, tokenizer=N... method on_train_end (line 1840) | def on_train_end(self, args, state, control, **kwargs): method on_log (line 1845) | def on_log(self, args, state, control, model=None, tokenizer=None, log... method on_save (line 1898) | def on_save(self, args, state, control, **kwargs): method _copy_training_args_as_hparams (line 1930) | def _copy_training_args_as_hparams(self, training_args, prefix): class FlyteCallback (line 1940) | class FlyteCallback(TrainerCallback): method __init__ (line 1967) | def __init__(self, save_log_history: bool = True, sync_checkpoints: bo... method on_save (line 1985) | def on_save(self, args, state, control, **kwargs): method on_train_end (line 1993) | def on_train_end(self, args, state, control, **kwargs): class DVCLiveCallback (line 2003) | class DVCLiveCallback(TrainerCallback): method __init__ (line 2019) | def __init__( method setup (line 2044) | def setup(self, args, state, model): method on_train_begin (line 2063) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_log (line 2067) | def on_log(self, args, state, control, model=None, logs=None, **kwargs): method on_save (line 2086) | def on_save(self, args, state, control, **kwargs): method on_train_end (line 2090) | def on_train_end(self, args, state, control, **kwargs): function get_reporting_integration_callbacks (line 2118) | def get_reporting_integration_callbacks(report_to): FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/peft.py class PeftAdapterMixin (line 42) | class PeftAdapterMixin: method load_adapter (line 68) | def load_adapter( method add_adapter (line 237) | def add_adapter(self, adapter_config, adapter_name: Optional[str] = No... method set_adapter (line 274) | def set_adapter(self, adapter_name: Union[List[str], str]) -> None: method disable_adapters (line 319) | def disable_adapters(self) -> None: method enable_adapters (line 342) | def enable_adapters(self) -> None: method active_adapters (line 364) | def active_adapters(self) -> List[str]: method active_adapter (line 396) | def active_adapter(self) -> str: method get_adapter_state_dict (line 403) | def get_adapter_state_dict(self, adapter_name: Optional[str] = None) -... method _dispatch_accelerate_model (line 428) | def _dispatch_accelerate_model( FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/quanto.py function replace_with_quanto_layers (line 22) | def replace_with_quanto_layers( FILE: mplsandbox_for_rl/transformers/src/transformers/integrations/tpu.py function tpu_spmd_dataloader (line 20) | def tpu_spmd_dataloader(dataloader: DataLoader): FILE: mplsandbox_for_rl/transformers/src/transformers/keras_callbacks.py class KerasMetricCallback (line 20) | class KerasMetricCallback(keras.callbacks.Callback): method __init__ (line 78) | def __init__( method _concatenate_batches (line 144) | def _concatenate_batches(batches, padding_index=-100): method _postprocess_predictions_or_labels (line 162) | def _postprocess_predictions_or_labels(self, inputs): method on_epoch_end (line 184) | def on_epoch_end(self, epoch, logs=None): class PushToHubCallback (line 268) | class PushToHubCallback(keras.callbacks.Callback): method __init__ (line 315) | def __init__( method on_train_begin (line 351) | def on_train_begin(self, logs=None): method on_train_batch_end (line 356) | def on_train_batch_end(self, batch, logs=None): method on_epoch_end (line 367) | def on_epoch_end(self, epoch, logs=None): method on_train_end (line 394) | def on_train_end(self, logs=None): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/kernels/deformable_detr/ms_deform_attn.h function im2col_step (line 27) | int im2col_step) FILE: mplsandbox_for_rl/transformers/src/transformers/kernels/deformable_detr/vision.cpp function PYBIND11_MODULE (line 13) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: mplsandbox_for_rl/transformers/src/transformers/kernels/deta/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: mplsandbox_for_rl/transformers/src/transformers/kernels/deta/ms_deform_attn.h function im2col_step (line 27) | int im2col_step) FILE: mplsandbox_for_rl/transformers/src/transformers/kernels/deta/vision.cpp function PYBIND11_MODULE (line 13) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: mplsandbox_for_rl/transformers/src/transformers/kernels/mra/torch_extension.cpp function index_max (line 6) | std::vector index_max( function mm_to_sparse (line 20) | at::Tensor mm_to_sparse( function sparse_dense_mm (line 32) | at::Tensor sparse_dense_mm( function reduce_sum (line 46) | at::Tensor reduce_sum( function scatter (line 60) | at::Tensor scatter( function PYBIND11_MODULE (line 72) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/modelcard.py class ModelCard (line 79) | class ModelCard: method __init__ (line 90) | def __init__(self, **kwargs): method save_pretrained (line 113) | def save_pretrained(self, save_directory_or_file): method from_pretrained (line 125) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method from_dict (line 219) | def from_dict(cls, json_object): method from_json_file (line 224) | def from_json_file(cls, json_file): method __eq__ (line 231) | def __eq__(self, other): method __repr__ (line 234) | def __repr__(self): method to_dict (line 237) | def to_dict(self): method to_json_string (line 242) | def to_json_string(self): method to_json_file (line 246) | def to_json_file(self, json_file_path): function _listify (line 298) | def _listify(obj): function _insert_values_as_list (line 307) | def _insert_values_as_list(metadata, name, values): function infer_metric_tags_from_eval_results (line 319) | def infer_metric_tags_from_eval_results(eval_results): function _insert_value (line 331) | def _insert_value(metadata, name, value): function is_hf_dataset (line 338) | def is_hf_dataset(dataset): function _get_mapping_values (line 347) | def _get_mapping_values(mapping): class TrainingSummary (line 358) | class TrainingSummary: method __post_init__ (line 374) | def __post_init__(self): method create_model_index (line 390) | def create_model_index(self, metric_mapping): method create_metadata (line 453) | def create_metadata(self): method to_model_card (line 469) | def to_model_card(self): method from_trainer (line 550) | def from_trainer( method from_keras (line 628) | def from_keras( function parse_keras_history (line 703) | def parse_keras_history(logs): function parse_log_history (line 738) | def parse_log_history(log_history): function extract_hyperparameters_from_keras (line 800) | def extract_hyperparameters_from_keras(model): function _maybe_round (line 813) | def _maybe_round(v, decimals=4): function _regular_table_line (line 819) | def _regular_table_line(values, col_widths): function _second_table_line (line 824) | def _second_table_line(col_widths): function make_markdown_table (line 829) | def make_markdown_table(lines): function extract_hyperparameters_from_trainer (line 856) | def extract_hyperparameters_from_trainer(trainer): FILE: mplsandbox_for_rl/transformers/src/transformers/modeling_attn_mask_utils.py class AttentionMaskConverter (line 21) | class AttentionMaskConverter: method __init__ (line 55) | def __init__(self, is_causal: bool, sliding_window: Optional[int] = No... method to_causal_4d (line 64) | def to_causal_4d( method to_4d (line 97) | def to_4d( method _make_causal_mask (line 145) | def _make_causal_mask( method _expand_mask (line 175) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Opti... method _unmask_unattended (line 189) | def _unmask_unattended( method _ignore_causal_mask_sdpa (line 238) | def _ignore_causal_mask_sdpa( function _prepare_4d_causal_attention_mask (line 292) | def _prepare_4d_causal_attention_mask( function _prepare_4d_causal_attention_mask_for_sdpa (line 345) | def _prepare_4d_causal_attention_mask_for_sdpa( function _prepare_4d_attention_mask (line 410) | def _prepare_4d_attention_mask(mask: torch.Tensor, dtype: torch.dtype, t... function _prepare_4d_attention_mask_for_sdpa (line 426) | def _prepare_4d_attention_mask_for_sdpa(mask: torch.Tensor, dtype: torch... function _create_4d_causal_attention_mask (line 455) | def _create_4d_causal_attention_mask( FILE: mplsandbox_for_rl/transformers/src/transformers/modeling_flash_attention_utils.py function _get_unpad_data (line 33) | def _get_unpad_data(attention_mask: torch.Tensor) -> Tuple[torch.Tensor,... function _upad_input (line 60) | def _upad_input( function prepare_fa2_from_position_ids (line 133) | def prepare_fa2_from_position_ids(query, key, value, position_ids): function _flash_attention_forward (line 183) | def _flash_attention_forward( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/modeling_flax_pytorch_utils.py function load_pytorch_checkpoint_in_flax_state_dict (line 49) | def load_pytorch_checkpoint_in_flax_state_dict( function rename_key_and_reshape_tensor (line 87) | def rename_key_and_reshape_tensor( function convert_pytorch_state_dict_to_flax (line 154) | def convert_pytorch_state_dict_to_flax(pt_state_dict, flax_model): function convert_pytorch_sharded_state_dict_to_flax (line 246) | def convert_pytorch_sharded_state_dict_to_flax(shard_filenames, flax_mod... function load_flax_checkpoint_in_pytorch_model (line 337) | def load_flax_checkpoint_in_pytorch_model(model, flax_checkpoint_path): function load_flax_weights_in_pytorch_model (line 359) | def load_flax_weights_in_pytorch_model(pt_model, flax_state): FILE: mplsandbox_for_rl/transformers/src/transformers/modeling_flax_utils.py function quick_gelu (line 70) | def quick_gelu(x): function dtype_byte_size (line 85) | def dtype_byte_size(dtype): function flax_shard_checkpoint (line 102) | def flax_shard_checkpoint(params, max_shard_size="10GB"): class FlaxPreTrainedModel (line 167) | class FlaxPreTrainedModel(PushToHubMixin, FlaxGenerationMixin): method __init__ (line 190) | def __init__( method init_weights (line 241) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method enable_gradient_checkpointing (line 244) | def enable_gradient_checkpointing(self): method _from_config (line 248) | def _from_config(cls, config, **kwargs): method framework (line 255) | def framework(self) -> str: method config (line 262) | def config(self) -> PretrainedConfig: method module (line 266) | def module(self) -> nn.Module: method params (line 270) | def params(self) -> Union[Dict, FrozenDict]: method required_params (line 280) | def required_params(self) -> Set: method params_shape_tree (line 284) | def params_shape_tree(self) -> Dict: method params (line 288) | def params(self, params: Union[Dict, FrozenDict]): method _cast_floating_to (line 306) | def _cast_floating_to(self, params: Union[Dict, FrozenDict], dtype: jn... method to_bf16 (line 329) | def to_bf16(self, params: Union[Dict, FrozenDict], mask: Any = None): method to_fp32 (line 368) | def to_fp32(self, params: Union[Dict, FrozenDict], mask: Any = None): method to_fp16 (line 395) | def to_fp16(self, params: Union[Dict, FrozenDict], mask: Any = None): method load_flax_weights (line 435) | def load_flax_weights(cls, resolved_archive_file): method load_flax_sharded_weights (line 460) | def load_flax_sharded_weights(cls, shard_files): method can_generate (line 507) | def can_generate(cls) -> bool: method from_pretrained (line 519) | def from_pretrained( method save_pretrained (line 1089) | def save_pretrained( method register_for_auto_class (line 1228) | def register_for_auto_class(cls, auto_class="FlaxAutoModel"): function overwrite_call_docstring (line 1262) | def overwrite_call_docstring(model_class, docstring): function append_call_sample_docstring (line 1271) | def append_call_sample_docstring( function append_replace_return_docstrings (line 1285) | def append_replace_return_docstrings(model_class, output_type, config_cl... FILE: mplsandbox_for_rl/transformers/src/transformers/modeling_gguf_pytorch_utils.py function read_field (line 57) | def read_field(reader, field): function load_gguf_checkpoint (line 62) | def load_gguf_checkpoint(gguf_checkpoint_path, return_tensors=False): function reverse_permute_weights (line 185) | def reverse_permute_weights(weights: np.ndarray, n_head: int, num_kv_hea... FILE: mplsandbox_for_rl/transformers/src/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 MoeModelOutputWithPast (line 372) | class MoeModelOutputWithPast(ModelOutput): class MoeCausalLMOutputWithPast (line 414) | class MoeCausalLMOutputWithPast(ModelOutput): class MoEModelOutputWithPastAndCrossAttentions (line 463) | class MoEModelOutputWithPastAndCrossAttentions(ModelOutput): class Seq2SeqModelOutput (line 516) | class Seq2SeqModelOutput(ModelOutput): class Seq2SeqMoEModelOutput (line 577) | class Seq2SeqMoEModelOutput(ModelOutput): class CausalLMOutput (line 649) | class CausalLMOutput(ModelOutput): class CausalLMOutputWithPast (line 678) | class CausalLMOutputWithPast(ModelOutput): class CausalLMOutputWithCrossAttentions (line 714) | class CausalLMOutputWithCrossAttentions(ModelOutput): class SequenceClassifierOutputWithPast (line 758) | class SequenceClassifierOutputWithPast(ModelOutput): class MaskedLMOutput (line 794) | class MaskedLMOutput(ModelOutput): class Seq2SeqLMOutput (line 823) | class Seq2SeqLMOutput(ModelOutput): class Seq2SeqMoEOutput (line 883) | class Seq2SeqMoEOutput(ModelOutput): class NextSentencePredictorOutput (line 958) | class NextSentencePredictorOutput(ModelOutput): class SequenceClassifierOutput (line 988) | class SequenceClassifierOutput(ModelOutput): class Seq2SeqSequenceClassifierOutput (line 1017) | class Seq2SeqSequenceClassifierOutput(ModelOutput): class MultipleChoiceModelOutput (line 1077) | class MultipleChoiceModelOutput(ModelOutput): class TokenClassifierOutput (line 1108) | class TokenClassifierOutput(ModelOutput): class QuestionAnsweringModelOutput (line 1137) | class QuestionAnsweringModelOutput(ModelOutput): class Seq2SeqQuestionAnsweringModelOutput (line 1169) | class Seq2SeqQuestionAnsweringModelOutput(ModelOutput): class SemanticSegmenterOutput (line 1232) | class SemanticSegmenterOutput(ModelOutput): class ImageClassifierOutput (line 1270) | class ImageClassifierOutput(ModelOutput): class ImageClassifierOutputWithNoAttention (line 1298) | class ImageClassifierOutputWithNoAttention(ModelOutput): class DepthEstimatorOutput (line 1319) | class DepthEstimatorOutput(ModelOutput): class ImageSuperResolutionOutput (line 1349) | class ImageSuperResolutionOutput(ModelOutput): class Wav2Vec2BaseModelOutput (line 1377) | class Wav2Vec2BaseModelOutput(ModelOutput): class XVectorOutput (line 1406) | class XVectorOutput(ModelOutput): class BackboneOutput (line 1438) | class BackboneOutput(ModelOutput): class BaseModelOutputWithPoolingAndProjection (line 1465) | class BaseModelOutputWithPoolingAndProjection(ModelOutput): class Seq2SeqSpectrogramOutput (line 1502) | class Seq2SeqSpectrogramOutput(ModelOutput): class Seq2SeqTSModelOutput (line 1562) | class Seq2SeqTSModelOutput(ModelOutput): class Seq2SeqTSPredictionOutput (line 1634) | class Seq2SeqTSPredictionOutput(ModelOutput): class SampleTSPredictionOutput (line 1706) | class SampleTSPredictionOutput(ModelOutput): class MaskedImageModelingOutput (line 1720) | class MaskedImageModelingOutput(ModelOutput): method logits (line 1747) | def logits(self): FILE: mplsandbox_for_rl/transformers/src/transformers/modeling_rope_utils.py function _compute_default_rope_parameters (line 29) | def _compute_default_rope_parameters( function _compute_linear_scaling_rope_parameters (line 71) | def _compute_linear_scaling_rope_parameters( function _compute_dynamic_ntk_parameters (line 112) | def _compute_dynamic_ntk_parameters( function _compute_yarn_parameters (line 163) | def _compute_yarn_parameters( function _compute_longrope_parameters (line 242) | def _compute_longrope_parameters( function _compute_llama3_parameters (line 307) | def _compute_llama3_parameters( function _check_received_keys (line 363) | def _check_received_keys(rope_type: str, received_keys: set, required_ke... function _validate_default_rope_parameters (line 382) | def _validate_default_rope_parameters(config: PretrainedConfig): function _validate_linear_scaling_rope_parameters (line 390) | def _validate_linear_scaling_rope_parameters(config: PretrainedConfig): function _validate_dynamic_scaling_rope_parameters (line 402) | def _validate_dynamic_scaling_rope_parameters(config: PretrainedConfig): function _validate_yarn_parameters (line 416) | def _validate_yarn_parameters(config: PretrainedConfig): function _validate_longrope_parameters (line 447) | def _validate_longrope_parameters(config: PretrainedConfig): function _validate_llama3_parameters (line 496) | def _validate_llama3_parameters(config: PretrainedConfig): function rope_config_validation (line 543) | def rope_config_validation(config: PretrainedConfig): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/modeling_tf_pytorch_utils.py class TransposeType (line 44) | class TransposeType(ExplicitEnum): function convert_tf_weight_name_to_pt_weight_name (line 55) | def convert_tf_weight_name_to_pt_weight_name( function apply_transpose (line 127) | def apply_transpose(transpose: TransposeType, weight, match_shape=None, ... function load_pytorch_checkpoint_in_tf2_model (line 169) | def load_pytorch_checkpoint_in_tf2_model( function load_pytorch_model_in_tf2_model (line 222) | def load_pytorch_model_in_tf2_model(tf_model, pt_model, tf_inputs=None, ... function load_pytorch_weights_in_tf2_model (line 231) | def load_pytorch_weights_in_tf2_model( function _log_key_warnings (line 266) | def _log_key_warnings(missing_keys, unexpected_keys, mismatched_keys, cl... function load_pytorch_state_dict_in_tf2_model (line 307) | def load_pytorch_state_dict_in_tf2_model( function load_sharded_pytorch_safetensors_in_tf2_model (line 448) | def load_sharded_pytorch_safetensors_in_tf2_model( function load_tf2_checkpoint_in_pytorch_model (line 498) | def load_tf2_checkpoint_in_pytorch_model( function load_tf2_model_in_pytorch_model (line 539) | def load_tf2_model_in_pytorch_model(pt_model, tf_model, allow_missing_ke... function load_tf2_weights_in_pytorch_model (line 548) | def load_tf2_weights_in_pytorch_model(pt_model, tf_weights, allow_missin... function load_tf2_state_dict_in_pytorch_model (line 566) | def load_tf2_state_dict_in_pytorch_model(pt_model, tf_state_dict, allow_... FILE: mplsandbox_for_rl/transformers/src/transformers/modeling_tf_utils.py function dummy_loss (line 118) | def dummy_loss(y_true, y_pred): class TFModelUtilsMixin (line 126) | class TFModelUtilsMixin: method num_parameters (line 131) | def num_parameters(self, only_trainable: bool = False) -> int: function keras_serializable (line 148) | def keras_serializable(cls): class TFCausalLanguageModelingLoss (line 213) | class TFCausalLanguageModelingLoss: method hf_compute_loss (line 224) | def hf_compute_loss(self, labels, logits): class TFQuestionAnsweringLoss (line 242) | class TFQuestionAnsweringLoss: method hf_compute_loss (line 247) | def hf_compute_loss(self, labels, logits): class TFTokenClassificationLoss (line 255) | class TFTokenClassificationLoss: method hf_compute_loss (line 266) | def hf_compute_loss(self, labels, logits): class TFSequenceClassificationLoss (line 297) | class TFSequenceClassificationLoss: method hf_compute_loss (line 302) | def hf_compute_loss(self, labels, logits): class TFMultipleChoiceLoss (line 316) | class TFMultipleChoiceLoss: method hf_compute_loss (line 319) | def hf_compute_loss(self, labels, logits): class TFMaskedLanguageModelingLoss (line 324) | class TFMaskedLanguageModelingLoss(TFCausalLanguageModelingLoss): class TFNextSentencePredictionLoss (line 336) | class TFNextSentencePredictionLoss: method hf_compute_loss (line 347) | def hf_compute_loss(self, labels, logits): function booleans_processing (line 370) | def booleans_processing(config, **kwargs): function unpack_inputs (line 403) | def unpack_inputs(func): function input_processing (line 447) | def input_processing(func, config, **kwargs): function dtype_byte_size (line 620) | def dtype_byte_size(dtype): function strip_model_name_and_prefix (line 640) | def strip_model_name_and_prefix(name, _prefix=None): function tf_shard_checkpoint (line 650) | def tf_shard_checkpoint(weights, max_shard_size="10GB", weights_name: st... 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_sharded_weights_from_safetensors (line 875) | def load_tf_sharded_weights_from_safetensors( function load_tf_weights (line 930) | def load_tf_weights(model, resolved_archive_file, ignore_mismatched_size... function load_tf_weights_from_h5 (line 957) | def load_tf_weights_from_h5(model, resolved_archive_file, ignore_mismatc... function load_tf_weights_from_safetensors (line 1057) | def load_tf_weights_from_safetensors(model, resolved_archive_file, ignor... function init_copy_embeddings (line 1089) | def init_copy_embeddings(old_embeddings, new_num_tokens): class TFPreTrainedModel (line 1129) | class TFPreTrainedModel(keras.Model, TFModelUtilsMixin, TFGenerationMixi... method dummy_inputs (line 1165) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method build_in_name_scope (line 1195) | def build_in_name_scope(self): method framework (line 1200) | def framework(self) -> str: method build (line 1206) | def build(self, input_shape=None): method __init__ (line 1209) | def __init__(self, config, *inputs, **kwargs): method get_config (line 1223) | def get_config(self): method fit (line 1227) | def fit(self, *args, **kwargs): method train_on_batch (line 1232) | def train_on_batch(self, *args, **kwargs): method test_on_batch (line 1237) | def test_on_batch(self, *args, **kwargs): method predict_on_batch (line 1242) | def predict_on_batch(self, *args, **kwargs): method predict (line 1247) | def predict(self, *args, **kwargs): method evaluate (line 1252) | def evaluate(self, *args, **kwargs): method from_config (line 1257) | def from_config(cls, config, **kwargs): method _from_config (line 1263) | def _from_config(cls, config, **kwargs): method get_head_mask (line 1269) | def get_head_mask(self, head_mask: tf.Tensor | None, num_hidden_layers... method _convert_head_mask_to_5d (line 1290) | def _convert_head_mask_to_5d(self, head_mask, num_hidden_layers): method serving (line 1302) | def serving(self, inputs): method input_signature (line 1315) | def input_signature(self) -> Dict[str, tf.TensorSpec]: method serving_output (line 1361) | def serving_output(self, output): method can_generate (line 1386) | def can_generate(cls) -> bool: method get_input_embeddings (line 1399) | def get_input_embeddings(self) -> keras.layers.Layer: method _save_checkpoint (line 1413) | def _save_checkpoint(self, checkpoint_dir, epoch): method prepare_tf_dataset (line 1426) | def prepare_tf_dataset( method compile (line 1531) | def compile( method compute_loss (line 1585) | def compute_loss(self, *args, **kwargs): method get_label_to_output_name_mapping (line 1599) | def get_label_to_output_name_mapping(self): method train_step (line 1614) | def train_step(self, data): method test_step (line 1722) | def test_step(self, data): method create_model_card (line 1826) | def create_model_card( method set_input_embeddings (line 1886) | def set_input_embeddings(self, value): method get_output_embeddings (line 1906) | def get_output_embeddings(self) -> Union[None, keras.layers.Layer]: method set_output_embeddings (line 1926) | def set_output_embeddings(self, value): method get_output_layer_with_bias (line 1943) | def get_output_layer_with_bias(self) -> Union[None, keras.layers.Layer]: method get_prefix_bias_name (line 1956) | def get_prefix_bias_name(self) -> Union[None, str]: method get_bias (line 1966) | def get_bias(self) -> Union[None, Dict[str, tf.Variable]]: method set_bias (line 1983) | def set_bias(self, value): method get_lm_head (line 1999) | def get_lm_head(self) -> keras.layers.Layer: method resize_token_embeddings (line 2008) | def resize_token_embeddings( method _v2_resized_token_embeddings (line 2041) | def _v2_resized_token_embeddings(self, new_num_tokens: Optional[int] =... method _get_word_embedding_weight (line 2064) | def _get_word_embedding_weight(model, embedding_layer): method _resize_token_embeddings (line 2095) | def _resize_token_embeddings(self, new_num_tokens): method _v2_resize_token_embeddings (line 2118) | def _v2_resize_token_embeddings(self, new_num_tokens): method _get_resized_lm_head_bias (line 2139) | def _get_resized_lm_head_bias(self, old_lm_head_bias, new_num_tokens): method _v2_get_resized_lm_head_bias (line 2192) | def _v2_get_resized_lm_head_bias( method _get_resized_lm_head_decoder (line 2226) | def _get_resized_lm_head_decoder(self, old_lm_head_decoder, new_num_to... method _get_resized_embeddings (line 2264) | def _get_resized_embeddings(self, old_embeddings, new_num_tokens=None)... method _v2_get_resized_embeddings (line 2299) | def _v2_get_resized_embeddings( method prune_heads (line 2346) | def prune_heads(self, heads_to_prune): method save_pretrained (line 2358) | def save_pretrained( method from_pretrained (line 2542) | def from_pretrained( method push_to_hub (line 3137) | def push_to_hub( method register_for_auto_class (line 3247) | def register_for_auto_class(cls, auto_class="TFAutoModel"): class TFConv1D (line 3273) | class TFConv1D(keras.layers.Layer): method __init__ (line 3290) | def __init__(self, nf, nx, initializer_range=0.02, **kwargs): method build (line 3296) | def build(self, input_shape): method call (line 3305) | def call(self, x): class TFSharedEmbeddings (line 3316) | class TFSharedEmbeddings(keras.layers.Layer): method __init__ (line 3337) | def __init__(self, vocab_size: int, hidden_size: int, initializer_rang... method build (line 3347) | def build(self, input_shape): method get_config (line 3357) | def get_config(self): method call (line 3367) | def call(self, inputs: tf.Tensor, mode: str = "embedding") -> tf.Tensor: method _embedding (line 3399) | def _embedding(self, input_ids): method _linear (line 3403) | def _linear(self, inputs): class TFSequenceSummary (line 3420) | class TFSequenceSummary(keras.layers.Layer): method __init__ (line 3450) | def __init__(self, config: PretrainedConfig, initializer_range: float ... method call (line 3485) | def call(self, inputs, cls_index=None, training=False): method build (line 3536) | def build(self, input_shape): function get_initializer (line 3545) | def get_initializer(initializer_range: float = 0.02) -> keras.initialize... FILE: mplsandbox_for_rl/transformers/src/transformers/modeling_utils.py function is_fsdp_enabled (line 140) | def is_fsdp_enabled(): function is_local_dist_rank_0 (line 149) | def is_local_dist_rank_0(): function no_init_weights (line 187) | def no_init_weights(_enable=True): function get_parameter_device (line 215) | def get_parameter_device(parameter: Union[nn.Module, GenerationMixin, "M... function get_first_parameter_dtype (line 230) | def get_first_parameter_dtype(parameter: Union[nn.Module, GenerationMixi... function get_parameter_dtype (line 248) | def get_parameter_dtype(parameter: Union[nn.Module, GenerationMixin, "Mo... function get_state_dict_float_dtype (line 297) | def get_state_dict_float_dtype(state_dict): function get_state_dict_dtype (line 308) | def get_state_dict_dtype(state_dict): function dtype_byte_size (line 321) | def dtype_byte_size(dtype): function check_support_param_buffer_assignment (line 341) | def check_support_param_buffer_assignment(model_to_load, state_dict, sta... function shard_checkpoint (line 372) | def shard_checkpoint( function load_sharded_checkpoint (line 458) | def load_sharded_checkpoint(model, folder, strict=True, prefer_safe=True): function load_state_dict (line 543) | def load_state_dict(checkpoint_file: Union[str, os.PathLike], is_quantiz... function set_initialized_submodules (line 603) | def set_initialized_submodules(model, state_dict_keys): function _end_ptr (line 618) | def _end_ptr(tensor: torch.Tensor) -> int: function _get_tied_weight_keys (line 627) | def _get_tied_weight_keys(module: nn.Module, prefix=""): function _find_disjoint (line 641) | def _find_disjoint(tensors: List[Set[str]], state_dict: Dict[str, torch.... function _find_identical (line 672) | def _find_identical(tensors: List[Set[str]], state_dict: Dict[str, torch... function _load_state_dict_into_model (line 691) | def _load_state_dict_into_model(model_to_load, state_dict, start_prefix,... function find_submodule_and_param_name (line 769) | def find_submodule_and_param_name(model, long_key, start_prefix): function _move_model_to_meta (line 792) | def _move_model_to_meta(model, loaded_state_dict_keys, start_prefix): function _load_state_dict_into_meta_model (line 818) | def _load_state_dict_into_meta_model( function _add_variant (line 978) | def _add_variant(weights_name: str, variant: Optional[str] = None) -> str: class ModuleUtilsMixin (line 987) | class ModuleUtilsMixin: method _hook_rss_memory_pre_forward (line 993) | def _hook_rss_memory_pre_forward(module, *args, **kwargs): method _hook_rss_memory_post_forward (line 1005) | def _hook_rss_memory_post_forward(module, *args, **kwargs): method add_memory_hooks (line 1018) | def add_memory_hooks(self): method reset_memory_hooks_state (line 1030) | def reset_memory_hooks_state(self): method device (line 1040) | def device(self) -> torch.device: method dtype (line 1048) | def dtype(self) -> torch.dtype: method invert_attention_mask (line 1054) | def invert_attention_mask(self, encoder_attention_mask: Tensor) -> Ten... method create_extended_attention_mask_for_decoder (line 1079) | def create_extended_attention_mask_for_decoder(input_shape, attention_... method get_extended_attention_mask (line 1106) | def get_extended_attention_mask( method get_head_mask (line 1158) | def get_head_mask( method _convert_head_mask_to_5d (line 1185) | def _convert_head_mask_to_5d(self, head_mask, num_hidden_layers): method num_parameters (line 1196) | def num_parameters(self, only_trainable: bool = False, exclude_embeddi... method estimate_tokens (line 1250) | def estimate_tokens(self, input_dict: Dict[str, Union[torch.Tensor, An... method floating_point_ops (line 1271) | def floating_point_ops( class PreTrainedModel (line 1298) | class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, Push... method dummy_inputs (line 1367) | def dummy_inputs(self) -> Dict[str, torch.Tensor]: method framework (line 1374) | def framework(self) -> str: method __init__ (line 1380) | def __init__(self, config: PretrainedConfig, *inputs, **kwargs): method post_init (line 1402) | def post_init(self): method dequantize (line 1410) | def dequantize(self): method _backward_compatibility_gradient_checkpointing (line 1422) | def _backward_compatibility_gradient_checkpointing(self): method add_model_tags (line 1428) | def add_model_tags(self, tags: Union[List[str], str]) -> None: method _from_config (line 1461) | def _from_config(cls, config, **kwargs): method _autoset_attn_implementation (line 1513) | def _autoset_attn_implementation( method _set_default_torch_dtype (line 1586) | def _set_default_torch_dtype(cls, dtype: torch.dtype) -> torch.dtype: method base_model (line 1613) | def base_model(self) -> nn.Module: method can_generate (line 1620) | def can_generate(cls) -> bool: method _check_and_enable_flash_attn_2 (line 1634) | def _check_and_enable_flash_attn_2( method _check_and_enable_sdpa (line 1724) | def _check_and_enable_sdpa(cls, config, hard_check_only: bool = False)... method enable_input_require_grads (line 1753) | def enable_input_require_grads(self): method disable_input_require_grads (line 1764) | def disable_input_require_grads(self): method get_input_embeddings (line 1770) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1783) | def set_input_embeddings(self, value: nn.Module): method get_output_embeddings (line 1796) | def get_output_embeddings(self) -> nn.Module: method _init_weights (line 1805) | def _init_weights(self, module): method _initialize_weights (line 1814) | def _initialize_weights(self, module): method tie_weights (line 1823) | def tie_weights(self): method _tie_encoder_decoder_weights (line 1851) | def _tie_encoder_decoder_weights( method _tie_or_clone_weights (line 1940) | def _tie_or_clone_weights(self, output_embeddings, input_embeddings): method _get_no_split_modules (line 1960) | def _get_no_split_modules(self, device_map: str): method resize_token_embeddings (line 1989) | def resize_token_embeddings( method _resize_token_embeddings (line 2040) | def _resize_token_embeddings(self, new_num_tokens, pad_to_multiple_of=... method _get_resized_embeddings (line 2077) | def _get_resized_embeddings( method _get_resized_lm_head (line 2202) | def _get_resized_lm_head( method _copy_lm_head_original_to_resized (line 2286) | def _copy_lm_head_original_to_resized( method resize_position_embeddings (line 2299) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 2305) | def get_position_embeddings(self) -> Union[nn.Embedding, Tuple[nn.Embe... method init_weights (line 2311) | def init_weights(self): method prune_heads (line 2328) | def prune_heads(self, heads_to_prune: Dict[int, List[int]]): method gradient_checkpointing_enable (line 2345) | def gradient_checkpointing_enable(self, gradient_checkpointing_kwargs=... method _set_gradient_checkpointing (line 2387) | def _set_gradient_checkpointing(self, enable: bool = True, gradient_ch... method gradient_checkpointing_disable (line 2409) | def gradient_checkpointing_disable(self): method is_gradient_checkpointing (line 2433) | def is_gradient_checkpointing(self) -> bool: method save_pretrained (line 2442) | def save_pretrained( method push_to_hub (line 2832) | def push_to_hub(self, *args, **kwargs): method get_memory_footprint (line 2847) | def get_memory_footprint(self, return_buffers=True): method cuda (line 2866) | def cuda(self, *args, **kwargs): method to (line 2879) | def to(self, *args, **kwargs): method half (line 2908) | def half(self, *args): method float (line 2918) | def float(self, *args): method from_pretrained (line 2929) | def from_pretrained( method _load_pretrained_model (line 4062) | def _load_pretrained_model( method retrieve_modules_from_names (line 4538) | def retrieve_modules_from_names(self, names, add_prefix=False, remove_... method _load_pretrained_model_low_mem (line 4562) | def _load_pretrained_model_low_mem( method register_for_auto_class (line 4602) | def register_for_auto_class(cls, auto_class="AutoModel"): method to_bettertransformer (line 4627) | def to_bettertransformer(self) -> "PreTrainedModel": method reverse_bettertransformer (line 4655) | def reverse_bettertransformer(self): method warn_if_padding_and_no_attention_mask (line 4677) | def warn_if_padding_and_no_attention_mask(self, input_ids, attention_m... method _is_quantized_training_enabled (line 4713) | def _is_quantized_training_enabled(self): class PoolerStartLogits (line 4732) | class PoolerStartLogits(nn.Module): method __init__ (line 4741) | def __init__(self, config: PretrainedConfig): method forward (line 4745) | def forward( class PoolerEndLogits (line 4770) | class PoolerEndLogits(nn.Module): method __init__ (line 4780) | def __init__(self, config: PretrainedConfig): method forward (line 4787) | def forward( class PoolerAnswerClass (line 4839) | class PoolerAnswerClass(nn.Module): method __init__ (line 4848) | def __init__(self, config): method forward (line 4854) | def forward( class SquadHeadOutput (line 4905) | class SquadHeadOutput(ModelOutput): class SQuADHead (line 4935) | class SQuADHead(nn.Module): method __init__ (line 4945) | def __init__(self, config): method forward (line 4955) | def forward( class SequenceSummary (line 5052) | class SequenceSummary(nn.Module): method __init__ (line 5078) | def __init__(self, config: PretrainedConfig): method forward (line 5107) | def forward( function unwrap_model (line 5151) | def unwrap_model(model: nn.Module, recursive: bool = False) -> nn.Module: function expand_device_map (line 5181) | def expand_device_map(device_map, param_names, start_prefix): function get_disk_only_shard_files (line 5194) | def get_disk_only_shard_files(device_map, sharded_metadata, start_prefix): FILE: mplsandbox_for_rl/transformers/src/transformers/models/albert/configuration_albert.py class AlbertConfig (line 25) | class AlbertConfig(PretrainedConfig): method __init__ (line 108) | def __init__( class AlbertOnnxConfig (line 154) | class AlbertOnnxConfig(OnnxConfig): method inputs (line 156) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/albert/convert_albert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 28) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, albert_config_f... FILE: mplsandbox_for_rl/transformers/src/transformers/models/albert/modeling_albert.py function load_tf_weights_in_albert (line 55) | def load_tf_weights_in_albert(model, config, tf_checkpoint_path): class AlbertEmbeddings (line 181) | class AlbertEmbeddings(nn.Module): method __init__ (line 186) | def __init__(self, config: AlbertConfig): method forward (line 207) | def forward( class AlbertAttention (line 249) | class AlbertAttention(nn.Module): method __init__ (line 250) | def __init__(self, config: AlbertConfig): method transpose_for_scores (line 279) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method prune_heads (line 284) | def prune_heads(self, heads: List[int]) -> None: method forward (line 302) | def forward( class AlbertLayer (line 361) | class AlbertLayer(nn.Module): method __init__ (line 362) | def __init__(self, config: AlbertConfig): method forward (line 375) | def forward( method ff_chunk (line 395) | def ff_chunk(self, attention_output: torch.Tensor) -> torch.Tensor: class AlbertLayerGroup (line 402) | class AlbertLayerGroup(nn.Module): method __init__ (line 403) | def __init__(self, config: AlbertConfig): method forward (line 408) | def forward( class AlbertTransformer (line 437) | class AlbertTransformer(nn.Module): method __init__ (line 438) | def __init__(self, config: AlbertConfig): method forward (line 445) | def forward( class AlbertPreTrainedModel (line 490) | class AlbertPreTrainedModel(PreTrainedModel): method _init_weights (line 500) | def _init_weights(self, module): class AlbertForPreTrainingOutput (line 518) | class AlbertForPreTrainingOutput(ModelOutput): class AlbertModel (line 621) | class AlbertModel(AlbertPreTrainedModel): method __init__ (line 625) | def __init__(self, config: AlbertConfig, add_pooling_layer: bool = True): method get_input_embeddings (line 641) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 644) | def set_input_embeddings(self, value: nn.Embedding) -> None: method _prune_heads (line 647) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 670) | def forward( class AlbertForPreTraining (line 750) | class AlbertForPreTraining(AlbertPreTrainedModel): method __init__ (line 753) | def __init__(self, config: AlbertConfig): method get_output_embeddings (line 763) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 766) | def set_output_embeddings(self, new_embeddings: nn.Linear) -> None: method get_input_embeddings (line 769) | def get_input_embeddings(self) -> nn.Embedding: method forward (line 774) | def forward( class AlbertMLMHead (line 855) | class AlbertMLMHead(nn.Module): method __init__ (line 856) | def __init__(self, config: AlbertConfig): method forward (line 866) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method _tie_weights (line 876) | def _tie_weights(self) -> None: class AlbertSOPHead (line 885) | class AlbertSOPHead(nn.Module): method __init__ (line 886) | def __init__(self, config: AlbertConfig): method forward (line 892) | def forward(self, pooled_output: torch.Tensor) -> torch.Tensor: class AlbertForMaskedLM (line 902) | class AlbertForMaskedLM(AlbertPreTrainedModel): method __init__ (line 905) | def __init__(self, config): method get_output_embeddings (line 914) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 917) | def set_output_embeddings(self, new_embeddings: nn.Linear) -> None: method get_input_embeddings (line 921) | def get_input_embeddings(self) -> nn.Embedding: method forward (line 926) | def forward( class AlbertForSequenceClassification (line 1017) | class AlbertForSequenceClassification(AlbertPreTrainedModel): method __init__ (line 1018) | def __init__(self, config: AlbertConfig): method forward (line 1038) | def forward( class AlbertForTokenClassification (line 1118) | class AlbertForTokenClassification(AlbertPreTrainedModel): method __init__ (line 1119) | def __init__(self, config: AlbertConfig): method forward (line 1141) | def forward( class AlbertForQuestionAnswering (line 1201) | class AlbertForQuestionAnswering(AlbertPreTrainedModel): method __init__ (line 1202) | def __init__(self, config: AlbertConfig): method forward (line 1222) | def forward( class AlbertForMultipleChoice (line 1304) | class AlbertForMultipleChoice(AlbertPreTrainedModel): method __init__ (line 1305) | def __init__(self, config: AlbertConfig): method forward (line 1321) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/albert/modeling_flax_albert.py class FlaxAlbertForPreTrainingOutput (line 55) | class FlaxAlbertForPreTrainingOutput(ModelOutput): class FlaxAlbertEmbeddings (line 152) | class FlaxAlbertEmbeddings(nn.Module): method setup (line 158) | 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 837) | class FlaxAlbertForSequenceClassificationModule(nn.Module): method setup (line 841) | def setup(self): method __call__ (line 854) | def __call__( class FlaxAlbertForSequenceClassification (line 898) | class FlaxAlbertForSequenceClassification(FlaxAlbertPreTrainedModel): class FlaxAlbertForMultipleChoiceModule (line 910) | class FlaxAlbertForMultipleChoiceModule(nn.Module): method setup (line 914) | def setup(self): method __call__ (line 919) | def __call__( class FlaxAlbertForMultipleChoice (line 971) | class FlaxAlbertForMultipleChoice(FlaxAlbertPreTrainedModel): class FlaxAlbertForTokenClassificationModule (line 986) | class FlaxAlbertForTokenClassificationModule(nn.Module): method setup (line 990) | def setup(self): method __call__ (line 1000) | def __call__( class FlaxAlbertForTokenClassification (line 1044) | class FlaxAlbertForTokenClassification(FlaxAlbertPreTrainedModel): class FlaxAlbertForQuestionAnsweringModule (line 1056) | class FlaxAlbertForQuestionAnsweringModule(nn.Module): method setup (line 1060) | def setup(self): method __call__ (line 1064) | def __call__( class FlaxAlbertForQuestionAnswering (line 1112) | class FlaxAlbertForQuestionAnswering(FlaxAlbertPreTrainedModel): FILE: mplsandbox_for_rl/transformers/src/transformers/models/albert/modeling_tf_albert.py class TFAlbertPreTrainingLoss (line 68) | class TFAlbertPreTrainingLoss: method hf_compute_loss (line 74) | def hf_compute_loss(self, labels: tf.Tensor, logits: tf.Tensor) -> tf.... class TFAlbertEmbeddings (line 122) | class TFAlbertEmbeddings(keras.layers.Layer): method __init__ (line 125) | def __init__(self, config: AlbertConfig, **kwargs): method build (line 135) | def build(self, input_shape=None): method call (line 165) | def call( class TFAlbertAttention (line 206) | class TFAlbertAttention(keras.layers.Layer): method __init__ (line 209) | def __init__(self, config: AlbertConfig, **kwargs): method transpose_for_scores (line 242) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 249) | def call( method build (line 302) | def build(self, input_shape=None): class TFAlbertLayer (line 323) | class TFAlbertLayer(keras.layers.Layer): method __init__ (line 324) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 346) | def call( method build (line 372) | def build(self, input_shape=None): class TFAlbertLayerGroup (line 390) | class TFAlbertLayerGroup(keras.layers.Layer): method __init__ (line 391) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 398) | def call( method build (line 432) | def build(self, input_shape=None): class TFAlbertTransformer (line 442) | class TFAlbertTransformer(keras.layers.Layer): method __init__ (line 443) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 460) | def call( method build (line 500) | def build(self, input_shape=None): class TFAlbertPreTrainedModel (line 513) | class TFAlbertPreTrainedModel(TFPreTrainedModel): class TFAlbertMLMHead (line 523) | class TFAlbertMLMHead(keras.layers.Layer): method __init__ (line 524) | def __init__(self, config: AlbertConfig, input_embeddings: keras.layer... method build (line 543) | def build(self, input_shape=None): method get_output_embeddings (line 559) | def get_output_embeddings(self) -> keras.layers.Layer: method set_output_embeddings (line 562) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 566) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 569) | def set_bias(self, value: tf.Variable): method call (line 574) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFAlbertMainLayer (line 588) | class TFAlbertMainLayer(keras.layers.Layer): method __init__ (line 591) | def __init__(self, config: AlbertConfig, add_pooling_layer: bool = Tru... method get_input_embeddings (line 609) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 612) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 616) | def _prune_heads(self, heads_to_prune): method call (line 624) | def call( method build (line 713) | def build(self, input_shape=None): class TFAlbertForPreTrainingOutput (line 729) | class TFAlbertForPreTrainingOutput(ModelOutput): class TFAlbertModel (line 861) | class TFAlbertModel(TFAlbertPreTrainedModel): method __init__ (line 862) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 874) | def call( method build (line 902) | def build(self, input_shape=None): class TFAlbertForPreTraining (line 918) | class TFAlbertForPreTraining(TFAlbertPreTrainedModel, TFAlbertPreTrainin... method __init__ (line 922) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method get_lm_head (line 931) | def get_lm_head(self) -> keras.layers.Layer: method call (line 937) | def call( method build (line 1006) | def build(self, input_shape=None): class TFAlbertSOPHead (line 1021) | class TFAlbertSOPHead(keras.layers.Layer): method __init__ (line 1022) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 1033) | def call(self, pooled_output: tf.Tensor, training: bool) -> tf.Tensor: method build (line 1039) | def build(self, input_shape=None): class TFAlbertForMaskedLM (line 1049) | class TFAlbertForMaskedLM(TFAlbertPreTrainedModel, TFMaskedLanguageModel... method __init__ (line 1053) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method get_lm_head (line 1059) | def get_lm_head(self) -> keras.layers.Layer: method call (line 1065) | def call( method build (line 1143) | def build(self, input_shape=None): class TFAlbertForSequenceClassification (line 1162) | class TFAlbertForSequenceClassification(TFAlbertPreTrainedModel, TFSeque... method __init__ (line 1167) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1188) | def call( method build (line 1237) | def build(self, input_shape=None): class TFAlbertForTokenClassification (line 1256) | class TFAlbertForTokenClassification(TFAlbertPreTrainedModel, TFTokenCla... method __init__ (line 1261) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1285) | def call( method build (line 1332) | def build(self, input_shape=None): class TFAlbertForQuestionAnswering (line 1351) | class TFAlbertForQuestionAnswering(TFAlbertPreTrainedModel, TFQuestionAn... method __init__ (line 1355) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1377) | def call( method build (line 1439) | def build(self, input_shape=None): class TFAlbertForMultipleChoice (line 1458) | class TFAlbertForMultipleChoice(TFAlbertPreTrainedModel, TFMultipleChoic... method __init__ (line 1463) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1480) | def call( method build (line 1551) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/albert/tokenization_albert.py class AlbertTokenizer (line 35) | class AlbertTokenizer(PreTrainedTokenizer): method __init__ (line 110) | def __init__( method vocab_size (line 160) | def vocab_size(self) -> int: method get_vocab (line 163) | def get_vocab(self) -> Dict[str, int]: method __getstate__ (line 168) | def __getstate__(self): method __setstate__ (line 173) | def __setstate__(self, d): method preprocess_text (line 183) | def preprocess_text(self, inputs): method _tokenize (line 198) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 220) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 224) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 228) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 247) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 272) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 300) | def create_token_type_ids_from_sequences( method save_vocabulary (line 330) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/albert/tokenization_albert_fast.py class AlbertTokenizerFast (line 38) | class AlbertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 88) | def __init__( method can_save_slow_tokenizer (line 134) | def can_save_slow_tokenizer(self) -> bool: 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: mplsandbox_for_rl/transformers/src/transformers/models/align/configuration_align.py class AlignTextConfig (line 31) | class AlignTextConfig(PretrainedConfig): method __init__ (line 99) | def __init__( method from_pretrained (line 137) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class AlignVisionConfig (line 155) | class AlignVisionConfig(PretrainedConfig): method __init__ (line 227) | def __init__( method from_pretrained (line 276) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class AlignConfig (line 294) | class AlignConfig(PretrainedConfig): method __init__ (line 344) | def __init__( method from_text_vision_configs (line 371) | def from_text_vision_configs(cls, text_config: AlignTextConfig, vision... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/align/modeling_align.py class AlignVisionModelOutput (line 184) | class AlignVisionModelOutput(ModelOutput): class AlignTextModelOutput (line 206) | class AlignTextModelOutput(ModelOutput): class AlignOutput (line 235) | class AlignOutput(ModelOutput): method to_tuple (line 264) | def to_tuple(self) -> Tuple[Any]: function contrastive_loss (line 273) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function align_loss (line 277) | def align_loss(similarity: torch.Tensor) -> torch.Tensor: function round_filters (line 284) | def round_filters(config: AlignVisionConfig, num_channels: int): function correct_pad (line 300) | def correct_pad(kernel_size: Union[int, Tuple], adjust: bool = True): class AlignVisionEmbeddings (line 321) | class AlignVisionEmbeddings(nn.Module): method __init__ (line 326) | def __init__(self, config: AlignVisionConfig): method forward (line 337) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class AlignVisionDepthwiseConv2d (line 347) | class AlignVisionDepthwiseConv2d(nn.Conv2d): method __init__ (line 348) | def __init__( class AlignVisionExpansionLayer (line 374) | class AlignVisionExpansionLayer(nn.Module): method __init__ (line 379) | def __init__(self, config: AlignVisionConfig, in_dim: int, out_dim: in... method forward (line 391) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class AlignVisionDepthwiseLayer (line 401) | class AlignVisionDepthwiseLayer(nn.Module): method __init__ (line 406) | def __init__( method forward (line 428) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class AlignVisionSqueezeExciteLayer (line 441) | class AlignVisionSqueezeExciteLayer(nn.Module): method __init__ (line 446) | def __init__(self, config: AlignVisionConfig, in_dim: int, expand_dim:... method forward (line 467) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class AlignVisionFinalBlockLayer (line 480) | class AlignVisionFinalBlockLayer(nn.Module): method __init__ (line 485) | def __init__( method forward (line 502) | def forward(self, embeddings: torch.FloatTensor, hidden_states: torch.... class AlignVisionBlock (line 513) | class AlignVisionBlock(nn.Module): method __init__ (line 540) | def __init__( method forward (line 581) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class AlignVisionEncoder (line 594) | class AlignVisionEncoder(nn.Module): method __init__ (line 603) | def __init__(self, config: AlignVisionConfig): method forward (line 646) | def forward( class AlignTextEmbeddings (line 669) | class AlignTextEmbeddings(nn.Module): method __init__ (line 672) | def __init__(self, config): method forward (line 691) | def forward( class AlignTextSelfAttention (line 734) | class AlignTextSelfAttention(nn.Module): method __init__ (line 735) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 761) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 766) | def forward( class AlignTextSelfOutput (line 869) | class AlignTextSelfOutput(nn.Module): method __init__ (line 870) | def __init__(self, config): method forward (line 876) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class AlignTextAttention (line 889) | class AlignTextAttention(nn.Module): method __init__ (line 890) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 898) | def prune_heads(self, heads): method forward (line 916) | def forward( class AlignTextIntermediate (line 941) | class AlignTextIntermediate(nn.Module): method __init__ (line 942) | def __init__(self, config): method forward (line 950) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AlignTextOutput (line 957) | class AlignTextOutput(nn.Module): method __init__ (line 958) | def __init__(self, config): method forward (line 964) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class AlignTextLayer (line 972) | class AlignTextLayer(nn.Module): method __init__ (line 973) | def __init__(self, config): method forward (line 987) | def forward( method feed_forward_chunk (line 1052) | def feed_forward_chunk(self, attention_output): class AlignTextEncoder (line 1059) | class AlignTextEncoder(nn.Module): method __init__ (line 1060) | def __init__(self, config): method forward (line 1066) | def forward( class AlignTextPooler (line 1153) | class AlignTextPooler(nn.Module): method __init__ (line 1154) | def __init__(self, config): method forward (line 1159) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AlignPreTrainedModel (line 1168) | class AlignPreTrainedModel(PreTrainedModel): method _init_weights (line 1178) | def _init_weights(self, module): class AlignTextModel (line 1201) | class AlignTextModel(AlignPreTrainedModel): method __init__ (line 1205) | def __init__(self, config: AlignTextConfig, add_pooling_layer: bool = ... method get_input_embeddings (line 1217) | def get_input_embeddings(self): method set_input_embeddings (line 1220) | def set_input_embeddings(self, value): method forward (line 1225) | def forward( class AlignVisionModel (line 1328) | class AlignVisionModel(AlignPreTrainedModel): method __init__ (line 1333) | def __init__(self, config: AlignVisionConfig): method get_input_embeddings (line 1350) | def get_input_embeddings(self) -> nn.Module: method forward (line 1355) | def forward( class AlignModel (line 1414) | class AlignModel(AlignPreTrainedModel): method __init__ (line 1417) | def __init__(self, config: AlignConfig): method get_text_features (line 1448) | def get_text_features( method get_image_features (line 1501) | def get_image_features( method forward (line 1547) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/align/processing_align.py class AlignProcessorKwargs (line 35) | class AlignProcessorKwargs(ProcessingKwargs, total=False): class AlignProcessor (line 45) | class AlignProcessor(ProcessorMixin): method __init__ (line 79) | def __init__(self, image_processor, tokenizer): method __call__ (line 82) | def __call__( method batch_decode (line 146) | def batch_decode(self, *args, **kwargs): method decode (line 153) | def decode(self, *args, **kwargs): method model_input_names (line 161) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/altclip/configuration_altclip.py class AltCLIPTextConfig (line 27) | class AltCLIPTextConfig(PretrainedConfig): method __init__ (line 102) | def __init__( class AltCLIPVisionConfig (line 145) | class AltCLIPVisionConfig(PretrainedConfig): method __init__ (line 203) | def __init__( method from_pretrained (line 237) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class AltCLIPConfig (line 255) | class AltCLIPConfig(PretrainedConfig): method __init__ (line 302) | def __init__( method from_text_vision_configs (line 391) | def from_text_vision_configs(cls, text_config: AltCLIPTextConfig, visi... FILE: mplsandbox_for_rl/transformers/src/transformers/models/altclip/modeling_altclip.py function contrastive_loss (line 147) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clip_loss (line 151) | def clip_loss(similarity: torch.Tensor) -> torch.Tensor: class AltCLIPOutput (line 159) | class AltCLIPOutput(ModelOutput): method to_tuple (line 188) | def to_tuple(self) -> Tuple[Any]: class AltRobertaEmbeddings (line 196) | class AltRobertaEmbeddings(nn.Module): method __init__ (line 202) | def __init__(self, config): method forward (line 227) | def forward( method create_position_ids_from_inputs_embeds (line 267) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class AltRobertaSelfAttention (line 286) | class AltRobertaSelfAttention(nn.Module): method __init__ (line 287) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 313) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 318) | def forward( class AltRobertaSelfOutput (line 421) | class AltRobertaSelfOutput(nn.Module): method __init__ (line 422) | def __init__(self, config): method forward (line 428) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class AltRobertaAttention (line 441) | class AltRobertaAttention(nn.Module): method __init__ (line 442) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 450) | def prune_heads(self, heads): method forward (line 468) | def forward( class AltRobertaIntermediate (line 493) | class AltRobertaIntermediate(nn.Module): method __init__ (line 494) | def __init__(self, config): method forward (line 502) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AltRobertaOutput (line 509) | class AltRobertaOutput(nn.Module): method __init__ (line 510) | def __init__(self, config): method forward (line 516) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class AltRobertaLayer (line 524) | class AltRobertaLayer(nn.Module): method __init__ (line 525) | def __init__(self, config): method forward (line 539) | def forward( method feed_forward_chunk (line 604) | def feed_forward_chunk(self, attention_output): class AltRobertaEncoder (line 611) | class AltRobertaEncoder(nn.Module): method __init__ (line 612) | def __init__(self, config): method forward (line 618) | def forward( class AltRobertaPooler (line 705) | class AltRobertaPooler(nn.Module): method __init__ (line 706) | def __init__(self, config): method forward (line 711) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AltCLIPAttention (line 721) | class AltCLIPAttention(nn.Module): method __init__ (line 724) | def __init__(self, config): method _shape (line 743) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 746) | def forward( class AltCLIPMLP (line 826) | class AltCLIPMLP(nn.Module): method __init__ (line 827) | def __init__(self, config): method forward (line 834) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AltCLIPEncoderLayer (line 841) | class AltCLIPEncoderLayer(nn.Module): method __init__ (line 842) | def __init__(self, config: AltCLIPConfig): method forward (line 850) | def forward( class AltCLIPEncoder (line 891) | class AltCLIPEncoder(nn.Module): method __init__ (line 900) | def __init__(self, config: AltCLIPConfig): method forward (line 906) | def forward( class AltCLIPVisionEmbeddings (line 989) | class AltCLIPVisionEmbeddings(nn.Module): method __init__ (line 990) | def __init__(self, config: AltCLIPVisionConfig): method forward (line 1012) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class AltCLIPPreTrainedModel (line 1024) | class AltCLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 1035) | def _init_weights(self, module): class AltCLIPVisionTransformer (line 1081) | class AltCLIPVisionTransformer(nn.Module): method __init__ (line 1082) | def __init__(self, config: AltCLIPVisionConfig): method forward (line 1094) | def forward( class AltCLIPVisionModel (line 1139) | class AltCLIPVisionModel(AltCLIPPreTrainedModel): method __init__ (line 1143) | def __init__(self, config: AltCLIPVisionConfig): method get_input_embeddings (line 1149) | def get_input_embeddings(self) -> nn.Module: method forward (line 1154) | def forward( class AltRobertaModel (line 1193) | class AltRobertaModel(AltCLIPPreTrainedModel): method __init__ (line 1212) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1224) | def get_input_embeddings(self): method set_input_embeddings (line 1227) | def set_input_embeddings(self, value): method _prune_heads (line 1230) | def _prune_heads(self, heads_to_prune): method forward (line 1239) | def forward( class AltCLIPTextModel (line 1370) | class AltCLIPTextModel(AltCLIPPreTrainedModel): method __init__ (line 1373) | def __init__(self, config): method get_input_embeddings (line 1380) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1383) | def set_input_embeddings(self, value: nn.Embedding) -> None: method resize_token_embeddings (line 1386) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method forward (line 1391) | def forward( class AltCLIPModel (line 1462) | class AltCLIPModel(AltCLIPPreTrainedModel): method __init__ (line 1465) | def __init__(self, config: AltCLIPConfig): method get_text_features (line 1497) | def get_text_features( method get_image_features (line 1544) | def get_image_features( method forward (line 1591) | def forward( function create_position_ids_from_input_ids (line 1683) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/altclip/processing_altclip.py class AltCLIPProcessor (line 25) | class AltCLIPProcessor(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 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): FILE: mplsandbox_for_rl/transformers/src/transformers/models/audio_spectrogram_transformer/configuration_audio_spectrogram_transformer.py class ASTConfig (line 24) | class ASTConfig(PretrainedConfig): method __init__ (line 85) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/audio_spectrogram_transformer/convert_audio_spectrogram_transformer_original_to_pytorch.py function get_audio_spectrogram_transformer_config (line 34) | def get_audio_spectrogram_transformer_config(model_name): function rename_key (line 69) | def rename_key(name): function convert_state_dict (line 107) | def convert_state_dict(orig_state_dict, config): function remove_keys (line 141) | def remove_keys(state_dict): function convert_audio_spectrogram_transformer_checkpoint (line 153) | def convert_audio_spectrogram_transformer_checkpoint(model_name, pytorch... FILE: mplsandbox_for_rl/transformers/src/transformers/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.py class ASTFeatureExtractor (line 39) | class ASTFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 71) | def __init__( method _extract_fbank_features (line 107) | def _extract_fbank_features( method normalize (line 158) | def normalize(self, input_values: np.ndarray) -> np.ndarray: method __call__ (line 161) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/audio_spectrogram_transformer/modeling_audio_spectrogram_transformer.py class ASTEmbeddings (line 48) | class ASTEmbeddings(nn.Module): method __init__ (line 53) | def __init__(self, config: ASTConfig) -> None: method get_shape (line 66) | def get_shape(self, config): method forward (line 74) | def forward(self, input_values: torch.Tensor) -> torch.Tensor: class ASTPatchEmbeddings (line 87) | class ASTPatchEmbeddings(nn.Module): method __init__ (line 93) | def __init__(self, config): method forward (line 104) | def forward(self, input_values: torch.Tensor) -> torch.Tensor: class ASTSelfAttention (line 112) | class ASTSelfAttention(nn.Module): method __init__ (line 113) | def __init__(self, config: ASTConfig) -> None: method transpose_for_scores (line 131) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 136) | def forward( class ASTSdpaSelfAttention (line 173) | class ASTSdpaSelfAttention(ASTSelfAttention): method __init__ (line 174) | def __init__(self, config: ASTConfig) -> None: method forward (line 178) | def forward( class ASTSelfOutput (line 205) | class ASTSelfOutput(nn.Module): method __init__ (line 211) | def __init__(self, config: ASTConfig) -> None: method forward (line 216) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ASTAttention (line 224) | class ASTAttention(nn.Module): method __init__ (line 225) | def __init__(self, config: ASTConfig) -> None: method prune_heads (line 231) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 249) | def forward( class ASTSdpaAttention (line 264) | class ASTSdpaAttention(ASTAttention): method __init__ (line 265) | def __init__(self, config: ASTConfig) -> None: class ASTIntermediate (line 271) | class ASTIntermediate(nn.Module): method __init__ (line 272) | def __init__(self, config: ASTConfig) -> None: method forward (line 280) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ASTOutput (line 288) | class ASTOutput(nn.Module): method __init__ (line 289) | def __init__(self, config: ASTConfig) -> None: method forward (line 294) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ASTLayer (line 310) | class ASTLayer(nn.Module): method __init__ (line 313) | def __init__(self, config: ASTConfig) -> None: method forward (line 323) | def forward( class ASTEncoder (line 353) | class ASTEncoder(nn.Module): method __init__ (line 354) | def __init__(self, config: ASTConfig) -> None: method forward (line 360) | def forward( class ASTPreTrainedModel (line 404) | class ASTPreTrainedModel(PreTrainedModel): method _init_weights (line 417) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class ASTModel (line 474) | class ASTModel(ASTPreTrainedModel): method __init__ (line 475) | def __init__(self, config: ASTConfig) -> None: method get_input_embeddings (line 487) | def get_input_embeddings(self) -> ASTPatchEmbeddings: method _prune_heads (line 490) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 506) | def forward( class ASTMLPHead (line 555) | class ASTMLPHead(nn.Module): method __init__ (line 556) | def __init__(self, config: ASTConfig): method forward (line 561) | def forward(self, hidden_state): class ASTForAudioClassification (line 574) | class ASTForAudioClassification(ASTPreTrainedModel): method __init__ (line 575) | def __init__(self, config: ASTConfig) -> None: method forward (line 596) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/auto/auto_factory.py function _get_model_class (line 383) | def _get_model_class(config, model_mapping): class _BaseAutoModelClass (line 403) | class _BaseAutoModelClass: method __init__ (line 407) | def __init__(self, *args, **kwargs): method from_config (line 415) | def from_config(cls, config, **kwargs): method from_pretrained (line 446) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method register (line 573) | def register(cls, config_class, model_class, exist_ok=False): class _BaseAutoBackboneClass (line 592) | class _BaseAutoBackboneClass(_BaseAutoModelClass): method _load_timm_backbone_from_pretrained (line 597) | def _load_timm_backbone_from_pretrained(cls, pretrained_model_name_or_... method from_pretrained (line 623) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... function insert_head_doc (line 631) | def insert_head_doc(docstring, head_doc=""): function auto_class_update (line 642) | def auto_class_update(cls, checkpoint_for_example="google-bert/bert-base... function get_values (line 677) | def get_values(model_mapping): function getattribute_from_module (line 688) | def getattribute_from_module(module, attr): class _LazyAutoMapping (line 708) | class _LazyAutoMapping(OrderedDict): method __init__ (line 717) | def __init__(self, config_mapping, model_mapping): method __len__ (line 725) | def __len__(self): method __getitem__ (line 729) | def __getitem__(self, key): method _load_attr_from_module (line 745) | def _load_attr_from_module(self, model_type, attr): method keys (line 751) | def keys(self): method get (line 759) | def get(self, key, default): method __bool__ (line 765) | def __bool__(self): method values (line 768) | def values(self): method items (line 776) | def items(self): method __iter__ (line 787) | def __iter__(self): method __contains__ (line 790) | def __contains__(self, item): method register (line 798) | def register(self, key, value, exist_ok=False): FILE: mplsandbox_for_rl/transformers/src/transformers/models/auto/configuration_auto.py function model_type_to_module_name (line 661) | def model_type_to_module_name(key): function config_class_to_model_type (line 678) | def config_class_to_model_type(config): class _LazyConfigMapping (line 690) | class _LazyConfigMapping(OrderedDict): method __init__ (line 695) | def __init__(self, mapping): method __getitem__ (line 700) | def __getitem__(self, key): method keys (line 717) | def keys(self): method values (line 720) | def values(self): method items (line 723) | def items(self): method __iter__ (line 726) | def __iter__(self): method __contains__ (line 729) | def __contains__(self, item): method register (line 732) | def register(self, key, value, exist_ok=False): class _LazyLoadAllMappings (line 744) | class _LazyLoadAllMappings(OrderedDict): method __init__ (line 753) | def __init__(self, mapping): method _initialize (line 758) | def _initialize(self): method __getitem__ (line 770) | def __getitem__(self, key): method keys (line 774) | def keys(self): method values (line 778) | def values(self): method items (line 782) | def items(self): method __iter__ (line 786) | def __iter__(self): method __contains__ (line 790) | def __contains__(self, item): function _get_class_name (line 795) | def _get_class_name(model_class: Union[str, List[str]]): function _list_model_options (line 801) | def _list_model_options(indent, config_to_class=None, use_model_types=Tr... function replace_list_option_in_docstrings (line 834) | def replace_list_option_in_docstrings(config_to_class=None, use_model_ty... class AutoConfig (line 861) | class AutoConfig: method __init__ (line 869) | def __init__(self): method for_model (line 876) | def for_model(cls, model_type: str, *args, **kwargs): method from_pretrained (line 886) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 1024) | def register(model_type, config, exist_ok=False): FILE: mplsandbox_for_rl/transformers/src/transformers/models/auto/feature_extraction_auto.py function feature_extractor_class_from_name (line 117) | def feature_extractor_class_from_name(class_name: str): function get_feature_extractor_config (line 141) | def get_feature_extractor_config( class AutoFeatureExtractor (line 241) | class AutoFeatureExtractor: method __init__ (line 249) | def __init__(self): method from_pretrained (line 257) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 390) | def register(config_class, feature_extractor_class, exist_ok=False): FILE: mplsandbox_for_rl/transformers/src/transformers/models/auto/image_processing_auto.py function image_processor_class_from_name (line 167) | def image_processor_class_from_name(class_name: str): function get_image_processor_config (line 195) | def get_image_processor_config( function _warning_fast_image_processor_available (line 295) | def _warning_fast_image_processor_available(fast_class): class AutoImageProcessor (line 302) | class AutoImageProcessor: method __init__ (line 310) | def __init__(self): method from_pretrained (line 318) | def from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwa... method register (line 495) | def register( FILE: mplsandbox_for_rl/transformers/src/transformers/models/auto/modeling_auto.py class AutoModelForMaskGeneration (line 1463) | class AutoModelForMaskGeneration(_BaseAutoModelClass): class AutoModelForKeypointDetection (line 1467) | class AutoModelForKeypointDetection(_BaseAutoModelClass): class AutoModelForTextEncoding (line 1471) | class AutoModelForTextEncoding(_BaseAutoModelClass): class AutoModelForImageToImage (line 1475) | class AutoModelForImageToImage(_BaseAutoModelClass): class AutoModel (line 1479) | class AutoModel(_BaseAutoModelClass): class AutoModelForPreTraining (line 1486) | class AutoModelForPreTraining(_BaseAutoModelClass): class _AutoModelWithLMHead (line 1494) | class _AutoModelWithLMHead(_BaseAutoModelClass): class AutoModelForCausalLM (line 1501) | class AutoModelForCausalLM(_BaseAutoModelClass): class AutoModelForMaskedLM (line 1508) | class AutoModelForMaskedLM(_BaseAutoModelClass): class AutoModelForSeq2SeqLM (line 1515) | class AutoModelForSeq2SeqLM(_BaseAutoModelClass): class AutoModelForSequenceClassification (line 1526) | class AutoModelForSequenceClassification(_BaseAutoModelClass): class AutoModelForQuestionAnswering (line 1535) | class AutoModelForQuestionAnswering(_BaseAutoModelClass): class AutoModelForTableQuestionAnswering (line 1542) | class AutoModelForTableQuestionAnswering(_BaseAutoModelClass): class AutoModelForVisualQuestionAnswering (line 1553) | class AutoModelForVisualQuestionAnswering(_BaseAutoModelClass): class AutoModelForDocumentQuestionAnswering (line 1564) | class AutoModelForDocumentQuestionAnswering(_BaseAutoModelClass): class AutoModelForTokenClassification (line 1575) | class AutoModelForTokenClassification(_BaseAutoModelClass): class AutoModelForMultipleChoice (line 1582) | class AutoModelForMultipleChoice(_BaseAutoModelClass): class AutoModelForNextSentencePrediction (line 1589) | class AutoModelForNextSentencePrediction(_BaseAutoModelClass): class AutoModelForImageClassification (line 1598) | class AutoModelForImageClassification(_BaseAutoModelClass): class AutoModelForZeroShotImageClassification (line 1605) | class AutoModelForZeroShotImageClassification(_BaseAutoModelClass): class AutoModelForImageSegmentation (line 1614) | class AutoModelForImageSegmentation(_BaseAutoModelClass): class AutoModelForSemanticSegmentation (line 1621) | class AutoModelForSemanticSegmentation(_BaseAutoModelClass): class AutoModelForUniversalSegmentation (line 1630) | class AutoModelForUniversalSegmentation(_BaseAutoModelClass): class AutoModelForInstanceSegmentation (line 1639) | class AutoModelForInstanceSegmentation(_BaseAutoModelClass): class AutoModelForObjectDetection (line 1648) | class AutoModelForObjectDetection(_BaseAutoModelClass): class AutoModelForZeroShotObjectDetection (line 1655) | class AutoModelForZeroShotObjectDetection(_BaseAutoModelClass): class AutoModelForDepthEstimation (line 1664) | class AutoModelForDepthEstimation(_BaseAutoModelClass): class AutoModelForVideoClassification (line 1671) | class AutoModelForVideoClassification(_BaseAutoModelClass): class AutoModelForVision2Seq (line 1678) | class AutoModelForVision2Seq(_BaseAutoModelClass): class AutoModelForAudioClassification (line 1685) | class AutoModelForAudioClassification(_BaseAutoModelClass): class AutoModelForCTC (line 1692) | class AutoModelForCTC(_BaseAutoModelClass): class AutoModelForSpeechSeq2Seq (line 1699) | class AutoModelForSpeechSeq2Seq(_BaseAutoModelClass): class AutoModelForAudioFrameClassification (line 1708) | class AutoModelForAudioFrameClassification(_BaseAutoModelClass): class AutoModelForAudioXVector (line 1717) | class AutoModelForAudioXVector(_BaseAutoModelClass): class AutoModelForTextToSpectrogram (line 1721) | class AutoModelForTextToSpectrogram(_BaseAutoModelClass): class AutoModelForTextToWaveform (line 1725) | class AutoModelForTextToWaveform(_BaseAutoModelClass): class AutoBackbone (line 1729) | class AutoBackbone(_BaseAutoBackboneClass): class AutoModelForMaskedImageModeling (line 1736) | class AutoModelForMaskedImageModeling(_BaseAutoModelClass): class AutoModelWithLMHead (line 1743) | class AutoModelWithLMHead(_AutoModelWithLMHead): method from_config (line 1745) | def from_config(cls, config): method from_pretrained (line 1755) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... FILE: mplsandbox_for_rl/transformers/src/transformers/models/auto/modeling_flax_auto.py class FlaxAutoModel (line 281) | class FlaxAutoModel(_BaseAutoModelClass): class FlaxAutoModelForPreTraining (line 288) | class FlaxAutoModelForPreTraining(_BaseAutoModelClass): class FlaxAutoModelForCausalLM (line 295) | class FlaxAutoModelForCausalLM(_BaseAutoModelClass): class FlaxAutoModelForMaskedLM (line 302) | class FlaxAutoModelForMaskedLM(_BaseAutoModelClass): class FlaxAutoModelForSeq2SeqLM (line 309) | class FlaxAutoModelForSeq2SeqLM(_BaseAutoModelClass): class FlaxAutoModelForSequenceClassification (line 320) | class FlaxAutoModelForSequenceClassification(_BaseAutoModelClass): class FlaxAutoModelForQuestionAnswering (line 329) | class FlaxAutoModelForQuestionAnswering(_BaseAutoModelClass): class FlaxAutoModelForTokenClassification (line 336) | class FlaxAutoModelForTokenClassification(_BaseAutoModelClass): class FlaxAutoModelForMultipleChoice (line 345) | class FlaxAutoModelForMultipleChoice(_BaseAutoModelClass): class FlaxAutoModelForNextSentencePrediction (line 352) | class FlaxAutoModelForNextSentencePrediction(_BaseAutoModelClass): class FlaxAutoModelForImageClassification (line 361) | class FlaxAutoModelForImageClassification(_BaseAutoModelClass): class FlaxAutoModelForVision2Seq (line 370) | class FlaxAutoModelForVision2Seq(_BaseAutoModelClass): class FlaxAutoModelForSpeechSeq2Seq (line 377) | class FlaxAutoModelForSpeechSeq2Seq(_BaseAutoModelClass): FILE: mplsandbox_for_rl/transformers/src/transformers/models/auto/modeling_tf_auto.py class TFAutoModelForMaskGeneration (line 529) | class TFAutoModelForMaskGeneration(_BaseAutoModelClass): class TFAutoModelForTextEncoding (line 533) | class TFAutoModelForTextEncoding(_BaseAutoModelClass): class TFAutoModel (line 537) | class TFAutoModel(_BaseAutoModelClass): class TFAutoModelForAudioClassification (line 544) | class TFAutoModelForAudioClassification(_BaseAutoModelClass): class TFAutoModelForPreTraining (line 553) | class TFAutoModelForPreTraining(_BaseAutoModelClass): class _TFAutoModelWithLMHead (line 561) | class _TFAutoModelWithLMHead(_BaseAutoModelClass): class TFAutoModelForCausalLM (line 568) | class TFAutoModelForCausalLM(_BaseAutoModelClass): class TFAutoModelForMaskedImageModeling (line 575) | class TFAutoModelForMaskedImageModeling(_BaseAutoModelClass): class TFAutoModelForImageClassification (line 584) | class TFAutoModelForImageClassification(_BaseAutoModelClass): class TFAutoModelForZeroShotImageClassification (line 593) | class TFAutoModelForZeroShotImageClassification(_BaseAutoModelClass): class TFAutoModelForSemanticSegmentation (line 602) | class TFAutoModelForSemanticSegmentation(_BaseAutoModelClass): class TFAutoModelForVision2Seq (line 611) | class TFAutoModelForVision2Seq(_BaseAutoModelClass): class TFAutoModelForMaskedLM (line 618) | class TFAutoModelForMaskedLM(_BaseAutoModelClass): class TFAutoModelForSeq2SeqLM (line 625) | class TFAutoModelForSeq2SeqLM(_BaseAutoModelClass): class TFAutoModelForSequenceClassification (line 636) | class TFAutoModelForSequenceClassification(_BaseAutoModelClass): class TFAutoModelForQuestionAnswering (line 645) | class TFAutoModelForQuestionAnswering(_BaseAutoModelClass): class TFAutoModelForDocumentQuestionAnswering (line 652) | class TFAutoModelForDocumentQuestionAnswering(_BaseAutoModelClass): class TFAutoModelForTableQuestionAnswering (line 663) | class TFAutoModelForTableQuestionAnswering(_BaseAutoModelClass): class TFAutoModelForTokenClassification (line 674) | class TFAutoModelForTokenClassification(_BaseAutoModelClass): class TFAutoModelForMultipleChoice (line 683) | class TFAutoModelForMultipleChoice(_BaseAutoModelClass): class TFAutoModelForNextSentencePrediction (line 690) | class TFAutoModelForNextSentencePrediction(_BaseAutoModelClass): class TFAutoModelForSpeechSeq2Seq (line 699) | class TFAutoModelForSpeechSeq2Seq(_BaseAutoModelClass): class TFAutoModelWithLMHead (line 708) | class TFAutoModelWithLMHead(_TFAutoModelWithLMHead): method from_config (line 710) | def from_config(cls, config): method from_pretrained (line 720) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... FILE: mplsandbox_for_rl/transformers/src/transformers/models/auto/processing_auto.py function processor_class_from_name (line 115) | def processor_class_from_name(class_name: str): class AutoProcessor (line 139) | class AutoProcessor: method __init__ (line 147) | def __init__(self): method from_pretrained (line 155) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 357) | def register(config_class, processor_class, exist_ok=False): FILE: mplsandbox_for_rl/transformers/src/transformers/models/auto/tokenization_auto.py function tokenizer_class_from_name (line 556) | def tokenizer_class_from_name(class_name: str): function get_tokenizer_config (line 584) | def get_tokenizer_config( class AutoTokenizer (line 695) | class AutoTokenizer: method __init__ (line 703) | def __init__(self): method from_pretrained (line 711) | def from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwa... method register (line 933) | def register(config_class, slow_tokenizer_class=None, fast_tokenizer_c... FILE: mplsandbox_for_rl/transformers/src/transformers/models/autoformer/configuration_autoformer.py class AutoformerConfig (line 26) | class AutoformerConfig(PretrainedConfig): method __init__ (line 138) | def __init__( method _number_of_features (line 235) | def _number_of_features(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/autoformer/modeling_autoformer.py class AutoFormerDecoderOutput (line 48) | class AutoFormerDecoderOutput(ModelOutput): class AutoformerModelOutput (line 97) | class AutoformerModelOutput(ModelOutput): class AutoformerFeatureEmbedder (line 171) | class AutoformerFeatureEmbedder(nn.Module): method __init__ (line 182) | def __init__(self, cardinalities: List[int], embedding_dims: List[int]... method forward (line 188) | def forward(self, features: torch.Tensor) -> torch.Tensor: class AutoformerStdScaler (line 206) | class AutoformerStdScaler(nn.Module): method __init__ (line 212) | def __init__(self, config: AutoformerConfig): method forward (line 218) | def forward( class AutoformerMeanScaler (line 242) | class AutoformerMeanScaler(nn.Module): method __init__ (line 248) | def __init__(self, config: AutoformerConfig): method forward (line 255) | def forward( class AutoformerNOPScaler (line 297) | class AutoformerNOPScaler(nn.Module): method __init__ (line 302) | def __init__(self, config: AutoformerConfig): method forward (line 307) | def forward( function weighted_average (line 325) | def weighted_average(input_tensor: torch.Tensor, weights: Optional[torch... function nll (line 350) | def nll(input: torch.distributions.Distribution, target: torch.Tensor) -... class AutoformerSinusoidalPositionalEmbedding (line 358) | class AutoformerSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 361) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 366) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 383) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class AutoformerValueEmbedding (line 393) | class AutoformerValueEmbedding(nn.Module): method __init__ (line 394) | def __init__(self, feature_size, d_model): method forward (line 398) | def forward(self, x): class AutoformerSeriesDecompositionLayer (line 405) | class AutoformerSeriesDecompositionLayer(nn.Module): method __init__ (line 412) | def __init__(self, config: AutoformerConfig): method forward (line 417) | def forward(self, x): class AutoformerLayernorm (line 434) | class AutoformerLayernorm(nn.Module): method __init__ (line 440) | def __init__(self, config: AutoformerConfig): method forward (line 444) | def forward(self, x): class AutoformerAttention (line 450) | class AutoformerAttention(nn.Module): method __init__ (line 457) | def __init__( method _shape (line 487) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 490) | def forward( class AutoformerEncoderLayer (line 673) | class AutoformerEncoderLayer(nn.Module): method __init__ (line 674) | def __init__(self, config: AutoformerConfig): method forward (line 693) | def forward( class AutoformerDecoderLayer (line 747) | class AutoformerDecoderLayer(nn.Module): method __init__ (line 748) | def __init__(self, config: AutoformerConfig): method forward (line 791) | def forward( class AutoformerPreTrainedModel (line 894) | class AutoformerPreTrainedModel(PreTrainedModel): method _init_weights (line 900) | def _init_weights(self, module): class AutoformerEncoder (line 1063) | class AutoformerEncoder(AutoformerPreTrainedModel): method __init__ (line 1072) | def __init__(self, config: AutoformerConfig): method forward (line 1091) | def forward( class AutoformerDecoder (line 1200) | class AutoformerDecoder(AutoformerPreTrainedModel): method __init__ (line 1208) | def __init__(self, config: AutoformerConfig): method forward (line 1229) | def forward( class AutoformerModel (line 1427) | class AutoformerModel(AutoformerPreTrainedModel): method __init__ (line 1428) | def __init__(self, config: AutoformerConfig): method _past_length (line 1454) | def _past_length(self) -> int: method get_lagged_subsequences (line 1457) | def get_lagged_subsequences( method create_network_inputs (line 1495) | def create_network_inputs( method get_encoder (line 1595) | def get_encoder(self): method get_decoder (line 1598) | def get_decoder(self): method forward (line 1603) | def forward( class AutoformerForPrediction (line 1763) | class AutoformerForPrediction(AutoformerPreTrainedModel): method __init__ (line 1764) | def __init__(self, config: AutoformerConfig): method output_params (line 1787) | def output_params(self, decoder_output): method get_encoder (line 1790) | def get_encoder(self): method get_decoder (line 1793) | def get_decoder(self): method output_distribution (line 1797) | def output_distribution(self, params, loc=None, scale=None, trailing_n... method forward (line 1805) | def forward( method generate (line 1978) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bark/configuration_bark.py class BarkSubModelConfig (line 66) | class BarkSubModelConfig(PretrainedConfig): method __init__ (line 77) | def __init__( method from_pretrained (line 105) | def from_pretrained( class BarkSemanticConfig (line 155) | class BarkSemanticConfig(BarkSubModelConfig): class BarkCoarseConfig (line 177) | class BarkCoarseConfig(BarkSubModelConfig): class BarkFineConfig (line 204) | class BarkFineConfig(BarkSubModelConfig): method __init__ (line 207) | def __init__(self, tie_word_embeddings=True, n_codes_total=8, n_codes_... class BarkConfig (line 214) | class BarkConfig(PretrainedConfig): method __init__ (line 269) | def __init__( method from_sub_model_configs (line 305) | def from_sub_model_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bark/convert_suno_to_hf.py function _get_ckpt_path (line 80) | def _get_ckpt_path(model_type, use_small=False): function _download (line 87) | def _download(from_hf_path, file_name): function _load_model (line 92) | def _load_model(ckpt_path, device, use_small=False, model_type="text"): function load_model (line 161) | def load_model(pytorch_dump_folder_path, use_small=False, model_type="te... function load_whole_bark_model (line 212) | def load_whole_bark_model( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bark/generation_configuration_bark.py class BarkSemanticGenerationConfig (line 27) | class BarkSemanticGenerationConfig(GenerationConfig): method __init__ (line 30) | def __init__( class BarkCoarseGenerationConfig (line 118) | class BarkCoarseGenerationConfig(GenerationConfig): method __init__ (line 121) | def __init__( class BarkFineGenerationConfig (line 198) | class BarkFineGenerationConfig(GenerationConfig): method __init__ (line 201) | def __init__( method validate (line 233) | def validate(self, **kwargs): class BarkGenerationConfig (line 241) | class BarkGenerationConfig(GenerationConfig): method __init__ (line 247) | def __init__( method from_sub_model_configs (line 297) | def from_sub_model_configs( method to_dict (line 317) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bark/modeling_bark.py class BarkSelfAttention (line 67) | class BarkSelfAttention(nn.Module): method __init__ (line 71) | def __init__(self, config, is_causal=False): method _split_heads (line 101) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 109) | def _merge_heads(self, tensor, num_heads, attn_head_size): method _attn (line 121) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method forward (line 152) | def forward( class BarkSelfFlashAttention2 (line 192) | class BarkSelfFlashAttention2(BarkSelfAttention): method __init__ (line 200) | def __init__(self, *args, **kwargs): method _split_heads (line 208) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 218) | def _merge_heads(self, tensor, num_heads, attn_head_size): method forward (line 227) | def forward( class BarkLayerNorm (line 288) | class BarkLayerNorm(nn.Module): method __init__ (line 291) | def __init__(self, hidden_size, bias=True): method forward (line 296) | def forward(self, input): class BarkMLP (line 300) | class BarkMLP(nn.Module): method __init__ (line 301) | def __init__(self, config): method forward (line 308) | def forward(self, hidden_states): class BarkBlock (line 316) | class BarkBlock(nn.Module): method __init__ (line 317) | def __init__(self, config, is_causal=False): method forward (line 334) | def forward( class BarkPreTrainedModel (line 370) | class BarkPreTrainedModel(PreTrainedModel): method _init_weights (line 380) | def _init_weights(self, module): method __init__ (line 396) | def __init__(self, *inputs, **kwargs): method device (line 400) | def device(self) -> torch.device: class BarkCausalModel (line 549) | class BarkCausalModel(BarkPreTrainedModel): method __init__ (line 552) | def __init__(self, config): method get_input_embeddings (line 573) | def get_input_embeddings(self): method set_input_embeddings (line 576) | def set_input_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 579) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 641) | def forward( method _reorder_cache (line 789) | def _reorder_cache( class BarkSemanticModel (line 809) | class BarkSemanticModel(BarkCausalModel): method generate (line 813) | def generate( class BarkCoarseModel (line 919) | class BarkCoarseModel(BarkCausalModel): method preprocess_histories (line 923) | def preprocess_histories( method generate (line 997) | def generate( class BarkFineModel (line 1139) | class BarkFineModel(BarkPreTrainedModel): method __init__ (line 1144) | def __init__(self, config): method get_input_embeddings (line 1175) | def get_input_embeddings(self): method set_input_embeddings (line 1179) | def set_input_embeddings(self, new_embeddings): method get_output_embeddings (line 1183) | def get_output_embeddings(self): method set_output_embeddings (line 1187) | def set_output_embeddings(self, new_output_embeddings): method _resize_token_embeddings (line 1191) | def _resize_token_embeddings(self, new_num_tokens, pad_to_multiple_of=... method resize_token_embeddings (line 1212) | def resize_token_embeddings( method tie_weights (line 1251) | def tie_weights(self): method forward (line 1273) | def forward( method generate (line 1383) | def generate( class BarkModel (line 1539) | class BarkModel(BarkPreTrainedModel): method __init__ (line 1542) | def __init__(self, config): method device (line 1554) | def device(self) -> torch.device: method enable_cpu_offload (line 1571) | def enable_cpu_offload(self, gpu_id: Optional[int] = 0): method codec_decode (line 1610) | def codec_decode(self, fine_output, output_lengths=None): method generate (line 1629) | def generate( method _check_and_enable_flash_attn_2 (line 1769) | def _check_and_enable_flash_attn_2( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bark/processing_bark.py class BarkProcessor (line 35) | class BarkProcessor(ProcessorMixin): method __init__ (line 60) | def __init__(self, tokenizer, speaker_embeddings=None): method from_pretrained (line 66) | def from_pretrained( method save_pretrained (line 118) | def save_pretrained( method _load_voice_preset (line 175) | def _load_voice_preset(self, voice_preset: str = None, **kwargs): method _validate_voice_preset_dict (line 208) | def _validate_voice_preset_dict(self, voice_preset: Optional[dict] = N... method __call__ (line 219) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bart/configuration_bart.py class BartConfig (line 31) | class BartConfig(PretrainedConfig): method __init__ (line 111) | def __init__( class BartOnnxConfig (line 182) | class BartOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 184) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 228) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 240) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 308) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 346) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 372) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 396) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bart/convert_bart_original_pytorch_checkpoint_to_pytorch.py function remove_ignore_keys_ (line 55) | def remove_ignore_keys_(state_dict): function rename_key (line 67) | def rename_key(dct, old, new): function load_xsum_checkpoint (line 72) | def load_xsum_checkpoint(checkpoint_path): function make_linear_from_emb (line 80) | def make_linear_from_emb(emb): function convert_bart_checkpoint (line 88) | def convert_bart_checkpoint(checkpoint_path, pytorch_dump_folder_path, h... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bart/modeling_bart.py function shift_tokens_right (line 80) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class BartLearnedPositionalEmbedding (line 96) | class BartLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 101) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 107) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class BartScaledWordEmbedding (line 118) | class BartScaledWordEmbedding(nn.Embedding): method __init__ (line 123) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 127) | def forward(self, input_ids: torch.Tensor): class BartAttention (line 131) | class BartAttention(nn.Module): method __init__ (line 134) | def __init__( method _shape (line 165) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 168) | def forward( class BartFlashAttention2 (line 289) | class BartFlashAttention2(BartAttention): method __init__ (line 297) | def __init__(self, *args, **kwargs): method _reshape (line 305) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 308) | def forward( class BartSdpaAttention (line 416) | class BartSdpaAttention(BartAttention): method forward (line 417) | def forward( class BartEncoderLayer (line 529) | class BartEncoderLayer(nn.Module): method __init__ (line 530) | def __init__(self, config: BartConfig): method forward (line 548) | def forward( class BartDecoderLayer (line 599) | class BartDecoderLayer(nn.Module): method __init__ (line 600) | def __init__(self, config: BartConfig): method forward (line 629) | def forward( class BartClassificationHead (line 719) | class BartClassificationHead(nn.Module): method __init__ (line 722) | def __init__( method forward (line 734) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BartPreTrainedModel (line 743) | class BartPreTrainedModel(PreTrainedModel): method _init_weights (line 753) | def _init_weights(self, module): method dummy_inputs (line 765) | def dummy_inputs(self): class PretrainedBartModel (line 775) | class PretrainedBartModel(BartPreTrainedModel): method __init_subclass__ (line 776) | def __init_subclass__(self): class BartPretrainedModel (line 783) | class BartPretrainedModel(BartPreTrainedModel): method __init_subclass__ (line 784) | def __init_subclass__(self): class BartEncoder (line 948) | class BartEncoder(BartPreTrainedModel): method __init__ (line 958) | def __init__(self, config: BartConfig, embed_tokens: Optional[nn.Embed... method get_input_embeddings (line 989) | def get_input_embeddings(self): method set_input_embeddings (line 992) | def set_input_embeddings(self, value): method forward (line 995) | def forward( class BartDecoder (line 1136) | class BartDecoder(BartPreTrainedModel): method __init__ (line 1145) | def __init__(self, config: BartConfig, embed_tokens: Optional[nn.Embed... method get_input_embeddings (line 1174) | def get_input_embeddings(self): method set_input_embeddings (line 1177) | def set_input_embeddings(self, value): method forward (line 1180) | def forward( class BartModel (line 1427) | class BartModel(BartPreTrainedModel): method __init__ (line 1430) | def __init__(self, config: BartConfig): method _tie_weights (line 1443) | def _tie_weights(self): method get_input_embeddings (line 1448) | def get_input_embeddings(self): method set_input_embeddings (line 1451) | def set_input_embeddings(self, value): method get_encoder (line 1456) | def get_encoder(self): method get_decoder (line 1459) | def get_decoder(self): method forward (line 1469) | def forward( class BartForConditionalGeneration (line 1560) | class BartForConditionalGeneration(BartPreTrainedModel): method __init__ (line 1565) | def __init__(self, config: BartConfig): method get_encoder (line 1574) | def get_encoder(self): method get_decoder (line 1577) | def get_decoder(self): method resize_token_embeddings (line 1580) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 1585) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1594) | def get_output_embeddings(self): method set_output_embeddings (line 1597) | def set_output_embeddings(self, new_embeddings): method forward (line 1603) | def forward( method prepare_inputs_for_generation (line 1684) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1723) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1727) | def _reorder_cache(past_key_values, beam_idx): class BartForSequenceClassification (line 1745) | class BartForSequenceClassification(BartPreTrainedModel): method __init__ (line 1748) | def __init__(self, config: BartConfig, **kwargs): method forward (line 1769) | def forward( class BartForQuestionAnswering (line 1875) | class BartForQuestionAnswering(BartPreTrainedModel): method __init__ (line 1878) | def __init__(self, config): method forward (line 1898) | def forward( class BartDecoderWrapper (line 1993) | class BartDecoderWrapper(BartPreTrainedModel): method __init__ (line 1999) | def __init__(self, config): method forward (line 2003) | def forward(self, *args, **kwargs): class BartForCausalLM (line 2013) | class BartForCausalLM(BartPreTrainedModel): method __init__ (line 2016) | def __init__(self, config): method get_input_embeddings (line 2028) | def get_input_embeddings(self): method set_input_embeddings (line 2031) | def set_input_embeddings(self, value): method get_output_embeddings (line 2034) | def get_output_embeddings(self): method set_output_embeddings (line 2037) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 2040) | def set_decoder(self, decoder): method get_decoder (line 2043) | def get_decoder(self): method forward (line 2047) | def forward( method prepare_inputs_for_generation (line 2191) | def prepare_inputs_for_generation( method _reorder_cache (line 2218) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bart/modeling_flax_bart.py function shift_tokens_right (line 220) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... 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: mplsandbox_for_rl/transformers/src/transformers/models/bart/modeling_tf_bart.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 89) | 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 TFBartLearnedPositionalEmbedding (line 119) | class TFBartLearnedPositionalEmbedding(keras.layers.Embedding): method __init__ (line 124) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 130) | def call( class TFBartAttention (line 146) | class TFBartAttention(keras.layers.Layer): method __init__ (line 149) | def __init__( method _shape (line 177) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 180) | def call( method build (line 298) | def build(self, input_shape=None): class TFBartEncoderLayer (line 316) | class TFBartEncoderLayer(keras.layers.Layer): method __init__ (line 317) | def __init__(self, config: BartConfig, **kwargs): method call (line 332) | def call( method build (line 372) | def build(self, input_shape=None): class TFBartDecoderLayer (line 393) | class TFBartDecoderLayer(keras.layers.Layer): method __init__ (line 394) | def __init__(self, config: BartConfig, **kwargs): method call (line 422) | def call( method build (line 502) | def build(self, input_shape=None): class TFBartClassificationHead (line 529) | class TFBartClassificationHead(keras.layers.Layer): method __init__ (line 532) | def __init__(self, inner_dim: int, num_classes: int, pooler_dropout: f... method call (line 540) | def call(self, inputs): method build (line 548) | def build(self, input_shape=None): class TFBartPretrainedModel (line 560) | class TFBartPretrainedModel(TFPreTrainedModel): method dummy_inputs (line 565) | def dummy_inputs(self): method tf_to_pt_weight_rename (line 574) | def tf_to_pt_weight_rename(self, tf_weight): class TFBartEncoder (line 743) | class TFBartEncoder(keras.layers.Layer): method __init__ (line 753) | def __init__(self, config: BartConfig, embed_tokens: Optional[keras.la... method call (line 773) | def call( method build (line 886) | def build(self, input_shape=None): class TFBartDecoder (line 903) | class TFBartDecoder(keras.layers.Layer): method __init__ (line 913) | def __init__(self, config: BartConfig, embed_tokens: Optional[keras.la... method call (line 931) | def call( method build (line 1116) | def build(self, input_shape=None): class TFBartMainLayer (line 1133) | class TFBartMainLayer(keras.layers.Layer): method __init__ (line 1136) | def __init__(self, config: BartConfig, load_weight_prefix=None, **kwar... method get_input_embeddings (line 1151) | def get_input_embeddings(self): method set_input_embeddings (line 1154) | def set_input_embeddings(self, new_embeddings): method call (line 1160) | def call( method build (line 1248) | def build(self, input_shape=None): class TFBartModel (line 1269) | class TFBartModel(TFBartPretrainedModel): method __init__ (line 1272) | def __init__(self, config: BartConfig, load_weight_prefix=None, *input... method get_encoder (line 1277) | def get_encoder(self): method get_decoder (line 1280) | def get_decoder(self): method call (line 1290) | def call( method serving_output (line 1333) | def serving_output(self, output): method build (line 1352) | def build(self, input_shape=None): class BiasLayer (line 1361) | class BiasLayer(keras.layers.Layer): method __init__ (line 1367) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1374) | def call(self, x): class TFBartForConditionalGeneration (line 1382) | class TFBartForConditionalGeneration(TFBartPretrainedModel, TFCausalLang... method __init__ (line 1386) | def __init__(self, config, load_weight_prefix=None, *inputs, **kwargs): method get_decoder (line 1395) | def get_decoder(self): method get_encoder (line 1398) | def get_encoder(self): method get_output_embeddings (line 1401) | def get_output_embeddings(self): method set_output_embeddings (line 1404) | def set_output_embeddings(self, value): method get_bias (line 1407) | def get_bias(self): method set_bias (line 1410) | def set_bias(self, value): method call (line 1422) | def call( method serving_output (line 1503) | def serving_output(self, output): method prepare_inputs_for_generation (line 1522) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1560) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method build (line 1563) | def build(self, input_shape=None): class TFBartForSequenceClassification (line 1582) | class TFBartForSequenceClassification(TFBartPretrainedModel, TFSequenceC... method __init__ (line 1583) | def __init__(self, config: BartConfig, load_weight_prefix=None, *input... method call (line 1593) | def call( method serving_output (line 1682) | def serving_output(self, output): method build (line 1702) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bart/tokenization_bart.py function bytes_to_unicode (line 36) | def bytes_to_unicode(): function get_pairs (line 60) | def get_pairs(word): class BartTokenizer (line 74) | class BartTokenizer(PreTrainedTokenizer): method __init__ (line 155) | def __init__( method vocab_size (line 210) | def vocab_size(self): method get_vocab (line 213) | def get_vocab(self): method bpe (line 216) | def bpe(self, token): method _tokenize (line 258) | def _tokenize(self, text): method _convert_token_to_id (line 268) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 272) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 276) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 282) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 311) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 336) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 363) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 386) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bart/tokenization_bart_fast.py class BartTokenizerFast (line 35) | class BartTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 120) | def __init__( method mask_token (line 196) | def mask_token(self) -> str: method mask_token (line 211) | def mask_token(self, value): method _batch_encode_plus (line 222) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 233) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 244) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 248) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 255) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/barthez/tokenization_barthez.py class BarthezTokenizer (line 37) | class BarthezTokenizer(PreTrainedTokenizer): method __init__ (line 108) | def __init__( method build_inputs_with_special_tokens (line 141) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 167) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 194) | def create_token_type_ids_from_sequences( method vocab_size (line 217) | def vocab_size(self): method get_vocab (line 220) | def get_vocab(self): method _tokenize (line 225) | def _tokenize(self, text: str) -> List[str]: 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 237) | def convert_tokens_to_string(self, tokens): method __getstate__ (line 256) | def __getstate__(self): method __setstate__ (line 261) | def __setstate__(self, d): method save_vocabulary (line 271) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/barthez/tokenization_barthez_fast.py class BarthezTokenizerFast (line 39) | class BarthezTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 94) | def __init__( method can_save_slow_tokenizer (line 126) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 129) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 155) | def create_token_type_ids_from_sequences( method save_vocabulary (line 177) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bartpho/tokenization_bartpho.py class BartphoTokenizer (line 34) | class BartphoTokenizer(PreTrainedTokenizer): method __init__ (line 107) | def __init__( method __getstate__ (line 161) | def __getstate__(self): method __setstate__ (line 167) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 177) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 203) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 231) | def create_token_type_ids_from_sequences( method vocab_size (line 257) | def vocab_size(self): method get_vocab (line 260) | def get_vocab(self): method _tokenize (line 265) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 268) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 275) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 279) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 284) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/beit/configuration_beit.py class BeitConfig (line 28) | class BeitConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 127) | def __init__( class BeitOnnxConfig (line 213) | class BeitOnnxConfig(OnnxConfig): method inputs (line 217) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 225) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/beit/convert_beit_unilm_to_pytorch.py function create_rename_keys (line 43) | def create_rename_keys(config, has_lm_head=False, is_semantic=False): function read_in_q_k_v (line 115) | def read_in_q_k_v(state_dict, config, has_lm_head=False, is_semantic=Fal... function rename_key (line 157) | def rename_key(dct, old, new): function prepare_img (line 163) | def prepare_img(): function convert_beit_checkpoint (line 170) | def convert_beit_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/beit/image_processing_beit.py class BeitImageProcessor (line 57) | class BeitImageProcessor(BaseImageProcessor): method __init__ (line 104) | def __init__( method from_dict (line 137) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method resize (line 146) | def resize( method reduce_label (line 182) | def reduce_label(self, label: ImageInput) -> np.ndarray: method _preprocess (line 190) | def _preprocess( method _preprocess_image (line 223) | def _preprocess_image( method _preprocess_segmentation_map (line 268) | def _preprocess_segmentation_map( method __call__ (line 309) | def __call__(self, images, segmentation_maps=None, **kwargs): method preprocess (line 316) | def preprocess( method post_process_semantic_segmentation (line 471) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: mplsandbox_for_rl/transformers/src/transformers/models/beit/modeling_beit.py class BeitModelOutputWithPooling (line 64) | class BeitModelOutputWithPooling(BaseModelOutputWithPooling): function drop_path (line 89) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class BeitDropPath (line 109) | class BeitDropPath(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 BeitEmbeddings (line 125) | class BeitEmbeddings(nn.Module): method __init__ (line 131) | def __init__(self, config: BeitConfig) -> None: method interpolate_pos_encoding (line 153) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 189) | def forward( class BeitPatchEmbeddings (line 221) | class BeitPatchEmbeddings(nn.Module): method __init__ (line 228) | def __init__(self, config): method forward (line 245) | def forward( class BeitSelfAttention (line 274) | class BeitSelfAttention(nn.Module): method __init__ (line 275) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method transpose_for_scores (line 299) | def transpose_for_scores(self, x): method forward (line 304) | def forward( class BeitSelfOutput (line 358) | class BeitSelfOutput(nn.Module): method __init__ (line 364) | def __init__(self, config: BeitConfig) -> None: method forward (line 369) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BeitAttention (line 376) | class BeitAttention(nn.Module): method __init__ (line 377) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method prune_heads (line 383) | def prune_heads(self, heads): method forward (line 401) | def forward( class BeitIntermediate (line 420) | class BeitIntermediate(nn.Module): method __init__ (line 421) | def __init__(self, config: BeitConfig) -> None: method forward (line 429) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BeitOutput (line 436) | class BeitOutput(nn.Module): method __init__ (line 437) | def __init__(self, config: BeitConfig) -> None: method forward (line 442) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BeitLayer (line 449) | class BeitLayer(nn.Module): method __init__ (line 452) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method forward (line 470) | def forward( class BeitRelativePositionBias (line 514) | class BeitRelativePositionBias(nn.Module): method __init__ (line 515) | def __init__(self, config: BeitConfig, window_size: tuple) -> None: method generate_relative_position_index (line 526) | def generate_relative_position_index(self, window_size: Tuple[int, int... method forward (line 550) | def forward(self, window_size, interpolate_pos_encoding: bool = False,... class BeitEncoder (line 600) | class BeitEncoder(nn.Module): method __init__ (line 601) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method forward (line 623) | def forward( class BeitPreTrainedModel (line 685) | class BeitPreTrainedModel(PreTrainedModel): method _init_weights (line 698) | def _init_weights(self, module): class BeitModel (line 755) | class BeitModel(BeitPreTrainedModel): method __init__ (line 756) | def __init__(self, config: BeitConfig, add_pooling_layer: bool = True)... method get_input_embeddings (line 771) | def get_input_embeddings(self): method _prune_heads (line 774) | def _prune_heads(self, heads_to_prune): method forward (line 790) | def forward( class BeitPooler (line 847) | class BeitPooler(nn.Module): method __init__ (line 848) | def __init__(self, config: BeitConfig) -> None: method forward (line 854) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BeitForMaskedImageModeling (line 873) | class BeitForMaskedImageModeling(BeitPreTrainedModel): method __init__ (line 874) | def __init__(self, config: BeitConfig) -> None: method forward (line 889) | def forward( class BeitForImageClassification (line 975) | class BeitForImageClassification(BeitPreTrainedModel): method __init__ (line 976) | def __init__(self, config: BeitConfig) -> None: method forward (line 995) | def forward( class BeitConvModule (line 1059) | class BeitConvModule(nn.Module): method __init__ (line 1067) | def __init__( method forward (line 1088) | def forward(self, input: torch.Tensor) -> torch.Tensor: class BeitPyramidPoolingBlock (line 1096) | class BeitPyramidPoolingBlock(nn.Module): method __init__ (line 1097) | def __init__(self, pool_scale: int, in_channels: int, channels: int) -... method forward (line 1106) | def forward(self, input: torch.Tensor) -> torch.Tensor: class BeitPyramidPoolingModule (line 1113) | class BeitPyramidPoolingModule(nn.Module): method __init__ (line 1127) | def __init__(self, pool_scales: Tuple[int, ...], in_channels: int, cha... method forward (line 1139) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]: class BeitUperHead (line 1150) | class BeitUperHead(nn.Module): method __init__ (line 1158) | def __init__(self, config: BeitConfig) -> None: method psp_forward (line 1196) | def psp_forward(self, inputs): method forward (line 1205) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class BeitFCNHead (line 1235) | class BeitFCNHead(nn.Module): method __init__ (line 1250) | def __init__( method forward (line 1284) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class BeitForSemanticSegmentation (line 1300) | class BeitForSemanticSegmentation(BeitPreTrainedModel): method __init__ (line 1301) | def __init__(self, config: BeitConfig) -> None: method compute_loss (line 1333) | def compute_loss(self, logits, auxiliary_logits, labels): method forward (line 1354) | def forward( class BeitBackbone (line 1453) | class BeitBackbone(BeitPreTrainedModel, BackboneMixin): method __init__ (line 1454) | def __init__(self, config): method get_input_embeddings (line 1484) | def get_input_embeddings(self): method forward (line 1489) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/beit/modeling_flax_beit.py class FlaxBeitModelOutputWithPooling (line 45) | class FlaxBeitModelOutputWithPooling(FlaxBaseModelOutputWithPooling): function relative_position_index_init (line 119) | def relative_position_index_init(window_size: Tuple[int, int]) -> jnp.nd... function ones_with_scale (line 143) | def ones_with_scale(key, shape, scale, dtype=jnp.float32): class FlaxBeitDropPath (line 147) | class FlaxBeitDropPath(nn.Module): method __call__ (line 153) | def __call__(self, inputs, deterministic: Optional[bool] = True): class FlaxBeitPatchEmbeddings (line 168) | class FlaxBeitPatchEmbeddings(nn.Module): method setup (line 172) | def setup(self): method __call__ (line 189) | def __call__(self, pixel_values): class FlaxBeitEmbeddings (line 200) | class FlaxBeitEmbeddings(nn.Module): method setup (line 206) | def setup(self): method __call__ (line 218) | def __call__(self, pixel_values, bool_masked_pos=None, deterministic=T... class FlaxBeitRelativePositionBias (line 241) | class FlaxBeitRelativePositionBias(nn.Module): method setup (line 246) | def setup(self): method __call__ (line 257) | def __call__(self): class FlaxBeitSelfAttention (line 264) | class FlaxBeitSelfAttention(nn.Module): method setup (line 269) | def setup(self): method __call__ (line 301) | def __call__( class FlaxBeitSelfOutput (line 349) | class FlaxBeitSelfOutput(nn.Module): method setup (line 353) | def setup(self): method __call__ (line 361) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxBeitAttention (line 367) | class FlaxBeitAttention(nn.Module): method setup (line 372) | def setup(self): method __call__ (line 376) | def __call__( class FlaxBeitIntermediate (line 393) | class FlaxBeitIntermediate(nn.Module): method setup (line 397) | def setup(self): method __call__ (line 405) | def __call__(self, hidden_states): class FlaxBeitOutput (line 412) | class FlaxBeitOutput(nn.Module): method setup (line 416) | def setup(self): method __call__ (line 424) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxBeitLayer (line 431) | class FlaxBeitLayer(nn.Module): method setup (line 437) | def setup(self): method __call__ (line 453) | def __call__( class FlaxBeitLayerCollection (line 492) | class FlaxBeitLayerCollection(nn.Module): method setup (line 499) | def setup(self): method __call__ (line 511) | def __call__( class FlaxBeitEncoder (line 547) | class FlaxBeitEncoder(nn.Module): method setup (line 552) | def setup(self): method __call__ (line 570) | def __call__( class FlaxBeitPreTrainedModel (line 587) | class FlaxBeitPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 598) | def __init__( method init_weights (line 612) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 633) | def __call__( class FlaxBeitPooler (line 670) | class FlaxBeitPooler(nn.Module): method setup (line 674) | def setup(self): method __call__ (line 678) | def __call__(self, hidden_states): class FlaxBeitModule (line 690) | class FlaxBeitModule(nn.Module): method setup (line 695) | def setup(self): method __call__ (line 704) | def __call__( class FlaxBeitModel (line 745) | class FlaxBeitModel(FlaxBeitPreTrainedModel): class FlaxBeitForMaskedImageModelingModule (line 775) | class FlaxBeitForMaskedImageModelingModule(nn.Module): method setup (line 779) | def setup(self): method __call__ (line 790) | def __call__( class FlaxBeitForMaskedImageModeling (line 829) | class FlaxBeitForMaskedImageModeling(FlaxBeitPreTrainedModel): class FlaxBeitForImageClassificationModule (line 864) | class FlaxBeitForImageClassificationModule(nn.Module): method setup (line 868) | def setup(self): method __call__ (line 876) | def __call__( class FlaxBeitForImageClassification (line 916) | class FlaxBeitForImageClassification(FlaxBeitPreTrainedModel): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert/configuration_bert.py class BertConfig (line 29) | class BertConfig(PretrainedConfig): method __init__ (line 99) | def __init__( class BertOnnxConfig (line 138) | class BertOnnxConfig(OnnxConfig): method inputs (line 140) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert/convert_bert_original_tf2_checkpoint_to_pytorch.py function load_tf2_weights_in_bert (line 43) | def load_tf2_weights_in_bert(model, tf_checkpoint_path, config): function convert_tf2_checkpoint_to_pytorch (line 213) | def convert_tf2_checkpoint_to_pytorch(tf_checkpoint_path, config_path, p... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert/convert_bert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 28) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_fil... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/bert/convert_bert_token_dropping_original_tf2_checkpoint_to_pytorch.py function convert_checkpoint_to_pytorch (line 42) | def convert_checkpoint_to_pytorch(tf_checkpoint_path: str, config_path: ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert/modeling_bert.py function load_tf_weights_in_bert (line 85) | def load_tf_weights_in_bert(model, config, tf_checkpoint_path): class BertEmbeddings (line 158) | class BertEmbeddings(nn.Module): method __init__ (line 161) | def __init__(self, config): method forward (line 180) | def forward( class BertSelfAttention (line 222) | class BertSelfAttention(nn.Module): method __init__ (line 223) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 249) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 254) | def forward( class BertSdpaSelfAttention (line 356) | class BertSdpaSelfAttention(BertSelfAttention): method __init__ (line 357) | def __init__(self, config, position_embedding_type=None): method forward (line 363) | def forward( class BertSelfOutput (line 457) | class BertSelfOutput(nn.Module): method __init__ (line 458) | def __init__(self, config): method forward (line 464) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertAttention (line 477) | class BertAttention(nn.Module): method __init__ (line 478) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 486) | def prune_heads(self, heads): method forward (line 504) | def forward( class BertIntermediate (line 528) | class BertIntermediate(nn.Module): method __init__ (line 529) | def __init__(self, config): method forward (line 537) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertOutput (line 543) | class BertOutput(nn.Module): method __init__ (line 544) | def __init__(self, config): method forward (line 550) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertLayer (line 557) | class BertLayer(nn.Module): method __init__ (line 558) | def __init__(self, config): method forward (line 572) | def forward( method feed_forward_chunk (line 637) | def feed_forward_chunk(self, attention_output): class BertEncoder (line 643) | class BertEncoder(nn.Module): method __init__ (line 644) | def __init__(self, config): method forward (line 650) | def forward( class BertPooler (line 736) | class BertPooler(nn.Module): method __init__ (line 737) | def __init__(self, config): method forward (line 742) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertPredictionHeadTransform (line 751) | class BertPredictionHeadTransform(nn.Module): method __init__ (line 752) | def __init__(self, config): method forward (line 761) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertLMPredictionHead (line 768) | class BertLMPredictionHead(nn.Module): method __init__ (line 769) | def __init__(self, config): method _tie_weights (line 782) | def _tie_weights(self): method forward (line 785) | def forward(self, hidden_states): class BertOnlyMLMHead (line 791) | class BertOnlyMLMHead(nn.Module): method __init__ (line 792) | def __init__(self, config): method forward (line 796) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class BertOnlyNSPHead (line 801) | class BertOnlyNSPHead(nn.Module): method __init__ (line 802) | def __init__(self, config): method forward (line 806) | def forward(self, pooled_output): class BertPreTrainingHeads (line 811) | class BertPreTrainingHeads(nn.Module): method __init__ (line 812) | def __init__(self, config): method forward (line 817) | def forward(self, sequence_output, pooled_output): class BertPreTrainedModel (line 823) | class BertPreTrainedModel(PreTrainedModel): method _init_weights (line 835) | def _init_weights(self, module): class BertForPreTrainingOutput (line 853) | class BertForPreTrainingOutput(ModelOutput): class BertModel (line 956) | class BertModel(BertPreTrainedModel): method __init__ (line 971) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 986) | def get_input_embeddings(self): method set_input_embeddings (line 989) | def set_input_embeddings(self, value): method _prune_heads (line 992) | def _prune_heads(self, heads_to_prune): method forward (line 1006) | def forward( class BertForPreTraining (line 1176) | class BertForPreTraining(BertPreTrainedModel): method __init__ (line 1179) | def __init__(self, config): method get_output_embeddings (line 1188) | def get_output_embeddings(self): method set_output_embeddings (line 1191) | def set_output_embeddings(self, new_embeddings): method forward (line 1197) | def forward( class BertLMHeadModel (line 1283) | class BertLMHeadModel(BertPreTrainedModel): method __init__ (line 1286) | def __init__(self, config): method get_output_embeddings (line 1298) | def get_output_embeddings(self): method set_output_embeddings (line 1301) | def set_output_embeddings(self, new_embeddings): method forward (line 1311) | def forward( method prepare_inputs_for_generation (line 1396) | def prepare_inputs_for_generation( method _reorder_cache (line 1424) | def _reorder_cache(self, past_key_values, beam_idx): class BertForMaskedLM (line 1434) | class BertForMaskedLM(BertPreTrainedModel): 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 1467) | def forward( method prepare_inputs_for_generation (line 1524) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class BertForNextSentencePrediction (line 1545) | class BertForNextSentencePrediction(BertPreTrainedModel): method __init__ (line 1546) | def __init__(self, config): method forward (line 1557) | def forward( class BertForSequenceClassification (line 1650) | class BertForSequenceClassification(BertPreTrainedModel): method __init__ (line 1651) | def __init__(self, config): method forward (line 1674) | def forward( class BertForMultipleChoice (line 1753) | class BertForMultipleChoice(BertPreTrainedModel): method __init__ (line 1754) | def __init__(self, config): method forward (line 1773) | def forward( class BertForTokenClassification (line 1847) | class BertForTokenClassification(BertPreTrainedModel): method __init__ (line 1848) | def __init__(self, config): method forward (line 1870) | def forward( class BertForQuestionAnswering (line 1930) | class BertForQuestionAnswering(BertPreTrainedModel): method __init__ (line 1931) | def __init__(self, config): method forward (line 1951) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert/modeling_flax_bert.py class FlaxBertForPreTrainingOutput (line 62) | class FlaxBertForPreTrainingOutput(ModelOutput): class FlaxBertEmbeddings (line 178) | class FlaxBertEmbeddings(nn.Module): method setup (line 184) | def setup(self): method __call__ (line 206) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxBertSelfAttention (line 221) | class FlaxBertSelfAttention(nn.Module): method setup (line 226) | def setup(self): method _split_heads (line 255) | def _split_heads(self, hidden_states): method _merge_heads (line 258) | 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 FlaxBertSelfOutput (line 392) | class FlaxBertSelfOutput(nn.Module): method setup (line 396) | def setup(self): method __call__ (line 405) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxBertAttention (line 412) | class FlaxBertAttention(nn.Module): method setup (line 417) | def setup(self): method __call__ (line 421) | def __call__( class FlaxBertIntermediate (line 454) | class FlaxBertIntermediate(nn.Module): method setup (line 458) | def setup(self): method __call__ (line 466) | def __call__(self, hidden_states): class FlaxBertOutput (line 472) | class FlaxBertOutput(nn.Module): method setup (line 476) | def setup(self): method __call__ (line 485) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxBertLayer (line 492) | class FlaxBertLayer(nn.Module): method setup (line 496) | def setup(self): method __call__ (line 503) | def __call__( class FlaxBertLayerCollection (line 549) | class FlaxBertLayerCollection(nn.Module): method setup (line 554) | def setup(self): method __call__ (line 566) | def __call__( class FlaxBertEncoder (line 630) | class FlaxBertEncoder(nn.Module): method setup (line 635) | def setup(self): method __call__ (line 642) | def __call__( class FlaxBertPooler (line 669) | class FlaxBertPooler(nn.Module): method setup (line 673) | def setup(self): method __call__ (line 680) | def __call__(self, hidden_states): class FlaxBertPredictionHeadTransform (line 686) | class FlaxBertPredictionHeadTransform(nn.Module): method setup (line 690) | def setup(self): method __call__ (line 695) | def __call__(self, hidden_states): class FlaxBertLMPredictionHead (line 701) | class FlaxBertLMPredictionHead(nn.Module): method setup (line 706) | def setup(self): method __call__ (line 711) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBertOnlyMLMHead (line 724) | class FlaxBertOnlyMLMHead(nn.Module): method setup (line 728) | def setup(self): method __call__ (line 731) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBertOnlyNSPHead (line 736) | class FlaxBertOnlyNSPHead(nn.Module): method setup (line 739) | def setup(self): method __call__ (line 742) | def __call__(self, pooled_output): class FlaxBertPreTrainingHeads (line 746) | class FlaxBertPreTrainingHeads(nn.Module): method setup (line 750) | def setup(self): method __call__ (line 754) | def __call__(self, hidden_states, pooled_output, shared_embedding=None): class FlaxBertPreTrainedModel (line 760) | class FlaxBertPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 770) | def __init__( method enable_gradient_checkpointing (line 788) | def enable_gradient_checkpointing(self): method init_weights (line 795) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 838) | def init_cache(self, batch_size, max_length): method __call__ (line 858) | def __call__( class FlaxBertModule (line 955) | class FlaxBertModule(nn.Module): method setup (line 961) | def setup(self): method __call__ (line 970) | def __call__( class FlaxBertModel (line 1030) | class FlaxBertModel(FlaxBertPreTrainedModel): class FlaxBertForPreTrainingModule (line 1037) | class FlaxBertForPreTrainingModule(nn.Module): method setup (line 1042) | def setup(self): method __call__ (line 1050) | def __call__( class FlaxBertForPreTraining (line 1105) | class FlaxBertForPreTraining(FlaxBertPreTrainedModel): class FlaxBertForMaskedLMModule (line 1137) | class FlaxBertForMaskedLMModule(nn.Module): method setup (line 1142) | def setup(self): method __call__ (line 1151) | def __call__( class FlaxBertForMaskedLM (line 1196) | class FlaxBertForMaskedLM(FlaxBertPreTrainedModel): class FlaxBertForNextSentencePredictionModule (line 1203) | class FlaxBertForNextSentencePredictionModule(nn.Module): method setup (line 1208) | def setup(self): method __call__ (line 1216) | def __call__( class FlaxBertForNextSentencePrediction (line 1260) | class FlaxBertForNextSentencePrediction(FlaxBertPreTrainedModel): class FlaxBertForSequenceClassificationModule (line 1295) | class FlaxBertForSequenceClassificationModule(nn.Module): method setup (line 1300) | def setup(self): method __call__ (line 1317) | def __call__( class FlaxBertForSequenceClassification (line 1363) | class FlaxBertForSequenceClassification(FlaxBertPreTrainedModel): class FlaxBertForMultipleChoiceModule (line 1375) | class FlaxBertForMultipleChoiceModule(nn.Module): method setup (line 1380) | def setup(self): method __call__ (line 1389) | def __call__( class FlaxBertForMultipleChoice (line 1443) | class FlaxBertForMultipleChoice(FlaxBertPreTrainedModel): class FlaxBertForTokenClassificationModule (line 1455) | class FlaxBertForTokenClassificationModule(nn.Module): method setup (line 1460) | def setup(self): method __call__ (line 1475) | def __call__( class FlaxBertForTokenClassification (line 1521) | class FlaxBertForTokenClassification(FlaxBertPreTrainedModel): class FlaxBertForQuestionAnsweringModule (line 1530) | class FlaxBertForQuestionAnsweringModule(nn.Module): method setup (line 1535) | def setup(self): method __call__ (line 1544) | def __call__( class FlaxBertForQuestionAnswering (line 1594) | class FlaxBertForQuestionAnswering(FlaxBertPreTrainedModel): class FlaxBertForCausalLMModule (line 1606) | class FlaxBertForCausalLMModule(nn.Module): method setup (line 1611) | def setup(self): method __call__ (line 1620) | def __call__( class FlaxBertForCausalLM (line 1678) | class FlaxBertForCausalLM(FlaxBertPreTrainedModel): method prepare_inputs_for_generation (line 1681) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1702) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert/modeling_tf_bert.py class TFBertPreTrainingLoss (line 92) | class TFBertPreTrainingLoss: method hf_compute_loss (line 99) | def hf_compute_loss(self, labels: tf.Tensor, logits: tf.Tensor) -> tf.... class TFBertEmbeddings (line 120) | class TFBertEmbeddings(keras.layers.Layer): method __init__ (line 123) | def __init__(self, config: BertConfig, **kwargs): method build (line 133) | def build(self, input_shape=None): method call (line 162) | def call( class TFBertSelfAttention (line 203) | class TFBertSelfAttention(keras.layers.Layer): method __init__ (line 204) | def __init__(self, config: BertConfig, **kwargs): method transpose_for_scores (line 232) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 239) | def call( method build (line 320) | def build(self, input_shape=None): class TFBertSelfOutput (line 335) | class TFBertSelfOutput(keras.layers.Layer): method __init__ (line 336) | def __init__(self, config: BertConfig, **kwargs): method call (line 346) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 353) | def build(self, input_shape=None): class TFBertAttention (line 365) | class TFBertAttention(keras.layers.Layer): method __init__ (line 366) | def __init__(self, config: BertConfig, **kwargs): method prune_heads (line 372) | def prune_heads(self, heads): method call (line 375) | def call( method build (line 404) | def build(self, input_shape=None): class TFBertIntermediate (line 416) | class TFBertIntermediate(keras.layers.Layer): method __init__ (line 417) | def __init__(self, config: BertConfig, **kwargs): method call (line 430) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 436) | def build(self, input_shape=None): class TFBertOutput (line 445) | class TFBertOutput(keras.layers.Layer): method __init__ (line 446) | def __init__(self, config: BertConfig, **kwargs): method call (line 456) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 463) | def build(self, input_shape=None): class TFBertLayer (line 475) | class TFBertLayer(keras.layers.Layer): method __init__ (line 476) | def __init__(self, config: BertConfig, **kwargs): method call (line 489) | def call( method build (line 560) | def build(self, input_shape=None): class TFBertEncoder (line 578) | class TFBertEncoder(keras.layers.Layer): method __init__ (line 579) | def __init__(self, config: BertConfig, **kwargs): method call (line 584) | def call( method build (line 646) | def build(self, input_shape=None): class TFBertPooler (line 656) | class TFBertPooler(keras.layers.Layer): method __init__ (line 657) | def __init__(self, config: BertConfig, **kwargs): method call (line 668) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 676) | def build(self, input_shape=None): class TFBertPredictionHeadTransform (line 685) | class TFBertPredictionHeadTransform(keras.layers.Layer): method __init__ (line 686) | def __init__(self, config: BertConfig, **kwargs): method call (line 703) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 710) | def build(self, input_shape=None): class TFBertLMPredictionHead (line 722) | class TFBertLMPredictionHead(keras.layers.Layer): method __init__ (line 723) | def __init__(self, config: BertConfig, input_embeddings: keras.layers.... method build (line 735) | def build(self, input_shape=None): method get_output_embeddings (line 745) | def get_output_embeddings(self) -> keras.layers.Layer: method set_output_embeddings (line 748) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 752) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 755) | def set_bias(self, value: tf.Variable): method call (line 759) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBertMLMHead (line 770) | class TFBertMLMHead(keras.layers.Layer): method __init__ (line 771) | def __init__(self, config: BertConfig, input_embeddings: keras.layers.... method call (line 776) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: method build (line 781) | def build(self, input_shape=None): class TFBertNSPHead (line 790) | class TFBertNSPHead(keras.layers.Layer): method __init__ (line 791) | def __init__(self, config: BertConfig, **kwargs): method call (line 801) | def call(self, pooled_output: tf.Tensor) -> tf.Tensor: method build (line 806) | def build(self, input_shape=None): class TFBertMainLayer (line 816) | class TFBertMainLayer(keras.layers.Layer): method __init__ (line 819) | def __init__(self, config: BertConfig, add_pooling_layer: bool = True,... method get_input_embeddings (line 829) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 832) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 836) | def _prune_heads(self, heads_to_prune): method call (line 844) | def call( method build (line 1001) | def build(self, input_shape=None): class TFBertPreTrainedModel (line 1016) | class TFBertPreTrainedModel(TFPreTrainedModel): class TFBertForPreTrainingOutput (line 1027) | class TFBertForPreTrainingOutput(ModelOutput): class TFBertModel (line 1159) | class TFBertModel(TFBertPreTrainedModel): method __init__ (line 1160) | def __init__(self, config: BertConfig, add_pooling_layer: bool = True,... method call (line 1172) | def call( method build (line 1227) | def build(self, input_shape=None): class TFBertForPreTraining (line 1243) | class TFBertForPreTraining(TFBertPreTrainedModel, TFBertPreTrainingLoss): method __init__ (line 1251) | def __init__(self, config: BertConfig, *inputs, **kwargs): method get_lm_head (line 1258) | def get_lm_head(self) -> keras.layers.Layer: method get_prefix_bias_name (line 1261) | def get_prefix_bias_name(self) -> str: method call (line 1268) | def call( method build (line 1347) | def build(self, input_shape=None): class TFBertForMaskedLM (line 1363) | class TFBertForMaskedLM(TFBertPreTrainedModel, TFMaskedLanguageModelingL... method __init__ (line 1372) | def __init__(self, config: BertConfig, *inputs, **kwargs): method get_lm_head (line 1384) | def get_lm_head(self) -> keras.layers.Layer: method get_prefix_bias_name (line 1387) | def get_prefix_bias_name(self) -> str: method call (line 1400) | def call( method build (line 1447) | def build(self, input_shape=None): class TFBertLMHeadModel (line 1459) | class TFBertLMHeadModel(TFBertPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 1468) | def __init__(self, config: BertConfig, *inputs, **kwargs): method get_lm_head (line 1477) | def get_lm_head(self) -> keras.layers.Layer: method get_prefix_bias_name (line 1480) | def get_prefix_bias_name(self) -> str: method prepare_inputs_for_generation (line 1484) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1502) | def call( method build (line 1583) | def build(self, input_shape=None): class TFBertForNextSentencePrediction (line 1599) | class TFBertForNextSentencePrediction(TFBertPreTrainedModel, TFNextSente... method __init__ (line 1603) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1612) | def call( method build (line 1676) | def build(self, input_shape=None): class TFBertForSequenceClassification (line 1695) | class TFBertForSequenceClassification(TFBertPreTrainedModel, TFSequenceC... method __init__ (line 1700) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1726) | def call( method build (line 1774) | def build(self, input_shape=None): class TFBertForMultipleChoice (line 1793) | class TFBertForMultipleChoice(TFBertPreTrainedModel, TFMultipleChoiceLoss): method __init__ (line 1798) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1815) | def call( method build (line 1885) | def build(self, input_shape=None): class TFBertForTokenClassification (line 1904) | class TFBertForTokenClassification(TFBertPreTrainedModel, TFTokenClassif... method __init__ (line 1915) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1941) | def call( method build (line 1987) | def build(self, input_shape=None): class TFBertForQuestionAnswering (line 2006) | class TFBertForQuestionAnswering(TFBertPreTrainedModel, TFQuestionAnswer... method __init__ (line 2016) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 2040) | def call( method build (line 2101) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert/tokenization_bert.py function load_vocab (line 31) | def load_vocab(vocab_file): function whitespace_tokenize (line 42) | def whitespace_tokenize(text): class BertTokenizer (line 51) | class BertTokenizer(PreTrainedTokenizer): method __init__ (line 95) | def __init__( method do_lower_case (line 143) | def do_lower_case(self): method vocab_size (line 147) | def vocab_size(self): method get_vocab (line 150) | def get_vocab(self): method _tokenize (line 153) | def _tokenize(self, text, split_special_tokens=False): method _convert_token_to_id (line 168) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 172) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 176) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 181) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 206) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 234) | def create_token_type_ids_from_sequences( method save_vocabulary (line 263) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 284) | class BasicTokenizer: method __init__ (line 307) | def __init__( method tokenize (line 323) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 361) | def _run_strip_accents(self, text): method _run_split_on_punc (line 372) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 394) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 407) | def _is_chinese_char(self, cp): method _clean_text (line 431) | def _clean_text(self, text): class WordpieceTokenizer (line 445) | class WordpieceTokenizer: method __init__ (line 448) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 453) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert/tokenization_bert_fast.py class BertTokenizerFast (line 32) | class BertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 75) | def __init__( method build_inputs_with_special_tokens (line 117) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 141) | def create_token_type_ids_from_sequences( method save_vocabulary (line 170) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert/tokenization_bert_tf.py class TFBertTokenizer (line 12) | class TFBertTokenizer(keras.layers.Layer): method __init__ (line 57) | def __init__( method from_tokenizer (line 106) | def from_tokenizer(cls, tokenizer: "PreTrainedTokenizerBase", **kwargs... method from_pretrained (line 145) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method unpaired_tokenize (line 169) | def unpaired_tokenize(self, texts): method call (line 175) | def call( method get_config (line 247) | def get_config(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert_generation/configuration_bert_generation.py class BertGenerationConfig (line 20) | class BertGenerationConfig(PretrainedConfig): method __init__ (line 90) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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 201) | class BertGenerationAttention(nn.Module): method __init__ (line 202) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 210) | def prune_heads(self, heads): method forward (line 228) | def forward( class BertGenerationIntermediate (line 253) | class BertGenerationIntermediate(nn.Module): method __init__ (line 254) | def __init__(self, config): method forward (line 262) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertGenerationOutput (line 269) | class BertGenerationOutput(nn.Module): method __init__ (line 270) | def __init__(self, config): method forward (line 276) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertGenerationLayer (line 284) | class BertGenerationLayer(nn.Module): method __init__ (line 285) | def __init__(self, config): method forward (line 299) | def forward( method feed_forward_chunk (line 364) | def feed_forward_chunk(self, attention_output): class BertEncoder (line 371) | class BertEncoder(nn.Module): method __init__ (line 372) | def __init__(self, config): method forward (line 378) | def forward( function load_tf_weights_in_bert_generation (line 464) | def load_tf_weights_in_bert_generation( class BertGenerationEmbeddings (line 548) | class BertGenerationEmbeddings(nn.Module): method __init__ (line 551) | def __init__(self, config): method forward (line 565) | def forward(self, input_ids=None, position_ids=None, inputs_embeds=Non... class BertGenerationPreTrainedModel (line 586) | class BertGenerationPreTrainedModel(PreTrainedModel): method _init_weights (line 596) | def _init_weights(self, module): class BertGenerationEncoder (line 675) | class BertGenerationEncoder(BertGenerationPreTrainedModel): method __init__ (line 692) | def __init__(self, config): 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 722) | 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 866) | class BertGenerationDecoder(BertGenerationPreTrainedModel): method __init__ (line 869) | def __init__(self, config): method get_output_embeddings (line 881) | def get_output_embeddings(self): method set_output_embeddings (line 884) | def set_output_embeddings(self, new_embeddings): method forward (line 890) | def forward( method prepare_inputs_for_generation (line 993) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1014) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert_generation/tokenization_bert_generation.py class BertGenerationTokenizer (line 32) | class BertGenerationTokenizer(PreTrainedTokenizer): method __init__ (line 77) | def __init__( method vocab_size (line 107) | def vocab_size(self): method get_vocab (line 110) | def get_vocab(self): method __getstate__ (line 115) | def __getstate__(self): method __setstate__ (line 120) | def __setstate__(self, d): method _tokenize (line 130) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 134) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 138) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 143) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 157) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bert_japanese/tokenization_bert_japanese.py function load_vocab (line 40) | def load_vocab(vocab_file): function whitespace_tokenize (line 52) | def whitespace_tokenize(text): class BertJapaneseTokenizer (line 61) | class BertJapaneseTokenizer(PreTrainedTokenizer): method __init__ (line 94) | def __init__( method do_lower_case (line 188) | def do_lower_case(self): method __getstate__ (line 191) | def __getstate__(self): method __setstate__ (line 197) | def __setstate__(self, state): method _tokenize (line 212) | def _tokenize(self, text): method vocab_size (line 226) | def vocab_size(self): method get_vocab (line 231) | def get_vocab(self): method _convert_token_to_id (line 238) | 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 250) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 258) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 284) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 313) | def create_token_type_ids_from_sequences( method save_vocabulary (line 342) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class MecabTokenizer (line 375) | class MecabTokenizer: method __init__ (line 378) | def __init__( method tokenize (line 464) | def tokenize(self, text, never_split=None, **kwargs): class SudachiTokenizer (line 483) | class SudachiTokenizer: method __init__ (line 486) | def __init__( method tokenize (line 555) | def tokenize(self, text, never_split=None, **kwargs): class JumanppTokenizer (line 580) | class JumanppTokenizer: method __init__ (line 583) | def __init__( method tokenize (line 620) | def tokenize(self, text, never_split=None, **kwargs): class CharacterTokenizer (line 647) | class CharacterTokenizer: method __init__ (line 650) | def __init__(self, vocab, unk_token, normalize_text=True): method tokenize (line 666) | def tokenize(self, text): class BasicTokenizer (line 694) | class BasicTokenizer: method __init__ (line 717) | def __init__( method tokenize (line 733) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 771) | def _run_strip_accents(self, text): method _run_split_on_punc (line 782) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 804) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 817) | def _is_chinese_char(self, cp): method _clean_text (line 841) | def _clean_text(self, text): class WordpieceTokenizer (line 856) | class WordpieceTokenizer: method __init__ (line 859) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 864) | def tokenize(self, text): class SentencepieceTokenizer (line 913) | class SentencepieceTokenizer: method __init__ (line 918) | def __init__( method preprocess_text (line 937) | def preprocess_text(self, inputs): method tokenize (line 952) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bertweet/tokenization_bertweet.py function get_pairs (line 38) | def get_pairs(word): class BertweetTokenizer (line 54) | class BertweetTokenizer(PreTrainedTokenizer): method __init__ (line 107) | def __init__( method build_inputs_with_special_tokens (line 167) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 193) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 221) | def create_token_type_ids_from_sequences( method vocab_size (line 246) | def vocab_size(self): method get_vocab (line 249) | def get_vocab(self): method bpe (line 252) | def bpe(self, token): method _tokenize (line 296) | def _tokenize(self, text): method normalizeTweet (line 307) | def normalizeTweet(self, tweet): method normalizeToken (line 341) | def normalizeToken(self, token): method _convert_token_to_id (line 360) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 364) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 368) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 373) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method add_from_file (line 402) | def add_from_file(self, f): function _str_to_unicode (line 604) | def _str_to_unicode(text, encoding=None, errors="strict"): function _replace_html_entities (line 612) | def _replace_html_entities(text, keep=(), remove_illegal=True, encoding=... class TweetTokenizer (line 677) | class TweetTokenizer: method __init__ (line 697) | def __init__(self, preserve_case=True, reduce_len=False, strip_handles... method tokenize (line 702) | def tokenize(self, text): function reduce_lengthening (line 733) | def reduce_lengthening(text): function remove_handles (line 741) | def remove_handles(text): function casual_tokenize (line 757) | def casual_tokenize(text, preserve_case=True, reduce_len=False, strip_ha... FILE: mplsandbox_for_rl/transformers/src/transformers/models/big_bird/configuration_big_bird.py class BigBirdConfig (line 28) | class BigBirdConfig(PretrainedConfig): method __init__ (line 104) | def __init__( class BigBirdOnnxConfig (line 161) | class BigBirdOnnxConfig(OnnxConfig): method inputs (line 163) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/big_bird/convert_bigbird_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 26) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, big_bird_config... FILE: mplsandbox_for_rl/transformers/src/transformers/models/big_bird/modeling_big_bird.py function load_tf_weights_in_big_bird (line 76) | def load_tf_weights_in_big_bird(model, tf_checkpoint_path, is_trivia_qa=... class BigBirdEmbeddings (line 237) | class BigBirdEmbeddings(nn.Module): method __init__ (line 241) | def __init__(self, config): method forward (line 264) | def forward( class BigBirdSelfAttention (line 306) | class BigBirdSelfAttention(nn.Module): method __init__ (line 307) | def __init__(self, config): method transpose_for_scores (line 326) | def transpose_for_scores(self, x): method forward (line 331) | def forward( class BigBirdBlockSparseAttention (line 410) | class BigBirdBlockSparseAttention(nn.Module): method __init__ (line 411) | def __init__(self, config, seed=None): method transpose_for_scores (line 434) | def transpose_for_scores(self, x): method forward (line 439) | def forward( method torch_bmm_nd (line 494) | def torch_bmm_nd(inp_1, inp_2, ndim=None): method torch_bmm_nd_transpose (line 502) | def torch_bmm_nd_transpose(inp_1, inp_2, ndim=None): method bigbird_block_sparse_attention (line 509) | def bigbird_block_sparse_attention( method torch_gather_b2 (line 952) | def torch_gather_b2(params, indices): method _create_rand_mask_from_inputs (line 975) | def _create_rand_mask_from_inputs( method _get_rand_attn_plan (line 1012) | def _get_rand_attn_plan(from_seq_length, from_block_size, num_rand_blo... method _bigbird_block_rand_mask (line 1044) | def _bigbird_block_rand_mask( method _bigbird_block_rand_mask_with_head (line 1102) | def _bigbird_block_rand_mask_with_head( method _get_single_block_row_attention (line 1242) | def _get_single_block_row_attention( class BigBirdSelfOutput (line 1299) | class BigBirdSelfOutput(nn.Module): method __init__ (line 1300) | def __init__(self, config): method forward (line 1306) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BigBirdAttention (line 1313) | class BigBirdAttention(nn.Module): method __init__ (line 1314) | def __init__(self, config, seed=None): method set_attention_type (line 1331) | def set_attention_type(self, value: str): method forward (line 1356) | def forward( class BigBirdIntermediate (line 1402) | class BigBirdIntermediate(nn.Module): method __init__ (line 1403) | def __init__(self, config): method forward (line 1411) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BigBirdOutput (line 1418) | class BigBirdOutput(nn.Module): method __init__ (line 1419) | def __init__(self, config): method forward (line 1425) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BigBirdLayer (line 1432) | class BigBirdLayer(nn.Module): method __init__ (line 1433) | def __init__(self, config, seed=None): method set_attention_type (line 1449) | def set_attention_type(self, value: str): method forward (line 1463) | def forward( method feed_forward_chunk (line 1540) | def feed_forward_chunk(self, attention_output): class BigBirdEncoder (line 1546) | class BigBirdEncoder(nn.Module): method __init__ (line 1547) | def __init__(self, config): method set_attention_type (line 1557) | def set_attention_type(self, value: str): method forward (line 1569) | def forward( class BigBirdPredictionHeadTransform (line 1669) | class BigBirdPredictionHeadTransform(nn.Module): method __init__ (line 1670) | def __init__(self, config): method forward (line 1679) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BigBirdLMPredictionHead (line 1687) | class BigBirdLMPredictionHead(nn.Module): method __init__ (line 1688) | def __init__(self, config): method _tie_weights (line 1701) | def _tie_weights(self): method forward (line 1704) | def forward(self, hidden_states): class BigBirdOnlyMLMHead (line 1711) | class BigBirdOnlyMLMHead(nn.Module): method __init__ (line 1712) | def __init__(self, config): method forward (line 1716) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class BigBirdOnlyNSPHead (line 1722) | class BigBirdOnlyNSPHead(nn.Module): method __init__ (line 1723) | def __init__(self, config): method forward (line 1727) | def forward(self, pooled_output): class BigBirdPreTrainingHeads (line 1733) | class BigBirdPreTrainingHeads(nn.Module): method __init__ (line 1734) | def __init__(self, config): method forward (line 1739) | def forward(self, sequence_output, pooled_output): class BigBirdPreTrainedModel (line 1745) | class BigBirdPreTrainedModel(PreTrainedModel): method _init_weights (line 1756) | def _init_weights(self, module): class BigBirdForPreTrainingOutput (line 1835) | class BigBirdForPreTrainingOutput(ModelOutput): class BigBirdForQuestionAnsweringModelOutput (line 1869) | class BigBirdForQuestionAnsweringModelOutput(ModelOutput): class BigBirdModel (line 1907) | class BigBirdModel(BigBirdPreTrainedModel): method __init__ (line 1920) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1947) | def get_input_embeddings(self): method set_input_embeddings (line 1950) | def set_input_embeddings(self, value): method set_attention_type (line 1953) | def set_attention_type(self, value: str): method forward (line 1970) | def forward( method create_masks_for_block_sparse_attn (line 2165) | def create_masks_for_block_sparse_attn(attention_mask: torch.Tensor, b... method _pad_to_block_size (line 2202) | def _pad_to_block_size( class BigBirdForPreTraining (line 2246) | class BigBirdForPreTraining(BigBirdPreTrainedModel): method __init__ (line 2249) | def __init__(self, config): method get_output_embeddings (line 2258) | def get_output_embeddings(self): method set_output_embeddings (line 2261) | def set_output_embeddings(self, new_embeddings): method forward (line 2267) | def forward( class BigBirdForMaskedLM (line 2353) | class BigBirdForMaskedLM(BigBirdPreTrainedModel): method __init__ (line 2356) | def __init__(self, config): method get_output_embeddings (line 2371) | def get_output_embeddings(self): method set_output_embeddings (line 2374) | def set_output_embeddings(self, new_embeddings): method forward (line 2380) | def forward( method prepare_inputs_for_generation (line 2479) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class BigBirdForCausalLM (line 2498) | class BigBirdForCausalLM(BigBirdPreTrainedModel): method __init__ (line 2501) | def __init__(self, config): method get_output_embeddings (line 2513) | def get_output_embeddings(self): method set_output_embeddings (line 2516) | def set_output_embeddings(self, new_embeddings): method forward (line 2526) | def forward( method prepare_inputs_for_generation (line 2608) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 2630) | def _reorder_cache(self, past_key_values, beam_idx): class BigBirdClassificationHead (line 2640) | class BigBirdClassificationHead(nn.Module): method __init__ (line 2643) | def __init__(self, config): method forward (line 2654) | def forward(self, features, **kwargs): class BigBirdForSequenceClassification (line 2671) | class BigBirdForSequenceClassification(BigBirdPreTrainedModel): method __init__ (line 2672) | def __init__(self, config): method forward (line 2684) | def forward( class BigBirdForMultipleChoice (line 2799) | class BigBirdForMultipleChoice(BigBirdPreTrainedModel): method __init__ (line 2800) | def __init__(self, config): method forward (line 2818) | def forward( class BigBirdForTokenClassification (line 2892) | class BigBirdForTokenClassification(BigBirdPreTrainedModel): method __init__ (line 2893) | def __init__(self, config): method forward (line 2913) | def forward( class BigBirdForQuestionAnsweringHead (line 2966) | class BigBirdForQuestionAnsweringHead(nn.Module): method __init__ (line 2969) | def __init__(self, config): method forward (line 2976) | def forward(self, encoder_output): class BigBirdForQuestionAnswering (line 2991) | class BigBirdForQuestionAnswering(BigBirdPreTrainedModel): method __init__ (line 2992) | def __init__(self, config, add_pooling_layer=False): method forward (line 3007) | def forward( method prepare_question_mask (line 3144) | def prepare_question_mask(q_lengths: torch.Tensor, maxlen: int): FILE: mplsandbox_for_rl/transformers/src/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 194) | class FlaxBigBirdEmbeddings(nn.Module): method setup (line 201) | def setup(self): method __call__ (line 223) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxBigBirdSelfAttention (line 242) | class FlaxBigBirdSelfAttention(nn.Module): method setup (line 247) | def setup(self): method _split_heads (line 276) | def _split_heads(self, hidden_states): method _merge_heads (line 279) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 284) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 315) | def __call__( class FlaxBigBirdBlockSparseAttention (line 413) | class FlaxBigBirdBlockSparseAttention(nn.Module): method setup (line 418) | def setup(self): method transpose_for_scores (line 439) | def transpose_for_scores(x, n_heads, head_size): method __call__ (line 444) | def __call__( method create_masks_for_block_sparse_attn (line 488) | def create_masks_for_block_sparse_attn(attention_mask, block_size: int): method bigbird_block_sparse_attention (line 525) | def bigbird_block_sparse_attention( method jax_gather (line 870) | def jax_gather(params, indices, batch_dims=2): method _create_rand_mask_from_inputs (line 887) | def _create_rand_mask_from_inputs( method _get_rand_attn_plan (line 925) | def _get_rand_attn_plan(from_seq_length, from_block_size, num_rand_blo... method _bigbird_block_rand_mask (line 958) | def _bigbird_block_rand_mask( method _bigbird_block_rand_mask_with_head (line 1031) | def _bigbird_block_rand_mask_with_head( method _get_single_block_row_attention (line 1184) | def _get_single_block_row_attention( class FlaxBigBirdSelfOutput (line 1243) | class FlaxBigBirdSelfOutput(nn.Module): method setup (line 1247) | def setup(self): method __call__ (line 1256) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxBigBirdAttention (line 1263) | class FlaxBigBirdAttention(nn.Module): method setup (line 1269) | def setup(self): method __call__ (line 1282) | def __call__( class FlaxBigBirdIntermediate (line 1324) | class FlaxBigBirdIntermediate(nn.Module): method setup (line 1328) | def setup(self): method __call__ (line 1336) | def __call__(self, hidden_states): class FlaxBigBirdOutput (line 1343) | class FlaxBigBirdOutput(nn.Module): method setup (line 1347) | def setup(self): method __call__ (line 1356) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxBigBirdLayer (line 1363) | class FlaxBigBirdLayer(nn.Module): method setup (line 1368) | def setup(self): method __call__ (line 1378) | def __call__( class FlaxBigBirdLayerCollection (line 1424) | class FlaxBigBirdLayerCollection(nn.Module): method setup (line 1429) | def setup(self): method __call__ (line 1443) | def __call__( class FlaxBigBirdEncoder (line 1508) | class FlaxBigBirdEncoder(nn.Module): method setup (line 1513) | def setup(self): method __call__ (line 1520) | def __call__( class FlaxBigBirdPredictionHeadTransform (line 1548) | class FlaxBigBirdPredictionHeadTransform(nn.Module): method setup (line 1552) | def setup(self): method __call__ (line 1557) | def __call__(self, hidden_states): class FlaxBigBirdLMPredictionHead (line 1564) | class FlaxBigBirdLMPredictionHead(nn.Module): method setup (line 1569) | def setup(self): method __call__ (line 1574) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBigBirdOnlyMLMHead (line 1588) | class FlaxBigBirdOnlyMLMHead(nn.Module): method setup (line 1592) | def setup(self): method __call__ (line 1595) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBigBirdPreTrainingHeads (line 1600) | class FlaxBigBirdPreTrainingHeads(nn.Module): method setup (line 1604) | def setup(self): method __call__ (line 1608) | def __call__(self, hidden_states, pooled_output, shared_embedding=None): class FlaxBigBirdPreTrainedModel (line 1614) | class FlaxBigBirdPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 1624) | def __init__( method enable_gradient_checkpointing (line 1643) | def enable_gradient_checkpointing(self): method init_weights (line 1650) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 1699) | def init_cache(self, batch_size, max_length): method __call__ (line 1719) | def __call__( class FlaxBigBirdModule (line 1820) | class FlaxBigBirdModule(nn.Module): method setup (line 1826) | def setup(self): method __call__ (line 1837) | def __call__( class FlaxBigBirdModel (line 1891) | class FlaxBigBirdModel(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForPreTrainingModule (line 1899) | class FlaxBigBirdForPreTrainingModule(nn.Module): method setup (line 1904) | def setup(self): method __call__ (line 1912) | def __call__( class FlaxBigBirdForPreTraining (line 1968) | class FlaxBigBirdForPreTraining(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForMaskedLMModule (line 2001) | class FlaxBigBirdForMaskedLMModule(nn.Module): method setup (line 2006) | def setup(self): method __call__ (line 2015) | def __call__( class FlaxBigBirdForMaskedLM (line 2061) | class FlaxBigBirdForMaskedLM(FlaxBigBirdPreTrainedModel): class FlaxBigBirdClassificationHead (line 2068) | class FlaxBigBirdClassificationHead(nn.Module): method setup (line 2074) | def setup(self): method __call__ (line 2084) | def __call__(self, features, deterministic=True): class FlaxBigBirdForSequenceClassificationModule (line 2094) | class FlaxBigBirdForSequenceClassificationModule(nn.Module): method setup (line 2099) | def setup(self): method __call__ (line 2105) | def __call__( class FlaxBigBirdForSequenceClassification (line 2151) | class FlaxBigBirdForSequenceClassification(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForMultipleChoiceModule (line 2164) | class FlaxBigBirdForMultipleChoiceModule(nn.Module): method setup (line 2169) | def setup(self): method __call__ (line 2178) | def __call__( class FlaxBigBirdForMultipleChoice (line 2232) | class FlaxBigBirdForMultipleChoice(FlaxBigBirdPreTrainedModel): method __init__ (line 2235) | def __init__( class FlaxBigBirdForTokenClassificationModule (line 2263) | class FlaxBigBirdForTokenClassificationModule(nn.Module): method setup (line 2268) | def setup(self): method __call__ (line 2283) | def __call__( class FlaxBigBirdForTokenClassification (line 2330) | class FlaxBigBirdForTokenClassification(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForQuestionAnsweringHead (line 2342) | class FlaxBigBirdForQuestionAnsweringHead(nn.Module): method setup (line 2346) | def setup(self): method __call__ (line 2352) | def __call__(self, encoder_output, deterministic=True): class FlaxBigBirdForQuestionAnsweringModule (line 2360) | class FlaxBigBirdForQuestionAnsweringModule(nn.Module): method setup (line 2366) | def setup(self): method __call__ (line 2376) | def __call__( class FlaxBigBirdForQuestionAnswering (line 2433) | class FlaxBigBirdForQuestionAnswering(FlaxBigBirdPreTrainedModel): method __call__ (line 2437) | def __call__( method prepare_question_mask (line 2512) | def prepare_question_mask(q_lengths, maxlen: int): class FlaxBigBirdForCausalLMModule (line 2527) | class FlaxBigBirdForCausalLMModule(nn.Module): method setup (line 2532) | def setup(self): method __call__ (line 2541) | def __call__( class FlaxBigBirdForCausalLM (line 2600) | class FlaxBigBirdForCausalLM(FlaxBigBirdPreTrainedModel): method prepare_inputs_for_generation (line 2603) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 2624) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/big_bird/tokenization_big_bird.py class BigBirdTokenizer (line 33) | class BigBirdTokenizer(PreTrainedTokenizer): method __init__ (line 84) | def __init__( method vocab_size (line 127) | def vocab_size(self): method get_vocab (line 130) | def get_vocab(self): method __getstate__ (line 135) | def __getstate__(self): method __setstate__ (line 140) | def __setstate__(self, d): method _tokenize (line 150) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 154) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 158) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 164) | def convert_tokens_to_string(self, tokens): method _decode (line 183) | def _decode( method save_vocabulary (line 231) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 248) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 273) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 300) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/big_bird/tokenization_big_bird_fast.py class BigBirdTokenizerFast (line 38) | class BigBirdTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 84) | def __init__( method can_save_slow_tokenizer (line 123) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 126) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 151) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 182) | def create_token_type_ids_from_sequences( method save_vocabulary (line 212) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bigbird_pegasus/configuration_bigbird_pegasus.py class BigBirdPegasusConfig (line 30) | class BigBirdPegasusConfig(PretrainedConfig): method __init__ (line 119) | def __init__( class BigBirdPegasusOnnxConfig (line 189) | class BigBirdPegasusOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 191) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 235) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 247) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 315) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 353) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 379) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 403) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/bigbird_pegasus/modeling_bigbird_pegasus.py function shift_tokens_right (line 56) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class BigBirdPegasusLearnedPositionalEmbedding (line 72) | class BigBirdPegasusLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 77) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 80) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class BigBirdPegasusScaledWordEmbedding (line 90) | class BigBirdPegasusScaledWordEmbedding(nn.Embedding): method __init__ (line 95) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 99) | def forward(self, input_ids: torch.Tensor): class BigBirdPegasusSelfAttention (line 104) | class BigBirdPegasusSelfAttention(nn.Module): method __init__ (line 105) | def __init__(self, config): method transpose_for_scores (line 124) | def transpose_for_scores(self, x): method forward (line 129) | def forward( class BigBirdPegasusBlockSparseAttention (line 209) | class BigBirdPegasusBlockSparseAttention(nn.Module): method __init__ (line 210) | def __init__(self, config, seed=None): method transpose_for_scores (line 233) | def transpose_for_scores(self, x): method forward (line 238) | def forward( method torch_bmm_nd (line 293) | def torch_bmm_nd(inp_1, inp_2, ndim=None): method torch_bmm_nd_transpose (line 301) | def torch_bmm_nd_transpose(inp_1, inp_2, ndim=None): method bigbird_block_sparse_attention (line 308) | def bigbird_block_sparse_attention( method torch_gather_b2 (line 751) | def torch_gather_b2(params, indices): method _create_rand_mask_from_inputs (line 774) | def _create_rand_mask_from_inputs( method _get_rand_attn_plan (line 811) | def _get_rand_attn_plan(from_seq_length, from_block_size, num_rand_blo... method _bigbird_block_rand_mask (line 843) | def _bigbird_block_rand_mask( method _bigbird_block_rand_mask_with_head (line 901) | def _bigbird_block_rand_mask_with_head( method _get_single_block_row_attention (line 1041) | def _get_single_block_row_attention( class BigBirdPegasusEncoderAttention (line 1097) | class BigBirdPegasusEncoderAttention(nn.Module): method __init__ (line 1098) | def __init__(self, config, seed=None): method set_attention_type (line 1116) | def set_attention_type(self, value: str): method forward (line 1142) | def forward( class BigBirdPegasusDecoderAttention (line 1177) | class BigBirdPegasusDecoderAttention(nn.Module): method __init__ (line 1180) | def __init__( method _shape (line 1211) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 1214) | def forward( class BigBirdPegasusEncoderLayer (line 1335) | class BigBirdPegasusEncoderLayer(nn.Module): method __init__ (line 1336) | def __init__(self, config: BigBirdPegasusConfig, seed=None): method forward (line 1349) | def forward( method set_attention_type (line 1410) | def set_attention_type(self, value: str): class BigBirdPegasusDecoderLayer (line 1422) | class BigBirdPegasusDecoderLayer(nn.Module): method __init__ (line 1423) | def __init__(self, config: BigBirdPegasusConfig): method forward (line 1451) | def forward( class BigBirdPegasusClassificationHead (line 1542) | class BigBirdPegasusClassificationHead(nn.Module): method __init__ (line 1545) | def __init__( method forward (line 1557) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BigBirdPegasusPreTrainedModel (line 1566) | class BigBirdPegasusPreTrainedModel(PreTrainedModel): method _init_weights (line 1574) | def _init_weights(self, module): method dummy_inputs (line 1586) | def dummy_inputs(self): class BigBirdPegasusEncoder (line 1739) | class BigBirdPegasusEncoder(BigBirdPegasusPreTrainedModel): method __init__ (line 1749) | def __init__(self, config: BigBirdPegasusConfig, embed_tokens: Optiona... method forward (line 1781) | def forward( method set_attention_type (line 1966) | def set_attention_type(self, value: str): method create_masks_for_block_sparse_attn (line 1979) | def create_masks_for_block_sparse_attn(attention_mask: torch.Tensor, b... method _pad_to_block_size (line 2016) | def _pad_to_block_size(self, hidden_states: torch.Tensor, attention_ma... class BigBirdPegasusDecoder (line 2041) | class BigBirdPegasusDecoder(BigBirdPegasusPreTrainedModel): method __init__ (line 2050) | def __init__(self, config: BigBirdPegasusConfig, embed_tokens: Optiona... method get_input_embeddings (line 2076) | def get_input_embeddings(self): method set_input_embeddings (line 2079) | def set_input_embeddings(self, value): method forward (line 2082) | def forward( class BigBirdPegasusModel (line 2301) | class BigBirdPegasusModel(BigBirdPegasusPreTrainedModel): method __init__ (line 2304) | def __init__(self, config: BigBirdPegasusConfig): method get_input_embeddings (line 2319) | def get_input_embeddings(self): method set_input_embeddings (line 2322) | def set_input_embeddings(self, value): method _tie_weights (line 2327) | def _tie_weights(self): method get_encoder (line 2332) | def get_encoder(self): method get_decoder (line 2335) | def get_decoder(self): method forward (line 2346) | def forward( class BigBirdPegasusForConditionalGeneration (line 2439) | class BigBirdPegasusForConditionalGeneration(BigBirdPegasusPreTrainedMod... method __init__ (line 2444) | def __init__(self, config: BigBirdPegasusConfig): method get_encoder (line 2453) | def get_encoder(self): method get_decoder (line 2456) | def get_decoder(self): method resize_token_embeddings (line 2459) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 2464) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 2473) | def get_output_embeddings(self): method set_output_embeddings (line 2476) | def set_output_embeddings(self, new_embeddings): method forward (line 2482) | def forward( method prepare_inputs_for_generation (line 2563) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2602) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2606) | def _reorder_cache(past_key_values, beam_idx): class BigBirdPegasusForSequenceClassification (line 2624) | class BigBirdPegasusForSequenceClassification(BigBirdPegasusPreTrainedMo... method __init__ (line 2627) | def __init__(self, config: BigBirdPegasusConfig, **kwargs): method forward (line 2647) | def forward( class BigBirdPegasusForQuestionAnswering (line 2753) | class BigBirdPegasusForQuestionAnswering(BigBirdPegasusPreTrainedModel): method __init__ (line 2756) | def __init__(self, config): method forward (line 2775) | def forward( class BigBirdPegasusDecoderWrapper (line 2871) | class BigBirdPegasusDecoderWrapper(BigBirdPegasusPreTrainedModel): method __init__ (line 2877) | def __init__(self, config): method forward (line 2881) | def forward(self, *args, **kwargs): class BigBirdPegasusForCausalLM (line 2885) | class BigBirdPegasusForCausalLM(BigBirdPegasusPreTrainedModel): method __init__ (line 2888) | def __init__(self, config): method get_input_embeddings (line 2900) | def get_input_embeddings(self): method set_input_embeddings (line 2903) | def set_input_embeddings(self, value): method get_output_embeddings (line 2906) | def get_output_embeddings(self): method set_output_embeddings (line 2909) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 2912) | def set_decoder(self, decoder): method get_decoder (line 2915) | def get_decoder(self): method forward (line 2919) | def forward( method prepare_inputs_for_generation (line 3061) | def prepare_inputs_for_generation( method _reorder_cache (line 3079) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/biogpt/configuration_biogpt.py class BioGptConfig (line 24) | class BioGptConfig(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/biogpt/modeling_biogpt.py class BioGptLearnedPositionalEmbedding (line 50) | class BioGptLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 55) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 61) | def forward(self, attention_mask: torch.LongTensor, past_key_values_le... class BioGptScaledWordEmbedding (line 75) | class BioGptScaledWordEmbedding(nn.Embedding): method __init__ (line 80) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 84) | def forward(self, input_ids: torch.Tensor): class BioGptAttention (line 89) | class BioGptAttention(nn.Module): method __init__ (line 92) | def __init__( method _shape (line 123) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 126) | def forward( class BioGptDecoderLayer (line 247) | class BioGptDecoderLayer(nn.Module): method __init__ (line 248) | def __init__(self, config: BioGptConfig): method forward (line 268) | def forward( class BioGptPreTrainedModel (line 331) | class BioGptPreTrainedModel(PreTrainedModel): method _init_weights (line 341) | def _init_weights(self, module): class BioGptModel (line 428) | class BioGptModel(BioGptPreTrainedModel): method __init__ (line 429) | def __init__(self, config: BioGptConfig): method get_input_embeddings (line 450) | def get_input_embeddings(self): method set_input_embeddings (line 453) | def set_input_embeddings(self, value): method forward (line 462) | def forward( class BioGptForCausalLM (line 599) | class BioGptForCausalLM(BioGptPreTrainedModel): method __init__ (line 602) | def __init__(self, config): method get_output_embeddings (line 611) | def get_output_embeddings(self): method set_output_embeddings (line 614) | def set_output_embeddings(self, new_embeddings): method forward (line 623) | def forward( method prepare_inputs_for_generation (line 680) | def prepare_inputs_for_generation( method _reorder_cache (line 712) | def _reorder_cache(past_key_values, beam_idx): class BioGptForTokenClassification (line 728) | class BioGptForTokenClassification(BioGptPreTrainedModel): method __init__ (line 729) | def __init__(self, config): method forward (line 749) | def forward( class BioGptForSequenceClassification (line 828) | class BioGptForSequenceClassification(BioGptPreTrainedModel): method __init__ (line 829) | def __init__(self, config: BioGptConfig): method forward (line 844) | def forward( method get_input_embeddings (line 932) | def get_input_embeddings(self): method set_input_embeddings (line 935) | def set_input_embeddings(self, value): FILE: mplsandbox_for_rl/transformers/src/transformers/models/biogpt/tokenization_biogpt.py function get_pairs (line 33) | def get_pairs(word): class BioGptTokenizer (line 46) | class BioGptTokenizer(PreTrainedTokenizer): method __init__ (line 92) | def __init__( method vocab_size (line 137) | def vocab_size(self): method get_vocab (line 141) | def get_vocab(self): method moses_tokenize (line 144) | def moses_tokenize(self, text, lang): method moses_detokenize (line 152) | def moses_detokenize(self, tokens, lang): method bpe (line 158) | def bpe(self, token): method _tokenize (line 202) | def _tokenize(self, text, bypass_tokenizer=False): method _convert_token_to_id (line 216) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 220) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 224) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 233) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 257) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 284) | def create_token_type_ids_from_sequences( method save_vocabulary (line 314) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 342) | def __getstate__(self): method __setstate__ (line 347) | def __setstate__(self, d): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bit/configuration_bit.py class BitConfig (line 25) | class BitConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 91) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bit/convert_bit_to_pytorch.py function get_config (line 38) | def get_config(model_name): function rename_key (line 60) | def rename_key(name): function prepare_img (line 76) | def prepare_img(): function convert_bit_checkpoint (line 83) | def convert_bit_checkpoint(model_name, pytorch_dump_folder_path, push_to... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bit/image_processing_bit.py class BitImageProcessor (line 51) | class BitImageProcessor(BaseImageProcessor): method __init__ (line 92) | def __init__( method resize (line 126) | def resize( method preprocess (line 176) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bit/modeling_bit.py function get_padding_value (line 60) | def get_padding_value(padding=None, kernel_size=7, stride=1, dilation=1)... class WeightStandardizedConv2d (line 101) | class WeightStandardizedConv2d(nn.Conv2d): method __init__ (line 108) | def __init__( method forward (line 137) | def forward(self, hidden_state): class BitGroupNormActivation (line 149) | class BitGroupNormActivation(nn.GroupNorm): method __init__ (line 154) | def __init__(self, config, num_channels, eps=1e-5, affine=True, apply_... method forward (line 161) | def forward(self, hidden_state): class DynamicPad2d (line 167) | class DynamicPad2d(nn.Module): method __init__ (line 173) | def __init__(self, kernel_size, stride, dilation, value=0): method __call__ (line 195) | def __call__(self, input): class BitMaxPool2d (line 218) | class BitMaxPool2d(nn.MaxPool2d): method __init__ (line 221) | def __init__( method forward (line 240) | def forward(self, hidden_states): class BitEmbeddings (line 247) | class BitEmbeddings(nn.Module): method __init__ (line 252) | def __init__(self, config: BitConfig): method forward (line 279) | def forward(self, pixel_values: Tensor) -> Tensor: function drop_path (line 298) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class BitDropPath (line 319) | class BitDropPath(nn.Module): method __init__ (line 322) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 326) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 329) | def extra_repr(self) -> str: function make_div (line 333) | def make_div(value, divisor=8): class BitPreActivationBottleneckLayer (line 341) | class BitPreActivationBottleneckLayer(nn.Module): method __init__ (line 349) | def __init__( method forward (line 393) | def forward(self, hidden_states): class BitBottleneckLayer (line 409) | class BitBottleneckLayer(nn.Module): method __init__ (line 412) | def __init__( method forward (line 461) | def forward(self, hidden_states): class BitDownsampleConv (line 482) | class BitDownsampleConv(nn.Module): method __init__ (line 483) | def __init__( method forward (line 501) | def forward(self, x): class BitStage (line 505) | class BitStage(nn.Module): method __init__ (line 510) | def __init__( method _get_updated_hyperparameters (line 556) | def _get_updated_hyperparameters(self, layer_idx, stride, layer_dropout): method forward (line 572) | def forward(self, input: Tensor) -> Tensor: class BitEncoder (line 579) | class BitEncoder(nn.Module): method __init__ (line 580) | def __init__(self, config: BitConfig): method _get_updated_hyperparameters (line 618) | def _get_updated_hyperparameters(self, stage_idx, current_stride, curr... method forward (line 626) | def forward( class BitPreTrainedModel (line 649) | class BitPreTrainedModel(PreTrainedModel): method _init_weights (line 660) | def _init_weights(self, module): class BitModel (line 704) | class BitModel(BitPreTrainedModel): method __init__ (line 705) | def __init__(self, config): method forward (line 730) | def forward( class BitForImageClassification (line 767) | class BitForImageClassification(BitPreTrainedModel): method __init__ (line 768) | def __init__(self, config): method forward (line 787) | def forward( class BitBackbone (line 843) | class BitBackbone(BitPreTrainedModel, BackboneMixin): method __init__ (line 844) | def __init__(self, config): method forward (line 856) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot/configuration_blenderbot.py class BlenderbotConfig (line 31) | class BlenderbotConfig(PretrainedConfig): method __init__ (line 107) | def __init__( class BlenderbotOnnxConfig (line 168) | class BlenderbotOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 170) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 212) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 224) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 281) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 318) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 345) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 370) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): method fill_with_past_key_values_ (line 378) | def fill_with_past_key_values_(self, inputs_or_outputs: Mapping[str, M... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot/modeling_blenderbot.py function shift_tokens_right (line 56) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class BlenderbotLearnedPositionalEmbedding (line 72) | class BlenderbotLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 77) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 80) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class BlenderbotScaledWordEmbedding (line 90) | class BlenderbotScaledWordEmbedding(nn.Embedding): method __init__ (line 95) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 99) | def forward(self, input_ids: torch.Tensor): class BlenderbotAttention (line 104) | class BlenderbotAttention(nn.Module): method __init__ (line 107) | def __init__( method _shape (line 138) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 141) | def forward( class BlenderbotEncoderLayer (line 266) | class BlenderbotEncoderLayer(nn.Module): method __init__ (line 267) | def __init__(self, config: BlenderbotConfig): method forward (line 285) | def forward( class BlenderbotDecoderLayer (line 337) | class BlenderbotDecoderLayer(nn.Module): method __init__ (line 338) | def __init__(self, config: BlenderbotConfig): method forward (line 367) | def forward( class BlenderbotPreTrainedModel (line 457) | class BlenderbotPreTrainedModel(PreTrainedModel): method _init_weights (line 462) | def _init_weights(self, module): method dummy_inputs (line 474) | def dummy_inputs(self): class BlenderbotEncoder (line 626) | class BlenderbotEncoder(BlenderbotPreTrainedModel): method __init__ (line 636) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[nn... method forward (line 665) | def forward( class BlenderbotDecoder (line 799) | class BlenderbotDecoder(BlenderbotPreTrainedModel): method __init__ (line 808) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[nn... 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 840) | def forward( class BlenderbotModel (line 1059) | class BlenderbotModel(BlenderbotPreTrainedModel): method __init__ (line 1062) | def __init__(self, config: BlenderbotConfig): method from_pretrained (line 1075) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method get_input_embeddings (line 1087) | def get_input_embeddings(self): method set_input_embeddings (line 1090) | def set_input_embeddings(self, value): method get_encoder (line 1095) | def get_encoder(self): method get_decoder (line 1098) | def get_decoder(self): method forward (line 1103) | def forward( class BlenderbotForConditionalGeneration (line 1199) | class BlenderbotForConditionalGeneration(BlenderbotPreTrainedModel): method __init__ (line 1204) | def __init__(self, config: BlenderbotConfig): method from_pretrained (line 1214) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method get_encoder (line 1228) | def get_encoder(self): method get_decoder (line 1231) | def get_decoder(self): method resize_token_embeddings (line 1234) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 1239) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1248) | def get_output_embeddings(self): method set_output_embeddings (line 1251) | def set_output_embeddings(self, new_embeddings): method forward (line 1257) | def forward( method prepare_inputs_for_generation (line 1335) | def prepare_inputs_for_generation( method _reorder_cache (line 1373) | def _reorder_cache(past_key_values, beam_idx): class BlenderbotDecoderWrapper (line 1385) | class BlenderbotDecoderWrapper(BlenderbotPreTrainedModel): method __init__ (line 1391) | def __init__(self, config): method forward (line 1395) | def forward(self, *args, **kwargs): class BlenderbotForCausalLM (line 1400) | class BlenderbotForCausalLM(BlenderbotPreTrainedModel): method __init__ (line 1403) | def __init__(self, config): method get_input_embeddings (line 1415) | def get_input_embeddings(self): method set_input_embeddings (line 1418) | def set_input_embeddings(self, value): method get_output_embeddings (line 1421) | def get_output_embeddings(self): method set_output_embeddings (line 1424) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1427) | def set_decoder(self, decoder): method get_decoder (line 1430) | def get_decoder(self): method forward (line 1434) | def forward( method prepare_inputs_for_generation (line 1578) | def prepare_inputs_for_generation( method _reorder_cache (line 1605) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot/modeling_flax_blenderbot.py function shift_tokens_right (line 207) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... class FlaxBlenderbotAttention (line 220) | class FlaxBlenderbotAttention(nn.Module): method setup (line 229) | def setup(self) -> None: method _split_heads (line 255) | def _split_heads(self, hidden_states): method _merge_heads (line 258) | 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 FlaxBlenderbotEncoderLayer (line 388) | class FlaxBlenderbotEncoderLayer(nn.Module): method setup (line 392) | def setup(self) -> None: method __call__ (line 415) | def __call__( class FlaxBlenderbotEncoderLayerCollection (line 445) | class FlaxBlenderbotEncoderLayerCollection(nn.Module): method setup (line 449) | def setup(self): method __call__ (line 456) | def __call__( class FlaxBlenderbotDecoderLayer (line 500) | class FlaxBlenderbotDecoderLayer(nn.Module): method setup (line 504) | def setup(self) -> None: method __call__ (line 537) | def __call__( class FlaxBlenderbotDecoderLayerCollection (line 589) | class FlaxBlenderbotDecoderLayerCollection(nn.Module): method setup (line 593) | def setup(self): method __call__ (line 600) | def __call__( class FlaxBlenderbotEncoder (line 659) | class FlaxBlenderbotEncoder(nn.Module): method setup (line 664) | def setup(self): method __call__ (line 680) | def __call__( class FlaxBlenderbotDecoder (line 728) | class FlaxBlenderbotDecoder(nn.Module): method setup (line 733) | def setup(self): method __call__ (line 750) | def __call__( class FlaxBlenderbotModule (line 808) | class FlaxBlenderbotModule(nn.Module): method setup (line 812) | def setup(self): method _get_encoder_module (line 823) | def _get_encoder_module(self): method _get_decoder_module (line 826) | def _get_decoder_module(self): method __call__ (line 829) | def __call__( class FlaxBlenderbotPreTrainedModel (line 878) | class FlaxBlenderbotPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 883) | def __init__( method init_weights (line 895) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 931) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 974) | def encode( method decode (line 1039) | def decode( method __call__ (line 1152) | def __call__( class FlaxBlenderbotModel (line 1216) | class FlaxBlenderbotModel(FlaxBlenderbotPreTrainedModel): class FlaxBlenderbotForConditionalGenerationModule (line 1226) | class FlaxBlenderbotForConditionalGenerationModule(nn.Module): method setup (line 1231) | def setup(self): method _get_encoder_module (line 1241) | def _get_encoder_module(self): method _get_decoder_module (line 1244) | def _get_decoder_module(self): method __call__ (line 1247) | def __call__( class FlaxBlenderbotForConditionalGeneration (line 1301) | class FlaxBlenderbotForConditionalGeneration(FlaxBlenderbotPreTrainedMod... method decode (line 1307) | def decode( method prepare_inputs_for_generation (line 1442) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1473) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot/modeling_tf_blenderbot.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 TFBlenderbotLearnedPositionalEmbedding (line 120) | class TFBlenderbotLearnedPositionalEmbedding(keras.layers.Embedding): method __init__ (line 125) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 128) | def call( class TFBlenderbotAttention (line 141) | class TFBlenderbotAttention(keras.layers.Layer): method __init__ (line 144) | def __init__( method _shape (line 172) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 175) | def call( method build (line 293) | def build(self, input_shape=None): class TFBlenderbotEncoderLayer (line 312) | class TFBlenderbotEncoderLayer(keras.layers.Layer): method __init__ (line 313) | def __init__(self, config: BlenderbotConfig, **kwargs): method call (line 328) | def call( method build (line 368) | def build(self, input_shape=None): class TFBlenderbotDecoderLayer (line 390) | class TFBlenderbotDecoderLayer(keras.layers.Layer): method __init__ (line 391) | def __init__(self, config: BlenderbotConfig, **kwargs): method call (line 419) | def call( method build (line 499) | def build(self, input_shape=None): class TFBlenderbotPreTrainedModel (line 526) | class TFBlenderbotPreTrainedModel(TFPreTrainedModel): class TFBlenderbotEncoder (line 680) | class TFBlenderbotEncoder(keras.layers.Layer): method __init__ (line 690) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[ke... method get_embed_tokens (line 708) | def get_embed_tokens(self): method set_embed_tokens (line 711) | def set_embed_tokens(self, embed_tokens): method call (line 715) | def call( method build (line 835) | def build(self, input_shape=None): class TFBlenderbotDecoder (line 852) | class TFBlenderbotDecoder(keras.layers.Layer): method __init__ (line 862) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[ke... method get_embed_tokens (line 879) | def get_embed_tokens(self): method set_embed_tokens (line 882) | def set_embed_tokens(self, embed_tokens): method call (line 886) | def call( method build (line 1076) | def build(self, input_shape=None): class TFBlenderbotMainLayer (line 1093) | class TFBlenderbotMainLayer(keras.layers.Layer): method __init__ (line 1096) | def __init__(self, config: BlenderbotConfig, **kwargs): method get_input_embeddings (line 1112) | def get_input_embeddings(self): method set_input_embeddings (line 1115) | def set_input_embeddings(self, new_embeddings): method call (line 1121) | def call( method build (line 1199) | def build(self, input_shape=None): class TFBlenderbotModel (line 1220) | class TFBlenderbotModel(TFBlenderbotPreTrainedModel): method __init__ (line 1221) | def __init__(self, config: BlenderbotConfig, *inputs, **kwargs): method get_encoder (line 1226) | def get_encoder(self): method get_decoder (line 1229) | def get_decoder(self): method from_pretrained (line 1233) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method call (line 1255) | def call( method serving_output (line 1299) | def serving_output(self, output): method build (line 1318) | def build(self, input_shape=None): class BiasLayer (line 1328) | class BiasLayer(keras.layers.Layer): method __init__ (line 1334) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1341) | def call(self, x): class TFBlenderbotForConditionalGeneration (line 1349) | class TFBlenderbotForConditionalGeneration(TFBlenderbotPreTrainedModel, ... method __init__ (line 1355) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1364) | def get_decoder(self): method get_encoder (line 1367) | def get_encoder(self): method get_output_embeddings (line 1370) | def get_output_embeddings(self): method set_output_embeddings (line 1373) | def set_output_embeddings(self, value): method get_bias (line 1376) | def get_bias(self): method set_bias (line 1379) | def set_bias(self, value): method from_pretrained (line 1388) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method call (line 1407) | def call( method serving_output (line 1488) | def serving_output(self, output): method prepare_inputs_for_generation (line 1508) | def prepare_inputs_for_generation( method build (line 1546) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot/tokenization_blenderbot.py function bytes_to_unicode (line 40) | def bytes_to_unicode(): function get_pairs (line 65) | def get_pairs(word): class BlenderbotTokenizer (line 79) | class BlenderbotTokenizer(PreTrainedTokenizer): method __init__ (line 162) | def __init__( method vocab_size (line 224) | def vocab_size(self): method get_vocab (line 228) | def get_vocab(self): method bpe (line 234) | def bpe(self, token): method _tokenize (line 277) | def _tokenize(self, text): method _convert_token_to_id (line 288) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 293) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 298) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 305) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method get_special_tokens_mask (line 335) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 363) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 387) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method build_inputs_with_special_tokens (line 393) | def build_inputs_with_special_tokens(self, token_ids_0: List[int], tok... FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot/tokenization_blenderbot_fast.py class BlenderbotTokenizerFast (line 38) | class BlenderbotTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 124) | def __init__( method mask_token (line 199) | def mask_token(self) -> str: method mask_token (line 214) | def mask_token(self, value): method _batch_encode_plus (line 226) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 236) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 247) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method create_token_type_ids_from_sequences (line 252) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 275) | def build_inputs_with_special_tokens(self, token_ids_0: List[int], tok... FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot_small/configuration_blenderbot_small.py class BlenderbotSmallConfig (line 31) | class BlenderbotSmallConfig(PretrainedConfig): method __init__ (line 107) | def __init__( class BlenderbotSmallOnnxConfig (line 167) | class BlenderbotSmallOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 169) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 213) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 225) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 293) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 331) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 357) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 381) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py function shift_tokens_right (line 52) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class BlenderbotSmallLearnedPositionalEmbedding (line 69) | class BlenderbotSmallLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 74) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 77) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class BlenderbotSmallAttention (line 87) | class BlenderbotSmallAttention(nn.Module): method __init__ (line 90) | def __init__( method _shape (line 121) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 124) | def forward( class BlenderbotSmallEncoderLayer (line 246) | class BlenderbotSmallEncoderLayer(nn.Module): method __init__ (line 247) | def __init__(self, config: BlenderbotSmallConfig): method forward (line 265) | def forward( class BlenderbotSmallDecoderLayer (line 323) | class BlenderbotSmallDecoderLayer(nn.Module): method __init__ (line 324) | def __init__(self, config: BlenderbotSmallConfig): method forward (line 353) | def forward( class BlenderbotSmallPreTrainedModel (line 443) | class BlenderbotSmallPreTrainedModel(PreTrainedModel): method _init_weights (line 448) | def _init_weights(self, module): method dummy_inputs (line 460) | def dummy_inputs(self): class BlenderbotSmallEncoder (line 612) | class BlenderbotSmallEncoder(BlenderbotSmallPreTrainedModel): method __init__ (line 622) | def __init__(self, config: BlenderbotSmallConfig, embed_tokens: Option... method forward (line 649) | def forward( class BlenderbotSmallDecoder (line 781) | class BlenderbotSmallDecoder(BlenderbotSmallPreTrainedModel): method __init__ (line 790) | def __init__(self, config: BlenderbotSmallConfig, embed_tokens: Option... method get_input_embeddings (line 814) | def get_input_embeddings(self): method set_input_embeddings (line 817) | def set_input_embeddings(self, value): method forward (line 820) | def forward( class BlenderbotSmallModel (line 1038) | class BlenderbotSmallModel(BlenderbotSmallPreTrainedModel): method __init__ (line 1041) | def __init__(self, config: BlenderbotSmallConfig): method get_input_embeddings (line 1053) | def get_input_embeddings(self): method set_input_embeddings (line 1056) | def set_input_embeddings(self, value): method get_encoder (line 1061) | def get_encoder(self): method get_decoder (line 1064) | def get_decoder(self): method forward (line 1069) | def forward( class BlenderbotSmallForConditionalGeneration (line 1166) | class BlenderbotSmallForConditionalGeneration(BlenderbotSmallPreTrainedM... method __init__ (line 1171) | def __init__(self, config: BlenderbotSmallConfig): method get_encoder (line 1180) | def get_encoder(self): method get_decoder (line 1183) | def get_decoder(self): method resize_token_embeddings (line 1186) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 1191) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1200) | def get_output_embeddings(self): method set_output_embeddings (line 1203) | def set_output_embeddings(self, new_embeddings): method forward (line 1209) | def forward( method prepare_inputs_for_generation (line 1287) | def prepare_inputs_for_generation( method _reorder_cache (line 1325) | def _reorder_cache(past_key_values, beam_idx): class BlenderbotSmallDecoderWrapper (line 1337) | class BlenderbotSmallDecoderWrapper(BlenderbotSmallPreTrainedModel): method __init__ (line 1343) | def __init__(self, config): method forward (line 1347) | def forward(self, *args, **kwargs): class BlenderbotSmallForCausalLM (line 1352) | class BlenderbotSmallForCausalLM(BlenderbotSmallPreTrainedModel): method __init__ (line 1355) | def __init__(self, config): method get_input_embeddings (line 1367) | def get_input_embeddings(self): method set_input_embeddings (line 1370) | def set_input_embeddings(self, value): method get_output_embeddings (line 1373) | def get_output_embeddings(self): method set_output_embeddings (line 1376) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1379) | def set_decoder(self, decoder): method get_decoder (line 1382) | def get_decoder(self): method forward (line 1386) | def forward( method prepare_inputs_for_generation (line 1530) | def prepare_inputs_for_generation( method _reorder_cache (line 1557) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py function shift_tokens_right (line 218) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... class FlaxBlenderbotSmallAttention (line 231) | class FlaxBlenderbotSmallAttention(nn.Module): method setup (line 240) | def setup(self) -> None: method _split_heads (line 266) | def _split_heads(self, hidden_states): method _merge_heads (line 269) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 273) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 304) | def __call__( class FlaxBlenderbotSmallEncoderLayer (line 399) | class FlaxBlenderbotSmallEncoderLayer(nn.Module): method setup (line 403) | def setup(self) -> None: method __call__ (line 426) | def __call__( class FlaxBlenderbotSmallEncoderLayerCollection (line 457) | class FlaxBlenderbotSmallEncoderLayerCollection(nn.Module): method setup (line 461) | def setup(self): method __call__ (line 468) | def __call__( class FlaxBlenderbotSmallDecoderLayer (line 512) | class FlaxBlenderbotSmallDecoderLayer(nn.Module): method setup (line 516) | def setup(self) -> None: method __call__ (line 549) | def __call__( class FlaxBlenderbotSmallDecoderLayerCollection (line 601) | class FlaxBlenderbotSmallDecoderLayerCollection(nn.Module): method setup (line 605) | def setup(self): method __call__ (line 612) | def __call__( class FlaxBlenderbotSmallEncoder (line 671) | class FlaxBlenderbotSmallEncoder(nn.Module): method setup (line 676) | def setup(self): method __call__ (line 692) | def __call__( class FlaxBlenderbotSmallDecoder (line 732) | class FlaxBlenderbotSmallDecoder(nn.Module): method setup (line 737) | def setup(self): method __call__ (line 754) | def __call__( class FlaxBlenderbotSmallModule (line 805) | class FlaxBlenderbotSmallModule(nn.Module): method setup (line 809) | def setup(self): method _get_encoder_module (line 820) | def _get_encoder_module(self): method _get_decoder_module (line 823) | def _get_decoder_module(self): method __call__ (line 826) | def __call__( class FlaxBlenderbotSmallPreTrainedModel (line 875) | class FlaxBlenderbotSmallPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 880) | def __init__( method init_weights (line 892) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 928) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 971) | def encode( method decode (line 1036) | def decode( method __call__ (line 1148) | def __call__( class FlaxBlenderbotSmallModel (line 1212) | class FlaxBlenderbotSmallModel(FlaxBlenderbotSmallPreTrainedModel): class FlaxBlenderbotSmallForConditionalGenerationModule (line 1222) | class FlaxBlenderbotSmallForConditionalGenerationModule(nn.Module): method setup (line 1227) | def setup(self): method _get_encoder_module (line 1237) | def _get_encoder_module(self): method _get_decoder_module (line 1240) | def _get_decoder_module(self): method __call__ (line 1243) | def __call__( class FlaxBlenderbotSmallForConditionalGeneration (line 1298) | class FlaxBlenderbotSmallForConditionalGeneration(FlaxBlenderbotSmallPre... method decode (line 1304) | def decode( method prepare_inputs_for_generation (line 1439) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1470) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py function shift_tokens_right (line 63) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... 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 TFBlenderbotSmallLearnedPositionalEmbedding (line 120) | class TFBlenderbotSmallLearnedPositionalEmbedding(keras.layers.Embedding): method __init__ (line 125) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 128) | def call( class TFBlenderbotSmallAttention (line 141) | class TFBlenderbotSmallAttention(keras.layers.Layer): method __init__ (line 144) | def __init__( method _shape (line 172) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 175) | def call( method build (line 293) | def build(self, input_shape=None): class TFBlenderbotSmallEncoderLayer (line 312) | class TFBlenderbotSmallEncoderLayer(keras.layers.Layer): method __init__ (line 313) | def __init__(self, config: BlenderbotSmallConfig, **kwargs): method call (line 328) | def call( method build (line 368) | def build(self, input_shape=None): class TFBlenderbotSmallDecoderLayer (line 390) | class TFBlenderbotSmallDecoderLayer(keras.layers.Layer): method __init__ (line 391) | def __init__(self, config: BlenderbotSmallConfig, **kwargs): method call (line 419) | def call( method build (line 499) | def build(self, input_shape=None): class TFBlenderbotSmallPreTrainedModel (line 526) | class TFBlenderbotSmallPreTrainedModel(TFPreTrainedModel): class TFBlenderbotSmallEncoder (line 684) | class TFBlenderbotSmallEncoder(keras.layers.Layer): method __init__ (line 694) | def __init__(self, config: BlenderbotSmallConfig, embed_tokens: Option... method get_embed_tokens (line 713) | def get_embed_tokens(self): method set_embed_tokens (line 716) | def set_embed_tokens(self, embed_tokens): method call (line 720) | def call( method build (line 839) | def build(self, input_shape=None): class TFBlenderbotSmallDecoder (line 856) | class TFBlenderbotSmallDecoder(keras.layers.Layer): method __init__ (line 866) | def __init__(self, config: BlenderbotSmallConfig, embed_tokens: Option... method get_embed_tokens (line 883) | def get_embed_tokens(self): method set_embed_tokens (line 886) | def set_embed_tokens(self, embed_tokens): method call (line 890) | def call( method build (line 1077) | def build(self, input_shape=None): class TFBlenderbotSmallMainLayer (line 1094) | class TFBlenderbotSmallMainLayer(keras.layers.Layer): method __init__ (line 1097) | def __init__(self, config: BlenderbotSmallConfig, **kwargs): method get_input_embeddings (line 1113) | def get_input_embeddings(self): method set_input_embeddings (line 1116) | def set_input_embeddings(self, new_embeddings): method call (line 1122) | def call( method build (line 1200) | def build(self, input_shape=None): class TFBlenderbotSmallModel (line 1221) | class TFBlenderbotSmallModel(TFBlenderbotSmallPreTrainedModel): method __init__ (line 1222) | def __init__(self, config: BlenderbotSmallConfig, *inputs, **kwargs): method get_encoder (line 1227) | def get_encoder(self): method get_decoder (line 1230) | def get_decoder(self): method call (line 1240) | def call( method serving_output (line 1284) | def serving_output(self, output): method build (line 1303) | def build(self, input_shape=None): class BiasLayer (line 1313) | class BiasLayer(keras.layers.Layer): method __init__ (line 1319) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1326) | def call(self, x): class TFBlenderbotSmallForConditionalGeneration (line 1334) | class TFBlenderbotSmallForConditionalGeneration(TFBlenderbotSmallPreTrai... method __init__ (line 1340) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1349) | def get_decoder(self): method get_encoder (line 1352) | def get_encoder(self): method get_output_embeddings (line 1355) | def get_output_embeddings(self): method set_output_embeddings (line 1358) | def set_output_embeddings(self, value): method get_bias (line 1361) | def get_bias(self): method set_bias (line 1364) | def set_bias(self, value): method call (line 1376) | def call( method serving_output (line 1458) | def serving_output(self, output): method prepare_inputs_for_generation (line 1478) | def prepare_inputs_for_generation( method build (line 1516) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot_small/tokenization_blenderbot_small.py function get_pairs (line 37) | def get_pairs(word): class BlenderbotSmallTokenizer (line 53) | class BlenderbotSmallTokenizer(PreTrainedTokenizer): method __init__ (line 81) | def __init__( method vocab_size (line 102) | def vocab_size(self) -> int: method get_vocab (line 105) | def get_vocab(self) -> Dict: method bpe (line 108) | def bpe(self, token: str) -> str: method _tokenize (line 168) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 178) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 183) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 187) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method save_vocabulary (line 192) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/blenderbot_small/tokenization_blenderbot_small_fast.py class BlenderbotSmallTokenizerFast (line 35) | class BlenderbotSmallTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 47) | def __init__( method build_inputs_with_special_tokens (line 72) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 79) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/blip/configuration_blip.py class BlipTextConfig (line 27) | class BlipTextConfig(PretrainedConfig): method __init__ (line 100) | def __init__( method from_pretrained (line 150) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class BlipVisionConfig (line 168) | class BlipVisionConfig(PretrainedConfig): method __init__ (line 219) | def __init__( method from_pretrained (line 249) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class BlipConfig (line 267) | class BlipConfig(PretrainedConfig): method __init__ (line 320) | def __init__( method from_text_vision_configs (line 353) | def from_text_vision_configs(cls, text_config: BlipTextConfig, vision_... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/blip/image_processing_blip.py class BlipImageProcessor (line 46) | class BlipImageProcessor(BaseImageProcessor): method __init__ (line 83) | def __init__( method resize (line 111) | def resize( method preprocess (line 160) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/blip/modeling_blip.py function contrastive_loss (line 47) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function blip_loss (line 52) | def blip_loss(similarity: torch.Tensor) -> torch.Tensor: class BlipForConditionalGenerationModelOutput (line 59) | class BlipForConditionalGenerationModelOutput(ModelOutput): method decoder_logits (line 94) | def decoder_logits(self): class BlipTextVisionModelOutput (line 104) | class BlipTextVisionModelOutput(ModelOutput): class BlipImageTextMatchingModelOutput (line 137) | class BlipImageTextMatchingModelOutput(ModelOutput): class BlipOutput (line 180) | class BlipOutput(ModelOutput): method to_tuple (line 209) | def to_tuple(self) -> Tuple[Any]: class BlipVisionEmbeddings (line 216) | class BlipVisionEmbeddings(nn.Module): method __init__ (line 217) | def __init__(self, config: BlipVisionConfig): method interpolate_pos_encoding (line 235) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 268) | def forward(self, pixel_values: torch.FloatTensor, interpolate_pos_enc... class BlipTextEmbeddings (line 284) | class BlipTextEmbeddings(nn.Module): method __init__ (line 285) | def __init__(self, config: BlipTextConfig): method forward (line 297) | def forward( class BlipAttention (line 317) | class BlipAttention(nn.Module): method __init__ (line 320) | def __init__(self, config): method _shape (line 338) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 341) | def forward( class BlipMLP (line 387) | class BlipMLP(nn.Module): method __init__ (line 388) | def __init__(self, config): method forward (line 395) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BlipEncoderLayer (line 402) | class BlipEncoderLayer(nn.Module): method __init__ (line 403) | def __init__(self, config: BlipConfig): method forward (line 411) | def forward( class BlipPreTrainedModel (line 450) | class BlipPreTrainedModel(PreTrainedModel): method _init_weights (line 460) | def _init_weights(self, module): class BlipEncoder (line 592) | class BlipEncoder(nn.Module): method __init__ (line 602) | def __init__(self, config: BlipConfig): method forward (line 608) | def forward( class BlipVisionModel (line 678) | class BlipVisionModel(BlipPreTrainedModel): method __init__ (line 682) | def __init__(self, config: BlipVisionConfig): method forward (line 695) | def forward( method get_input_embeddings (line 741) | def get_input_embeddings(self): class BlipModel (line 751) | class BlipModel(BlipPreTrainedModel): method __init__ (line 754) | def __init__(self, config: BlipConfig): method get_text_features (line 791) | def get_text_features( method get_image_features (line 829) | def get_image_features( method get_multimodal_features (line 871) | def get_multimodal_features( method forward (line 927) | def forward( class BlipForConditionalGeneration (line 1030) | class BlipForConditionalGeneration(BlipPreTrainedModel): method __init__ (line 1035) | def __init__(self, config: BlipConfig): method get_input_embeddings (line 1048) | def get_input_embeddings(self) -> nn.Module: method forward (line 1053) | def forward( method generate (line 1125) | def generate( class BlipForQuestionAnswering (line 1208) | class BlipForQuestionAnswering(BlipPreTrainedModel): method __init__ (line 1212) | def __init__(self, config: BlipConfig): method get_input_embeddings (line 1227) | def get_input_embeddings(self) -> nn.Module: method forward (line 1232) | def forward( method generate (line 1345) | def generate( class BlipForImageTextRetrieval (line 1436) | class BlipForImageTextRetrieval(BlipPreTrainedModel): method __init__ (line 1439) | def __init__(self, config: BlipConfig): method get_input_embeddings (line 1469) | def get_input_embeddings(self) -> nn.Module: method forward (line 1474) | def forward( FILE: mplsandbox_for_rl/transformers/src/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 66) | def forward( class BlipTextSelfAttention (line 98) | class BlipTextSelfAttention(nn.Module): method __init__ (line 99) | def __init__(self, config, is_cross_attention): method save_attn_gradients (line 126) | def save_attn_gradients(self, attn_gradients): method get_attn_gradients (line 129) | def get_attn_gradients(self): method save_attention_map (line 132) | def save_attention_map(self, attention_map): method get_attention_map (line 135) | def get_attention_map(self): method transpose_for_scores (line 138) | def transpose_for_scores(self, x): method forward (line 143) | def forward( class BlipTextSelfOutput (line 225) | class BlipTextSelfOutput(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 BlipTextAttention (line 240) | class BlipTextAttention(nn.Module): method __init__ (line 241) | def __init__(self, config, is_cross_attention=False): method prune_heads (line 247) | def prune_heads(self, heads): method forward (line 265) | def forward( class BlipTextIntermediate (line 290) | class BlipTextIntermediate(nn.Module): method __init__ (line 291) | def __init__(self, config): method forward (line 299) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BlipTextOutput (line 306) | class BlipTextOutput(nn.Module): method __init__ (line 307) | def __init__(self, config): method forward (line 313) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BlipTextLayer (line 320) | class BlipTextLayer(nn.Module): method __init__ (line 321) | def __init__(self, config, layer_num): method forward (line 333) | def forward( method feed_forward_chunk (line 377) | def feed_forward_chunk(self, attention_output): class BlipTextEncoder (line 384) | class BlipTextEncoder(nn.Module): method __init__ (line 385) | def __init__(self, config): method forward (line 391) | def forward( class BlipTextPooler (line 478) | class BlipTextPooler(nn.Module): method __init__ (line 479) | def __init__(self, config): method forward (line 484) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BlipTextPredictionHeadTransform (line 494) | class BlipTextPredictionHeadTransform(nn.Module): method __init__ (line 495) | def __init__(self, config): method forward (line 504) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BlipTextLMPredictionHead (line 512) | class BlipTextLMPredictionHead(nn.Module): method __init__ (line 513) | def __init__(self, config): method _tie_weights (line 526) | def _tie_weights(self): 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 811) | class BlipTextLMHeadModel(BlipTextPreTrainedModel): method __init__ (line 812) | def __init__(self, config): method get_output_embeddings (line 819) | def get_output_embeddings(self): method set_output_embeddings (line 822) | 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 944) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blip/modeling_tf_blip.py function contrastive_loss (line 53) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function blip_loss (line 62) | def blip_loss(similarity: tf.Tensor) -> tf.Tensor: class TFBlipForConditionalGenerationModelOutput (line 69) | class TFBlipForConditionalGenerationModelOutput(ModelOutput): method decoder_logits (line 104) | def decoder_logits(self): class TFBlipTextVisionModelOutput (line 114) | class TFBlipTextVisionModelOutput(ModelOutput): class TFBlipImageTextMatchingModelOutput (line 147) | class TFBlipImageTextMatchingModelOutput(ModelOutput): class TFBlipOutput (line 190) | class TFBlipOutput(ModelOutput): method to_tuple (line 219) | def to_tuple(self) -> Tuple[Any]: class TFBlipVisionEmbeddings (line 226) | class TFBlipVisionEmbeddings(keras.layers.Layer): method __init__ (line 227) | def __init__(self, config: BlipVisionConfig, **kwargs): method build (line 246) | def build(self, input_shape=None): method call (line 268) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFBlipTextEmbeddings (line 283) | class TFBlipTextEmbeddings(keras.layers.Layer): method __init__ (line 284) | def __init__(self, config: BlipTextConfig, **kwargs): method build (line 291) | def build(self, input_shape: tf.TensorShape = None): method call (line 310) | def call( class TFBlipAttention (line 341) | class TFBlipAttention(keras.layers.Layer): method __init__ (line 344) | def __init__(self, config, **kwargs): method call (line 366) | def call( method build (line 410) | def build(self, input_shape=None): class TFBlipMLP (line 425) | class TFBlipMLP(keras.layers.Layer): method __init__ (line 426) | def __init__(self, config: BlipConfig, **kwargs): method call (line 442) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 448) | def build(self, input_shape=None): class TFBlipEncoderLayer (line 460) | class TFBlipEncoderLayer(keras.layers.Layer): method __init__ (line 461) | def __init__(self, config: BlipConfig, **kwargs): method call (line 469) | def call( method build (line 509) | def build(self, input_shape=None): class TFBlipPreTrainedModel (line 527) | class TFBlipPreTrainedModel(TFPreTrainedModel): class TFBlipEncoder (line 606) | class TFBlipEncoder(keras.layers.Layer): method __init__ (line 617) | def __init__(self, config: BlipConfig, **kwargs): method call (line 623) | def call( method build (line 686) | def build(self, input_shape=None): class TFBlipVisionModel (line 696) | class TFBlipVisionModel(TFBlipPreTrainedModel): method __init__ (line 700) | def __init__(self, config: BlipVisionConfig, *args, **kwargs): method serving_output (line 709) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... method call (line 723) | def call( method get_input_embeddings (line 772) | def get_input_embeddings(self): method build (line 775) | def build(self, input_shape=None): class TFBlipMainLayer (line 790) | class TFBlipMainLayer(keras.layers.Layer): method __init__ (line 793) | def __init__(self, config: BlipConfig, *args, **kwargs): method build (line 833) | def build(self, input_shape=None): method call (line 858) | def call( class TFBlipModel (line 930) | class TFBlipModel(TFBlipPreTrainedModel): method __init__ (line 935) | def __init__(self, config: BlipConfig, *inputs, **kwargs): method serving_output (line 940) | def serving_output(self, output: TFBlipOutput) -> TFBlipOutput: method call (line 951) | def call( method get_text_features (line 1001) | def get_text_features( method get_image_features (line 1039) | def get_image_features( method build (line 1075) | def build(self, input_shape=None): class TFBlipForConditionalGeneration (line 1093) | class TFBlipForConditionalGeneration(TFBlipPreTrainedModel): method __init__ (line 1098) | def __init__(self, config: BlipConfig, *args, **kwargs): method get_input_embeddings (line 1108) | def get_input_embeddings(self) -> keras.layers.Layer: method call (line 1114) | def call( method generate (line 1190) | def generate( method build (line 1263) | def build(self, input_shape=None): class TFBlipForQuestionAnswering (line 1283) | class TFBlipForQuestionAnswering(TFBlipPreTrainedModel): method __init__ (line 1287) | def __init__(self, config: BlipConfig, *args, **kwargs): method get_input_embeddings (line 1299) | def get_input_embeddings(self) -> keras.layers.Layer: method _shift_right (line 1303) | def _shift_right(self, input_ids): method call (line 1329) | def call( method generate (line 1437) | def generate( method build (line 1515) | def build(self, input_shape=None): class TFBlipForImageTextRetrieval (line 1538) | class TFBlipForImageTextRetrieval(TFBlipPreTrainedModel): method __init__ (line 1541) | def __init__(self, config: BlipConfig, *args, **kwargs): method get_input_embeddings (line 1579) | def get_input_embeddings(self) -> keras.layers.Layer: method call (line 1585) | def call( method build (line 1680) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blip/modeling_tf_blip_text.py class TFBlipTextEmbeddings (line 79) | class TFBlipTextEmbeddings(keras.layers.Layer): method __init__ (line 82) | def __init__(self, config, **kwargs): method call (line 107) | def call(self, input_ids=None, position_ids=None, inputs_embeds=None, ... method build (line 131) | def build(self, input_shape=None): class TFBlipTextSelfAttention (line 150) | class TFBlipTextSelfAttention(keras.layers.Layer): method __init__ (line 151) | def __init__(self, config, is_cross_attention, **kwargs): method transpose_for_scores (line 183) | def transpose_for_scores(self, x): method call (line 191) | def call( method build (line 272) | def build(self, input_shape=None): class TFBlipTextSelfOutput (line 295) | class TFBlipTextSelfOutput(keras.layers.Layer): method __init__ (line 296) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 306) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 313) | def build(self, input_shape=None): class TFBlipTextAttention (line 326) | class TFBlipTextAttention(keras.layers.Layer): method __init__ (line 327) | def __init__(self, config, is_cross_attention=False, **kwargs): method call (line 333) | def call( method build (line 358) | def build(self, input_shape=None): class TFBlipTextIntermediate (line 371) | class TFBlipTextIntermediate(keras.layers.Layer): method __init__ (line 372) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 385) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 391) | def build(self, input_shape=None): class TFBlipTextOutput (line 400) | class TFBlipTextOutput(keras.layers.Layer): method __init__ (line 401) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 411) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 418) | def build(self, input_shape=None): class TFBlipTextLayer (line 430) | class TFBlipTextLayer(keras.layers.Layer): method __init__ (line 431) | def __init__(self, config, **kwargs): method call (line 442) | def call( method build (line 488) | def build(self, input_shape=None): class TFBlipTextEncoder (line 508) | class TFBlipTextEncoder(keras.layers.Layer): method __init__ (line 511) | def __init__(self, config, name=None, **kwargs): method call (line 517) | def call( method build (line 586) | def build(self, input_shape=None): class TFBlipTextPooler (line 597) | class TFBlipTextPooler(keras.layers.Layer): method __init__ (line 598) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 609) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 617) | def build(self, input_shape=None): class TFBlipTextPredictionHeadTransform (line 627) | class TFBlipTextPredictionHeadTransform(keras.layers.Layer): method __init__ (line 628) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 645) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 652) | def build(self, input_shape=None): class TFBlipTextLMPredictionHead (line 664) | class TFBlipTextLMPredictionHead(keras.layers.Layer): method __init__ (line 665) | def __init__(self, config, **kwargs): method build (line 679) | def build(self, input_shape=None): method call (line 692) | def call(self, hidden_states): class TFBlipTextOnlyMLMHead (line 698) | class TFBlipTextOnlyMLMHead(keras.layers.Layer): method __init__ (line 699) | def __init__(self, config, **kwargs): method call (line 703) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: method build (line 707) | def build(self, input_shape=None): class TFBlipTextPreTrainedModel (line 717) | class TFBlipTextPreTrainedModel(TFPreTrainedModel): class TFBlipTextModel (line 729) | class TFBlipTextModel(TFBlipTextPreTrainedModel): method __init__ (line 738) | def __init__(self, config, add_pooling_layer=True, name=None, **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 get_extended_attention_mask (line 753) | def get_extended_attention_mask( method call (line 819) | def call( method build (line 954) | def build(self, input_shape=None): class TFBlipTextLMHeadModel (line 970) | class TFBlipTextLMHeadModel(TFBlipTextPreTrainedModel): method __init__ (line 974) | def __init__(self, config, **kwargs): method get_output_embeddings (line 981) | def get_output_embeddings(self): method set_output_embeddings (line 984) | def set_output_embeddings(self, new_embeddings): method call (line 989) | def call( method prepare_inputs_for_generation (line 1088) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1107) | def _reorder_cache(self, past_key_values, beam_idx): method build (line 1113) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blip/processing_blip.py class BlipProcessor (line 27) | class BlipProcessor(ProcessorMixin): method __init__ (line 46) | def __init__(self, image_processor, tokenizer, **kwargs): method __call__ (line 51) | def __call__( method batch_decode (line 133) | def batch_decode(self, *args, **kwargs): method decode (line 140) | def decode(self, *args, **kwargs): method model_input_names (line 148) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/blip_2/configuration_blip_2.py class Blip2VisionConfig (line 29) | class Blip2VisionConfig(PretrainedConfig): method __init__ (line 80) | def __init__( method from_pretrained (line 110) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class Blip2QFormerConfig (line 128) | class Blip2QFormerConfig(PretrainedConfig): method __init__ (line 192) | def __init__( method from_pretrained (line 229) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class Blip2Config (line 247) | class Blip2Config(PretrainedConfig): method __init__ (line 304) | def __init__( method from_vision_qformer_text_configs (line 343) | def from_vision_qformer_text_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/blip_2/convert_blip_2_original_to_pytorch.py function load_demo_image (line 46) | def load_demo_image(): function create_rename_keys (line 54) | def create_rename_keys(config): function rename_key (line 87) | def rename_key(dct, old, new): function read_in_q_v_bias (line 92) | def read_in_q_v_bias(state_dict, config): function get_blip2_config (line 103) | def get_blip2_config(model_name, eos_token_id): function convert_blip2_checkpoint (line 124) | def convert_blip2_checkpoint(model_name, pytorch_dump_folder_path=None, ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/blip_2/modeling_blip_2.py class Blip2ForConditionalGenerationModelOutput (line 52) | class Blip2ForConditionalGenerationModelOutput(ModelOutput): method to_tuple (line 75) | def to_tuple(self) -> Tuple[Any]: class Blip2VisionEmbeddings (line 85) | class Blip2VisionEmbeddings(nn.Module): method __init__ (line 86) | def __init__(self, config: Blip2VisionConfig): method interpolate_pos_encoding (line 104) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 137) | def forward(self, pixel_values: torch.FloatTensor, interpolate_pos_enc... class Blip2Attention (line 152) | class Blip2Attention(nn.Module): method __init__ (line 155) | def __init__(self, config): method _shape (line 185) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 188) | def forward( class Blip2MLP (line 234) | class Blip2MLP(nn.Module): method __init__ (line 235) | def __init__(self, config): method forward (line 242) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Blip2EncoderLayer (line 250) | class Blip2EncoderLayer(nn.Module): method __init__ (line 251) | def __init__(self, config: Blip2Config): method forward (line 259) | def forward( class Blip2PreTrainedModel (line 298) | class Blip2PreTrainedModel(PreTrainedModel): method _init_weights (line 311) | def _init_weights(self, module): class Blip2Encoder (line 449) | class Blip2Encoder(nn.Module): method __init__ (line 459) | def __init__(self, config: Blip2Config): method forward (line 465) | def forward( class Blip2VisionModel (line 536) | class Blip2VisionModel(Blip2PreTrainedModel): method __init__ (line 540) | def __init__(self, config: Blip2VisionConfig): method forward (line 553) | def forward( method get_input_embeddings (line 599) | def get_input_embeddings(self): class Blip2QFormerMultiHeadAttention (line 603) | class Blip2QFormerMultiHeadAttention(nn.Module): method __init__ (line 604) | def __init__(self, config, is_cross_attention=False): method save_attn_gradients (line 632) | def save_attn_gradients(self, attn_gradients): method get_attn_gradients (line 635) | def get_attn_gradients(self): method save_attention_map (line 638) | def save_attention_map(self, attention_map): method get_attention_map (line 641) | def get_attention_map(self): method transpose_for_scores (line 644) | def transpose_for_scores(self, x): method forward (line 649) | def forward( class Blip2QFormerSelfOutput (line 736) | class Blip2QFormerSelfOutput(nn.Module): method __init__ (line 737) | def __init__(self, config): method forward (line 743) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Blip2QFormerAttention (line 750) | class Blip2QFormerAttention(nn.Module): method __init__ (line 751) | def __init__(self, config, is_cross_attention=False): method prune_heads (line 757) | def prune_heads(self, heads): method forward (line 775) | def forward( class Blip2QFormerIntermediate (line 800) | class Blip2QFormerIntermediate(nn.Module): method __init__ (line 801) | def __init__(self, config): method forward (line 809) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Blip2QFormerOutput (line 816) | class Blip2QFormerOutput(nn.Module): method __init__ (line 817) | def __init__(self, config): method forward (line 823) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Blip2QFormerLayer (line 830) | class Blip2QFormerLayer(nn.Module): method __init__ (line 831) | def __init__(self, config, layer_idx): method forward (line 848) | def forward( method feed_forward_chunk (line 919) | def feed_forward_chunk(self, attention_output): method feed_forward_chunk_query (line 924) | def feed_forward_chunk_query(self, attention_output): class Blip2QFormerEncoder (line 930) | class Blip2QFormerEncoder(nn.Module): method __init__ (line 931) | def __init__(self, config): method forward (line 939) | def forward( class Blip2QFormerModel (line 1025) | class Blip2QFormerModel(Blip2PreTrainedModel): method __init__ (line 1030) | def __init__(self, config: Blip2QFormerConfig): method get_input_embeddings (line 1041) | def get_input_embeddings(self): method set_input_embeddings (line 1044) | def set_input_embeddings(self, value): method _prune_heads (line 1047) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 1055) | def get_extended_attention_mask( method forward (line 1100) | def forward( class Blip2Model (line 1221) | class Blip2Model(Blip2PreTrainedModel): method __init__ (line 1225) | def __init__(self, config: Blip2Config): method get_input_embeddings (line 1252) | def get_input_embeddings(self): method set_input_embeddings (line 1255) | def set_input_embeddings(self, value): method set_output_embeddings (line 1258) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1261) | def get_output_embeddings(self) -> nn.Module: method get_encoder (line 1264) | def get_encoder(self): method get_decoder (line 1267) | def get_decoder(self): method _tie_weights (line 1270) | def _tie_weights(self): method get_text_features (line 1276) | def get_text_features( method get_image_features (line 1335) | def get_image_features( method get_qformer_features (line 1381) | def get_qformer_features( method forward (line 1443) | def forward( class Blip2ForConditionalGeneration (line 1586) | class Blip2ForConditionalGeneration(Blip2PreTrainedModel): method __init__ (line 1590) | def __init__(self, config: Blip2Config): method get_input_embeddings (line 1617) | def get_input_embeddings(self): method set_input_embeddings (line 1620) | def set_input_embeddings(self, value): method set_output_embeddings (line 1623) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1626) | def get_output_embeddings(self) -> nn.Module: method get_encoder (line 1629) | def get_encoder(self): method get_decoder (line 1632) | def get_decoder(self): method _tie_weights (line 1635) | def _tie_weights(self): method _preprocess_accelerate (line 1640) | def _preprocess_accelerate(self): method forward (line 1662) | def forward( method generate (line 1839) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/blip_2/processing_blip_2.py class Blip2Processor (line 37) | class Blip2Processor(ProcessorMixin): method __init__ (line 58) | def __init__(self, image_processor, tokenizer, num_query_tokens=None, ... method __call__ (line 67) | def __call__( method batch_decode (line 177) | def batch_decode(self, *args, **kwargs): method decode (line 185) | def decode(self, *args, **kwargs): method model_input_names (line 194) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bloom/configuration_bloom.py class BloomConfig (line 34) | class BloomConfig(PretrainedConfig): method __init__ (line 105) | def __init__( class BloomOnnxConfig (line 144) | class BloomOnnxConfig(OnnxConfigWithPast): method __init__ (line 147) | def __init__( method inputs (line 160) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 172) | def num_layers(self) -> int: method num_attention_heads (line 176) | def num_attention_heads(self) -> int: method atol_for_validation (line 180) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 183) | def generate_dummy_inputs( method default_onnx_opset (line 233) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/bloom/convert_bloom_original_checkpoint_to_pytorch.py function layer_name_mapping (line 50) | def layer_name_mapping(key, file): function get_dtype_size (line 70) | def get_dtype_size(dtype): function convert_bloom_checkpoint_to_pytorch (line 80) | def convert_bloom_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bloom/modeling_bloom.py function _prepare_4d_causal_attention_mask_with_cache_position (line 49) | def _prepare_4d_causal_attention_mask_with_cache_position( function build_alibi_tensor (line 102) | def build_alibi_tensor(attention_mask: torch.Tensor, num_heads: int, dty... function dropout_add (line 146) | def dropout_add(x: torch.Tensor, residual: torch.Tensor, prob: float, tr... function bloom_gelu_forward (line 165) | def bloom_gelu_forward(x: torch.Tensor) -> torch.Tensor: function bloom_gelu_back (line 177) | def bloom_gelu_back(g: torch.Tensor, x: torch.Tensor) -> torch.Tensor: class GeLUFunction (line 195) | class GeLUFunction(torch.autograd.Function): method forward (line 197) | def forward(ctx, input: torch.Tensor) -> torch.Tensor: method backward (line 202) | def backward(ctx, grad_output: torch.Tensor) -> torch.Tensor: class BloomGelu (line 208) | class BloomGelu(nn.Module): method __init__ (line 217) | def __init__(self): method forward (line 220) | def forward(self, x: torch.Tensor) -> torch.Tensor: class BloomAttention (line 227) | class BloomAttention(nn.Module): method __init__ (line 228) | def __init__(self, config: BloomConfig, layer_idx: Optional[int] = None): method _reshape (line 261) | def _reshape(self, fused_qkv: torch.Tensor) -> Tuple[torch.Tensor, tor... method _merge_heads (line 281) | def _merge_heads(self, x: torch.Tensor) -> torch.Tensor: method forward (line 306) | def forward( class BloomMLP (line 388) | class BloomMLP(nn.Module): method __init__ (line 389) | def __init__(self, config: BloomConfig): method forward (line 400) | def forward(self, hidden_states: torch.Tensor, residual: torch.Tensor)... class BloomBlock (line 419) | class BloomBlock(nn.Module): method __init__ (line 420) | def __init__(self, config: BloomConfig, layer_idx: Optional[int] = None): method forward (line 434) | def forward( class BloomPreTrainedModel (line 492) | class BloomPreTrainedModel(PreTrainedModel): method __init__ (line 500) | def __init__(self, *inputs, **kwargs): method _init_weights (line 503) | def _init_weights(self, module: nn.Module): class BloomModel (line 607) | class BloomModel(BloomPreTrainedModel): method __init__ (line 608) | def __init__(self, config: BloomConfig): method build_alibi_tensor (line 629) | def build_alibi_tensor(self, attention_mask: torch.Tensor, num_heads: ... method get_input_embeddings (line 632) | def get_input_embeddings(self): method set_input_embeddings (line 635) | def set_input_embeddings(self, new_embeddings: torch.Tensor): method forward (line 644) | def forward( method _update_causal_mask (line 785) | def _update_causal_mask( class BloomForCausalLM (line 864) | class BloomForCausalLM(BloomPreTrainedModel): method __init__ (line 867) | def __init__(self, config: BloomConfig): method get_output_embeddings (line 875) | def get_output_embeddings(self): method set_output_embeddings (line 878) | def set_output_embeddings(self, new_embeddings: torch.Tensor): method prepare_inputs_for_generation (line 881) | def prepare_inputs_for_generation( method forward (line 922) | def forward( method _reorder_cache (line 997) | def _reorder_cache( class BloomForSequenceClassification (line 1036) | class BloomForSequenceClassification(BloomPreTrainedModel): method __init__ (line 1037) | def __init__(self, config: BloomConfig): method forward (line 1052) | def forward( class BloomForTokenClassification (line 1165) | class BloomForTokenClassification(BloomPreTrainedModel): method __init__ (line 1166) | def __init__(self, config: BloomConfig): method forward (line 1189) | def forward( class BloomForQuestionAnswering (line 1266) | class BloomForQuestionAnswering(BloomPreTrainedModel): method __init__ (line 1267) | def __init__(self, config): method forward (line 1276) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bloom/modeling_flax_bloom.py function build_alibi_tensor (line 111) | def build_alibi_tensor(attention_mask: jnp.ndarray, num_heads: int, dtyp... class FlaxBloomAttention (line 153) | class FlaxBloomAttention(nn.Module): method setup (line 157) | def setup(self): method _split_heads (line 179) | def _split_heads(self, hidden_states): method _merge_heads (line 182) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 187) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 219) | def __call__( class BloomGELU (line 306) | class BloomGELU(nn.Module): method setup (line 307) | def setup(self): method __call__ (line 310) | def __call__(self, x): class FlaxBloomMLP (line 314) | class FlaxBloomMLP(nn.Module): method setup (line 318) | def setup(self): method __call__ (line 328) | def __call__(self, hidden_states, residual, deterministic: bool = True): class FlaxBloomBlock (line 340) | class FlaxBloomBlock(nn.Module): method setup (line 344) | def setup(self): method __call__ (line 355) | def __call__( class FlaxBloomPreTrainedModel (line 402) | class FlaxBloomPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 412) | def __init__( method init_weights (line 424) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 443) | def init_cache(self, batch_size, max_length): method __call__ (line 462) | def __call__( class FlaxBloomBlockCollection (line 526) | class FlaxBloomBlockCollection(nn.Module): method setup (line 530) | def setup(self): method __call__ (line 536) | def __call__( class FlaxBloomModule (line 572) | class FlaxBloomModule(nn.Module): method setup (line 576) | def setup(self): method __call__ (line 596) | def __call__( class FlaxBloomModel (line 647) | class FlaxBloomModel(FlaxBloomPreTrainedModel): class FlaxBloomForCausalLMModule (line 654) | class FlaxBloomForCausalLMModule(nn.Module): method setup (line 658) | def setup(self): method __call__ (line 667) | def __call__( class FlaxBloomForCausalLM (line 708) | class FlaxBloomForCausalLM(FlaxBloomPreTrainedModel): method prepare_inputs_for_generation (line 711) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 729) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bloom/tokenization_bloom_fast.py class BloomTokenizerFast (line 30) | class BloomTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 88) | def __init__( method _batch_encode_plus (line 126) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 136) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 147) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bridgetower/configuration_bridgetower.py class BridgeTowerVisionConfig (line 27) | class BridgeTowerVisionConfig(PretrainedConfig): method __init__ (line 72) | def __init__( method from_pretrained (line 99) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class BridgeTowerTextConfig (line 114) | class BridgeTowerTextConfig(PretrainedConfig): method __init__ (line 179) | def __init__( method from_pretrained (line 221) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class BridgeTowerConfig (line 236) | class BridgeTowerConfig(PretrainedConfig): method __init__ (line 292) | def __init__( method from_text_vision_configs (line 338) | def from_text_vision_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bridgetower/image_processing_bridgetower.py function max_across_indices (line 47) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function make_pixel_mask (line 55) | def make_pixel_mask( function get_max_height_width (line 74) | def get_max_height_width( function get_resize_output_image_size (line 93) | def get_resize_output_image_size( class BridgeTowerImageProcessor (line 124) | class BridgeTowerImageProcessor(BaseImageProcessor): method __init__ (line 172) | def __init__( method resize (line 209) | def resize( method center_crop (line 257) | def center_crop( method _pad_image (line 290) | def _pad_image( method pad (line 318) | def pad( method preprocess (line 374) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bridgetower/modeling_bridgetower.py class BridgeTowerModelOutput (line 120) | class BridgeTowerModelOutput(ModelOutput): class BridgeTowerContrastiveOutput (line 152) | class BridgeTowerContrastiveOutput(ModelOutput): class BridgeTowerResidualAttention (line 185) | class BridgeTowerResidualAttention(nn.Module): method __init__ (line 186) | def __init__(self, config): method attention (line 203) | def attention(self, hidden_state: torch.Tensor, attention_mask: torch.... method forward (line 220) | def forward(self, hidden_state: torch.Tensor, attention_mask: torch.Te... class BridgeTowerTransformer (line 229) | class BridgeTowerTransformer(nn.Module): method __init__ (line 230) | def __init__(self, config): method forward (line 244) | def forward(self, hidden_state: torch.Tensor, attention_mask: Optional... class BridgeTowerVisionEmbeddings (line 256) | class BridgeTowerVisionEmbeddings(nn.Module): method __init__ (line 257) | def __init__(self, config: BridgeTowerVisionConfig): method forward (line 279) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class BridgeTowerVisionTransformer (line 291) | class BridgeTowerVisionTransformer(nn.Module): method __init__ (line 292) | def __init__(self, config): method forward (line 305) | def forward(self, pixel_values: torch.Tensor, attention_mask): method forward_pre (line 327) | def forward_pre(self, pixel_values: torch.Tensor): method forward_post (line 334) | def forward_post(self, hidden_state: torch.Tensor): class BridgeTowerLinkTower (line 340) | class BridgeTowerLinkTower(nn.Module): method __init__ (line 341) | def __init__(self, config): method forward (line 354) | def forward(self, hidden_states, cross_modal_hidden_states, attention_... class BridgeTowerSelfOutput (line 366) | class BridgeTowerSelfOutput(nn.Module): method __init__ (line 367) | def __init__(self, config): method forward (line 373) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BridgeTowerIntermediate (line 381) | class BridgeTowerIntermediate(nn.Module): method __init__ (line 382) | def __init__(self, config): method forward (line 390) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BridgeTowerOutput (line 397) | class BridgeTowerOutput(nn.Module): method __init__ (line 398) | def __init__(self, config): method forward (line 404) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BridgeTowerPooler (line 412) | class BridgeTowerPooler(nn.Module): method __init__ (line 413) | def __init__(self, config): method forward (line 418) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BridgeTowerSelfAttention (line 428) | class BridgeTowerSelfAttention(nn.Module): method __init__ (line 429) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 455) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 460) | def forward( class BridgeTowerAttention (line 568) | class BridgeTowerAttention(nn.Module): method __init__ (line 569) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 577) | def prune_heads(self, heads): method forward (line 595) | def forward( class BridgeTowerBertCrossLayer (line 619) | class BridgeTowerBertCrossLayer(nn.Module): method __init__ (line 620) | def __init__(self, config): method forward (line 631) | def forward( method feed_forward_chunk (line 675) | def feed_forward_chunk(self, attention_output): class BridgeTowerTextLayer (line 681) | class BridgeTowerTextLayer(nn.Module): method __init__ (line 682) | def __init__(self, config): method forward (line 696) | def forward( method feed_forward_chunk (line 761) | def feed_forward_chunk(self, attention_output): class BridgeTowerTextEncoder (line 768) | class BridgeTowerTextEncoder(nn.Module): method __init__ (line 769) | def __init__(self, config): method forward (line 775) | def forward( class BridgeTowerTextEmbeddings (line 862) | class BridgeTowerTextEmbeddings(nn.Module): method __init__ (line 868) | def __init__(self, config): method forward (line 893) | def forward( method create_position_ids_from_inputs_embeds (line 933) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): function create_position_ids_from_input_ids (line 952) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class BridgeTowerPreTrainedModel (line 968) | class BridgeTowerPreTrainedModel(PreTrainedModel): method _init_weights (line 980) | def _init_weights(self, module): class BridgeTowerVisionModel (line 1007) | class BridgeTowerVisionModel(BridgeTowerPreTrainedModel): method __init__ (line 1010) | def __init__(self, config): method dtype (line 1015) | def dtype(self): method forward (line 1018) | def forward(self, image, image_mask=None): class BridgeTowerTextModel (line 1022) | class BridgeTowerTextModel(BridgeTowerPreTrainedModel): method __init__ (line 1040) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1052) | def get_input_embeddings(self): method set_input_embeddings (line 1055) | def set_input_embeddings(self, value): method _prune_heads (line 1058) | def _prune_heads(self, heads_to_prune): method forward (line 1067) | def forward( class BridgeTowerModel (line 1203) | class BridgeTowerModel(BridgeTowerPreTrainedModel): method __init__ (line 1204) | def __init__(self, config): method get_input_embeddings (line 1260) | def get_input_embeddings(self): method set_input_embeddings (line 1263) | def set_input_embeddings(self, value): method forward (line 1268) | def forward( method get_cls_features (line 1497) | def get_cls_features(self, text_features, image_features): class BridgeTowerPredictionHeadTransform (line 1504) | class BridgeTowerPredictionHeadTransform(nn.Module): method __init__ (line 1505) | def __init__(self, config): method forward (line 1514) | def forward(self, hidden_states): class BridgeTowerMLMHead (line 1521) | class BridgeTowerMLMHead(nn.Module): method __init__ (line 1522) | def __init__(self, config, weight=None): method forward (line 1531) | def forward(self, x): class BridgeTowerITMHead (line 1537) | class BridgeTowerITMHead(nn.Module): method __init__ (line 1538) | def __init__(self, hidden_size): method forward (line 1542) | def forward(self, x): class BridgeTowerForMaskedLM (line 1553) | class BridgeTowerForMaskedLM(BridgeTowerPreTrainedModel): method __init__ (line 1556) | def __init__(self, config): method get_output_embeddings (line 1565) | def get_output_embeddings(self): method set_output_embeddings (line 1568) | def set_output_embeddings(self, new_embeddings): method forward (line 1573) | def forward( class BridgeTowerForImageAndTextRetrieval (line 1662) | class BridgeTowerForImageAndTextRetrieval(BridgeTowerPreTrainedModel): method __init__ (line 1663) | def __init__(self, config): method forward (line 1675) | def forward( class BridgeTowerContrastiveHead (line 1757) | class BridgeTowerContrastiveHead(nn.Module): method __init__ (line 1758) | def __init__(self, hidden_size, embed_size): method forward (line 1762) | def forward(self, x): class BridgeTowerForContrastiveLearning (line 1773) | class BridgeTowerForContrastiveLearning(BridgeTowerPreTrainedModel): method __init__ (line 1774) | def __init__(self, config): method forward (line 1789) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bridgetower/processing_bridgetower.py class BridgeTowerProcessor (line 26) | class BridgeTowerProcessor(ProcessorMixin): method __init__ (line 46) | def __init__(self, image_processor, tokenizer): method __call__ (line 49) | def __call__( method batch_decode (line 101) | def batch_decode(self, *args, **kwargs): method decode (line 108) | def decode(self, *args, **kwargs): method model_input_names (line 116) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/bros/configuration_bros.py class BrosConfig (line 24) | class BrosConfig(PretrainedConfig): method __init__ (line 91) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bros/convert_bros_to_pytorch.py function get_configs (line 30) | def get_configs(model_name): function remove_ignore_keys_ (line 35) | def remove_ignore_keys_(state_dict): function rename_key (line 43) | def rename_key(name): function convert_state_dict (line 56) | def convert_state_dict(orig_state_dict, model): function convert_bros_checkpoint (line 68) | def convert_bros_checkpoint(model_name, pytorch_dump_folder_path=None, p... FILE: mplsandbox_for_rl/transformers/src/transformers/models/bros/modeling_bros.py class BrosSpadeOutput (line 130) | class BrosSpadeOutput(ModelOutput): class BrosPositionalEmbedding1D (line 161) | class BrosPositionalEmbedding1D(nn.Module): method __init__ (line 164) | def __init__(self, config): method forward (line 174) | def forward(self, pos_seq: torch.Tensor) -> torch.Tensor: class BrosPositionalEmbedding2D (line 182) | class BrosPositionalEmbedding2D(nn.Module): method __init__ (line 183) | def __init__(self, config): method forward (line 190) | def forward(self, bbox: torch.Tensor) -> torch.Tensor: class BrosBboxEmbeddings (line 201) | class BrosBboxEmbeddings(nn.Module): method __init__ (line 202) | def __init__(self, config): method forward (line 207) | def forward(self, bbox: torch.Tensor): class BrosTextEmbeddings (line 216) | class BrosTextEmbeddings(nn.Module): method __init__ (line 219) | def __init__(self, config): method forward (line 243) | def forward( class BrosSelfAttention (line 282) | class BrosSelfAttention(nn.Module): method __init__ (line 283) | def __init__(self, config): method transpose_for_scores (line 307) | def transpose_for_scores(self, x: torch.Tensor): method forward (line 315) | def forward( class BrosSelfOutput (line 421) | class BrosSelfOutput(nn.Module): method __init__ (line 422) | def __init__(self, config): method forward (line 428) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BrosAttention (line 435) | class BrosAttention(nn.Module): method __init__ (line 436) | def __init__(self, config): method prune_heads (line 442) | def prune_heads(self, heads): method forward (line 463) | def forward( class BrosIntermediate (line 490) | class BrosIntermediate(nn.Module): method __init__ (line 491) | def __init__(self, config): method forward (line 499) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BrosOutput (line 505) | class BrosOutput(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 BrosLayer (line 519) | class BrosLayer(nn.Module): method __init__ (line 520) | def __init__(self, config): method forward (line 534) | def forward( method feed_forward_chunk (line 603) | def feed_forward_chunk(self, attention_output): class BrosEncoder (line 609) | class BrosEncoder(nn.Module): method __init__ (line 610) | def __init__(self, config): method forward (line 615) | def forward( class BrosPooler (line 703) | class BrosPooler(nn.Module): method __init__ (line 704) | def __init__(self, config): method forward (line 709) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BrosRelationExtractor (line 718) | class BrosRelationExtractor(nn.Module): method __init__ (line 719) | def __init__(self, config): method forward (line 733) | def forward(self, query_layer: torch.Tensor, key_layer: torch.Tensor): class BrosPreTrainedModel (line 752) | class BrosPreTrainedModel(PreTrainedModel): method _init_weights (line 761) | def _init_weights(self, module): class BrosModel (line 782) | class BrosModel(BrosPreTrainedModel): method __init__ (line 783) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 795) | def get_input_embeddings(self): method set_input_embeddings (line 798) | def set_input_embeddings(self, value): method _prune_heads (line 801) | def _prune_heads(self, heads_to_prune): method forward (line 811) | def forward( class BrosForTokenClassification (line 960) | class BrosForTokenClassification(BrosPreTrainedModel): method __init__ (line 963) | def __init__(self, config): method forward (line 978) | def forward( class BrosSpadeEEForTokenClassification (line 1067) | class BrosSpadeEEForTokenClassification(BrosPreTrainedModel): method __init__ (line 1070) | def __init__(self, config): method forward (line 1097) | def forward( class BrosSpadeELForTokenClassification (line 1210) | class BrosSpadeELForTokenClassification(BrosPreTrainedModel): method __init__ (line 1213) | def __init__(self, config): method forward (line 1229) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/bros/processing_bros.py class BrosProcessor (line 26) | class BrosProcessor(ProcessorMixin): method __init__ (line 41) | def __init__(self, tokenizer=None, **kwargs): method __call__ (line 47) | def __call__( method batch_decode (line 92) | def batch_decode(self, *args, **kwargs): method decode (line 99) | def decode(self, *args, **kwargs): method model_input_names (line 107) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/byt5/convert_byt5_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 26) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: mplsandbox_for_rl/transformers/src/transformers/models/byt5/tokenization_byt5.py class ByT5Tokenizer (line 27) | class ByT5Tokenizer(PreTrainedTokenizer): method __init__ (line 62) | def __init__( method vocab_size (line 102) | def vocab_size(self): method get_vocab (line 105) | def get_vocab(self): method get_special_tokens_mask (line 110) | def get_special_tokens_mask( method _add_eos_if_not_present (line 138) | def _add_eos_if_not_present(self, token_ids: List[int]) -> List[int]: method create_token_type_ids_from_sequences (line 149) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 171) | def build_inputs_with_special_tokens( method _tokenize (line 197) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 202) | 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 217) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 232) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/camembert/configuration_camembert.py class CamembertConfig (line 29) | class CamembertConfig(PretrainedConfig): method __init__ (line 99) | def __init__( class CamembertOnnxConfig (line 140) | class CamembertOnnxConfig(OnnxConfig): method inputs (line 142) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/camembert/modeling_camembert.py class CamembertEmbeddings (line 73) | class CamembertEmbeddings(nn.Module): method __init__ (line 79) | def __init__(self, config): method forward (line 104) | def forward( method create_position_ids_from_inputs_embeds (line 144) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class CamembertSelfAttention (line 163) | class CamembertSelfAttention(nn.Module): method __init__ (line 164) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 190) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 195) | def forward( class CamembertSelfOutput (line 298) | class CamembertSelfOutput(nn.Module): method __init__ (line 299) | def __init__(self, config): method forward (line 305) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class CamembertAttention (line 318) | class CamembertAttention(nn.Module): method __init__ (line 319) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 327) | def prune_heads(self, heads): method forward (line 345) | def forward( class CamembertIntermediate (line 370) | class CamembertIntermediate(nn.Module): method __init__ (line 371) | def __init__(self, config): method forward (line 379) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CamembertOutput (line 386) | class CamembertOutput(nn.Module): method __init__ (line 387) | def __init__(self, config): method forward (line 393) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class CamembertLayer (line 401) | class CamembertLayer(nn.Module): method __init__ (line 402) | def __init__(self, config): method forward (line 416) | def forward( method feed_forward_chunk (line 481) | def feed_forward_chunk(self, attention_output): class CamembertEncoder (line 488) | class CamembertEncoder(nn.Module): method __init__ (line 489) | def __init__(self, config): method forward (line 495) | def forward( class CamembertPooler (line 582) | class CamembertPooler(nn.Module): method __init__ (line 583) | def __init__(self, config): method forward (line 588) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CamembertPreTrainedModel (line 597) | class CamembertPreTrainedModel(PreTrainedModel): method _init_weights (line 608) | def _init_weights(self, module): class CamembertClassificationHead (line 676) | class CamembertClassificationHead(nn.Module): method __init__ (line 679) | def __init__(self, config): method forward (line 688) | def forward(self, features, **kwargs): class CamembertLMHead (line 699) | class CamembertLMHead(nn.Module): method __init__ (line 702) | def __init__(self, config): method forward (line 711) | def forward(self, features, **kwargs): method _tie_weights (line 721) | def _tie_weights(self): class CamembertModel (line 734) | class CamembertModel(CamembertPreTrainedModel): method __init__ (line 753) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 765) | def get_input_embeddings(self): method set_input_embeddings (line 768) | def set_input_embeddings(self, value): method _prune_heads (line 771) | def _prune_heads(self, heads_to_prune): method forward (line 786) | def forward( class CamembertForMaskedLM (line 922) | class CamembertForMaskedLM(CamembertPreTrainedModel): method __init__ (line 925) | 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_embeddings): method forward (line 955) | def forward( class CamembertForSequenceClassification (line 1023) | class CamembertForSequenceClassification(CamembertPreTrainedModel): method __init__ (line 1024) | def __init__(self, config): method forward (line 1043) | def forward( class CamembertForMultipleChoice (line 1123) | class CamembertForMultipleChoice(CamembertPreTrainedModel): method __init__ (line 1124) | def __init__(self, config): method forward (line 1142) | def forward( class CamembertForTokenClassification (line 1218) | class CamembertForTokenClassification(CamembertPreTrainedModel): method __init__ (line 1219) | def __init__(self, config): method forward (line 1241) | def forward( class CamembertForQuestionAnswering (line 1304) | class CamembertForQuestionAnswering(CamembertPreTrainedModel): method __init__ (line 1305) | def __init__(self, config): method forward (line 1323) | def forward( class CamembertForCausalLM (line 1402) | class CamembertForCausalLM(CamembertPreTrainedModel): method __init__ (line 1405) | def __init__(self, config): method get_output_embeddings (line 1417) | def get_output_embeddings(self): method set_output_embeddings (line 1420) | def set_output_embeddings(self, new_embeddings): method forward (line 1425) | def forward( method prepare_inputs_for_generation (line 1531) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1552) | def _reorder_cache(self, past_key_values, beam_idx): function create_position_ids_from_input_ids (line 1562) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/camembert/modeling_tf_camembert.py class TFCamembertEmbeddings (line 167) | class TFCamembertEmbeddings(keras.layers.Layer): method __init__ (line 172) | def __init__(self, config, **kwargs): method build (line 183) | def build(self, input_shape=None): method create_position_ids_from_input_ids (line 212) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 226) | def call( class TFCamembertPooler (line 273) | class TFCamembertPooler(keras.layers.Layer): method __init__ (line 274) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 285) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 293) | def build(self, input_shape=None): class TFCamembertSelfAttention (line 303) | class TFCamembertSelfAttention(keras.layers.Layer): method __init__ (line 304) | def __init__(self, config: CamembertConfig, **kwargs): method transpose_for_scores (line 332) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 339) | def call( method build (line 420) | def build(self, input_shape=None): class TFCamembertSelfOutput (line 436) | class TFCamembertSelfOutput(keras.layers.Layer): method __init__ (line 437) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 447) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 454) | def build(self, input_shape=None): class TFCamembertAttention (line 467) | class TFCamembertAttention(keras.layers.Layer): method __init__ (line 468) | def __init__(self, config: CamembertConfig, **kwargs): method prune_heads (line 474) | def prune_heads(self, heads): method call (line 477) | def call( method build (line 506) | def build(self, input_shape=None): class TFCamembertIntermediate (line 519) | class TFCamembertIntermediate(keras.layers.Layer): method __init__ (line 520) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 533) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 539) | def build(self, input_shape=None): class TFCamembertOutput (line 549) | class TFCamembertOutput(keras.layers.Layer): method __init__ (line 550) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 560) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 567) | def build(self, input_shape=None): class TFCamembertLayer (line 580) | class TFCamembertLayer(keras.layers.Layer): method __init__ (line 581) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 594) | def call( method build (line 665) | def build(self, input_shape=None): class TFCamembertEncoder (line 684) | class TFCamembertEncoder(keras.layers.Layer): method __init__ (line 685) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 690) | def call( method build (line 752) | def build(self, input_shape=None): class TFCamembertMainLayer (line 764) | class TFCamembertMainLayer(keras.layers.Layer): method __init__ (line 767) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 784) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 788) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 793) | def _prune_heads(self, heads_to_prune): method call (line 802) | def call( method build (line 959) | def build(self, input_shape=None): class TFCamembertPreTrainedModel (line 974) | class TFCamembertPreTrainedModel(TFPreTrainedModel): class TFCamembertModel (line 989) | class TFCamembertModel(TFCamembertPreTrainedModel): method __init__ (line 990) | def __init__(self, config, *inputs, **kwargs): method call (line 1001) | def call( method build (line 1057) | def build(self, input_shape=None): class TFCamembertLMHead (line 1067) | class TFCamembertLMHead(keras.layers.Layer): method __init__ (line 1070) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1085) | def build(self, input_shape=None): method get_output_embeddings (line 1098) | def get_output_embeddings(self): method set_output_embeddings (line 1101) | def set_output_embeddings(self, value): method get_bias (line 1105) | def get_bias(self): method set_bias (line 1108) | def set_bias(self, value): method call (line 1112) | def call(self, hidden_states): class TFCamembertForMaskedLM (line 1132) | class TFCamembertForMaskedLM(TFCamembertPreTrainedModel, TFMaskedLanguag... method __init__ (line 1136) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1142) | def get_lm_head(self): method get_prefix_bias_name (line 1145) | def get_prefix_bias_name(self): method call (line 1159) | def call( method build (line 1208) | def build(self, input_shape=None): class TFCamembertClassificationHead (line 1221) | class TFCamembertClassificationHead(keras.layers.Layer): method __init__ (line 1224) | def __init__(self, config, **kwargs): method call (line 1241) | def call(self, features, training=False): method build (line 1249) | def build(self, input_shape=None): class TFCamembertForSequenceClassification (line 1269) | class TFCamembertForSequenceClassification(TFCamembertPreTrainedModel, T... method __init__ (line 1273) | def __init__(self, config, *inputs, **kwargs): method call (line 1289) | def call( method build (line 1337) | def build(self, input_shape=None): class TFCamembertForTokenClassification (line 1357) | class TFCamembertForTokenClassification(TFCamembertPreTrainedModel, TFTo... method __init__ (line 1362) | def __init__(self, config, *inputs, **kwargs): method call (line 1385) | def call( method build (line 1433) | def build(self, input_shape=None): class TFCamembertForMultipleChoice (line 1453) | class TFCamembertForMultipleChoice(TFCamembertPreTrainedModel, TFMultipl... method __init__ (line 1458) | def __init__(self, config, *inputs, **kwargs): method call (line 1477) | def call( method build (line 1538) | def build(self, input_shape=None): class TFCamembertForQuestionAnswering (line 1558) | class TFCamembertForQuestionAnswering(TFCamembertPreTrainedModel, TFQues... method __init__ (line 1562) | def __init__(self, config, *inputs, **kwargs): method call (line 1581) | def call( method build (line 1643) | def build(self, input_shape=None): class TFCamembertForCausalLM (line 1659) | class TFCamembertForCausalLM(TFCamembertPreTrainedModel, TFCausalLanguag... method __init__ (line 1663) | def __init__(self, config: CamembertConfig, *inputs, **kwargs): method get_lm_head (line 1672) | def get_lm_head(self): method get_prefix_bias_name (line 1675) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1680) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1699) | def call( method build (line 1780) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/camembert/tokenization_camembert.py class CamembertTokenizer (line 35) | class CamembertTokenizer(PreTrainedTokenizer): method __init__ (line 108) | def __init__( method vocab_size (line 168) | def vocab_size(self): method get_vocab (line 172) | def get_vocab(self): method _tokenize (line 177) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 180) | 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 __getstate__ (line 212) | def __getstate__(self): method __setstate__ (line 217) | def __setstate__(self, d): method save_vocabulary (line 227) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 244) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 270) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 297) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/camembert/tokenization_camembert_fast.py class CamembertTokenizerFast (line 40) | class CamembertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 96) | def __init__( method can_save_slow_tokenizer (line 129) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 132) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 158) | def create_token_type_ids_from_sequences( method save_vocabulary (line 181) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/canine/configuration_canine.py class CanineConfig (line 24) | class CanineConfig(PretrainedConfig): method __init__ (line 96) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/canine/convert_canine_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 26) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, pytorch_dump_pa... FILE: mplsandbox_for_rl/transformers/src/transformers/models/canine/modeling_canine.py class CanineModelOutputWithPooling (line 60) | class CanineModelOutputWithPooling(ModelOutput): function load_tf_weights_in_canine (line 94) | def load_tf_weights_in_canine(model, config, tf_checkpoint_path): class CanineEmbeddings (line 191) | class CanineEmbeddings(nn.Module): method __init__ (line 194) | def __init__(self, config): method _hash_bucket_tensors (line 218) | def _hash_bucket_tensors(self, input_ids, num_hashes: int, num_buckets... method _embed_hash_buckets (line 241) | def _embed_hash_buckets(self, input_ids, embedding_size: int, num_hash... method forward (line 255) | def forward( class CharactersToMolecules (line 292) | class CharactersToMolecules(nn.Module): method __init__ (line 295) | def __init__(self, config): method forward (line 310) | def forward(self, char_encoding: torch.Tensor) -> torch.Tensor: class ConvProjection (line 338) | class ConvProjection(nn.Module): method __init__ (line 344) | def __init__(self, config): method forward (line 359) | def forward( class CanineSelfAttention (line 396) | class CanineSelfAttention(nn.Module): method __init__ (line 397) | def __init__(self, config): method transpose_for_scores (line 419) | def transpose_for_scores(self, x): method forward (line 424) | def forward( class CanineSelfOutput (line 496) | class CanineSelfOutput(nn.Module): method __init__ (line 497) | def __init__(self, config): method forward (line 503) | def forward( class CanineAttention (line 512) | class CanineAttention(nn.Module): method __init__ (line 529) | def __init__( method prune_heads (line 562) | def prune_heads(self, heads): method forward (line 580) | def forward( class CanineIntermediate (line 655) | class CanineIntermediate(nn.Module): method __init__ (line 656) | def __init__(self, config): method forward (line 664) | def forward(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor: class CanineOutput (line 670) | class CanineOutput(nn.Module): method __init__ (line 671) | def __init__(self, config): method forward (line 677) | def forward(self, hidden_states: Tuple[torch.FloatTensor], input_tenso... class CanineLayer (line 684) | class CanineLayer(nn.Module): method __init__ (line 685) | def __init__( method forward (line 712) | def forward( method feed_forward_chunk (line 736) | def feed_forward_chunk(self, attention_output): class CanineEncoder (line 742) | class CanineEncoder(nn.Module): method __init__ (line 743) | def __init__( method forward (line 773) | def forward( class CaninePooler (line 818) | class CaninePooler(nn.Module): method __init__ (line 819) | def __init__(self, config): method forward (line 824) | def forward(self, hidden_states: Tuple[torch.FloatTensor]) -> torch.Fl... class CaninePredictionHeadTransform (line 833) | class CaninePredictionHeadTransform(nn.Module): method __init__ (line 834) | def __init__(self, config): method forward (line 843) | def forward(self, hidden_states: Tuple[torch.FloatTensor]) -> torch.Fl... class CanineLMPredictionHead (line 850) | class CanineLMPredictionHead(nn.Module): method __init__ (line 851) | def __init__(self, config): method forward (line 864) | def forward(self, hidden_states: Tuple[torch.FloatTensor]) -> torch.Fl... class CanineOnlyMLMHead (line 870) | class CanineOnlyMLMHead(nn.Module): method __init__ (line 871) | def __init__(self, config): method forward (line 875) | def forward( class CaninePreTrainedModel (line 883) | class CaninePreTrainedModel(PreTrainedModel): method _init_weights (line 894) | def _init_weights(self, module): class CanineModel (line 976) | class CanineModel(CaninePreTrainedModel): method __init__ (line 977) | def __init__(self, config, add_pooling_layer=True): method _prune_heads (line 1007) | def _prune_heads(self, heads_to_prune): method _create_3d_attention_mask_from_input_mask (line 1015) | def _create_3d_attention_mask_from_input_mask(self, from_tensor, to_ma... method _downsample_attention_mask (line 1042) | def _downsample_attention_mask(self, char_attention_mask: torch.Tensor... method _repeat_molecules (line 1059) | def _repeat_molecules(self, molecules: torch.Tensor, char_seq_length: ... method forward (line 1090) | def forward( class CanineForSequenceClassification (line 1256) | class CanineForSequenceClassification(CaninePreTrainedModel): method __init__ (line 1257) | def __init__(self, config): method forward (line 1274) | def forward( class CanineForMultipleChoice (line 1353) | class CanineForMultipleChoice(CaninePreTrainedModel): method __init__ (line 1354) | def __init__(self, config): method forward (line 1370) | def forward( class CanineForTokenClassification (line 1444) | class CanineForTokenClassification(CaninePreTrainedModel): method __init__ (line 1445) | def __init__(self, config): method forward (line 1458) | def forward( class CanineForQuestionAnswering (line 1550) | class CanineForQuestionAnswering(CaninePreTrainedModel): method __init__ (line 1551) | def __init__(self, config): method forward (line 1569) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/canine/tokenization_canine.py class CanineTokenizer (line 58) | class CanineTokenizer(PreTrainedTokenizer): method __init__ (line 72) | def __init__( method vocab_size (line 119) | def vocab_size(self) -> int: method get_vocab (line 122) | def get_vocab(self): method _tokenize (line 127) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 131) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 138) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 150) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 153) | 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 208) | def create_token_type_ids_from_sequences( method save_vocabulary (line 240) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/chameleon/configuration_chameleon.py class ChameleonVQVAEConfig (line 26) | class ChameleonVQVAEConfig(PretrainedConfig): method __init__ (line 66) | def __init__( class ChameleonConfig (line 99) | class ChameleonConfig(PretrainedConfig): method __init__ (line 192) | def __init__( method _rope_scaling_validation (line 257) | def _rope_scaling_validation(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/chameleon/convert_chameleon_weights_to_hf.py function compute_intermediate_size (line 70) | def compute_intermediate_size(n, ffn_dim_multiplier=1, multiple_of=256): function read_json (line 74) | def read_json(path): function write_json (line 79) | def write_json(text, path): function write_model (line 84) | def write_model(model_path, input_base_path, model_size, chameleon_versi... function main (line 437) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/chameleon/image_processing_chameleon.py function make_batched_images (line 47) | def make_batched_images(images) -> List[List[ImageInput]]: class ChameleonImageProcessor (line 70) | class ChameleonImageProcessor(BaseImageProcessor): method __init__ (line 111) | def __init__( method resize (line 145) | def resize( method preprocess (line 195) | def preprocess( method blend_rgba (line 345) | def blend_rgba(self, image: ImageInput) -> ImageInput: FILE: mplsandbox_for_rl/transformers/src/transformers/models/chameleon/modeling_chameleon.py function _prepare_4d_causal_attention_mask_with_cache_position (line 54) | def _prepare_4d_causal_attention_mask_with_cache_position( class ChameleonRMSNorm (line 117) | class ChameleonRMSNorm(nn.Module): method __init__ (line 118) | def __init__(self, hidden_size, eps=1e-6): method forward (line 126) | def forward(self, hidden_states): method extra_repr (line 133) | def extra_repr(self): class ChameleonRotaryEmbedding (line 142) | class ChameleonRotaryEmbedding(nn.Module): method __init__ (line 143) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 155) | def forward(self, x, position_ids): class ChameleonLinearScalingRotaryEmbedding (line 173) | class ChameleonLinearScalingRotaryEmbedding(ChameleonRotaryEmbedding): method forward (line 176) | def forward(self, x, position_ids): class ChameleonDynamicNTKScalingRotaryEmbedding (line 185) | class ChameleonDynamicNTKScalingRotaryEmbedding(ChameleonRotaryEmbedding): method forward (line 188) | def forward(self, x, position_ids): function rotate_half (line 205) | def rotate_half(x): function apply_rotary_pos_emb (line 213) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... class ChameleonMLP (line 241) | class ChameleonMLP(nn.Module): method __init__ (line 242) | def __init__(self, config): method forward (line 253) | def forward(self, x): class ChameleonLayerNorm (line 258) | class ChameleonLayerNorm(nn.LayerNorm): method __init__ (line 266) | def __init__(self, hidden_size, *args, **kwargs): method forward (line 270) | def forward(self, hidden_states): function repeat_kv (line 277) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class ChameleonAttention (line 289) | class ChameleonAttention(nn.Module): method __init__ (line 292) | def __init__(self, config: ChameleonConfig, layer_idx: Optional[int] =... method _init_rope (line 330) | def _init_rope(self): method forward (line 357) | def forward( class ChameleonFlashAttention2 (line 424) | class ChameleonFlashAttention2(ChameleonAttention): method __init__ (line 431) | def __init__(self, *args, **kwargs): method forward (line 440) | def forward( class ChameleonSdpaAttention (line 541) | class ChameleonSdpaAttention(ChameleonAttention): method forward (line 549) | def forward( class ChameleonDecoderLayer (line 643) | class ChameleonDecoderLayer(nn.Module): method __init__ (line 644) | def __init__(self, config: ChameleonConfig, layer_idx: int): method forward (line 654) | def forward( class ChameleonSwinDecoderLayer (line 718) | class ChameleonSwinDecoderLayer(nn.Module): method __init__ (line 719) | def __init__(self, config: ChameleonConfig, layer_idx: int): method forward (line 729) | def forward( class ChameleonVQVAEVectorQuantizer (line 791) | class ChameleonVQVAEVectorQuantizer(nn.Module): method __init__ (line 802) | def __init__(self, config): method forward (line 811) | def forward(self, hidden_state: torch.Tensor): class ChameleonVQVAEEncoderConvDownsample (line 839) | class ChameleonVQVAEEncoderConvDownsample(nn.Module): method __init__ (line 840) | def __init__(self, in_channels): method forward (line 844) | def forward(self, hidden_states): class ChameleonVQVAEEncoderResnetBlock (line 851) | class ChameleonVQVAEEncoderResnetBlock(nn.Module): method __init__ (line 852) | def __init__( method forward (line 875) | def forward(self, hidden_states): class ChameleonVQVAEEncoderAttnBlock (line 895) | class ChameleonVQVAEEncoderAttnBlock(nn.Module): method __init__ (line 896) | def __init__(self, in_channels): method forward (line 906) | def forward(self, hidden_states): class ChameleonVQVAEEncoder (line 930) | class ChameleonVQVAEEncoder(nn.Module): method __init__ (line 931) | def __init__(self, config): method forward (line 1000) | def forward(self, pixel_values: torch.LongTensor): class ChameleonVQVAE (line 1051) | class ChameleonVQVAE(PreTrainedModel): method _init_weights (line 1055) | def _init_weights(self, module): method __init__ (line 1067) | def __init__(self, config: ChameleonVQVAEConfig): method encode (line 1076) | def encode(self, pixel_values: torch.LongTensor): class ChameleonImageVocabularyMapping (line 1083) | class ChameleonImageVocabularyMapping: method __init__ (line 1088) | def __init__(self, vocab_map): method val2name (line 1093) | def val2name(self): method image_tokens (line 1097) | def image_tokens(self): method bpe2img (line 1101) | def bpe2img(self): method img2bpe (line 1110) | def img2bpe(self): method bpe2img_search_tensors (line 1114) | def bpe2img_search_tensors(self): method img2bpe_mapping_tensor (line 1118) | def img2bpe_mapping_tensor(self): method convert_img2bpe (line 1124) | def convert_img2bpe(self, img_batch: torch.Tensor) -> torch.Tensor: class ChameleonPreTrainedModel (line 1151) | class ChameleonPreTrainedModel(PreTrainedModel): method _init_weights (line 1164) | def _init_weights(self, module): class ChameleonModel (line 1251) | class ChameleonModel(ChameleonPreTrainedModel): method __init__ (line 1259) | def __init__(self, config: ChameleonConfig): method get_input_embeddings (line 1277) | def get_input_embeddings(self): method set_input_embeddings (line 1280) | def set_input_embeddings(self, value): method get_image_tokens (line 1283) | def get_image_tokens(self, pixel_values: torch.FloatTensor): method forward (line 1306) | def forward( method _update_causal_mask (line 1428) | def _update_causal_mask( class ChameleonForConditionalGeneration (line 1504) | class ChameleonForConditionalGeneration(ChameleonPreTrainedModel): method __init__ (line 1507) | def __init__(self, config): method get_input_embeddings (line 1516) | def get_input_embeddings(self): method set_input_embeddings (line 1519) | def set_input_embeddings(self, value): method get_output_embeddings (line 1522) | def get_output_embeddings(self): method set_output_embeddings (line 1525) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1528) | def set_decoder(self, decoder): method get_decoder (line 1531) | def get_decoder(self): method forward (line 1536) | def forward( method prepare_inputs_for_generation (line 1634) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/chameleon/processing_chameleon.py class ChameleonProcessor (line 28) | class ChameleonProcessor(ProcessorMixin): method __init__ (line 51) | def __init__(self, image_processor, tokenizer, image_seq_length: int =... method __call__ (line 58) | def __call__( method batch_decode (line 142) | def batch_decode(self, *args, **kwargs): method decode (line 150) | def decode(self, *args, **kwargs): method model_input_names (line 159) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/chinese_clip/configuration_chinese_clip.py class ChineseCLIPTextConfig (line 34) | class ChineseCLIPTextConfig(PretrainedConfig): method __init__ (line 106) | def __init__( method from_pretrained (line 145) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class ChineseCLIPVisionConfig (line 163) | class ChineseCLIPVisionConfig(PretrainedConfig): method __init__ (line 219) | def __init__( method from_pretrained (line 253) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class ChineseCLIPConfig (line 271) | class ChineseCLIPConfig(PretrainedConfig): method __init__ (line 320) | def __init__( method from_text_vision_configs (line 410) | def from_text_vision_configs( class ChineseCLIPOnnxConfig (line 422) | class ChineseCLIPOnnxConfig(OnnxConfig): method inputs (line 424) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 434) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 445) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 448) | def generate_dummy_inputs( method default_onnx_opset (line 464) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/chinese_clip/image_processing_chinese_clip.py class ChineseCLIPImageProcessor (line 51) | class ChineseCLIPImageProcessor(BaseImageProcessor): method __init__ (line 92) | def __init__( method resize (line 125) | def resize( method preprocess (line 165) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/chinese_clip/modeling_chinese_clip.py function contrastive_loss (line 53) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function chinese_clip_loss (line 57) | def chinese_clip_loss(similarity: torch.Tensor) -> torch.Tensor: class ChineseCLIPOutput (line 64) | class ChineseCLIPOutput(ModelOutput): method to_tuple (line 95) | def to_tuple(self) -> Tuple[Any]: class ChineseCLIPTextEmbeddings (line 103) | class ChineseCLIPTextEmbeddings(nn.Module): method __init__ (line 106) | def __init__(self, config): method forward (line 125) | def forward( class ChineseCLIPVisionEmbeddings (line 168) | class ChineseCLIPVisionEmbeddings(nn.Module): method __init__ (line 169) | def __init__(self, config: ChineseCLIPVisionConfig): method forward (line 191) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class ChineseCLIPTextSelfAttention (line 204) | class ChineseCLIPTextSelfAttention(nn.Module): method __init__ (line 205) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 231) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 236) | def forward( class ChineseCLIPTextSelfOutput (line 339) | class ChineseCLIPTextSelfOutput(nn.Module): method __init__ (line 340) | def __init__(self, config): method forward (line 346) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ChineseCLIPTextAttention (line 359) | class ChineseCLIPTextAttention(nn.Module): method __init__ (line 360) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 368) | def prune_heads(self, heads): method forward (line 386) | def forward( class ChineseCLIPVisionAttention (line 410) | class ChineseCLIPVisionAttention(nn.Module): method __init__ (line 413) | def __init__(self, config): method _shape (line 432) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 435) | def forward( class ChineseCLIPTextIntermediate (line 495) | class ChineseCLIPTextIntermediate(nn.Module): method __init__ (line 496) | def __init__(self, config): method forward (line 504) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ChineseCLIPTextOutput (line 511) | class ChineseCLIPTextOutput(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 ChineseCLIPVisionMLP (line 526) | class ChineseCLIPVisionMLP(nn.Module): method __init__ (line 527) | def __init__(self, config): method forward (line 534) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ChineseCLIPTextLayer (line 542) | class ChineseCLIPTextLayer(nn.Module): method __init__ (line 543) | def __init__(self, config): method forward (line 557) | def forward( method feed_forward_chunk (line 622) | def feed_forward_chunk(self, attention_output): class ChineseCLIPVisionLayer (line 628) | class ChineseCLIPVisionLayer(nn.Module): method __init__ (line 629) | def __init__(self, config: ChineseCLIPConfig): method forward (line 637) | def forward( class ChineseCLIPTextPooler (line 672) | class ChineseCLIPTextPooler(nn.Module): method __init__ (line 673) | def __init__(self, config): method forward (line 678) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ChineseCLIPPreTrainedModel (line 687) | class ChineseCLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 697) | def _init_weights(self, module): class ChineseCLIPTextEncoder (line 867) | class ChineseCLIPTextEncoder(nn.Module): method __init__ (line 868) | def __init__(self, config): method forward (line 874) | def forward( class ChineseCLIPVisionEncoder (line 960) | class ChineseCLIPVisionEncoder(nn.Module): method __init__ (line 969) | def __init__(self, config: ChineseCLIPConfig): method forward (line 975) | def forward( class ChineseCLIPVisionTransformer (line 1037) | class ChineseCLIPVisionTransformer(nn.Module): method __init__ (line 1038) | def __init__(self, config: ChineseCLIPVisionConfig): method forward (line 1050) | def forward( class ChineseCLIPTextModel (line 1098) | class ChineseCLIPTextModel(ChineseCLIPPreTrainedModel): method __init__ (line 1114) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1126) | def get_input_embeddings(self): method set_input_embeddings (line 1129) | def set_input_embeddings(self, value): method _prune_heads (line 1132) | def _prune_heads(self, heads_to_prune): method forward (line 1146) | def forward( class ChineseCLIPVisionModel (line 1281) | class ChineseCLIPVisionModel(ChineseCLIPPreTrainedModel): method __init__ (line 1286) | def __init__(self, config: ChineseCLIPVisionConfig): method get_input_embeddings (line 1292) | def get_input_embeddings(self) -> nn.Module: method forward (line 1297) | def forward( class ChineseCLIPModel (line 1337) | class ChineseCLIPModel(ChineseCLIPPreTrainedModel): method __init__ (line 1340) | def __init__(self, config: ChineseCLIPConfig): method get_text_features (line 1373) | def get_text_features( method get_image_features (line 1423) | def get_image_features( method forward (line 1474) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/chinese_clip/processing_chinese_clip.py class ChineseCLIPProcessor (line 25) | class ChineseCLIPProcessor(ProcessorMixin): method __init__ (line 44) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 63) | 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): FILE: mplsandbox_for_rl/transformers/src/transformers/models/clap/configuration_clap.py class ClapTextConfig (line 27) | class ClapTextConfig(PretrainedConfig): method __init__ (line 98) | def __init__( method from_pretrained (line 141) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class ClapAudioConfig (line 159) | class ClapAudioConfig(PretrainedConfig): method __init__ (line 249) | def __init__( method from_pretrained (line 311) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class ClapConfig (line 329) | class ClapConfig(PretrainedConfig): method __init__ (line 381) | def __init__( method from_text_audio_configs (line 418) | def from_text_audio_configs(cls, text_config: ClapTextConfig, audio_co... FILE: mplsandbox_for_rl/transformers/src/transformers/models/clap/convert_clap_original_pytorch_to_hf.py function init_clap (line 40) | def init_clap(checkpoint_path, model_type, enable_fusion=False): function get_config_from_original (line 49) | def get_config_from_original(clap_model): function rename_state_dict (line 61) | def rename_state_dict(state_dict): function convert_clap_checkpoint (line 104) | def convert_clap_checkpoint(checkpoint_path, pytorch_dump_folder_path, c... FILE: mplsandbox_for_rl/transformers/src/transformers/models/clap/feature_extraction_clap.py class ClapFeatureExtractor (line 32) | class ClapFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 84) | def __init__( method to_dict (line 137) | def to_dict(self) -> Dict[str, Any]: method _np_extract_fbank_features (line 153) | def _np_extract_fbank_features(self, waveform: np.array, mel_filters: ... method _random_mel_fusion (line 175) | def _random_mel_fusion(self, mel, total_frames, chunk_frames): method _get_input_mel (line 200) | def _get_input_mel(self, waveform: np.array, max_length, truncation, p... method __call__ (line 258) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/clap/modeling_clap.py function interpolate (line 51) | def interpolate(hidden_states, ratio): function window_partition (line 68) | def window_partition(hidden_states, window_size): function window_reverse (line 89) | def window_reverse(windows, window_size, height, width): function create_position_ids_from_input_ids (line 109) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... function contrastive_loss (line 127) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: class ClapTextModelOutput (line 134) | class ClapTextModelOutput(ModelOutput): class ClapAudioModelOutput (line 163) | class ClapAudioModelOutput(ModelOutput): class ClapOutput (line 193) | class ClapOutput(ModelOutput): method to_tuple (line 222) | def to_tuple(self) -> Tuple[Any]: class ClapDropPath (line 230) | class ClapDropPath(nn.Module): method __init__ (line 236) | def __init__(self, drop_prob=None): method forward (line 240) | def forward(self, hidden_states): class ClapAudioAFFBlock (line 255) | class ClapAudioAFFBlock(nn.Module): method __init__ (line 261) | def __init__(self, config: ClapAudioConfig): method forward (line 285) | def forward(self, hidden_states, residual): class ClapAudioPatchEmbed (line 295) | class ClapAudioPatchEmbed(nn.Module): method __init__ (line 301) | def __init__(self, config: ClapAudioConfig): method forward (line 343) | def forward(self, hidden_states, is_longer_idx=None): class ClapAudioSelfAttention (line 394) | class ClapAudioSelfAttention(nn.Module): method __init__ (line 395) | def __init__(self, config, dim, num_heads, window_size): method transpose_for_scores (line 432) | def transpose_for_scores(self, x): method forward (line 437) | def forward( class ClapAudioSelfOutput (line 495) | class ClapAudioSelfOutput(nn.Module): method __init__ (line 496) | def __init__(self, config, dim): method forward (line 501) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ClapAudioAttention (line 509) | class ClapAudioAttention(nn.Module): method __init__ (line 510) | def __init__(self, config, dim, num_heads, window_size): method prune_heads (line 516) | def prune_heads(self, heads): method forward (line 534) | def forward( class ClapAudioIntermediate (line 548) | class ClapAudioIntermediate(nn.Module): method __init__ (line 549) | def __init__(self, config, dim): method forward (line 557) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ClapAudioOutput (line 564) | class ClapAudioOutput(nn.Module): method __init__ (line 565) | def __init__(self, config, dim): method forward (line 570) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ClapAudioLayer (line 577) | class ClapAudioLayer(nn.Module): method __init__ (line 578) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 591) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 599) | def get_attn_mask(self, height, width, dtype, device): method maybe_pad (line 627) | def maybe_pad(self, hidden_states, height, width): method forward (line 634) | def forward( class ClapAudioStage (line 703) | class ClapAudioStage(nn.Module): method __init__ (line 704) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 729) | def forward( class ClapAudioPatchMerging (line 763) | class ClapAudioPatchMerging(nn.Module): method __init__ (line 776) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 783) | def maybe_pad(self, input_feature, height, width): method forward (line 791) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... class ClapAudioEncoder (line 817) | class ClapAudioEncoder(nn.Module): method __init__ (line 818) | def __init__(self, config): method reshape_mel2img (line 858) | def reshape_mel2img(self, normalized_input_features): method forward (line 894) | def forward( class ClapProjectionLayer (line 1122) | class ClapProjectionLayer(nn.Module): method __init__ (line 1123) | def __init__(self, config: Union[ClapAudioConfig, ClapTextConfig]): method forward (line 1133) | def forward(self, hidden_states): class ClapTextEmbeddings (line 1141) | class ClapTextEmbeddings(nn.Module): method __init__ (line 1147) | def __init__(self, config): method forward (line 1172) | def forward( method create_position_ids_from_inputs_embeds (line 1212) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class ClapTextSelfAttention (line 1231) | class ClapTextSelfAttention(nn.Module): method __init__ (line 1232) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 1258) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 1263) | def forward( class ClapTextSelfOutput (line 1366) | class ClapTextSelfOutput(nn.Module): method __init__ (line 1367) | def __init__(self, config): method forward (line 1373) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ClapTextAttention (line 1386) | class ClapTextAttention(nn.Module): method __init__ (line 1387) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 1395) | def prune_heads(self, heads): method forward (line 1413) | def forward( class ClapTextIntermediate (line 1438) | class ClapTextIntermediate(nn.Module): method __init__ (line 1439) | def __init__(self, config): method forward (line 1447) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ClapTextOutput (line 1454) | class ClapTextOutput(nn.Module): method __init__ (line 1455) | def __init__(self, config): method forward (line 1461) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ClapTextLayer (line 1469) | class ClapTextLayer(nn.Module): method __init__ (line 1470) | def __init__(self, config): method forward (line 1484) | def forward( method feed_forward_chunk (line 1549) | def feed_forward_chunk(self, attention_output): class ClapTextEncoder (line 1556) | class ClapTextEncoder(nn.Module): method __init__ (line 1557) | def __init__(self, config): method forward (line 1563) | def forward( class ClapTextPooler (line 1650) | class ClapTextPooler(nn.Module): method __init__ (line 1651) | def __init__(self, config): method forward (line 1656) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ClapPreTrainedModel (line 1665) | class ClapPreTrainedModel(PreTrainedModel): method _init_weights (line 1675) | def _init_weights(self, module): class ClapAudioModel (line 1698) | class ClapAudioModel(ClapPreTrainedModel): method __init__ (line 1702) | def __init__(self, config: ClapAudioConfig): method get_input_embeddings (line 1708) | def get_input_embeddings(self) -> nn.Module: method forward (line 1713) | def forward( class ClapTextModel (line 1756) | class ClapTextModel(ClapPreTrainedModel): method __init__ (line 1774) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1786) | def get_input_embeddings(self): method set_input_embeddings (line 1789) | def set_input_embeddings(self, value): method forward (line 1792) | def forward( class ClapModel (line 1924) | class ClapModel(ClapPreTrainedModel): method __init__ (line 1927) | def __init__(self, config: ClapConfig): method get_text_features (line 1960) | def get_text_features( method get_audio_features (line 2008) | def get_audio_features( method forward (line 2055) | def forward( class ClapTextModelWithProjection (line 2157) | class ClapTextModelWithProjection(ClapPreTrainedModel): method __init__ (line 2160) | def __init__(self, config: ClapTextConfig): method get_input_embeddings (line 2167) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 2170) | def set_input_embeddings(self, value): method forward (line 2175) | def forward( class ClapAudioModelWithProjection (line 2233) | class ClapAudioModelWithProjection(ClapPreTrainedModel): method __init__ (line 2237) | def __init__(self, config: ClapAudioConfig): method get_input_embeddings (line 2244) | def get_input_embeddings(self) -> nn.Module: method forward (line 2249) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/clap/processing_clap.py class ClapProcessor (line 23) | class ClapProcessor(ProcessorMixin): method __init__ (line 40) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 43) | def __call__(self, text=None, audios=None, return_tensors=None, **kwar... method batch_decode (line 99) | def batch_decode(self, *args, **kwargs): method decode (line 106) | def decode(self, *args, **kwargs): method model_input_names (line 114) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/clip/configuration_clip.py class CLIPTextConfig (line 34) | class CLIPTextConfig(PretrainedConfig): method __init__ (line 97) | def __init__( method from_pretrained (line 134) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class CLIPVisionConfig (line 152) | class CLIPVisionConfig(PretrainedConfig): method __init__ (line 209) | def __init__( method from_pretrained (line 243) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class CLIPConfig (line 261) | class CLIPConfig(PretrainedConfig): method __init__ (line 309) | def __init__( method from_text_vision_configs (line 398) | def from_text_vision_configs(cls, text_config: CLIPTextConfig, vision_... class CLIPOnnxConfig (line 410) | class CLIPOnnxConfig(OnnxConfig): method inputs (line 412) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 422) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 433) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 436) | def generate_dummy_inputs( method default_onnx_opset (line 452) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/clip/image_processing_clip.py class CLIPImageProcessor (line 52) | class CLIPImageProcessor(BaseImageProcessor): method __init__ (line 93) | def __init__( method resize (line 151) | def resize( method preprocess (line 200) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/clip/modeling_clip.py function contrastive_loss (line 60) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clip_loss (line 64) | def clip_loss(similarity: torch.Tensor) -> torch.Tensor: class CLIPVisionModelOutput (line 71) | class CLIPVisionModelOutput(ModelOutput): class CLIPTextModelOutput (line 100) | class CLIPTextModelOutput(ModelOutput): class CLIPOutput (line 129) | class CLIPOutput(ModelOutput): method to_tuple (line 158) | def to_tuple(self) -> Tuple[Any]: class CLIPVisionEmbeddings (line 165) | class CLIPVisionEmbeddings(nn.Module): method __init__ (line 166) | def __init__(self, config: CLIPVisionConfig): method forward (line 188) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class CLIPTextEmbeddings (line 200) | class CLIPTextEmbeddings(nn.Module): method __init__ (line 201) | def __init__(self, config: CLIPTextConfig): method forward (line 213) | def forward( class CLIPAttention (line 233) | class CLIPAttention(nn.Module): method __init__ (line 236) | def __init__(self, config): method _shape (line 255) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 258) | def forward( class CLIPFlashAttention2 (line 337) | class CLIPFlashAttention2(CLIPAttention): method __init__ (line 345) | def __init__(self, *args, **kwargs): method forward (line 354) | def forward( class CLIPSdpaAttention (line 424) | class CLIPSdpaAttention(CLIPAttention): method forward (line 432) | def forward( class CLIPMLP (line 504) | class CLIPMLP(nn.Module): method __init__ (line 505) | def __init__(self, config): method forward (line 512) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CLIPEncoderLayer (line 519) | class CLIPEncoderLayer(nn.Module): method __init__ (line 520) | def __init__(self, config: CLIPConfig): method forward (line 528) | def forward( class CLIPPreTrainedModel (line 569) | class CLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 581) | def _init_weights(self, module): class CLIPEncoder (line 738) | class CLIPEncoder(nn.Module): method __init__ (line 747) | def __init__(self, config: CLIPConfig): method forward (line 753) | def forward( class CLIPTextTransformer (line 835) | class CLIPTextTransformer(nn.Module): method __init__ (line 836) | def __init__(self, config: CLIPTextConfig): method forward (line 852) | def forward( class CLIPTextModel (line 939) | class CLIPTextModel(CLIPPreTrainedModel): method __init__ (line 944) | def __init__(self, config: CLIPTextConfig): method get_input_embeddings (line 950) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 953) | def set_input_embeddings(self, value): method forward (line 958) | def forward( class CLIPVisionTransformer (line 996) | class CLIPVisionTransformer(nn.Module): method __init__ (line 997) | def __init__(self, config: CLIPVisionConfig): method forward (line 1009) | def forward( class CLIPVisionModel (line 1058) | class CLIPVisionModel(CLIPPreTrainedModel): method __init__ (line 1063) | def __init__(self, config: CLIPVisionConfig): method get_input_embeddings (line 1069) | def get_input_embeddings(self) -> nn.Module: method forward (line 1074) | def forward( class CLIPModel (line 1114) | class CLIPModel(CLIPPreTrainedModel): method __init__ (line 1118) | def __init__(self, config: CLIPConfig): method get_text_features (line 1154) | def get_text_features( method get_image_features (line 1201) | def get_image_features( method forward (line 1251) | def forward( class CLIPTextModelWithProjection (line 1351) | class CLIPTextModelWithProjection(CLIPPreTrainedModel): method __init__ (line 1356) | def __init__(self, config: CLIPTextConfig): method get_input_embeddings (line 1367) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1370) | def set_input_embeddings(self, value): method forward (line 1375) | def forward( class CLIPVisionModelWithProjection (line 1433) | class CLIPVisionModelWithProjection(CLIPPreTrainedModel): method __init__ (line 1437) | def __init__(self, config: CLIPVisionConfig): method get_input_embeddings (line 1448) | def get_input_embeddings(self) -> nn.Module: method forward (line 1453) | def forward( class CLIPForImageClassification (line 1513) | class CLIPForImageClassification(CLIPPreTrainedModel): method __init__ (line 1516) | def __init__(self, config: CLIPConfig) -> None: method forward (line 1540) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/clip/modeling_flax_clip.py class FlaxCLIPTextModelOutput (line 160) | class FlaxCLIPTextModelOutput(ModelOutput): class FlaxCLIPOutput (line 190) | class FlaxCLIPOutput(ModelOutput): method to_tuple (line 218) | def to_tuple(self) -> Tuple[Any]: class FlaxCLIPVisionEmbeddings (line 225) | class FlaxCLIPVisionEmbeddings(nn.Module): method setup (line 229) | def setup(self): method __call__ (line 251) | def __call__(self, pixel_values): class FlaxCLIPTextEmbeddings (line 263) | class FlaxCLIPTextEmbeddings(nn.Module): method setup (line 267) | def setup(self): method __call__ (line 278) | def __call__(self, input_ids, position_ids): class FlaxCLIPAttention (line 286) | class FlaxCLIPAttention(nn.Module): method setup (line 290) | def setup(self): method _split_heads (line 311) | def _split_heads(self, hidden_states): method _merge_heads (line 314) | def _merge_heads(self, hidden_states): method __call__ (line 317) | def __call__( class FlaxCLIPMLP (line 377) | class FlaxCLIPMLP(nn.Module): method setup (line 381) | def setup(self): method __call__ (line 390) | def __call__(self, hidden_states): class FlaxCLIPEncoderLayer (line 397) | class FlaxCLIPEncoderLayer(nn.Module): method setup (line 401) | def setup(self): method __call__ (line 407) | def __call__( class FlaxCLIPLayerCollection (line 439) | class FlaxCLIPLayerCollection(nn.Module): method setup (line 443) | def setup(self): method __call__ (line 449) | def __call__( class FlaxCLIPEncoder (line 486) | class FlaxCLIPEncoder(nn.Module): method setup (line 490) | def setup(self): method __call__ (line 493) | def __call__( class FlaxCLIPTextTransformer (line 512) | class FlaxCLIPTextTransformer(nn.Module): method setup (line 516) | def setup(self): method __call__ (line 524) | def __call__( class FlaxCLIPVisionTransformer (line 578) | class FlaxCLIPVisionTransformer(nn.Module): method setup (line 582) | def setup(self): method __call__ (line 588) | def __call__( class FlaxCLIPTextPreTrainedModel (line 628) | class FlaxCLIPTextPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 632) | def __init__( method init_weights (line 644) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 665) | def __call__( class FlaxCLIPVisionPreTrainedModel (line 707) | class FlaxCLIPVisionPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 712) | def __init__( method init_weights (line 726) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 745) | def __call__( class FlaxCLIPPreTrainedModel (line 779) | class FlaxCLIPPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 783) | def __init__( method init_weights (line 797) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 820) | def __call__( method get_text_features (line 865) | def get_text_features( method get_image_features (line 932) | def get_image_features( class FlaxCLIPTextModule (line 984) | class FlaxCLIPTextModule(nn.Module): method setup (line 988) | def setup(self): method __call__ (line 991) | def __call__( class FlaxCLIPTextModel (line 1012) | class FlaxCLIPTextModel(FlaxCLIPTextPreTrainedModel): class FlaxCLIPTextModelWithProjectionModule (line 1041) | class FlaxCLIPTextModelWithProjectionModule(nn.Module): method setup (line 1045) | def setup(self): method __call__ (line 1049) | def __call__( class FlaxCLIPTextModelWithProjection (line 1083) | class FlaxCLIPTextModelWithProjection(FlaxCLIPTextPreTrainedModel): class FlaxCLIPVisionModule (line 1113) | class FlaxCLIPVisionModule(nn.Module): method setup (line 1117) | def setup(self): method __call__ (line 1120) | def __call__( class FlaxCLIPVisionModel (line 1137) | class FlaxCLIPVisionModel(FlaxCLIPVisionPreTrainedModel): class FlaxCLIPModule (line 1171) | class FlaxCLIPModule(nn.Module): method setup (line 1175) | def setup(self): method __call__ (line 1203) | def __call__( class FlaxCLIPModel (line 1263) | class FlaxCLIPModel(FlaxCLIPPreTrainedModel): FILE: mplsandbox_for_rl/transformers/src/transformers/models/clip/modeling_tf_clip.py function _expand_mask (line 58) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): function contrastive_loss (line 73) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function clip_loss (line 81) | def clip_loss(similarity: tf.Tensor) -> tf.Tensor: class TFCLIPOutput (line 88) | class TFCLIPOutput(ModelOutput): method to_tuple (line 118) | def to_tuple(self) -> Tuple[Any]: class TFCLIPVisionEmbeddings (line 125) | class TFCLIPVisionEmbeddings(keras.layers.Layer): method __init__ (line 126) | def __init__(self, config: CLIPVisionConfig, **kwargs): method build (line 149) | 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(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(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( method build (line 355) | def build(self, input_shape=None): class TFCLIPMLP (line 373) | class TFCLIPMLP(keras.layers.Layer): method __init__ (line 374) | def __init__(self, config: CLIPConfig, **kwargs): method call (line 391) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 397) | def build(self, input_shape=None): class TFCLIPEncoderLayer (line 409) | class TFCLIPEncoderLayer(keras.layers.Layer): method __init__ (line 410) | def __init__(self, config: CLIPConfig, **kwargs): method call (line 419) | def call( method build (line 460) | def build(self, input_shape=None): class TFCLIPEncoder (line 478) | class TFCLIPEncoder(keras.layers.Layer): method __init__ (line 487) | def __init__(self, config: CLIPConfig, **kwargs): method call (line 492) | def call( method build (line 532) | def build(self, input_shape=None): class TFCLIPTextTransformer (line 542) | class TFCLIPTextTransformer(keras.layers.Layer): method __init__ (line 543) | def __init__(self, config: CLIPTextConfig, **kwargs): method call (line 554) | def call( method _build_causal_attention_mask (line 625) | def _build_causal_attention_mask(self, batch_size, seq_length, dtype=t... method build (line 643) | def build(self, input_shape=None): class TFCLIPTextMainLayer (line 659) | class TFCLIPTextMainLayer(keras.layers.Layer): method __init__ (line 662) | def __init__(self, config: CLIPTextConfig, **kwargs): method get_input_embeddings (line 667) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 670) | def set_input_embeddings(self, value: tf.Variable): method call (line 675) | def call( method build (line 705) | def build(self, input_shape=None): class TFCLIPVisionTransformer (line 714) | class TFCLIPVisionTransformer(keras.layers.Layer): method __init__ (line 715) | def __init__(self, config: CLIPVisionConfig, **kwargs): method call (line 724) | def call( method build (line 759) | def build(self, input_shape=None): class TFCLIPVisionMainLayer (line 778) | class TFCLIPVisionMainLayer(keras.layers.Layer): method __init__ (line 781) | def __init__(self, config: CLIPVisionConfig, **kwargs): method get_input_embeddings (line 786) | def get_input_embeddings(self) -> keras.layers.Layer: method call (line 790) | def call( method build (line 811) | def build(self, input_shape=None): class TFCLIPMainLayer (line 821) | class TFCLIPMainLayer(keras.layers.Layer): method __init__ (line 824) | def __init__(self, config: CLIPConfig, **kwargs): method build (line 865) | def build(self, input_shape: tf.TensorShape = None): method get_text_features (line 890) | def get_text_features( method get_image_features (line 924) | def get_image_features( method call (line 949) | def call( class TFCLIPPreTrainedModel (line 1024) | class TFCLIPPreTrainedModel(TFPreTrainedModel): class TFCLIPTextModel (line 1178) | class TFCLIPTextModel(TFCLIPPreTrainedModel): method __init__ (line 1181) | def __init__(self, config: CLIPTextConfig, *inputs, **kwargs): method call (line 1189) | def call( method build (line 1229) | def build(self, input_shape=None): class TFCLIPVisionModel (line 1238) | class TFCLIPVisionModel(TFCLIPPreTrainedModel): method __init__ (line 1242) | def __init__(self, config: CLIPVisionConfig, *inputs, **kwargs): method call (line 1250) | def call( method build (line 1291) | def build(self, input_shape=None): class TFCLIPModel (line 1301) | class TFCLIPModel(TFCLIPPreTrainedModel): method __init__ (line 1304) | def __init__(self, config: CLIPConfig, *inputs, **kwargs): method get_text_features (line 1311) | def get_text_features( method get_image_features (line 1351) | def get_image_features( method call (line 1394) | def call( method serving_output (line 1445) | def serving_output(self, output: TFCLIPOutput) -> TFCLIPOutput: method build (line 1451) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/clip/processing_clip.py class CLIPProcessor (line 25) | class CLIPProcessor(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 119) | def batch_decode(self, *args, **kwargs): method decode (line 126) | def decode(self, *args, **kwargs): method model_input_names (line 134) | def model_input_names(self): method feature_extractor_class (line 140) | def feature_extractor_class(self): method feature_extractor (line 148) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/clip/tokenization_clip.py function bytes_to_unicode (line 38) | def bytes_to_unicode(): function get_pairs (line 62) | def get_pairs(word): function whitespace_clean (line 76) | def whitespace_clean(text): function whitespace_tokenize (line 83) | def whitespace_tokenize(text): class BasicTokenizer (line 93) | class BasicTokenizer: method __init__ (line 116) | def __init__( method tokenize (line 132) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 170) | def _run_strip_accents(self, text): method _run_split_on_punc (line 181) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 203) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 216) | def _is_chinese_char(self, cp): method _clean_text (line 240) | def _clean_text(self, text): class CLIPTokenizer (line 254) | class CLIPTokenizer(PreTrainedTokenizer): method __init__ (line 283) | def __init__( method vocab_size (line 333) | def vocab_size(self): method get_vocab (line 336) | def get_vocab(self): method build_inputs_with_special_tokens (line 339) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 366) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 394) | def create_token_type_ids_from_sequences( method bpe (line 417) | def bpe(self, token): method _tokenize (line 459) | def _tokenize(self, text): method _convert_token_to_id (line 474) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 478) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 482) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 489) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/clip/tokenization_clip_fast.py class CLIPTokenizerFast (line 31) | class CLIPTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 61) | def __init__( method _wrap_decode_method_backend_tokenizer (line 95) | def _wrap_decode_method_backend_tokenizer(self): method build_inputs_with_special_tokens (line 109) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 136) | def create_token_type_ids_from_sequences( method save_vocabulary (line 159) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/clipseg/configuration_clipseg.py class CLIPSegTextConfig (line 27) | class CLIPSegTextConfig(PretrainedConfig): method __init__ (line 88) | def __init__( method from_pretrained (line 121) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class CLIPSegVisionConfig (line 139) | class CLIPSegVisionConfig(PretrainedConfig): method __init__ (line 194) | def __init__( method from_pretrained (line 226) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class CLIPSegConfig (line 244) | class CLIPSegConfig(PretrainedConfig): method __init__ (line 310) | def __init__( method from_text_vision_configs (line 420) | def from_text_vision_configs(cls, text_config: CLIPSegTextConfig, visi... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/clipseg/modeling_clipseg.py function contrastive_loss (line 48) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clipseg_loss (line 53) | def clipseg_loss(similarity: torch.Tensor) -> torch.Tensor: class CLIPSegOutput (line 61) | class CLIPSegOutput(ModelOutput): method to_tuple (line 90) | def to_tuple(self) -> Tuple[Any]: class CLIPSegDecoderOutput (line 98) | class CLIPSegDecoderOutput(ModelOutput): class CLIPSegImageSegmentationOutput (line 118) | class CLIPSegImageSegmentationOutput(ModelOutput): method to_tuple (line 135) | def to_tuple(self) -> Tuple[Any]: class CLIPSegVisionEmbeddings (line 142) | class CLIPSegVisionEmbeddings(nn.Module): method __init__ (line 144) | def __init__(self, config: CLIPSegVisionConfig): method interpolate_position_embeddings (line 166) | def interpolate_position_embeddings(self, new_size): method forward (line 185) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class CLIPSegTextEmbeddings (line 204) | class CLIPSegTextEmbeddings(nn.Module): method __init__ (line 205) | def __init__(self, config: CLIPSegTextConfig): method forward (line 217) | def forward( class CLIPSegAttention (line 238) | class CLIPSegAttention(nn.Module): method __init__ (line 241) | def __init__(self, config): method _shape (line 260) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 263) | def forward( class CLIPSegMLP (line 343) | class CLIPSegMLP(nn.Module): method __init__ (line 344) | def __init__(self, config): method forward (line 351) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CLIPSegEncoderLayer (line 359) | class CLIPSegEncoderLayer(nn.Module): method __init__ (line 360) | def __init__(self, config: CLIPSegConfig): method forward (line 368) | def forward( class CLIPSegPreTrainedModel (line 409) | class CLIPSegPreTrainedModel(PreTrainedModel): method _init_weights (line 419) | def _init_weights(self, module): class CLIPSegEncoder (line 558) | class CLIPSegEncoder(nn.Module): method __init__ (line 567) | def __init__(self, config: CLIPSegConfig): method forward (line 573) | def forward( class CLIPSegTextTransformer (line 655) | class CLIPSegTextTransformer(nn.Module): method __init__ (line 656) | def __init__(self, config: CLIPSegTextConfig): method forward (line 670) | def forward( class CLIPSegTextModel (line 752) | class CLIPSegTextModel(CLIPSegPreTrainedModel): method __init__ (line 757) | def __init__(self, config: CLIPSegTextConfig): method get_input_embeddings (line 763) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 766) | def set_input_embeddings(self, value): method forward (line 771) | def forward( class CLIPSegVisionTransformer (line 807) | class CLIPSegVisionTransformer(nn.Module): method __init__ (line 809) | def __init__(self, config: CLIPSegVisionConfig): method forward (line 822) | def forward( class CLIPSegVisionModel (line 867) | class CLIPSegVisionModel(CLIPSegPreTrainedModel): method __init__ (line 871) | def __init__(self, config: CLIPSegVisionConfig): method get_input_embeddings (line 877) | def get_input_embeddings(self) -> nn.Module: method forward (line 882) | def forward( class CLIPSegModel (line 920) | class CLIPSegModel(CLIPSegPreTrainedModel): method __init__ (line 923) | def __init__(self, config: CLIPSegConfig): method get_text_features (line 956) | def get_text_features( method get_image_features (line 1003) | def get_image_features( method forward (line 1053) | def forward( class CLIPSegDecoderLayer (line 1145) | class CLIPSegDecoderLayer(nn.Module): method __init__ (line 1152) | def __init__(self, config: CLIPSegConfig): method forward (line 1160) | def forward( class CLIPSegDecoder (line 1202) | class CLIPSegDecoder(CLIPSegPreTrainedModel): method __init__ (line 1203) | def __init__(self, config: CLIPSegConfig): method forward (line 1245) | def forward( class CLIPSegForImageSegmentation (line 1308) | class CLIPSegForImageSegmentation(CLIPSegPreTrainedModel): method __init__ (line 1311) | def __init__(self, config: CLIPSegConfig): method get_conditional_embeddings (line 1324) | def get_conditional_embeddings( method forward (line 1355) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/clipseg/processing_clipseg.py class CLIPSegProcessor (line 25) | class CLIPSegProcessor(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, visual_prompt=None, return_... method batch_decode (line 133) | def batch_decode(self, *args, **kwargs): method decode (line 140) | def decode(self, *args, **kwargs): method feature_extractor_class (line 148) | def feature_extractor_class(self): method feature_extractor (line 156) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/clvp/configuration_clvp.py class ClvpEncoderConfig (line 31) | class ClvpEncoderConfig(PretrainedConfig): method __init__ (line 95) | def __init__( method from_pretrained (line 135) | def from_pretrained( class ClvpDecoderConfig (line 162) | class ClvpDecoderConfig(PretrainedConfig): method __init__ (line 257) | def __init__( method from_pretrained (line 318) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class ClvpConfig (line 336) | class ClvpConfig(PretrainedConfig): method __init__ (line 391) | def __init__( method from_sub_model_configs (line 424) | def from_sub_model_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/clvp/convert_clvp_to_hf.py function update_index (line 75) | def update_index(present_index): function convert_encoder_weights (line 82) | def convert_encoder_weights(original_weights): function convert_decoder_weights (line 111) | def convert_decoder_weights(original_weights): function _download (line 183) | def _download(url: str, root: str): function convert_clvp_weights (line 194) | def convert_clvp_weights(checkpoint_path, pytorch_dump_folder_path): FILE: mplsandbox_for_rl/transformers/src/transformers/models/clvp/feature_extraction_clvp.py class ClvpFeatureExtractor (line 33) | class ClvpFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 71) | def __init__( method _np_extract_fbank_features (line 109) | def _np_extract_fbank_features(self, waveform: np.array) -> np.ndarray: method __call__ (line 131) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/clvp/modeling_clvp.py function contrastive_loss (line 59) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clvp_loss (line 64) | def clvp_loss(similarity: torch.Tensor) -> torch.Tensor: function rotate_half (line 71) | def rotate_half(x): function apply_rotary_pos_emb (line 78) | def apply_rotary_pos_emb(q, k, v, cos, sin, position_ids, unsqueeze_dim=1): function _pad_extra_bos_eos_tokens (line 107) | def _pad_extra_bos_eos_tokens( class ClvpEncoderOutput (line 151) | class ClvpEncoderOutput(ModelOutput): class ClvpOutput (line 181) | class ClvpOutput(ModelOutput): class ClvpRMSNorm (line 226) | class ClvpRMSNorm(nn.Module): method __init__ (line 227) | def __init__(self, hidden_size, eps=1e-6): method forward (line 235) | def forward(self, hidden_states): method extra_repr (line 242) | def extra_repr(self): class ClvpRotaryPositionalEmbedding (line 246) | class ClvpRotaryPositionalEmbedding(nn.Module): method __init__ (line 252) | def __init__(self, config): method forward (line 261) | def forward(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor: class ClvpSelfAttention (line 276) | class ClvpSelfAttention(nn.Module): method __init__ (line 281) | def __init__(self, config): method _shape (line 307) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 310) | def forward( class ClvpGatedLinearUnit (line 405) | class ClvpGatedLinearUnit(nn.Module): method __init__ (line 411) | def __init__(self, config): method forward (line 416) | def forward(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor: class ClvpEncoderMLP (line 421) | class ClvpEncoderMLP(nn.Module): method __init__ (line 426) | def __init__(self, config): method forward (line 434) | def forward(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor: class ClvpEncoderLayer (line 441) | class ClvpEncoderLayer(nn.Module): method __init__ (line 442) | def __init__(self, config: ClvpConfig): method forward (line 452) | def forward( class ClvpDecoderMLP (line 504) | class ClvpDecoderMLP(nn.Module): method __init__ (line 505) | def __init__(self, intermediate_size, config): method forward (line 513) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... class ClvpDecoderLayer (line 521) | class ClvpDecoderLayer(nn.Module): method __init__ (line 522) | def __init__(self, config): method forward (line 533) | def forward( class ClvpConditioningEncoder (line 573) | class ClvpConditioningEncoder(nn.Module): method __init__ (line 586) | def __init__(self, config: ClvpConfig): method compute_groupnorm_groups (line 615) | def compute_groupnorm_groups(self, channels: int, groups: int = 32): method forward (line 636) | def forward( class ClvpPreTrainedModel (line 711) | class ClvpPreTrainedModel(PreTrainedModel): method _init_weights (line 722) | def _init_weights(self, module): class ClvpEncoder (line 871) | class ClvpEncoder(ClvpPreTrainedModel): method __init__ (line 880) | def __init__(self, config: ClvpConfig): method get_input_embeddings (line 897) | def get_input_embeddings(self): method set_input_embeddings (line 900) | def set_input_embeddings(self, value): method forward (line 903) | def forward( class ClvpDecoder (line 1027) | class ClvpDecoder(ClvpPreTrainedModel): method __init__ (line 1032) | def __init__(self, config): 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 _prune_heads (line 1055) | def _prune_heads(self, heads_to_prune): method forward (line 1063) | def forward( class ClvpModel (line 1210) | class ClvpModel(ClvpPreTrainedModel): method __init__ (line 1211) | def __init__(self, config: ClvpDecoderConfig): method get_input_embeddings (line 1219) | def get_input_embeddings(self): method set_input_embeddings (line 1222) | def set_input_embeddings(self, value): method get_decoder (line 1225) | def get_decoder(self): method forward (line 1229) | def forward( class ClvpForCausalLM (line 1281) | class ClvpForCausalLM(ClvpPreTrainedModel): method __init__ (line 1282) | def __init__(self, config): method get_input_embeddings (line 1294) | def get_input_embeddings(self): method set_input_embeddings (line 1297) | def set_input_embeddings(self, new_embeddings): method _prepare_model_inputs (line 1300) | def _prepare_model_inputs( method prepare_inputs_for_generation (line 1367) | def prepare_inputs_for_generation( method forward (line 1419) | def forward( method _reorder_cache (line 1492) | def _reorder_cache( class ClvpModelForConditionalGeneration (line 1512) | class ClvpModelForConditionalGeneration(ClvpPreTrainedModel): method __init__ (line 1515) | def __init__(self, config: ClvpConfig): method fix_speech_decoder_output (line 1550) | def fix_speech_decoder_output(self, speech_ids: torch.LongTensor) -> t... method get_text_features (line 1580) | def get_text_features( method get_speech_features (line 1637) | def get_speech_features( method forward (line 1736) | def forward( method generate (line 1867) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/clvp/number_normalizer.py class EnglishNormalizer (line 21) | class EnglishNormalizer: method __init__ (line 22) | def __init__(self): method number_to_words (line 63) | def number_to_words(self, num: int) -> str: method convert_to_ascii (line 122) | def convert_to_ascii(self, text: str) -> str: method _expand_dollars (line 128) | def _expand_dollars(self, m: str) -> str: method _remove_commas (line 152) | def _remove_commas(self, m: str) -> str: method _expand_decimal_point (line 158) | def _expand_decimal_point(self, m: str) -> str: method _expand_ordinal (line 164) | def _expand_ordinal(self, num: str) -> str: method _expand_number (line 177) | def _expand_number(self, m: str) -> str: method normalize_numbers (line 197) | def normalize_numbers(self, text: str) -> str: method expand_abbreviations (line 210) | def expand_abbreviations(self, text: str) -> str: method collapse_whitespace (line 218) | def collapse_whitespace(self, text: str) -> str: method __call__ (line 224) | def __call__(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/clvp/processing_clvp.py class ClvpProcessor (line 23) | class ClvpProcessor(ProcessorMixin): method __init__ (line 45) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 48) | def __call__(self, *args, **kwargs): method batch_decode (line 77) | def batch_decode(self, *args, **kwargs): method decode (line 85) | def decode(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/clvp/tokenization_clvp.py function bytes_to_unicode (line 39) | def bytes_to_unicode(): function get_pairs (line 64) | def get_pairs(word): class ClvpTokenizer (line 78) | class ClvpTokenizer(PreTrainedTokenizer): method __init__ (line 140) | def __init__( method vocab_size (line 192) | def vocab_size(self): method normalizer (line 196) | def normalizer(self): method get_vocab (line 201) | def get_vocab(self): method bpe (line 205) | def bpe(self, token): method build_inputs_with_special_tokens (line 248) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 260) | def get_special_tokens_mask( method _tokenize (line 292) | def _tokenize(self, text): method _convert_token_to_id (line 310) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 315) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 320) | def convert_tokens_to_string(self, tokens): method clean_up_tokenization (line 326) | def clean_up_tokenization(self, text): method save_vocabulary (line 337) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/code_llama/tokenization_code_llama.py class CodeLlamaTokenizer (line 49) | class CodeLlamaTokenizer(PreTrainedTokenizer): method __init__ (line 118) | def __init__( method unk_token_length (line 181) | def unk_token_length(self): method get_spm_processor (line 184) | def get_spm_processor(self): method prefix_token (line 198) | def prefix_token(self): method prefix_id (line 202) | def prefix_id(self): method middle_token (line 208) | def middle_token(self): method middle_id (line 212) | def middle_id(self): method suffix_token (line 218) | def suffix_token(self): method suffix_id (line 222) | def suffix_id(self): method eot_token (line 228) | def eot_token(self): method eot_id (line 232) | def eot_id(self): method vocab_size (line 238) | def vocab_size(self): method get_vocab (line 243) | def get_vocab(self): method tokenize (line 249) | def tokenize(self, prefix, suffix=None, suffix_first=False, **kwargs) ... method _tokenize (line 281) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 300) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 305) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 310) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 329) | def save_vocabulary(self, save_directory, filename_prefix: Optional[st... method build_inputs_with_special_tokens (line 357) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 369) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 407) | def create_token_type_ids_from_sequences( method __getstate__ (line 440) | def __getstate__(self): method __setstate__ (line 446) | def __setstate__(self, d): FILE: mplsandbox_for_rl/transformers/src/transformers/models/code_llama/tokenization_code_llama_fast.py class CodeLlamaTokenizerFast (line 52) | class CodeLlamaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 119) | def __init__( method can_save_slow_tokenizer (line 175) | def can_save_slow_tokenizer(self) -> bool: method update_post_processor (line 179) | def update_post_processor(self): method prefix_token (line 206) | def prefix_token(self): method prefix_id (line 210) | def prefix_id(self): method middle_token (line 216) | def middle_token(self): method middle_id (line 220) | def middle_id(self): method suffix_token (line 226) | def suffix_token(self): method suffix_id (line 230) | def suffix_id(self): method eot_id (line 236) | def eot_id(self): method eot_token (line 242) | def eot_token(self): method add_eos_token (line 246) | def add_eos_token(self): method add_bos_token (line 250) | def add_bos_token(self): method add_eos_token (line 254) | def add_eos_token(self, value): method add_bos_token (line 259) | def add_bos_token(self, value): method set_infilling_processor (line 263) | def set_infilling_processor(self, reset, suffix_first=False, add_speci... method encode_plus (line 311) | def encode_plus(self, text, text_pair=None, suffix_first=False, add_sp... method save_vocabulary (line 333) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 352) | def build_inputs_with_special_tokens( FILE: mplsandbox_for_rl/transformers/src/transformers/models/codegen/configuration_codegen.py class CodeGenConfig (line 29) | class CodeGenConfig(PretrainedConfig): method __init__ (line 102) | def __init__( class CodeGenOnnxConfig (line 149) | class CodeGenOnnxConfig(OnnxConfigWithPast): method __init__ (line 150) | def __init__( method inputs (line 163) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 174) | def num_layers(self) -> int: method num_attention_heads (line 178) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 181) | def generate_dummy_inputs( method default_onnx_opset (line 226) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/codegen/modeling_codegen.py function _prepare_4d_causal_attention_mask_with_cache_position (line 40) | def _prepare_4d_causal_attention_mask_with_cache_position( function create_sinusoidal_positions (line 94) | def create_sinusoidal_positions(num_pos: int, dim: int) -> torch.Tensor: function rotate_every_two (line 101) | def rotate_every_two(x: torch.Tensor) -> torch.Tensor: function apply_rotary_pos_emb (line 109) | def apply_rotary_pos_emb(tensor: torch.Tensor, sin: torch.Tensor, cos: t... class CodeGenAttention (line 115) | class CodeGenAttention(nn.Module): method __init__ (line 116) | def __init__(self, config, layer_idx=None): method _split_heads (line 146) | def _split_heads(self, x, n_head, dim_head, mp_num): method _merge_heads (line 151) | def _merge_heads(self, tensor, num_attention_heads, attn_head_size): method _attn (line 164) | def _attn( method forward (line 195) | def forward( class CodeGenMLP (line 275) | class CodeGenMLP(nn.Module): method __init__ (line 276) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 286) | def forward(self, hidden_states: Optional[torch.FloatTensor]) -> torch... class CodeGenBlock (line 295) | class CodeGenBlock(nn.Module): method __init__ (line 297) | def __init__(self, config, layer_idx=None): method forward (line 304) | def forward( class CodeGenPreTrainedModel (line 341) | class CodeGenPreTrainedModel(PreTrainedModel): method __init__ (line 356) | def __init__(self, *inputs, **kwargs): method _init_weights (line 359) | def _init_weights(self, module): class CodeGenModel (line 462) | class CodeGenModel(CodeGenPreTrainedModel): method __init__ (line 463) | def __init__(self, config): method get_input_embeddings (line 479) | def get_input_embeddings(self): method set_input_embeddings (line 482) | def set_input_embeddings(self, new_embeddings): method forward (line 491) | def forward( method _update_causal_mask (line 627) | def _update_causal_mask( class CodeGenForCausalLM (line 705) | class CodeGenForCausalLM(CodeGenPreTrainedModel): method __init__ (line 708) | def __init__(self, config): method get_output_embeddings (line 716) | def get_output_embeddings(self): method set_output_embeddings (line 719) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 723) | def prepare_inputs_for_generation( method forward (line 804) | def forward( method _reorder_cache (line 875) | def _reorder_cache( FILE: mplsandbox_for_rl/transformers/src/transformers/models/codegen/tokenization_codegen.py function bytes_to_unicode (line 46) | def bytes_to_unicode(): function get_pairs (line 70) | def get_pairs(word): class CodeGenTokenizer (line 84) | class CodeGenTokenizer(PreTrainedTokenizer): method __init__ (line 143) | def __init__( method vocab_size (line 194) | def vocab_size(self): method get_vocab (line 197) | def get_vocab(self): method bpe (line 200) | def bpe(self, token): method build_inputs_with_special_tokens (line 242) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method _tokenize (line 255) | def _tokenize(self, text): method _convert_token_to_id (line 265) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 269) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 273) | def convert_tokens_to_string(self, tokens): method create_token_type_ids_from_sequences (line 279) | def create_token_type_ids_from_sequences( method save_vocabulary (line 308) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 337) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method decode (line 343) | def decode( method truncate (line 390) | def truncate(self, completion, truncate_before_pattern): FILE: mplsandbox_for_rl/transformers/src/transformers/models/codegen/tokenization_codegen_fast.py class CodeGenTokenizerFast (line 44) | class CodeGenTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 101) | def __init__( method _batch_encode_plus (line 148) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 157) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method create_token_type_ids_from_sequences (line 168) | def create_token_type_ids_from_sequences( method save_vocabulary (line 197) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method decode (line 201) | def decode( method truncate (line 246) | def truncate(self, completion, truncate_before_pattern): FILE: mplsandbox_for_rl/transformers/src/transformers/models/cohere/configuration_cohere.py class CohereConfig (line 29) | class CohereConfig(PretrainedConfig): method __init__ (line 105) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/cohere/modeling_cohere.py function _prepare_4d_causal_attention_mask_with_cache_position (line 63) | def _prepare_4d_causal_attention_mask_with_cache_position( class CohereLayerNorm (line 116) | class CohereLayerNorm(nn.Module): method __init__ (line 117) | def __init__(self, hidden_size=None, eps=1e-5, bias=False): method forward (line 123) | def forward(self, hidden_states): class CohereRotaryEmbedding (line 136) | class CohereRotaryEmbedding(nn.Module): method __init__ (line 137) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 147) | def forward(self, x, position_ids): function rotate_half (line 164) | def rotate_half(x): function apply_rotary_pos_emb (line 172) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... class CohereMLP (line 202) | class CohereMLP(nn.Module): method __init__ (line 203) | def __init__(self, config): method forward (line 214) | def forward(self, x): function repeat_kv (line 220) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class CohereAttention (line 232) | class CohereAttention(nn.Module): method __init__ (line 235) | def __init__(self, config: CohereConfig, layer_idx: Optional[int] = No... method _init_rope (line 277) | def _init_rope(self): method forward (line 285) | def forward( class CohereFlashAttention2 (line 354) | class CohereFlashAttention2(CohereAttention): method __init__ (line 361) | def __init__(self, *args, **kwargs): method forward (line 370) | def forward( class CohereSdpaAttention (line 469) | class CohereSdpaAttention(CohereAttention): method forward (line 477) | def forward( class CohereDecoderLayer (line 570) | class CohereDecoderLayer(nn.Module): method __init__ (line 571) | def __init__(self, config: CohereConfig, layer_idx: int): method forward (line 580) | def forward( class CoherePreTrainedModel (line 658) | class CoherePreTrainedModel(PreTrainedModel): method _init_weights (line 670) | def _init_weights(self, module): class CohereModel (line 758) | class CohereModel(CoherePreTrainedModel): method __init__ (line 767) | def __init__(self, config: CohereConfig): method get_input_embeddings (line 782) | def get_input_embeddings(self): method set_input_embeddings (line 785) | def set_input_embeddings(self, value): method forward (line 790) | def forward( method _update_causal_mask (line 906) | def _update_causal_mask( class CohereForCausalLM (line 979) | class CohereForCausalLM(CoherePreTrainedModel): method __init__ (line 983) | def __init__(self, config): method get_input_embeddings (line 993) | def get_input_embeddings(self): method set_input_embeddings (line 996) | def set_input_embeddings(self, value): method get_output_embeddings (line 999) | def get_output_embeddings(self): method set_output_embeddings (line 1002) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1005) | def set_decoder(self, decoder): method get_decoder (line 1008) | def get_decoder(self): method forward (line 1014) | def forward( method prepare_inputs_for_generation (line 1103) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/cohere/tokenization_cohere_fast.py class CohereTokenizerFast (line 50) | class CohereTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 116) | def __init__( method _batch_encode_plus (line 166) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 176) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method update_post_processor (line 187) | def update_post_processor(self): method add_eos_token (line 214) | def add_eos_token(self): method add_bos_token (line 218) | def add_bos_token(self): method add_eos_token (line 222) | def add_eos_token(self, value): method add_bos_token (line 227) | def add_bos_token(self, value): method apply_tool_use_template (line 231) | def apply_tool_use_template( method apply_grounded_generation_template (line 386) | def apply_grounded_generation_template( method build_inputs_with_special_tokens (line 503) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... FILE: mplsandbox_for_rl/transformers/src/transformers/models/conditional_detr/configuration_conditional_detr.py class ConditionalDetrConfig (line 32) | class ConditionalDetrConfig(PretrainedConfig): method __init__ (line 144) | def __init__( method num_attention_heads (line 249) | def num_attention_heads(self) -> int: method hidden_size (line 253) | def hidden_size(self) -> int: class ConditionalDetrOnnxConfig (line 257) | class ConditionalDetrOnnxConfig(OnnxConfig): method inputs (line 261) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 270) | def atol_for_validation(self) -> float: method default_onnx_opset (line 274) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/conditional_detr/convert_conditional_detr_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 177) | def rename_key(state_dict, old, new): function rename_backbone_keys (line 182) | def rename_backbone_keys(state_dict): function read_in_q_k_v (line 194) | def read_in_q_k_v(state_dict, is_panoptic=False): function prepare_img (line 214) | def prepare_img(): function convert_conditional_detr_checkpoint (line 222) | def convert_conditional_detr_checkpoint(model_name, pytorch_dump_folder_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py function rgb_to_id (line 27) | def rgb_to_id(x): class ConditionalDetrFeatureExtractor (line 36) | class ConditionalDetrFeatureExtractor(ConditionalDetrImageProcessor): method __init__ (line 37) | def __init__(self, *args, **kwargs) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/conditional_detr/image_processing_conditional_detr.py function get_size_with_aspect_ratio (line 90) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_resize_output_image_size (line 130) | def get_resize_output_image_size( function get_image_size_for_max_height_width (line 159) | def get_image_size_for_max_height_width( function get_numpy_to_framework_fn (line 195) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 220) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 234) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 249) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 257) | def get_max_height_width( function make_pixel_mask (line 276) | def make_pixel_mask( function convert_coco_poly_to_mask (line 295) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 330) | def prepare_coco_detection_annotation( function masks_to_boxes (line 391) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 426) | def prepare_coco_panoptic_annotation( function get_segmentation_image (line 468) | def get_segmentation_image( function get_mask_area (line 494) | def get_mask_area(seg_img: np.ndarray, target_size: Tuple[int, int], n_c... function score_labels_from_class_probabilities (line 504) | def score_labels_from_class_probabilities(logits: np.ndarray) -> Tuple[n... function post_process_panoptic_sample (line 513) | def post_process_panoptic_sample( function resize_annotation (line 599) | def resize_annotation( function binary_mask_to_rle (line 651) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 674) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 696) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 725) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 744) | def compute_segments( class ConditionalDetrImageProcessor (line 804) | class ConditionalDetrImageProcessor(BaseImageProcessor): method __init__ (line 860) | def __init__( method from_dict (line 932) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method prepare_annotation (line 946) | def prepare_annotation( method resize (line 979) | def resize( method resize_annotation (line 1048) | def resize_annotation( method rescale (line 1062) | def rescale( method normalize_annotation (line 1091) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method _update_annotation_for_padded_image (line 1099) | def _update_annotation_for_padded_image( method _pad_image (line 1143) | def _pad_image( method pad (line 1177) | def pad( method preprocess (line 1263) | def preprocess( method post_process (line 1529) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 1575) | def post_process_object_detection( method post_process_semantic_segmentation (line 1635) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... method post_process_instance_segmentation (line 1683) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1767) | def post_process_panoptic_segmentation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/conditional_detr/modeling_conditional_detr.py class ConditionalDetrDecoderOutput (line 64) | class ConditionalDetrDecoderOutput(BaseModelOutputWithCrossAttentions): class ConditionalDetrModelOutput (line 96) | class ConditionalDetrModelOutput(Seq2SeqModelOutput): class ConditionalDetrObjectDetectionOutput (line 139) | class ConditionalDetrObjectDetectionOutput(ModelOutput): class ConditionalDetrSegmentationOutput (line 203) | class ConditionalDetrSegmentationOutput(ModelOutput): class ConditionalDetrFrozenBatchNorm2d (line 273) | class ConditionalDetrFrozenBatchNorm2d(nn.Module): method __init__ (line 281) | def __init__(self, n): method _load_from_state_dict (line 288) | def _load_from_state_dict( method forward (line 299) | def forward(self, x): function replace_batch_norm (line 313) | def replace_batch_norm(model): class ConditionalDetrConvEncoder (line 338) | class ConditionalDetrConvEncoder(nn.Module): method __init__ (line 346) | def __init__(self, config): method forward (line 398) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class ConditionalDetrConvModel (line 411) | class ConditionalDetrConvModel(nn.Module): method __init__ (line 416) | def __init__(self, conv_encoder, position_embedding): method forward (line 421) | def forward(self, pixel_values, pixel_mask): class ConditionalDetrSinePositionEmbedding (line 432) | class ConditionalDetrSinePositionEmbedding(nn.Module): method __init__ (line 438) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 449) | def forward(self, pixel_values, pixel_mask): class ConditionalDetrLearnedPositionEmbedding (line 470) | class ConditionalDetrLearnedPositionEmbedding(nn.Module): method __init__ (line 475) | def __init__(self, embedding_dim=256): method forward (line 480) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 494) | def build_position_encoding(config): function gen_sine_position_embeddings (line 508) | def gen_sine_position_embeddings(pos_tensor, d_model): function inverse_sigmoid (line 523) | def inverse_sigmoid(x, eps=1e-5): class DetrAttention (line 531) | class DetrAttention(nn.Module): method __init__ (line 538) | def __init__( method _shape (line 562) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 565) | def with_pos_embed(self, tensor: torch.Tensor, object_queries: Optiona... method forward (line 568) | def forward( class ConditionalDetrAttention (line 660) | class ConditionalDetrAttention(nn.Module): method __init__ (line 668) | def __init__( method _qk_shape (line 697) | def _qk_shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method _v_shape (line 700) | def _v_shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method forward (line 703) | def forward( class ConditionalDetrEncoderLayer (line 778) | class ConditionalDetrEncoderLayer(nn.Module): method __init__ (line 779) | def __init__(self, config: ConditionalDetrConfig): method forward (line 795) | def forward( class ConditionalDetrDecoderLayer (line 849) | class ConditionalDetrDecoderLayer(nn.Module): method __init__ (line 850) | def __init__(self, config: ConditionalDetrConfig): method forward (line 891) | def forward( class MLP (line 1021) | class MLP(nn.Module): method __init__ (line 1030) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 1036) | def forward(self, x): class ConditionalDetrPreTrainedModel (line 1043) | class ConditionalDetrPreTrainedModel(PreTrainedModel): method _init_weights (line 1049) | def _init_weights(self, module): class ConditionalDetrEncoder (line 1129) | class ConditionalDetrEncoder(ConditionalDetrPreTrainedModel): method __init__ (line 1144) | def __init__(self, config: ConditionalDetrConfig): method forward (line 1157) | def forward( class ConditionalDetrDecoder (line 1243) | class ConditionalDetrDecoder(ConditionalDetrPreTrainedModel): method __init__ (line 1258) | def __init__(self, config: ConditionalDetrConfig): method forward (line 1278) | def forward( class ConditionalDetrModel (line 1451) | class ConditionalDetrModel(ConditionalDetrPreTrainedModel): method __init__ (line 1452) | def __init__(self, config: ConditionalDetrConfig): method get_encoder (line 1471) | def get_encoder(self): method get_decoder (line 1474) | def get_decoder(self): method freeze_backbone (line 1477) | def freeze_backbone(self): method unfreeze_backbone (line 1481) | def unfreeze_backbone(self): method forward (line 1487) | def forward( class ConditionalDetrForObjectDetection (line 1620) | class ConditionalDetrForObjectDetection(ConditionalDetrPreTrainedModel): method __init__ (line 1621) | def __init__(self, config: ConditionalDetrConfig): method _set_aux_loss (line 1640) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1648) | def forward( class ConditionalDetrForSegmentation (line 1808) | class ConditionalDetrForSegmentation(ConditionalDetrPreTrainedModel): method __init__ (line 1809) | def __init__(self, config: ConditionalDetrConfig): method forward (line 1832) | def forward( function _expand (line 2042) | def _expand(tensor, length: int): class ConditionalDetrMaskHeadSmallConv (line 2047) | class ConditionalDetrMaskHeadSmallConv(nn.Module): method __init__ (line 2052) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 2086) | def forward(self, x: Tensor, bbox_mask: Tensor, fpns: List[Tensor]): class ConditionalDetrMHAttentionMap (line 2128) | class ConditionalDetrMHAttentionMap(nn.Module): method __init__ (line 2131) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0.0, bias... method forward (line 2142) | def forward(self, q, k, mask: Optional[Tensor] = None): function dice_loss (line 2157) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 2177) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class ConditionalDetrLoss (line 2208) | class ConditionalDetrLoss(nn.Module): method __init__ (line 2226) | def __init__(self, matcher, num_classes, focal_alpha, losses): method loss_labels (line 2234) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 2269) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2285) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 2310) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2344) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2351) | def _get_target_permutation_idx(self, indices): method get_loss (line 2358) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2370) | def forward(self, outputs, targets): class ConditionalDetrMLPPredictionHead (line 2418) | class ConditionalDetrMLPPredictionHead(nn.Module): method __init__ (line 2427) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2433) | def forward(self, x): class ConditionalDetrHungarianMatcher (line 2440) | class ConditionalDetrHungarianMatcher(nn.Module): method __init__ (line 2457) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2468) | def forward(self, outputs, targets): function _upcast (line 2521) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2530) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2547) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2564) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 2589) | def _max_by_axis(the_list): class NestedTensor (line 2599) | class NestedTensor: method __init__ (line 2600) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2604) | def to(self, device): method decompose (line 2613) | def decompose(self): method __repr__ (line 2616) | def __repr__(self): function nested_tensor_from_tensor_list (line 2621) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: mplsandbox_for_rl/transformers/src/transformers/models/convbert/configuration_convbert.py class ConvBertConfig (line 28) | class ConvBertConfig(PretrainedConfig): method __init__ (line 93) | def __init__( class ConvBertOnnxConfig (line 144) | class ConvBertOnnxConfig(OnnxConfig): method inputs (line 146) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/convbert/modeling_convbert.py function load_tf_weights_in_convbert (line 48) | def load_tf_weights_in_convbert(model, config, tf_checkpoint_path): class ConvBertEmbeddings (line 172) | class ConvBertEmbeddings(nn.Module): method __init__ (line 175) | def __init__(self, config): method forward (line 193) | def forward( class ConvBertPreTrainedModel (line 232) | class ConvBertPreTrainedModel(PreTrainedModel): method _init_weights (line 243) | def _init_weights(self, module): class SeparableConv1D (line 260) | class SeparableConv1D(nn.Module): method __init__ (line 263) | def __init__(self, config, input_filters, output_filters, kernel_size,... method forward (line 279) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertSelfAttention (line 286) | class ConvBertSelfAttention(nn.Module): method __init__ (line 287) | def __init__(self, config): method transpose_for_scores (line 326) | def transpose_for_scores(self, x): method forward (line 331) | def forward( class ConvBertSelfOutput (line 414) | class ConvBertSelfOutput(nn.Module): method __init__ (line 415) | def __init__(self, config): method forward (line 421) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ConvBertAttention (line 428) | class ConvBertAttention(nn.Module): method __init__ (line 429) | def __init__(self, config): method prune_heads (line 435) | def prune_heads(self, heads): method forward (line 453) | def forward( class GroupedLinearLayer (line 473) | class GroupedLinearLayer(nn.Module): method __init__ (line 474) | def __init__(self, input_size, output_size, num_groups): method forward (line 484) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertIntermediate (line 495) | class ConvBertIntermediate(nn.Module): method __init__ (line 496) | def __init__(self, config): method forward (line 509) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertOutput (line 515) | class ConvBertOutput(nn.Module): method __init__ (line 516) | def __init__(self, config): method forward (line 527) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ConvBertLayer (line 534) | class ConvBertLayer(nn.Module): method __init__ (line 535) | def __init__(self, config): method forward (line 549) | def forward( method feed_forward_chunk (line 589) | def feed_forward_chunk(self, attention_output): class ConvBertEncoder (line 595) | class ConvBertEncoder(nn.Module): method __init__ (line 596) | def __init__(self, config): method forward (line 602) | def forward( class ConvBertPredictionHeadTransform (line 664) | class ConvBertPredictionHeadTransform(nn.Module): method __init__ (line 665) | def __init__(self, config): method forward (line 674) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertModel (line 749) | class ConvBertModel(ConvBertPreTrainedModel): method __init__ (line 750) | def __init__(self, config): method get_input_embeddings (line 762) | def get_input_embeddings(self): method set_input_embeddings (line 765) | def set_input_embeddings(self, value): method _prune_heads (line 768) | def _prune_heads(self, heads_to_prune): method forward (line 782) | def forward( class ConvBertGeneratorPredictions (line 845) | class ConvBertGeneratorPredictions(nn.Module): method __init__ (line 848) | def __init__(self, config): method forward (line 855) | def forward(self, generator_hidden_states: torch.FloatTensor) -> torch... class ConvBertForMaskedLM (line 864) | class ConvBertForMaskedLM(ConvBertPreTrainedModel): method __init__ (line 867) | 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, word_embeddings): method forward (line 889) | def forward( class ConvBertClassificationHead (line 944) | class ConvBertClassificationHead(nn.Module): method __init__ (line 947) | def __init__(self, config): method forward (line 958) | def forward(self, hidden_states: torch.Tensor, **kwargs) -> torch.Tensor: class ConvBertForSequenceClassification (line 975) | class ConvBertForSequenceClassification(ConvBertPreTrainedModel): method __init__ (line 976) | def __init__(self, config): method forward (line 992) | def forward( class ConvBertForMultipleChoice (line 1070) | class ConvBertForMultipleChoice(ConvBertPreTrainedModel): method __init__ (line 1071) | def __init__(self, config): method forward (line 1089) | def forward( class ConvBertForTokenClassification (line 1163) | class ConvBertForTokenClassification(ConvBertPreTrainedModel): method __init__ (line 1164) | def __init__(self, config): method forward (line 1184) | def forward( class ConvBertForQuestionAnswering (line 1244) | class ConvBertForQuestionAnswering(ConvBertPreTrainedModel): method __init__ (line 1245) | def __init__(self, config): method forward (line 1261) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/convbert/modeling_tf_convbert.py class TFConvBertEmbeddings (line 64) | class TFConvBertEmbeddings(keras.layers.Layer): method __init__ (line 67) | def __init__(self, config: ConvBertConfig, **kwargs): method build (line 77) | def build(self, input_shape=None): method call (line 107) | def call( class TFConvBertSelfAttention (line 148) | class TFConvBertSelfAttention(keras.layers.Layer): method __init__ (line 149) | def __init__(self, config, **kwargs): method transpose_for_scores (line 211) | def transpose_for_scores(self, x, batch_size): method call (line 216) | def call(self, hidden_states, attention_mask, head_mask, output_attent... method build (line 299) | def build(self, input_shape=None): class TFConvBertSelfOutput (line 323) | class TFConvBertSelfOutput(keras.layers.Layer): method __init__ (line 324) | def __init__(self, config, **kwargs): method call (line 334) | def call(self, hidden_states, input_tensor, training=False): method build (line 341) | def build(self, input_shape=None): class TFConvBertAttention (line 353) | class TFConvBertAttention(keras.layers.Layer): method __init__ (line 354) | def __init__(self, config, **kwargs): method prune_heads (line 360) | def prune_heads(self, heads): method call (line 363) | def call(self, input_tensor, attention_mask, head_mask, output_attenti... method build (line 372) | def build(self, input_shape=None): class GroupedLinearLayer (line 384) | class GroupedLinearLayer(keras.layers.Layer): method __init__ (line 385) | def __init__(self, input_size, output_size, num_groups, kernel_initial... method build (line 394) | def build(self, input_shape=None): method call (line 407) | def call(self, hidden_states): class TFConvBertIntermediate (line 417) | class TFConvBertIntermediate(keras.layers.Layer): method __init__ (line 418) | def __init__(self, config, **kwargs): method call (line 439) | def call(self, hidden_states): method build (line 445) | def build(self, input_shape=None): class TFConvBertOutput (line 454) | class TFConvBertOutput(keras.layers.Layer): method __init__ (line 455) | def __init__(self, config, **kwargs): method call (line 474) | def call(self, hidden_states, input_tensor, training=False): method build (line 481) | def build(self, input_shape=None): class TFConvBertLayer (line 493) | class TFConvBertLayer(keras.layers.Layer): method __init__ (line 494) | def __init__(self, config, **kwargs): method call (line 501) | def call(self, hidden_states, attention_mask, head_mask, output_attent... method build (line 512) | def build(self, input_shape=None): class TFConvBertEncoder (line 527) | class TFConvBertEncoder(keras.layers.Layer): method __init__ (line 528) | def __init__(self, config, **kwargs): method call (line 533) | def call( method build (line 569) | def build(self, input_shape=None): class TFConvBertPredictionHeadTransform (line 579) | class TFConvBertPredictionHeadTransform(keras.layers.Layer): method __init__ (line 580) | def __init__(self, config, **kwargs): method call (line 595) | def call(self, hidden_states): method build (line 602) | def build(self, input_shape=None): class TFConvBertMainLayer (line 615) | class TFConvBertMainLayer(keras.layers.Layer): method __init__ (line 618) | def __init__(self, config, **kwargs): method get_input_embeddings (line 629) | def get_input_embeddings(self): method set_input_embeddings (line 632) | def set_input_embeddings(self, value): method _prune_heads (line 636) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 643) | def get_extended_attention_mask(self, attention_mask, input_shape, dty... method get_head_mask (line 664) | def get_head_mask(self, head_mask): method call (line 673) | def call( method build (line 720) | def build(self, input_shape=None): class TFConvBertPreTrainedModel (line 735) | class TFConvBertPreTrainedModel(TFPreTrainedModel): class TFConvBertModel (line 847) | class TFConvBertModel(TFConvBertPreTrainedModel): method __init__ (line 848) | def __init__(self, config, *inputs, **kwargs): method call (line 860) | def call( method build (line 888) | def build(self, input_shape=None): class TFConvBertMaskedLMHead (line 897) | class TFConvBertMaskedLMHead(keras.layers.Layer): method __init__ (line 898) | def __init__(self, config, input_embeddings, **kwargs): method build (line 905) | def build(self, input_shape): method get_output_embeddings (line 910) | def get_output_embeddings(self): method set_output_embeddings (line 913) | def set_output_embeddings(self, value): method get_bias (line 917) | def get_bias(self): method set_bias (line 920) | def set_bias(self, value): method call (line 924) | def call(self, hidden_states): class TFConvBertGeneratorPredictions (line 934) | class TFConvBertGeneratorPredictions(keras.layers.Layer): method __init__ (line 935) | def __init__(self, config, **kwargs): method call (line 942) | def call(self, generator_hidden_states, training=False): method build (line 949) | def build(self, input_shape=None): class TFConvBertForMaskedLM (line 962) | class TFConvBertForMaskedLM(TFConvBertPreTrainedModel, TFMaskedLanguageM... method __init__ (line 963) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 977) | def get_lm_head(self): method get_prefix_bias_name (line 980) | def get_prefix_bias_name(self): method call (line 990) | def call( method build (line 1039) | def build(self, input_shape=None): class TFConvBertClassificationHead (line 1054) | class TFConvBertClassificationHead(keras.layers.Layer): method __init__ (line 1057) | def __init__(self, config, **kwargs): method call (line 1073) | def call(self, hidden_states, **kwargs): method build (line 1083) | def build(self, input_shape=None): class TFConvBertForSequenceClassification (line 1101) | class TFConvBertForSequenceClassification(TFConvBertPreTrainedModel, TFS... method __init__ (line 1102) | def __init__(self, config, *inputs, **kwargs): method call (line 1115) | def call( method build (line 1162) | def build(self, input_shape=None): class TFConvBertForMultipleChoice (line 1181) | class TFConvBertForMultipleChoice(TFConvBertPreTrainedModel, TFMultipleC... method __init__ (line 1182) | def __init__(self, config, *inputs, **kwargs): method call (line 1203) | def call( method build (line 1267) | def build(self, input_shape=None): class TFConvBertForTokenClassification (line 1289) | class TFConvBertForTokenClassification(TFConvBertPreTrainedModel, TFToke... method __init__ (line 1290) | def __init__(self, config, *inputs, **kwargs): method call (line 1311) | def call( method build (line 1357) | def build(self, input_shape=None): class TFConvBertForQuestionAnswering (line 1376) | class TFConvBertForQuestionAnswering(TFConvBertPreTrainedModel, TFQuesti... method __init__ (line 1377) | def __init__(self, config, *inputs, **kwargs): method call (line 1394) | def call( method build (line 1455) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/convbert/tokenization_convbert.py function load_vocab (line 32) | def load_vocab(vocab_file): function whitespace_tokenize (line 44) | def whitespace_tokenize(text): class ConvBertTokenizer (line 54) | class ConvBertTokenizer(PreTrainedTokenizer): method __init__ (line 98) | def __init__( method do_lower_case (line 146) | def do_lower_case(self): method vocab_size (line 150) | def vocab_size(self): method get_vocab (line 153) | def get_vocab(self): method _tokenize (line 156) | def _tokenize(self, text, split_special_tokens=False): method _convert_token_to_id (line 171) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 175) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 179) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 184) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 209) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 237) | def create_token_type_ids_from_sequences( method save_vocabulary (line 266) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 288) | class BasicTokenizer: method __init__ (line 311) | def __init__( method tokenize (line 327) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 365) | def _run_strip_accents(self, text): method _run_split_on_punc (line 376) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 398) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 411) | def _is_chinese_char(self, cp): method _clean_text (line 435) | def _clean_text(self, text): class WordpieceTokenizer (line 450) | class WordpieceTokenizer: method __init__ (line 453) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 458) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/convbert/tokenization_convbert_fast.py class ConvBertTokenizerFast (line 33) | class ConvBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 76) | def __init__( method build_inputs_with_special_tokens (line 118) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 142) | def create_token_type_ids_from_sequences( method save_vocabulary (line 171) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/convnext/configuration_convnext.py class ConvNextConfig (line 31) | class ConvNextConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 90) | def __init__( class ConvNextOnnxConfig (line 126) | class ConvNextOnnxConfig(OnnxConfig): method inputs (line 130) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 138) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/convnext/convert_convnext_to_pytorch.py function get_convnext_config (line 36) | def get_convnext_config(checkpoint_url): function rename_key (line 81) | def rename_key(name): function prepare_img (line 114) | def prepare_img(): function convert_convnext_checkpoint (line 121) | def convert_convnext_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/convnext/image_processing_convnext.py class ConvNextImageProcessor (line 51) | class ConvNextImageProcessor(BaseImageProcessor): method __init__ (line 89) | def __init__( method resize (line 117) | def resize( method preprocess (line 187) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/convnext/modeling_convnext.py function drop_path (line 58) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class ConvNextDropPath (line 79) | class ConvNextDropPath(nn.Module): method __init__ (line 82) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 86) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 89) | def extra_repr(self) -> str: class ConvNextLayerNorm (line 93) | class ConvNextLayerNorm(nn.Module): method __init__ (line 99) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 109) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvNextEmbeddings (line 123) | class ConvNextEmbeddings(nn.Module): method __init__ (line 128) | def __init__(self, config): method forward (line 136) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class ConvNextLayer (line 147) | class ConvNextLayer(nn.Module): method __init__ (line 161) | def __init__(self, config, dim, drop_path=0): method forward (line 175) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextStage (line 191) | class ConvNextStage(nn.Module): method __init__ (line 202) | def __init__(self, config, in_channels, out_channels, kernel_size=2, s... method forward (line 217) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextEncoder (line 223) | class ConvNextEncoder(nn.Module): method __init__ (line 224) | def __init__(self, config): method forward (line 244) | def forward( class ConvNextPreTrainedModel (line 270) | class ConvNextPreTrainedModel(PreTrainedModel): method _init_weights (line 281) | def _init_weights(self, module): class ConvNextModel (line 323) | class ConvNextModel(ConvNextPreTrainedModel): method __init__ (line 324) | def __init__(self, config): method forward (line 345) | def forward( class ConvNextForImageClassification (line 389) | class ConvNextForImageClassification(ConvNextPreTrainedModel): method __init__ (line 390) | def __init__(self, config): method forward (line 411) | def forward( class ConvNextBackbone (line 471) | class ConvNextBackbone(ConvNextPreTrainedModel, BackboneMixin): method __init__ (line 472) | def __init__(self, config): method forward (line 491) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/convnext/modeling_tf_convnext.py class TFConvNextDropPath (line 47) | class TFConvNextDropPath(keras.layers.Layer): method __init__ (line 53) | def __init__(self, drop_path: float, **kwargs): method call (line 57) | def call(self, x: tf.Tensor, training=None): class TFConvNextEmbeddings (line 67) | class TFConvNextEmbeddings(keras.layers.Layer): method __init__ (line 72) | def __init__(self, config: ConvNextConfig, **kwargs): method call (line 86) | def call(self, pixel_values): method build (line 105) | def build(self, input_shape=None): class TFConvNextLayer (line 117) | class TFConvNextLayer(keras.layers.Layer): method __init__ (line 132) | def __init__(self, config, dim, drop_path=0.0, **kwargs): method build (line 170) | def build(self, input_shape: tf.TensorShape = None): method call (line 202) | def call(self, hidden_states, training=False): class TFConvNextStage (line 217) | class TFConvNextStage(keras.layers.Layer): method __init__ (line 233) | def __init__( method call (line 282) | def call(self, hidden_states): method build (line 289) | def build(self, input_shape=None): class TFConvNextEncoder (line 304) | class TFConvNextEncoder(keras.layers.Layer): method __init__ (line 305) | def __init__(self, config, **kwargs): method call (line 326) | def call(self, hidden_states, output_hidden_states=False, return_dict=... method build (line 343) | def build(self, input_shape=None): class TFConvNextMainLayer (line 350) | class TFConvNextMainLayer(keras.layers.Layer): method __init__ (line 353) | def __init__(self, config: ConvNextConfig, add_pooling_layer: bool = T... method call (line 365) | def call( method build (line 408) | def build(self, input_shape=None): class TFConvNextPreTrainedModel (line 423) | class TFConvNextPreTrainedModel(TFPreTrainedModel): class TFConvNextModel (line 495) | class TFConvNextModel(TFConvNextPreTrainedModel): method __init__ (line 496) | def __init__(self, config, *inputs, add_pooling_layer=True, **kwargs): method call (line 503) | def call( method build (line 554) | def build(self, input_shape=None): class TFConvNextForImageClassification (line 570) | class TFConvNextForImageClassification(TFConvNextPreTrainedModel, TFSequ... method __init__ (line 571) | def __init__(self, config: ConvNextConfig, *inputs, **kwargs): method call (line 589) | def call( method build (line 656) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/convnextv2/configuration_convnextv2.py class ConvNextV2Config (line 25) | class ConvNextV2Config(BackboneConfigMixin, PretrainedConfig): method __init__ (line 82) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/convnextv2/modeling_convnextv2.py function drop_path (line 58) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class ConvNextV2DropPath (line 79) | class ConvNextV2DropPath(nn.Module): method __init__ (line 82) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 86) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 89) | def extra_repr(self) -> str: class ConvNextV2GRN (line 93) | class ConvNextV2GRN(nn.Module): method __init__ (line 96) | def __init__(self, dim: int): method forward (line 101) | def forward(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor: class ConvNextV2LayerNorm (line 111) | class ConvNextV2LayerNorm(nn.Module): method __init__ (line 117) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 127) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvNextV2Embeddings (line 142) | class ConvNextV2Embeddings(nn.Module): method __init__ (line 147) | def __init__(self, config): method forward (line 155) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class ConvNextV2Layer (line 166) | class ConvNextV2Layer(nn.Module): method __init__ (line 180) | def __init__(self, config, dim, drop_path=0): method forward (line 192) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextV2Stage (line 210) | class ConvNextV2Stage(nn.Module): method __init__ (line 221) | def __init__(self, config, in_channels, out_channels, kernel_size=2, s... method forward (line 236) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextV2Encoder (line 243) | class ConvNextV2Encoder(nn.Module): method __init__ (line 244) | def __init__(self, config): method forward (line 264) | def forward( class ConvNextV2PreTrainedModel (line 291) | class ConvNextV2PreTrainedModel(PreTrainedModel): method _init_weights (line 302) | def _init_weights(self, module): class ConvNextV2Model (line 344) | class ConvNextV2Model(ConvNextV2PreTrainedModel): method __init__ (line 345) | def __init__(self, config): method forward (line 366) | def forward( class ConvNextV2ForImageClassification (line 411) | class ConvNextV2ForImageClassification(ConvNextV2PreTrainedModel): method __init__ (line 412) | def __init__(self, config): method forward (line 433) | def forward( class ConvNextV2Backbone (line 494) | class ConvNextV2Backbone(ConvNextV2PreTrainedModel, BackboneMixin): method __init__ (line 495) | def __init__(self, config): method forward (line 514) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/convnextv2/modeling_tf_convnextv2.py class TFConvNextV2DropPath (line 65) | class TFConvNextV2DropPath(keras.layers.Layer): method __init__ (line 71) | def __init__(self, drop_path: float, **kwargs): method call (line 75) | def call(self, x: tf.Tensor, training=None): class TFConvNextV2GRN (line 85) | class TFConvNextV2GRN(keras.layers.Layer): method __init__ (line 88) | def __init__(self, config: ConvNextV2Config, dim: int, **kwargs): method build (line 92) | def build(self, input_shape: tf.TensorShape = None): method call (line 106) | def call(self, hidden_states: tf.Tensor): class TFConvNextV2Embeddings (line 114) | class TFConvNextV2Embeddings(keras.layers.Layer): method __init__ (line 119) | def __init__(self, config: ConvNextV2Config, **kwargs): method call (line 133) | def call(self, pixel_values): method build (line 152) | def build(self, input_shape=None): class TFConvNextV2Layer (line 164) | class TFConvNextV2Layer(keras.layers.Layer): method __init__ (line 182) | def __init__(self, config: ConvNextV2Config, dim: int, drop_path: floa... method call (line 221) | def call(self, hidden_states, training=False): method build (line 233) | def build(self, input_shape=None): class TFConvNextV2Stage (line 258) | class TFConvNextV2Stage(keras.layers.Layer): method __init__ (line 274) | def __init__( method call (line 323) | def call(self, hidden_states): method build (line 330) | def build(self, input_shape=None): class TFConvNextV2Encoder (line 345) | class TFConvNextV2Encoder(keras.layers.Layer): method __init__ (line 346) | def __init__(self, config: ConvNextV2Config, **kwargs): method call (line 367) | def call( method build (line 389) | def build(self, input_shape=None): class TFConvNextV2MainLayer (line 396) | class TFConvNextV2MainLayer(keras.layers.Layer): method __init__ (line 399) | def __init__(self, config: ConvNextV2Config, **kwargs): method call (line 411) | def call( method build (line 456) | def build(self, input_shape=None): class TFConvNextV2PreTrainedModel (line 471) | class TFConvNextV2PreTrainedModel(TFPreTrainedModel): class TFConvNextV2Model (line 543) | class TFConvNextV2Model(TFConvNextV2PreTrainedModel): method __init__ (line 544) | def __init__(self, config: ConvNextV2Config, *inputs, **kwargs): method call (line 557) | def call( method build (line 588) | def build(self, input_shape=None): class TFConvNextV2ForImageClassification (line 604) | class TFConvNextV2ForImageClassification(TFConvNextV2PreTrainedModel, TF... method __init__ (line 605) | def __init__(self, config: ConvNextV2Config, *inputs, **kwargs): method call (line 627) | def call( method build (line 671) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/cpm/tokenization_cpm.py class CpmTokenizer (line 33) | class CpmTokenizer(PreTrainedTokenizer): method __init__ (line 38) | def __init__( method vocab_size (line 159) | def vocab_size(self): method get_vocab (line 163) | def get_vocab(self): method __getstate__ (line 169) | def __getstate__(self): method __setstate__ (line 175) | def __setstate__(self, d): method preprocess_text (line 186) | def preprocess_text(self, inputs): method _tokenize (line 202) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 223) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 228) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 233) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 239) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 265) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 294) | def create_token_type_ids_from_sequences( method save_vocabulary (line 325) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _decode (line 342) | def _decode(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/cpm/tokenization_cpm_fast.py class CpmTokenizerFast (line 30) | class CpmTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 33) | def __init__( method can_save_slow_tokenizer (line 148) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 152) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 178) | def create_token_type_ids_from_sequences( method save_vocabulary (line 209) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _batch_encode_plus (line 228) | def _batch_encode_plus(self, batch_text_or_text_pairs, *args, **kwargs): method _decode (line 235) | def _decode(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/cpmant/configuration_cpmant.py class CpmAntConfig (line 24) | class CpmAntConfig(PretrainedConfig): method __init__ (line 85) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/cpmant/modeling_cpmant.py class CpmAntLayerNorm (line 39) | class CpmAntLayerNorm(nn.Module): method __init__ (line 44) | def __init__(self, config: CpmAntConfig): method forward (line 51) | def forward(self, hidden_states: torch.Tensor): class CpmAntAttention (line 64) | class CpmAntAttention(nn.Module): method __init__ (line 65) | def __init__(self, config: CpmAntConfig): method forward (line 84) | def forward( class CpmAntSelfAttentionBlock (line 168) | class CpmAntSelfAttentionBlock(nn.Module): method __init__ (line 169) | def __init__(self, config: CpmAntConfig): method forward (line 178) | def forward( class CpmAntDenseGatedACT (line 217) | class CpmAntDenseGatedACT(nn.Module): method __init__ (line 218) | def __init__(self, config: CpmAntConfig): method forward (line 224) | def forward(self, hidden_states: torch.Tensor): class CpmAntFeedForward (line 237) | class CpmAntFeedForward(nn.Module): method __init__ (line 238) | def __init__(self, config: CpmAntConfig): method forward (line 248) | def forward(self, hidden_states: torch.Tensor): class CpmAntFFNBlock (line 263) | class CpmAntFFNBlock(nn.Module): method __init__ (line 264) | def __init__(self, config: CpmAntConfig): method forward (line 273) | def forward( class CpmAntTransformerBlock (line 290) | class CpmAntTransformerBlock(nn.Module): method __init__ (line 291) | def __init__(self, config: CpmAntConfig): method forward (line 296) | def forward( class CpmAntEncoder (line 337) | class CpmAntEncoder(nn.Module): method __init__ (line 338) | def __init__(self, config: CpmAntConfig): method forward (line 345) | def forward( class CpmAntIntermediate (line 403) | class CpmAntIntermediate(nn.Module): method __init__ (line 404) | def __init__(self, config): method forward (line 412) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CpmAntSegmentPositionEmbedding (line 418) | class CpmAntSegmentPositionEmbedding(nn.Module): method __init__ (line 419) | def __init__(self, config: CpmAntConfig): method forward (line 434) | def forward( method _segment_relative_position_bucket (line 486) | def _segment_relative_position_bucket(self, query_segment, key_segment): method _position_bucket (line 489) | def _position_bucket(self, relative_position, num_buckets=32, max_dist... class CpmAntOutput (line 511) | class CpmAntOutput(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 CpmAntPreTrainedModel (line 525) | class CpmAntPreTrainedModel(PreTrainedModel): method _init_weights (line 534) | def _init_weights(self, module): class CpmAntModel (line 592) | class CpmAntModel(CpmAntPreTrainedModel): method __init__ (line 593) | def __init__(self, config: CpmAntConfig): method get_input_embeddings (line 606) | def get_input_embeddings(self): method set_input_embeddings (line 609) | def set_input_embeddings(self, embeddings, **kwargs): method _prepare_attention_mask (line 612) | def _prepare_attention_mask(self, input_ids, span, context, length): method forward (line 636) | def forward( class CpmAntForCausalLM (line 739) | class CpmAntForCausalLM(CpmAntPreTrainedModel): method __init__ (line 742) | def __init__(self, config: CpmAntConfig): method forward (line 758) | def forward( method get_input_embeddings (line 839) | def get_input_embeddings(self): method set_input_embeddings (line 842) | def set_input_embeddings(self, embeddings): method get_output_embeddings (line 845) | def get_output_embeddings(self): method set_output_embeddings (line 848) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 851) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method _reorder_cache (line 863) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/cpmant/tokenization_cpmant.py function load_vocab (line 36) | def load_vocab(vocab_file): class WordpieceTokenizer (line 47) | class WordpieceTokenizer: method __init__ (line 48) | def __init__(self, vocab, unk_token="", max_input_chars_per_word=... method tokenize (line 53) | def tokenize(self, token): class CpmAntTokenizer (line 79) | class CpmAntTokenizer(PreTrainedTokenizer): method __init__ (line 108) | def __init__( method bod_token_id (line 151) | def bod_token_id(self): method eod_token_id (line 155) | def eod_token_id(self): method newline_id (line 159) | def newline_id(self): method vocab_size (line 163) | def vocab_size(self) -> int: method get_vocab (line 166) | def get_vocab(self): method _tokenize (line 169) | def _tokenize(self, text): method _decode (line 176) | def _decode(self, token_ids, **kwargs): method check (line 184) | def check(self, token): method convert_tokens_to_string (line 187) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _convert_token_to_id (line 190) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 194) | def _convert_id_to_token(self, index): method save_vocabulary (line 198) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 225) | def build_inputs_with_special_tokens(self, token_ids_0: List[int], tok... method get_special_tokens_mask (line 243) | def get_special_tokens_mask( FILE: mplsandbox_for_rl/transformers/src/transformers/models/ctrl/configuration_ctrl.py class CTRLConfig (line 24) | class CTRLConfig(PretrainedConfig): method __init__ (line 85) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/ctrl/modeling_ctrl.py function angle_defn (line 37) | def angle_defn(pos, i, d_model_size): function positional_encoding (line 42) | def positional_encoding(position, d_model_size, dtype): function scaled_dot_product_attention (line 57) | def scaled_dot_product_attention(q, k, v, mask, attention_mask=None, hea... class MultiHeadAttention (line 83) | class MultiHeadAttention(nn.Module): method __init__ (line 84) | def __init__(self, d_model_size, num_heads): method prune_heads (line 98) | def prune_heads(self, heads): method split_into_heads (line 115) | def split_into_heads(self, x, batch_size): method forward (line 119) | def forward( function point_wise_feed_forward_network (line 162) | def point_wise_feed_forward_network(d_model_size, dff): class EncoderLayer (line 166) | class EncoderLayer(nn.Module): method __init__ (line 167) | def __init__(self, d_model_size, num_heads, dff, rate=0.1): method forward (line 179) | def forward( class CTRLPreTrainedModel (line 207) | class CTRLPreTrainedModel(PreTrainedModel): method _init_weights (line 216) | def _init_weights(self, module): class CTRLModel (line 314) | class CTRLModel(CTRLPreTrainedModel): method __init__ (line 315) | def __init__(self, config): 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 forward (line 349) | def forward( class CTRLLMHeadModel (line 506) | class CTRLLMHeadModel(CTRLPreTrainedModel): method __init__ (line 509) | def __init__(self, config): method get_output_embeddings (line 517) | def get_output_embeddings(self): method set_output_embeddings (line 520) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 523) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 541) | def forward( method _reorder_cache (line 631) | def _reorder_cache( class CTRLForSequenceClassification (line 657) | class CTRLForSequenceClassification(CTRLPreTrainedModel): method __init__ (line 658) | def __init__(self, config): method forward (line 669) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/ctrl/modeling_tf_ctrl.py function angle_defn (line 47) | def angle_defn(pos, i, d_model_size): function positional_encoding (line 52) | def positional_encoding(position, d_model_size): function scaled_dot_product_attention (line 63) | def scaled_dot_product_attention(q, k, v, mask, attention_mask=None, hea... class TFMultiHeadAttention (line 89) | class TFMultiHeadAttention(keras.layers.Layer): method __init__ (line 90) | def __init__(self, d_model_size, num_heads, output_attentions=False, *... method split_into_heads (line 104) | def split_into_heads(self, x, batch_size): method call (line 108) | def call(self, v, k, q, mask, layer_past, attention_mask, head_mask, u... method build (line 141) | def build(self, input_shape=None): class TFPointWiseFeedForwardLayer (line 159) | class TFPointWiseFeedForwardLayer(keras.layers.Layer): method __init__ (line 160) | def __init__(self, d_model_size, dff, **kwargs): method call (line 168) | def call(self, inputs, trainable=False): method build (line 174) | def build(self, input_shape=None): class TFEncoderLayer (line 186) | class TFEncoderLayer(keras.layers.Layer): method __init__ (line 187) | def __init__( method call (line 206) | def call(self, x, mask, layer_past, attention_mask, head_mask, use_cac... method build (line 232) | def build(self, input_shape=None): class TFCTRLMainLayer (line 251) | class TFCTRLMainLayer(keras.layers.Layer): method __init__ (line 254) | def __init__(self, config, **kwargs): method get_input_embeddings (line 290) | def get_input_embeddings(self): method set_input_embeddings (line 293) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 296) | def _prune_heads(self, heads_to_prune): method call (line 303) | def call( method build (line 443) | def build(self, input_shape=None): class TFCTRLPreTrainedModel (line 459) | class TFCTRLPreTrainedModel(TFPreTrainedModel): class TFCTRLModel (line 582) | class TFCTRLModel(TFCTRLPreTrainedModel): method __init__ (line 583) | def __init__(self, config, *inputs, **kwargs): method call (line 594) | def call( method build (line 625) | def build(self, input_shape=None): class TFCTRLBiasLayer (line 634) | class TFCTRLBiasLayer(keras.layers.Layer): method __init__ (line 640) | def __init__(self, shape, initializer, trainable, name, **kwargs): method build (line 646) | def build(self, input_shape): method call (line 652) | def call(self, x): class TFCTRLLMHeadModel (line 663) | class TFCTRLLMHeadModel(TFCTRLPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 664) | def __init__(self, config, *inputs, **kwargs): 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 677) | def get_bias(self): method set_bias (line 680) | def set_bias(self, value): method prepare_inputs_for_generation (line 690) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 722) | def call( method build (line 780) | def build(self, input_shape=None): class TFCTRLForSequenceClassification (line 807) | class TFCTRLForSequenceClassification(TFCTRLPreTrainedModel, TFSequenceC... method __init__ (line 808) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 820) | def get_output_embeddings(self): method call (line 835) | def call( method build (line 919) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/ctrl/tokenization_ctrl.py function get_pairs (line 94) | def get_pairs(word): class CTRLTokenizer (line 110) | class CTRLTokenizer(PreTrainedTokenizer): method __init__ (line 130) | def __init__(self, vocab_file, merges_file, unk_token="", **kwargs): method vocab_size (line 142) | def vocab_size(self): method get_vocab (line 145) | def get_vocab(self): method bpe (line 148) | def bpe(self, token): method _tokenize (line 192) | def _tokenize(self, text): method _convert_token_to_id (line 202) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 206) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 210) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 215) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/cvt/configuration_cvt.py class CvtConfig (line 24) | class CvtConfig(PretrainedConfig): method __init__ (line 97) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/cvt/modeling_cvt.py class BaseModelOutputWithCLSToken (line 48) | class BaseModelOutputWithCLSToken(ModelOutput): function drop_path (line 69) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class CvtDropPath (line 90) | class CvtDropPath(nn.Module): method __init__ (line 93) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 97) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 100) | def extra_repr(self) -> str: class CvtEmbeddings (line 104) | class CvtEmbeddings(nn.Module): method __init__ (line 109) | def __init__(self, patch_size, num_channels, embed_dim, stride, paddin... method forward (line 116) | def forward(self, pixel_values): class CvtConvEmbeddings (line 122) | class CvtConvEmbeddings(nn.Module): method __init__ (line 127) | def __init__(self, patch_size, num_channels, embed_dim, stride, padding): method forward (line 134) | def forward(self, pixel_values): class CvtSelfAttentionConvProjection (line 147) | class CvtSelfAttentionConvProjection(nn.Module): method __init__ (line 148) | def __init__(self, embed_dim, kernel_size, padding, stride): method forward (line 161) | def forward(self, hidden_state): class CvtSelfAttentionLinearProjection (line 167) | class CvtSelfAttentionLinearProjection(nn.Module): method forward (line 168) | def forward(self, hidden_state): class CvtSelfAttentionProjection (line 176) | class CvtSelfAttentionProjection(nn.Module): method __init__ (line 177) | def __init__(self, embed_dim, kernel_size, padding, stride, projection... method forward (line 183) | def forward(self, hidden_state): class CvtSelfAttention (line 189) | class CvtSelfAttention(nn.Module): method __init__ (line 190) | def __init__( method rearrange_for_multi_head_attention (line 231) | def rearrange_for_multi_head_attention(self, hidden_state): method forward (line 237) | def forward(self, hidden_state, height, width): class CvtSelfOutput (line 270) | class CvtSelfOutput(nn.Module): method __init__ (line 276) | def __init__(self, embed_dim, drop_rate): method forward (line 281) | def forward(self, hidden_state, input_tensor): class CvtAttention (line 287) | class CvtAttention(nn.Module): method __init__ (line 288) | def __init__( method prune_heads (line 320) | def prune_heads(self, heads): method forward (line 338) | def forward(self, hidden_state, height, width): class CvtIntermediate (line 344) | class CvtIntermediate(nn.Module): method __init__ (line 345) | def __init__(self, embed_dim, mlp_ratio): method forward (line 350) | def forward(self, hidden_state): class CvtOutput (line 356) | class CvtOutput(nn.Module): method __init__ (line 357) | def __init__(self, embed_dim, mlp_ratio, drop_rate): method forward (line 362) | def forward(self, hidden_state, input_tensor): class CvtLayer (line 369) | class CvtLayer(nn.Module): method __init__ (line 374) | def __init__( method forward (line 413) | def forward(self, hidden_state, height, width): class CvtStage (line 435) | class CvtStage(nn.Module): method __init__ (line 436) | def __init__(self, config, stage): method forward (line 476) | def forward(self, hidden_state): class CvtEncoder (line 496) | class CvtEncoder(nn.Module): method __init__ (line 497) | def __init__(self, config): method forward (line 504) | def forward(self, pixel_values, output_hidden_states=False, return_dic... class CvtPreTrainedModel (line 524) | class CvtPreTrainedModel(PreTrainedModel): method _init_weights (line 535) | def _init_weights(self, module): class CvtModel (line 579) | class CvtModel(CvtPreTrainedModel): method __init__ (line 580) | def __init__(self, config, add_pooling_layer=True): method _prune_heads (line 586) | def _prune_heads(self, heads_to_prune): method forward (line 602) | def forward( class CvtForImageClassification (line 640) | class CvtForImageClassification(CvtPreTrainedModel): method __init__ (line 641) | def __init__(self, config): method forward (line 662) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/cvt/modeling_tf_cvt.py class TFBaseModelOutputWithCLSToken (line 53) | class TFBaseModelOutputWithCLSToken(ModelOutput): class TFCvtDropPath (line 73) | class TFCvtDropPath(keras.layers.Layer): method __init__ (line 79) | def __init__(self, drop_prob: float, **kwargs): method call (line 83) | def call(self, x: tf.Tensor, training=None): class TFCvtEmbeddings (line 93) | class TFCvtEmbeddings(keras.layers.Layer): method __init__ (line 96) | def __init__( method call (line 119) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... method build (line 124) | def build(self, input_shape=None): class TFCvtConvEmbeddings (line 133) | class TFCvtConvEmbeddings(keras.layers.Layer): method __init__ (line 136) | def __init__( method call (line 163) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: method build (line 179) | def build(self, input_shape=None): class TFCvtSelfAttentionConvProjection (line 191) | class TFCvtSelfAttentionConvProjection(keras.layers.Layer): method __init__ (line 194) | def __init__(self, config: CvtConfig, embed_dim: int, kernel_size: int... method call (line 211) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... method build (line 216) | def build(self, input_shape=None): class TFCvtSelfAttentionLinearProjection (line 228) | class TFCvtSelfAttentionLinearProjection(keras.layers.Layer): method call (line 231) | def call(self, hidden_state: tf.Tensor) -> tf.Tensor: class TFCvtSelfAttentionProjection (line 239) | class TFCvtSelfAttentionProjection(keras.layers.Layer): method __init__ (line 242) | def __init__( method call (line 259) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... method build (line 264) | def build(self, input_shape=None): class TFCvtSelfAttention (line 273) | class TFCvtSelfAttention(keras.layers.Layer): method __init__ (line 279) | def __init__( method rearrange_for_multi_head_attention (line 352) | def rearrange_for_multi_head_attention(self, hidden_state: tf.Tensor) ... method call (line 359) | def call(self, hidden_state: tf.Tensor, height: int, width: int, train... method build (line 393) | def build(self, input_shape=None): class TFCvtSelfOutput (line 417) | class TFCvtSelfOutput(keras.layers.Layer): method __init__ (line 420) | def __init__(self, config: CvtConfig, embed_dim: int, drop_rate: float... method call (line 428) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... method build (line 433) | def build(self, input_shape=None): class TFCvtAttention (line 442) | class TFCvtAttention(keras.layers.Layer): method __init__ (line 445) | def __init__( method prune_heads (line 480) | def prune_heads(self, heads): method call (line 483) | def call(self, hidden_state: tf.Tensor, height: int, width: int, train... method build (line 488) | def build(self, input_shape=None): class TFCvtIntermediate (line 500) | class TFCvtIntermediate(keras.layers.Layer): method __init__ (line 503) | def __init__(self, config: CvtConfig, embed_dim: int, mlp_ratio: int, ... method call (line 513) | def call(self, hidden_state: tf.Tensor) -> tf.Tensor: method build (line 517) | def build(self, input_shape=None): class TFCvtOutput (line 526) | class TFCvtOutput(keras.layers.Layer): method __init__ (line 531) | def __init__(self, config: CvtConfig, embed_dim: int, mlp_ratio: int, ... method call (line 540) | def call(self, hidden_state: tf.Tensor, input_tensor: tf.Tensor, train... method build (line 546) | def build(self, input_shape=None): class TFCvtLayer (line 555) | class TFCvtLayer(keras.layers.Layer): method __init__ (line 562) | def __init__( method call (line 611) | def call(self, hidden_state: tf.Tensor, height: int, width: int, train... method build (line 628) | def build(self, input_shape=None): class TFCvtStage (line 652) | class TFCvtStage(keras.layers.Layer): method __init__ (line 664) | def __init__(self, config: CvtConfig, stage: int, **kwargs): method call (line 711) | def call(self, hidden_state: tf.Tensor, training: bool = False): method build (line 735) | def build(self, input_shape=None): class TFCvtEncoder (line 748) | class TFCvtEncoder(keras.layers.Layer): method __init__ (line 759) | def __init__(self, config: CvtConfig, **kwargs): method call (line 766) | def call( method build (line 799) | def build(self, input_shape=None): class TFCvtMainLayer (line 810) | class TFCvtMainLayer(keras.layers.Layer): method __init__ (line 815) | def __init__(self, config: CvtConfig, **kwargs): method call (line 821) | def call( method build (line 849) | def build(self, input_shape=None): class TFCvtPreTrainedModel (line 858) | class TFCvtPreTrainedModel(TFPreTrainedModel): class TFCvtModel (line 920) | class TFCvtModel(TFCvtPreTrainedModel): method __init__ (line 921) | def __init__(self, config: CvtConfig, *inputs, **kwargs): method call (line 929) | def call( method build (line 976) | def build(self, input_shape=None): class TFCvtForImageClassification (line 992) | class TFCvtForImageClassification(TFCvtPreTrainedModel, TFSequenceClassi... method __init__ (line 993) | def __init__(self, config: CvtConfig, *inputs, **kwargs): method call (line 1014) | def call( method build (line 1080) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/dac/configuration_dac.py class DacConfig (line 28) | class DacConfig(PretrainedConfig): method __init__ (line 76) | def __init__( method frame_rate (line 109) | def frame_rate(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/dac/convert_dac_checkpoint.py function match_pattern (line 41) | def match_pattern(string, pattern): function set_recursively (line 99) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function should_ignore (line 127) | def should_ignore(name, ignore_keys): function recursively_load_weights (line 141) | def recursively_load_weights(orig_dict, hf_model, model_name): function convert_checkpoint (line 201) | def convert_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/dac/feature_extraction_dac.py class DacFeatureExtractor (line 29) | class DacFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 49) | def __init__( method __call__ (line 60) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/dac/modeling_dac.py class DacOutput (line 41) | class DacOutput(ModelOutput): class DacEncoderOutput (line 64) | class DacEncoderOutput(ModelOutput): class DacDecoderOutput (line 85) | class DacDecoderOutput(ModelOutput): class Snake1d (line 95) | class Snake1d(nn.Module): method __init__ (line 100) | def __init__(self, hidden_dim): method forward (line 104) | def forward(self, hidden_states): class DacVectorQuantize (line 112) | class DacVectorQuantize(nn.Module): method __init__ (line 124) | def __init__(self, config: DacConfig): method forward (line 131) | def forward(self, hidden_state): method decode_latents (line 163) | def decode_latents(self, hidden_states): class DacResidualUnit (line 182) | class DacResidualUnit(nn.Module): method __init__ (line 187) | def __init__(self, dimension: int = 16, dilation: int = 1): method forward (line 196) | def forward(self, hidden_state): class DacEncoderBlock (line 219) | class DacEncoderBlock(nn.Module): method __init__ (line 222) | def __init__(self, config: DacConfig, stride: int = 1, stride_index: i... method forward (line 234) | def forward(self, hidden_state): class DacDecoderBlock (line 243) | class DacDecoderBlock(nn.Module): method __init__ (line 246) | def __init__(self, config: DacConfig, stride: int = 1, stride_index: i... method forward (line 264) | def forward(self, hidden_state): class DacResidualVectorQuantize (line 274) | class DacResidualVectorQuantize(nn.Module): method __init__ (line 279) | def __init__(self, config: DacConfig): method forward (line 290) | def forward(self, hidden_state, n_quantizers: int = None): method from_codes (line 354) | def from_codes(self, audio_codes: torch.Tensor): method from_latents (line 380) | def from_latents(self, latents: torch.Tensor): class DacDecoder (line 412) | class DacDecoder(nn.Module): method __init__ (line 415) | def __init__(self, config: DacConfig): method forward (line 436) | def forward(self, hidden_state): class DacEncoder (line 449) | class DacEncoder(nn.Module): method __init__ (line 452) | def __init__(self, config: DacConfig): method forward (line 470) | def forward(self, hidden_state): class DacPreTrainedModel (line 482) | class DacPreTrainedModel(PreTrainedModel): method _init_weights (line 491) | def _init_weights(self, module): method apply_weight_norm (line 496) | def apply_weight_norm(self): method remove_weight_norm (line 525) | def remove_weight_norm(self): class DacModel (line 586) | class DacModel(DacPreTrainedModel): method __init__ (line 587) | def __init__(self, config: DacConfig): method encode (line 604) | def encode( method decode (line 638) | def decode( method forward (line 677) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/data2vec/configuration_data2vec_audio.py class Data2VecAudioConfig (line 26) | class Data2VecAudioConfig(PretrainedConfig): method __init__ (line 169) | def __init__( method inputs_to_logits_ratio (line 284) | def inputs_to_logits_ratio(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/data2vec/configuration_data2vec_text.py class Data2VecTextConfig (line 28) | class Data2VecTextConfig(PretrainedConfig): method __init__ (line 98) | def __init__( class Data2VecTextOnnxConfig (line 139) | class Data2VecTextOnnxConfig(OnnxConfig): method inputs (line 141) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/data2vec/configuration_data2vec_vision.py class Data2VecVisionConfig (line 30) | class Data2VecVisionConfig(PretrainedConfig): method __init__ (line 112) | def __init__( class Data2VecVisionOnnxConfig (line 178) | class Data2VecVisionOnnxConfig(OnnxConfig): method inputs (line 182) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 190) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/data2vec/convert_data2vec_audio_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 57) | 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_headless): function access_by_string (line 144) | def access_by_string(module, path): function set_weights (line 149) | def set_weights(full_name, module, fsq_value, hf_weight_path): function load_conv_layer (line 159) | def load_conv_layer(full_name, value, feature_extractor, unused_weights): function load_pos_conv_layer (line 177) | def load_pos_conv_layer(full_name, value, pos_conv_embeddings, unused_we... function convert_wav2vec2_checkpoint (line 194) | def convert_wav2vec2_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/data2vec/convert_data2vec_text_original_pytorch_checkpoint_to_pytorch.py function convert_data2vec_checkpoint_to_pytorch (line 55) | def convert_data2vec_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/data2vec/modeling_data2vec_audio.py function _compute_mask_indices (line 71) | def _compute_mask_indices( class Data2VecAudioConvLayer (line 190) | class Data2VecAudioConvLayer(nn.Module): method __init__ (line 191) | def __init__(self, config, layer_id=0): method forward (line 206) | def forward(self, hidden_states): class Data2VecAudioPadLayer (line 218) | class Data2VecAudioPadLayer(nn.Module): method __init__ (line 219) | def __init__(self, num_conv_pos_embeddings): method forward (line 223) | def forward(self, hidden_states): class Data2VecAudioPositionalConvLayer (line 229) | class Data2VecAudioPositionalConvLayer(nn.Module): method __init__ (line 230) | def __init__(self, config): method forward (line 245) | def forward(self, hidden_states): class Data2VecAudioPositionalConvEmbedding (line 256) | class Data2VecAudioPositionalConvEmbedding(nn.Module): method __init__ (line 257) | def __init__(self, config): method forward (line 263) | def forward(self, hidden_states): class Data2VecAudioFeatureEncoder (line 271) | class Data2VecAudioFeatureEncoder(nn.Module): method __init__ (line 274) | def __init__(self, config): method _freeze_parameters (line 283) | def _freeze_parameters(self): method forward (line 289) | def forward(self, input_values): class Data2VecAudioFeatureProjection (line 309) | class Data2VecAudioFeatureProjection(nn.Module): method __init__ (line 310) | def __init__(self, config): method forward (line 316) | def forward(self, hidden_states): class Data2VecAudioAttention (line 325) | class Data2VecAudioAttention(nn.Module): method __init__ (line 328) | def __init__( method _shape (line 359) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 362) | def forward( class Data2VecAudioFlashAttention2 (line 484) | class Data2VecAudioFlashAttention2(Data2VecAudioAttention): method __init__ (line 492) | def __init__(self, *args, **kwargs): method _reshape (line 500) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 503) | def forward( class Data2VecAudioSdpaAttention (line 611) | class Data2VecAudioSdpaAttention(Data2VecAudioAttention): method forward (line 613) | def forward( class Data2VecAudioFeedForward (line 726) | class Data2VecAudioFeedForward(nn.Module): method __init__ (line 727) | def __init__(self, config): method forward (line 740) | def forward(self, hidden_states): class Data2VecAudioEncoderLayer (line 751) | class Data2VecAudioEncoderLayer(nn.Module): method __init__ (line 752) | def __init__(self, config): method forward (line 766) | def forward(self, hidden_states, attention_mask=None, output_attention... class Data2VecAudioEncoder (line 787) | class Data2VecAudioEncoder(nn.Module): method __init__ (line 788) | def __init__(self, config): method forward (line 798) | def forward( class Data2VecAudioAdapter (line 873) | class Data2VecAudioAdapter(nn.Module): method __init__ (line 874) | def __init__(self, config): method forward (line 887) | def forward(self, hidden_states): class Data2VecAudioAdapterLayer (line 905) | class Data2VecAudioAdapterLayer(nn.Module): method __init__ (line 906) | def __init__(self, config): method forward (line 916) | def forward(self, hidden_states): class Data2VecAudioPreTrainedModel (line 923) | class Data2VecAudioPreTrainedModel(PreTrainedModel): method _init_weights (line 936) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 962) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 986) | def _get_feature_vector_attention_mask( class Data2VecAudioModel (line 1067) | class Data2VecAudioModel(Data2VecAudioPreTrainedModel): method __init__ (line 1068) | def __init__(self, config: Data2VecAudioConfig): method freeze_feature_encoder (line 1085) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1092) | def _mask_hidden_states( method forward (line 1146) | def forward( class Data2VecAudioForCTC (line 1203) | class Data2VecAudioForCTC(Data2VecAudioPreTrainedModel): method __init__ (line 1204) | def __init__(self, config): method freeze_feature_extractor (line 1225) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1237) | def freeze_feature_encoder(self): method forward (line 1253) | def forward( class Data2VecAudioForSequenceClassification (line 1331) | class Data2VecAudioForSequenceClassification(Data2VecAudioPreTrainedModel): method __init__ (line 1332) | def __init__(self, config): method freeze_feature_extractor (line 1349) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1361) | def freeze_feature_encoder(self): method freeze_base_model (line 1368) | def freeze_base_model(self): method forward (line 1384) | def forward( class Data2VecAudioForAudioFrameClassification (line 1452) | class Data2VecAudioForAudioFrameClassification(Data2VecAudioPreTrainedMo... method __init__ (line 1453) | def __init__(self, config): method freeze_feature_extractor (line 1470) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1482) | def freeze_feature_encoder(self): method freeze_base_model (line 1489) | def freeze_base_model(self): method forward (line 1505) | def forward( class AMSoftmaxLoss (line 1560) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1561) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1569) | def forward(self, hidden_states, labels): class TDNNLayer (line 1584) | class TDNNLayer(nn.Module): method __init__ (line 1585) | def __init__(self, config, layer_id=0): method forward (line 1595) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecAudioForXVector (line 1621) | class Data2VecAudioForXVector(Data2VecAudioPreTrainedModel): method __init__ (line 1622) | def __init__(self, config): method freeze_feature_extractor (line 1641) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1653) | def freeze_feature_encoder(self): method freeze_base_model (line 1660) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 1668) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 1691) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/data2vec/modeling_data2vec_text.py class Data2VecTextForTextEmbeddings (line 59) | class Data2VecTextForTextEmbeddings(nn.Module): method __init__ (line 65) | def __init__(self, config): method forward (line 90) | def forward( method create_position_ids_from_inputs_embeds (line 130) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class Data2VecTextSelfAttention (line 149) | class Data2VecTextSelfAttention(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 Data2VecTextSelfOutput (line 284) | class Data2VecTextSelfOutput(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 Data2VecTextAttention (line 304) | class Data2VecTextAttention(nn.Module): method __init__ (line 305) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 313) | def prune_heads(self, heads): method forward (line 331) | def forward( class Data2VecTextIntermediate (line 356) | class Data2VecTextIntermediate(nn.Module): method __init__ (line 357) | def __init__(self, config): method forward (line 365) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecTextOutput (line 372) | class Data2VecTextOutput(nn.Module): method __init__ (line 373) | def __init__(self, config): method forward (line 379) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Data2VecTextLayer (line 387) | class Data2VecTextLayer(nn.Module): method __init__ (line 388) | def __init__(self, config): method forward (line 402) | def forward( method feed_forward_chunk (line 467) | def feed_forward_chunk(self, attention_output): class Data2VecTextEncoder (line 474) | class Data2VecTextEncoder(nn.Module): method __init__ (line 475) | def __init__(self, config): method forward (line 481) | def forward( class Data2VecTextPooler (line 568) | class Data2VecTextPooler(nn.Module): method __init__ (line 569) | def __init__(self, config): method forward (line 574) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecTextPreTrainedModel (line 583) | class Data2VecTextPreTrainedModel(PreTrainedModel): method _init_weights (line 594) | def _init_weights(self, module): class Data2VecTextModel (line 686) | class Data2VecTextModel(Data2VecTextPreTrainedModel): method __init__ (line 702) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 714) | def get_input_embeddings(self): method set_input_embeddings (line 717) | def set_input_embeddings(self, value): method _prune_heads (line 720) | def _prune_heads(self, heads_to_prune): method forward (line 735) | def forward( class Data2VecTextForCausalLM (line 869) | class Data2VecTextForCausalLM(Data2VecTextPreTrainedModel): method __init__ (line 872) | def __init__(self, config): method get_output_embeddings (line 884) | def get_output_embeddings(self): method set_output_embeddings (line 887) | def set_output_embeddings(self, new_embeddings): method forward (line 892) | def forward( method prepare_inputs_for_generation (line 998) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1019) | def _reorder_cache(self, past_key_values, beam_idx): class Data2VecTextForMaskedLM (line 1029) | class Data2VecTextForMaskedLM(Data2VecTextPreTrainedModel): method __init__ (line 1032) | def __init__(self, config): method get_output_embeddings (line 1047) | def get_output_embeddings(self): method set_output_embeddings (line 1050) | def set_output_embeddings(self, new_embeddings): method forward (line 1060) | def forward( class Data2VecTextLMHead (line 1121) | class Data2VecTextLMHead(nn.Module): method __init__ (line 1124) | def __init__(self, config): method forward (line 1133) | def forward(self, features, **kwargs): method _tie_weights (line 1143) | def _tie_weights(self): class Data2VecTextForSequenceClassification (line 1159) | class Data2VecTextForSequenceClassification(Data2VecTextPreTrainedModel): method __init__ (line 1160) | def __init__(self, config): method forward (line 1177) | def forward( class Data2VecTextForMultipleChoice (line 1256) | class Data2VecTextForMultipleChoice(Data2VecTextPreTrainedModel): method __init__ (line 1257) | def __init__(self, config): method forward (line 1275) | def forward( class Data2VecTextForTokenClassification (line 1350) | class Data2VecTextForTokenClassification(Data2VecTextPreTrainedModel): method __init__ (line 1351) | def __init__(self, config): method forward (line 1371) | def forward( class Data2VecTextClassificationHead (line 1427) | class Data2VecTextClassificationHead(nn.Module): method __init__ (line 1430) | def __init__(self, config): method forward (line 1439) | def forward(self, features, **kwargs): class Data2VecTextForQuestionAnswering (line 1456) | class Data2VecTextForQuestionAnswering(Data2VecTextPreTrainedModel): method __init__ (line 1457) | def __init__(self, config): method forward (line 1473) | def forward( function create_position_ids_from_input_ids (line 1548) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/data2vec/modeling_data2vec_vision.py class Data2VecVisionModelOutputWithPooling (line 62) | class Data2VecVisionModelOutputWithPooling(BaseModelOutputWithPooling): function drop_path (line 88) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class Data2VecVisionDropPath (line 109) | class Data2VecVisionDropPath(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 Data2VecVisionEmbeddings (line 124) | class Data2VecVisionEmbeddings(nn.Module): method __init__ (line 130) | def __init__(self, config: Data2VecVisionConfig) -> None: method interpolate_pos_encoding (line 152) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 188) | def forward( class Data2VecVisionPatchEmbeddings (line 221) | class Data2VecVisionPatchEmbeddings(nn.Module): method __init__ (line 228) | def __init__(self, config): method forward (line 245) | def forward( class Data2VecVisionSelfAttention (line 275) | class Data2VecVisionSelfAttention(nn.Module): method __init__ (line 276) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method transpose_for_scores (line 300) | def transpose_for_scores(self, x): method forward (line 305) | def forward( class Data2VecVisionSelfOutput (line 360) | class Data2VecVisionSelfOutput(nn.Module): method __init__ (line 366) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 371) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Data2VecVisionAttention (line 379) | class Data2VecVisionAttention(nn.Module): method __init__ (line 380) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method prune_heads (line 386) | def prune_heads(self, heads): method forward (line 404) | def forward( class Data2VecVisionIntermediate (line 424) | class Data2VecVisionIntermediate(nn.Module): method __init__ (line 425) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 433) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionOutput (line 441) | class Data2VecVisionOutput(nn.Module): method __init__ (line 442) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 447) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionLayer (line 455) | class Data2VecVisionLayer(nn.Module): method __init__ (line 458) | def __init__( method forward (line 478) | def forward( class Data2VecVisionRelativePositionBias (line 523) | class Data2VecVisionRelativePositionBias(nn.Module): method __init__ (line 524) | def __init__(self, config: Data2VecVisionConfig, window_size: tuple) -... method generate_relative_position_index (line 535) | def generate_relative_position_index(self, window_size: Tuple[int, int... method forward (line 559) | def forward(self, window_size, interpolate_pos_encoding: bool = False,... class Data2VecVisionEncoder (line 610) | class Data2VecVisionEncoder(nn.Module): method __init__ (line 611) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method forward (line 633) | def forward( class Data2VecVisionPreTrainedModel (line 696) | class Data2VecVisionPreTrainedModel(PreTrainedModel): method _init_weights (line 709) | def _init_weights(self, module): class Data2VecVisionModel (line 767) | class Data2VecVisionModel(Data2VecVisionPreTrainedModel): method __init__ (line 768) | def __init__(self, config: Data2VecVisionConfig, add_pooling_layer: bo... method get_input_embeddings (line 783) | def get_input_embeddings(self): method _prune_heads (line 786) | def _prune_heads(self, heads_to_prune): method forward (line 802) | def forward( class Data2VecVisionPooler (line 860) | class Data2VecVisionPooler(nn.Module): method __init__ (line 861) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 867) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionForImageClassification (line 887) | class Data2VecVisionForImageClassification(Data2VecVisionPreTrainedModel): method __init__ (line 888) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 907) | def forward( class Data2VecVisionConvModule (line 972) | class Data2VecVisionConvModule(nn.Module): method __init__ (line 980) | def __init__( method forward (line 1001) | def forward(self, input: torch.Tensor) -> torch.Tensor: class Data2VecVisionPyramidPoolingBlock (line 1010) | class Data2VecVisionPyramidPoolingBlock(nn.Module): method __init__ (line 1011) | def __init__(self, pool_scale: int, in_channels: int, channels: int) -... method forward (line 1020) | def forward(self, input: torch.Tensor) -> torch.Tensor: class Data2VecVisionPyramidPoolingModule (line 1028) | class Data2VecVisionPyramidPoolingModule(nn.Module): method __init__ (line 1042) | def __init__(self, pool_scales: Tuple[int, ...], in_channels: int, cha... method forward (line 1056) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]: class Data2VecVisionUperHead (line 1068) | class Data2VecVisionUperHead(nn.Module): method __init__ (line 1076) | def __init__(self, config: Data2VecVisionConfig) -> None: method psp_forward (line 1114) | def psp_forward(self, inputs): method forward (line 1123) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionFCNHead (line 1154) | class Data2VecVisionFCNHead(nn.Module): method __init__ (line 1169) | def __init__( method forward (line 1207) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionForSemanticSegmentation (line 1224) | class Data2VecVisionForSemanticSegmentation(Data2VecVisionPreTrainedModel): method __init__ (line 1225) | def __init__(self, config: Data2VecVisionConfig) -> None: method compute_loss (line 1257) | def compute_loss(self, logits, auxiliary_logits, labels): method forward (line 1278) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py class TFData2VecVisionModelOutputWithPooling (line 69) | class TFData2VecVisionModelOutputWithPooling(TFBaseModelOutputWithPooling): class TFData2VecVisionDropPath (line 99) | class TFData2VecVisionDropPath(keras.layers.Layer): method __init__ (line 105) | def __init__(self, drop_path, **kwargs): method call (line 109) | def call(self, x, training=None): class TFData2VecVisionEmbeddings (line 119) | class TFData2VecVisionEmbeddings(keras.layers.Layer): method __init__ (line 125) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method build (line 135) | def build(self, input_shape=None): method call (line 169) | def call(self, pixel_values: tf.Tensor, bool_masked_pos: tf.Tensor | N... class TFData2VecVisionPatchEmbeddings (line 191) | class TFData2VecVisionPatchEmbeddings(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.... method build (line 251) | def build(self, input_shape=None): class TFData2VecVisionSelfAttention (line 260) | class TFData2VecVisionSelfAttention(keras.layers.Layer): method __init__ (line 261) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method transpose_for_scores (line 297) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 304) | def call( method build (line 356) | def build(self, input_shape=None): class TFData2VecVisionSelfOutput (line 374) | class TFData2VecVisionSelfOutput(keras.layers.Layer): method __init__ (line 380) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 389) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, gamm... method build (line 395) | def build(self, input_shape=None): class TFData2VecVisionAttention (line 404) | class TFData2VecVisionAttention(keras.layers.Layer): method __init__ (line 405) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method prune_heads (line 411) | def prune_heads(self, heads): method call (line 414) | def call( method build (line 436) | def build(self, input_shape=None): class TFData2VecVisionIntermediate (line 449) | class TFData2VecVisionIntermediate(keras.layers.Layer): method __init__ (line 450) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 463) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 469) | def build(self, input_shape=None): class TFData2VecVisionOutput (line 478) | class TFData2VecVisionOutput(keras.layers.Layer): method __init__ (line 479) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 488) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 494) | def build(self, input_shape=None): class TFData2VecVisionLayer (line 503) | class TFData2VecVisionLayer(keras.layers.Layer): method __init__ (line 506) | def __init__( method build (line 527) | def build(self, input_shape: tf.TensorShape = None): method call (line 568) | def call( class TFData2VecVisionRelativePositionBias (line 613) | class TFData2VecVisionRelativePositionBias(keras.layers.Layer): method __init__ (line 614) | def __init__(self, config: Data2VecVisionConfig, window_size: tuple, *... method build (line 625) | def build(self, input_shape): method get_position_index (line 636) | def get_position_index(self): method call (line 664) | def call(self, inputs=None) -> tf.Tensor: class TFData2VecVisionEncoder (line 669) | class TFData2VecVisionEncoder(keras.layers.Layer): method __init__ (line 670) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method call (line 692) | def call( method build (line 733) | def build(self, input_shape=None): class TFData2VecVisionMainLayer (line 747) | class TFData2VecVisionMainLayer(keras.layers.Layer): method __init__ (line 750) | def __init__(self, config: Data2VecVisionConfig, add_pooling_layer: bo... method get_input_embeddings (line 770) | def get_input_embeddings(self) -> keras.layers.Layer: method _prune_heads (line 773) | def _prune_heads(self, heads_to_prune): method call (line 781) | def call( method build (line 836) | def build(self, input_shape=None): class TFData2VecVisionPooler (line 855) | class TFData2VecVisionPooler(keras.layers.Layer): method __init__ (line 856) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 865) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 876) | def build(self, input_shape=None): class TFData2VecVisionPreTrainedModel (line 886) | class TFData2VecVisionPreTrainedModel(TFPreTrainedModel): class TFData2VecVisionModel (line 972) | class TFData2VecVisionModel(TFData2VecVisionPreTrainedModel): method __init__ (line 973) | def __init__(self, config: Data2VecVisionConfig, add_pooling_layer: bo... method get_input_embeddings (line 981) | def get_input_embeddings(self): method call (line 993) | def call( method build (line 1019) | def build(self, input_shape=None): class TFData2VecVisionForImageClassification (line 1035) | class TFData2VecVisionForImageClassification(TFData2VecVisionPreTrainedM... method __init__ (line 1036) | def __init__(self, config: Data2VecVisionConfig, *inputs, **kwargs): method call (line 1058) | def call( method build (line 1100) | def build(self, input_shape=None): class TFData2VecVisionConvModule (line 1112) | class TFData2VecVisionConvModule(keras.layers.Layer): method __init__ (line 1120) | def __init__( method call (line 1144) | def call(self, input: tf.Tensor) -> tf.Tensor: method build (line 1150) | def build(self, input_shape=None): class TFAdaptiveAvgPool2D (line 1162) | class TFAdaptiveAvgPool2D(keras.layers.Layer): method __init__ (line 1163) | def __init__(self, output_dims: Tuple[int, int], input_ordering: str =... method pseudo_1d_pool (line 1172) | def pseudo_1d_pool(self, inputs: tf.Tensor, h_pooling: bool): method call (line 1254) | def call(self, inputs: tf.Tensor): class TFData2VecVisionPyramidPoolingModule (line 1286) | class TFData2VecVisionPyramidPoolingModule(keras.layers.Layer): method __init__ (line 1298) | def __init__(self, pool_scales: Tuple[int, ...], in_channels: int, out... method call (line 1316) | def call(self, x: tf.Tensor) -> List[tf.Tensor]: method build (line 1329) | def build(self, input_shape=None): class TFData2VecVisionUperHead (line 1336) | class TFData2VecVisionUperHead(keras.layers.Layer): method __init__ (line 1344) | def __init__(self, config: Data2VecVisionConfig, **kwargs) -> None: method psp_forward (line 1388) | def psp_forward(self, inputs): method call (line 1397) | def call(self, encoder_hidden_states: tf.Tensor) -> tf.Tensor: method build (line 1422) | def build(self, input_shape=None): class TFData2VecVisionFCNHead (line 1446) | class TFData2VecVisionFCNHead(keras.layers.Layer): method __init__ (line 1460) | def __init__( method call (line 1512) | def call(self, encoder_hidden_states: tf.Tensor) -> tf.Tensor: method build (line 1523) | def build(self, input_shape=None): class TFData2VecVisionForSemanticSegmentation (line 1541) | class TFData2VecVisionForSemanticSegmentation(TFData2VecVisionPreTrained... method __init__ (line 1542) | def __init__(self, config: Data2VecVisionConfig, *inputs, **kwargs) ->... method compute_loss (line 1565) | def compute_loss(self, logits, auxiliary_logits, labels): method call (line 1597) | def call( method build (line 1694) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/dbrx/configuration_dbrx.py class DbrxAttentionConfig (line 26) | class DbrxAttentionConfig(PretrainedConfig): method __init__ (line 44) | def __init__( method from_pretrained (line 65) | def from_pretrained(cls, pretrained_model_name_or_path: str, **kwargs:... class DbrxFFNConfig (line 82) | class DbrxFFNConfig(PretrainedConfig): method __init__ (line 103) | def __init__( method from_pretrained (line 132) | def from_pretrained(cls, pretrained_model_name_or_path: str, **kwargs:... class DbrxConfig (line 149) | class DbrxConfig(PretrainedConfig): method __init__ (line 212) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/dbrx/modeling_dbrx.py function _prepare_4d_causal_attention_mask_with_cache_position (line 49) | def _prepare_4d_causal_attention_mask_with_cache_position( class DbrxRotaryEmbedding (line 103) | class DbrxRotaryEmbedding(nn.Module): method __init__ (line 104) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 115) | def forward(self, x, position_ids, seq_len=None): function rotate_half (line 133) | def rotate_half(x): function apply_rotary_pos_emb (line 141) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... function repeat_kv (line 169) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: function load_balancing_loss_func (line 181) | def load_balancing_loss_func( class DbrxAttention (line 261) | class DbrxAttention(nn.Module): method __init__ (line 264) | def __init__(self, config: DbrxConfig, block_idx: Optional[int] = None): method forward (line 297) | def forward( class DbrxFlashAttention2 (line 366) | class DbrxFlashAttention2(DbrxAttention): method __init__ (line 375) | def __init__(self, *args, **kwargs): method forward (line 383) | def forward( class DbrxSdpaAttention (line 487) | class DbrxSdpaAttention(DbrxAttention): method forward (line 494) | def forward( class DbrxNormAttentionNorm (line 589) | class DbrxNormAttentionNorm(nn.Module): method __init__ (line 590) | def __init__(self, config: DbrxConfig, block_idx: Optional[int] = None): method forward (line 601) | def forward( class DbrxRouter (line 635) | class DbrxRouter(nn.Module): method __init__ (line 636) | def __init__( method forward (line 653) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor, ... class DbrxExpertGLU (line 674) | class DbrxExpertGLU(nn.Module): method __init__ (line 675) | def __init__(self, hidden_size: int, ffn_hidden_size: int, moe_num_exp... method forward (line 688) | def forward( class DbrxExperts (line 699) | class DbrxExperts(nn.Module): method __init__ (line 700) | def __init__(self, hidden_size: int, ffn_hidden_size: int, moe_num_exp... method forward (line 710) | def forward( class DbrxFFN (line 751) | class DbrxFFN(nn.Module): method __init__ (line 752) | def __init__(self, config: DbrxConfig): method forward (line 771) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: class DbrxBlock (line 777) | class DbrxBlock(nn.Module): method __init__ (line 778) | def __init__(self, config: DbrxConfig, block_idx: int): method forward (line 789) | def forward( class DbrxPreTrainedModel (line 878) | class DbrxPreTrainedModel(PreTrainedModel): method _init_weights (line 890) | def _init_weights(self, module: nn.Module): class DbrxModel (line 991) | class DbrxModel(DbrxPreTrainedModel): method __init__ (line 1000) | def __init__(self, config: DbrxConfig): method get_input_embeddings (line 1014) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 1017) | def set_input_embeddings(self, value: nn.Embedding): method forward (line 1021) | def forward( method _update_causal_mask (line 1158) | def _update_causal_mask( class DbrxForCausalLM (line 1231) | class DbrxForCausalLM(DbrxPreTrainedModel): method __init__ (line 1232) | def __init__(self, config: DbrxConfig): method get_input_embeddings (line 1244) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 1247) | def set_input_embeddings(self, value: nn.Embedding): method get_output_embeddings (line 1250) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 1253) | def set_output_embeddings(self, new_embeddings: nn.Linear): method set_decoder (line 1256) | def set_decoder(self, decoder: DbrxModel): method get_decoder (line 1259) | def get_decoder(self) -> DbrxModel: method forward (line 1264) | def forward( method prepare_inputs_for_generation (line 1374) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta/configuration_deberta.py class DebertaConfig (line 32) | class DebertaConfig(PretrainedConfig): method __init__ (line 103) | def __init__( class DebertaOnnxConfig (line 157) | class DebertaOnnxConfig(OnnxConfig): method inputs (line 159) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 172) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 175) | def generate_dummy_inputs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta/modeling_deberta.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 78) | class XSoftmax(torch.autograd.Function): method forward (line 107) | def forward(ctx, input, mask, dim): method backward (line 118) | def backward(ctx, grad_output): method symbolic (line 124) | def symbolic(g, self, mask, dim): class DropoutContext (line 141) | class DropoutContext: method __init__ (line 142) | def __init__(self): function get_mask (line 149) | def get_mask(input, local_context): class XDropout (line 168) | class XDropout(torch.autograd.Function): method forward (line 172) | def forward(ctx, input, local_ctx): method backward (line 182) | def backward(ctx, grad_output): method symbolic (line 190) | def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Unio... class StableDropout (line 207) | class StableDropout(nn.Module): method __init__ (line 215) | def __init__(self, drop_prob): method forward (line 221) | def forward(self, x): method clear_context (line 232) | def clear_context(self): method init_context (line 236) | def init_context(self, reuse_mask=True, scale=1): method get_context (line 244) | def get_context(self): class DebertaLayerNorm (line 256) | class DebertaLayerNorm(nn.Module): method __init__ (line 259) | def __init__(self, size, eps=1e-12): method forward (line 265) | def forward(self, hidden_states): class DebertaSelfOutput (line 276) | class DebertaSelfOutput(nn.Module): method __init__ (line 277) | def __init__(self, config): method forward (line 283) | def forward(self, hidden_states, input_tensor): class DebertaAttention (line 290) | class DebertaAttention(nn.Module): method __init__ (line 291) | def __init__(self, config): method forward (line 297) | def forward( class DebertaIntermediate (line 327) | class DebertaIntermediate(nn.Module): method __init__ (line 328) | def __init__(self, config): method forward (line 336) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DebertaOutput (line 342) | class DebertaOutput(nn.Module): method __init__ (line 343) | def __init__(self, config): method forward (line 350) | def forward(self, hidden_states, input_tensor): class DebertaLayer (line 357) | class DebertaLayer(nn.Module): method __init__ (line 358) | def __init__(self, config): method forward (line 364) | def forward( class DebertaEncoder (line 391) | class DebertaEncoder(nn.Module): method __init__ (line 394) | def __init__(self, config): method get_rel_embedding (line 405) | def get_rel_embedding(self): method get_attention_mask (line 409) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 418) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method forward (line 424) | def forward( function build_relative_position (line 492) | def build_relative_position(query_size, key_size, device): function c2p_dynamic_expand (line 518) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 523) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 528) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): class DisentangledSelfAttention (line 532) | class DisentangledSelfAttention(nn.Module): method __init__ (line 543) | def __init__(self, config): method transpose_for_scores (line 578) | def transpose_for_scores(self, x): method forward (line 583) | def forward( method disentangled_att_bias (line 674) | def disentangled_att_bias(self, query_layer, key_layer, relative_pos, ... class DebertaEmbeddings (line 726) | class DebertaEmbeddings(nn.Module): method __init__ (line 729) | def __init__(self, config): method forward (line 755) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class DebertaPreTrainedModel (line 802) | class DebertaPreTrainedModel(PreTrainedModel): method _init_weights (line 813) | def _init_weights(self, module): class DebertaModel (line 892) | class DebertaModel(DebertaPreTrainedModel): method __init__ (line 893) | def __init__(self, config): method get_input_embeddings (line 903) | def get_input_embeddings(self): method set_input_embeddings (line 906) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 909) | def _prune_heads(self, heads_to_prune): method forward (line 922) | def forward( class DebertaForMaskedLM (line 1004) | class DebertaForMaskedLM(DebertaPreTrainedModel): method __init__ (line 1007) | def __init__(self, config): method get_output_embeddings (line 1016) | def get_output_embeddings(self): method set_output_embeddings (line 1019) | def set_output_embeddings(self, new_embeddings): method forward (line 1032) | def forward( class DebertaPredictionHeadTransform (line 1084) | class DebertaPredictionHeadTransform(nn.Module): method __init__ (line 1085) | def __init__(self, config): method forward (line 1096) | def forward(self, hidden_states): class DebertaLMPredictionHead (line 1103) | class DebertaLMPredictionHead(nn.Module): method __init__ (line 1104) | def __init__(self, config): method _tie_weights (line 1118) | def _tie_weights(self): method forward (line 1121) | def forward(self, hidden_states): class DebertaOnlyMLMHead (line 1128) | class DebertaOnlyMLMHead(nn.Module): method __init__ (line 1129) | def __init__(self, config): method forward (line 1133) | def forward(self, sequence_output): class DebertaForSequenceClassification (line 1145) | class DebertaForSequenceClassification(DebertaPreTrainedModel): method __init__ (line 1146) | def __init__(self, config): method get_input_embeddings (line 1164) | def get_input_embeddings(self): method set_input_embeddings (line 1167) | def set_input_embeddings(self, new_embeddings): method forward (line 1176) | def forward( class DebertaForTokenClassification (line 1263) | class DebertaForTokenClassification(DebertaPreTrainedModel): method __init__ (line 1264) | def __init__(self, config): method forward (line 1281) | def forward( class DebertaForQuestionAnswering (line 1336) | class DebertaForQuestionAnswering(DebertaPreTrainedModel): method __init__ (line 1337) | def __init__(self, config): method forward (line 1357) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta/modeling_tf_deberta.py class TFDebertaContextPooler (line 56) | class TFDebertaContextPooler(keras.layers.Layer): method __init__ (line 57) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 63) | def call(self, hidden_states, training: bool = False): method output_dim (line 73) | def output_dim(self) -> int: method build (line 76) | def build(self, input_shape=None): class TFDebertaXSoftmax (line 88) | class TFDebertaXSoftmax(keras.layers.Layer): method __init__ (line 98) | def __init__(self, axis=-1, **kwargs): method call (line 102) | def call(self, inputs: tf.Tensor, mask: tf.Tensor): class TFDebertaStableDropout (line 110) | class TFDebertaStableDropout(keras.layers.Layer): method __init__ (line 118) | def __init__(self, drop_prob, **kwargs): method xdropout (line 123) | def xdropout(self, inputs): method call (line 144) | def call(self, inputs: tf.Tensor, training: tf.Tensor = False): class TFDebertaLayerNorm (line 150) | class TFDebertaLayerNorm(keras.layers.Layer): method __init__ (line 153) | def __init__(self, size, eps=1e-12, **kwargs): method build (line 158) | def build(self, input_shape): method call (line 163) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFDebertaSelfOutput (line 170) | class TFDebertaSelfOutput(keras.layers.Layer): method __init__ (line 171) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 178) | def call(self, hidden_states, input_tensor, training: bool = False): method build (line 184) | def build(self, input_shape=None): class TFDebertaAttention (line 199) | class TFDebertaAttention(keras.layers.Layer): method __init__ (line 200) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 206) | def call( method build (line 235) | def build(self, input_shape=None): class TFDebertaIntermediate (line 247) | class TFDebertaIntermediate(keras.layers.Layer): method __init__ (line 248) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 261) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 267) | def build(self, input_shape=None): class TFDebertaOutput (line 276) | class TFDebertaOutput(keras.layers.Layer): method __init__ (line 277) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 287) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 294) | def build(self, input_shape=None): class TFDebertaLayer (line 309) | class TFDebertaLayer(keras.layers.Layer): method __init__ (line 310) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 317) | def call( method build (line 345) | def build(self, input_shape=None): class TFDebertaEncoder (line 360) | class TFDebertaEncoder(keras.layers.Layer): method __init__ (line 361) | def __init__(self, config: DebertaConfig, **kwargs): method build (line 372) | def build(self, input_shape=None): method get_rel_embedding (line 387) | def get_rel_embedding(self): method get_attention_mask (line 391) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 401) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method call (line 407) | def call( function build_relative_position (line 468) | def build_relative_position(query_size, key_size): function c2p_dynamic_expand (line 492) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 502) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 512) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): function torch_gather (line 517) | def torch_gather(x, indices, gather_axis): class TFDebertaDisentangledSelfAttention (line 541) | class TFDebertaDisentangledSelfAttention(keras.layers.Layer): method __init__ (line 552) | def __init__(self, config: DebertaConfig, **kwargs): method build (line 609) | def build(self, input_shape=None): method transpose_for_scores (line 641) | def transpose_for_scores(self, tensor: tf.Tensor) -> tf.Tensor: method call (line 649) | def call( method disentangled_att_bias (line 760) | def disentangled_att_bias(self, query_layer, key_layer, relative_pos, ... class TFDebertaEmbeddings (line 818) | class TFDebertaEmbeddings(keras.layers.Layer): method __init__ (line 821) | def __init__(self, config, **kwargs): method build (line 840) | def build(self, input_shape=None): method call (line 881) | def call( class TFDebertaPredictionHeadTransform (line 937) | class TFDebertaPredictionHeadTransform(keras.layers.Layer): method __init__ (line 938) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 956) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 963) | def build(self, input_shape=None): class TFDebertaLMPredictionHead (line 975) | class TFDebertaLMPredictionHead(keras.layers.Layer): method __init__ (line 976) | def __init__(self, config: DebertaConfig, input_embeddings: keras.laye... method build (line 988) | def build(self, input_shape=None): method get_output_embeddings (line 998) | def get_output_embeddings(self) -> keras.layers.Layer: method set_output_embeddings (line 1001) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 1005) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 1008) | def set_bias(self, value: tf.Variable): method call (line 1012) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaOnlyMLMHead (line 1023) | class TFDebertaOnlyMLMHead(keras.layers.Layer): method __init__ (line 1024) | def __init__(self, config: DebertaConfig, input_embeddings: keras.laye... method call (line 1028) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: method build (line 1033) | def build(self, input_shape=None): class TFDebertaMainLayer (line 1043) | class TFDebertaMainLayer(keras.layers.Layer): method __init__ (line 1046) | def __init__(self, config: DebertaConfig, **kwargs): method get_input_embeddings (line 1054) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 1057) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 1061) | def _prune_heads(self, heads_to_prune): method call (line 1069) | def call( method build (line 1125) | def build(self, input_shape=None): class TFDebertaPreTrainedModel (line 1137) | class TFDebertaPreTrainedModel(TFPreTrainedModel): class TFDebertaModel (line 1237) | class TFDebertaModel(TFDebertaPreTrainedModel): method __init__ (line 1238) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1250) | def call( method build (line 1276) | def build(self, input_shape=None): class TFDebertaForMaskedLM (line 1286) | class TFDebertaForMaskedLM(TFDebertaPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1287) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method get_lm_head (line 1299) | def get_lm_head(self) -> keras.layers.Layer: method call (line 1309) | def call( method build (line 1354) | def build(self, input_shape=None): class TFDebertaForSequenceClassification (line 1373) | class TFDebertaForSequenceClassification(TFDebertaPreTrainedModel, TFSeq... method __init__ (line 1374) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1399) | def call( method build (line 1447) | def build(self, input_shape=None): class TFDebertaForTokenClassification (line 1472) | class TFDebertaForTokenClassification(TFDebertaPreTrainedModel, TFTokenC... method __init__ (line 1473) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1492) | def call( method build (line 1536) | def build(self, input_shape=None): class TFDebertaForQuestionAnswering (line 1555) | class TFDebertaForQuestionAnswering(TFDebertaPreTrainedModel, TFQuestion... method __init__ (line 1556) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1574) | def call( method build (line 1633) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta/tokenization_deberta.py function bytes_to_unicode (line 33) | def bytes_to_unicode(): function get_pairs (line 58) | def get_pairs(word): class DebertaTokenizer (line 72) | class DebertaTokenizer(PreTrainedTokenizer): method __init__ (line 140) | def __init__( method vocab_size (line 199) | def vocab_size(self): method get_vocab (line 203) | def get_vocab(self): method bpe (line 207) | def bpe(self, token): method build_inputs_with_special_tokens (line 249) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 274) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 301) | def create_token_type_ids_from_sequences( method _tokenize (line 332) | def _tokenize(self, text): method _convert_token_to_id (line 343) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 348) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 353) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 360) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 389) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta/tokenization_deberta_fast.py class DebertaTokenizerFast (line 33) | class DebertaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 102) | def __init__( method mask_token (line 144) | def mask_token(self) -> str: method mask_token (line 159) | def mask_token(self, value): method build_inputs_with_special_tokens (line 168) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 193) | def create_token_type_ids_from_sequences( method _batch_encode_plus (line 224) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 234) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 245) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta_v2/configuration_deberta_v2.py class DebertaV2Config (line 32) | class DebertaV2Config(PretrainedConfig): method __init__ (line 103) | def __init__( class DebertaV2OnnxConfig (line 156) | class DebertaV2OnnxConfig(OnnxConfig): method inputs (line 158) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 171) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 174) | def generate_dummy_inputs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta_v2/modeling_deberta_v2.py class ContextPooler (line 49) | class ContextPooler(nn.Module): method __init__ (line 50) | def __init__(self, config): method forward (line 56) | def forward(self, hidden_states): method output_dim (line 67) | def output_dim(self): class XSoftmax (line 72) | class XSoftmax(torch.autograd.Function): method forward (line 101) | def forward(ctx, input, mask, dim): method backward (line 112) | def backward(ctx, grad_output): method symbolic (line 118) | def symbolic(g, self, mask, dim): class DropoutContext (line 136) | class DropoutContext: method __init__ (line 137) | def __init__(self): function get_mask (line 145) | def get_mask(input, local_context): class XDropout (line 165) | class XDropout(torch.autograd.Function): method forward (line 169) | def forward(ctx, input, local_ctx): method backward (line 179) | def backward(ctx, grad_output): method symbolic (line 187) | def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Unio... class StableDropout (line 205) | class StableDropout(nn.Module): method __init__ (line 213) | def __init__(self, drop_prob): method forward (line 219) | def forward(self, x): method clear_context (line 230) | def clear_context(self): method init_context (line 234) | def init_context(self, reuse_mask=True, scale=1): method get_context (line 242) | def get_context(self): class DebertaV2SelfOutput (line 255) | class DebertaV2SelfOutput(nn.Module): method __init__ (line 256) | def __init__(self, config): method forward (line 262) | def forward(self, hidden_states, input_tensor): class DebertaV2Attention (line 270) | class DebertaV2Attention(nn.Module): method __init__ (line 271) | def __init__(self, config): method forward (line 277) | def forward( class DebertaV2Intermediate (line 307) | class DebertaV2Intermediate(nn.Module): method __init__ (line 308) | def __init__(self, config): method forward (line 316) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DebertaV2Output (line 323) | class DebertaV2Output(nn.Module): method __init__ (line 324) | def __init__(self, config): method forward (line 331) | def forward(self, hidden_states, input_tensor): class DebertaV2Layer (line 339) | class DebertaV2Layer(nn.Module): method __init__ (line 340) | def __init__(self, config): method forward (line 346) | def forward( class ConvLayer (line 373) | class ConvLayer(nn.Module): method __init__ (line 374) | def __init__(self, config): method forward (line 386) | def forward(self, hidden_states, residual_states, input_mask): class DebertaV2Encoder (line 409) | class DebertaV2Encoder(nn.Module): method __init__ (line 412) | def __init__(self, config): method get_rel_embedding (line 439) | def get_rel_embedding(self): method get_attention_mask (line 445) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 454) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method forward (line 466) | def forward( function make_log_bucket_position (line 542) | def make_log_bucket_position(relative_pos, bucket_size, max_position): function build_relative_position (line 557) | def build_relative_position(query_size, key_size, bucket_size=-1, max_po... function c2p_dynamic_expand (line 589) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 595) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 601) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): class DisentangledSelfAttention (line 605) | class DisentangledSelfAttention(nn.Module): method __init__ (line 616) | def __init__(self, config): method transpose_for_scores (line 654) | def transpose_for_scores(self, x, attention_heads): method forward (line 659) | def forward( method disentangled_attention_bias (line 743) | def disentangled_attention_bias(self, query_layer, key_layer, relative... class DebertaV2Embeddings (line 823) | class DebertaV2Embeddings(nn.Module): method __init__ (line 826) | def __init__(self, config): method forward (line 852) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class DebertaV2PreTrainedModel (line 900) | class DebertaV2PreTrainedModel(PreTrainedModel): method _init_weights (line 911) | def _init_weights(self, module): class DebertaV2Model (line 991) | class DebertaV2Model(DebertaV2PreTrainedModel): method __init__ (line 992) | def __init__(self, config): method get_input_embeddings (line 1002) | def get_input_embeddings(self): method set_input_embeddings (line 1005) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 1008) | def _prune_heads(self, heads_to_prune): method forward (line 1021) | def forward( class DebertaV2ForMaskedLM (line 1103) | class DebertaV2ForMaskedLM(DebertaV2PreTrainedModel): method __init__ (line 1106) | def __init__(self, config): method get_output_embeddings (line 1115) | def get_output_embeddings(self): method set_output_embeddings (line 1118) | def set_output_embeddings(self, new_embeddings): method forward (line 1130) | def forward( class DebertaV2PredictionHeadTransform (line 1183) | class DebertaV2PredictionHeadTransform(nn.Module): method __init__ (line 1184) | def __init__(self, config): method forward (line 1195) | def forward(self, hidden_states): class DebertaV2LMPredictionHead (line 1203) | class DebertaV2LMPredictionHead(nn.Module): method __init__ (line 1204) | def __init__(self, config): method _tie_weights (line 1218) | def _tie_weights(self): method forward (line 1221) | def forward(self, hidden_states): class DebertaV2OnlyMLMHead (line 1228) | class DebertaV2OnlyMLMHead(nn.Module): method __init__ (line 1229) | def __init__(self, config): method forward (line 1233) | def forward(self, sequence_output): class DebertaV2ForSequenceClassification (line 1245) | class DebertaV2ForSequenceClassification(DebertaV2PreTrainedModel): method __init__ (line 1246) | def __init__(self, config): method get_input_embeddings (line 1264) | def get_input_embeddings(self): method set_input_embeddings (line 1267) | def set_input_embeddings(self, new_embeddings): method forward (line 1277) | def forward( class DebertaV2ForTokenClassification (line 1365) | class DebertaV2ForTokenClassification(DebertaV2PreTrainedModel): method __init__ (line 1366) | def __init__(self, config): method forward (line 1383) | def forward( class DebertaV2ForQuestionAnswering (line 1438) | class DebertaV2ForQuestionAnswering(DebertaV2PreTrainedModel): method __init__ (line 1439) | def __init__(self, config): method forward (line 1458) | def forward( class DebertaV2ForMultipleChoice (line 1538) | class DebertaV2ForMultipleChoice(DebertaV2PreTrainedModel): method __init__ (line 1539) | def __init__(self, config): method get_input_embeddings (line 1556) | def get_input_embeddings(self): method set_input_embeddings (line 1559) | def set_input_embeddings(self, new_embeddings): method forward (line 1568) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py class TFDebertaV2ContextPooler (line 57) | class TFDebertaV2ContextPooler(keras.layers.Layer): method __init__ (line 58) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 64) | def call(self, hidden_states, training: bool = False): method output_dim (line 74) | def output_dim(self) -> int: method build (line 77) | def build(self, input_shape=None): class TFDebertaV2XSoftmax (line 90) | class TFDebertaV2XSoftmax(keras.layers.Layer): method __init__ (line 100) | def __init__(self, axis=-1, **kwargs): method call (line 104) | def call(self, inputs: tf.Tensor, mask: tf.Tensor): class TFDebertaV2StableDropout (line 113) | class TFDebertaV2StableDropout(keras.layers.Layer): method __init__ (line 121) | def __init__(self, drop_prob, **kwargs): method xdropout (line 126) | def xdropout(self, inputs): method call (line 147) | def call(self, inputs: tf.Tensor, training: tf.Tensor = False): class TFDebertaV2SelfOutput (line 154) | class TFDebertaV2SelfOutput(keras.layers.Layer): method __init__ (line 155) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 162) | def call(self, hidden_states, input_tensor, training: bool = False): method build (line 168) | def build(self, input_shape=None): class TFDebertaV2Attention (line 184) | class TFDebertaV2Attention(keras.layers.Layer): method __init__ (line 185) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 191) | def call( method build (line 220) | def build(self, input_shape=None): class TFDebertaV2Intermediate (line 233) | class TFDebertaV2Intermediate(keras.layers.Layer): method __init__ (line 234) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 247) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 253) | def build(self, input_shape=None): class TFDebertaV2Output (line 263) | class TFDebertaV2Output(keras.layers.Layer): method __init__ (line 264) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 274) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 281) | def build(self, input_shape=None): class TFDebertaV2Layer (line 297) | class TFDebertaV2Layer(keras.layers.Layer): method __init__ (line 298) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 305) | def call( method build (line 333) | def build(self, input_shape=None): class TFDebertaV2ConvLayer (line 348) | class TFDebertaV2ConvLayer(keras.layers.Layer): method __init__ (line 349) | def __init__(self, config: DebertaV2Config, **kwargs): method build (line 360) | def build(self, input_shape=None): method call (line 380) | def call( class TFDebertaV2Encoder (line 411) | class TFDebertaV2Encoder(keras.layers.Layer): method __init__ (line 412) | def __init__(self, config: DebertaV2Config, **kwargs): method build (line 436) | def build(self, input_shape=None): method get_rel_embedding (line 457) | def get_rel_embedding(self): method get_attention_mask (line 463) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 473) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method call (line 484) | def call( function make_log_bucket_position (line 545) | def make_log_bucket_position(relative_pos, bucket_size, max_position): function build_relative_position (line 560) | def build_relative_position(query_size, key_size, bucket_size=-1, max_po... function c2p_dynamic_expand (line 588) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 598) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 608) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): function take_along_axis (line 613) | def take_along_axis(x, indices): class TFDebertaV2DisentangledSelfAttention (line 632) | class TFDebertaV2DisentangledSelfAttention(keras.layers.Layer): method __init__ (line 643) | def __init__(self, config: DebertaV2Config, **kwargs): method transpose_for_scores (line 706) | def transpose_for_scores(self, tensor: tf.Tensor, attention_heads: int... method call (line 717) | def call( method disentangled_att_bias (line 806) | def disentangled_att_bias(self, query_layer, key_layer, relative_pos, ... method build (line 895) | def build(self, input_shape=None): class TFDebertaV2Embeddings (line 923) | class TFDebertaV2Embeddings(keras.layers.Layer): method __init__ (line 926) | def __init__(self, config, **kwargs): method build (line 945) | def build(self, input_shape=None): method call (line 986) | def call( class TFDebertaV2PredictionHeadTransform (line 1043) | class TFDebertaV2PredictionHeadTransform(keras.layers.Layer): method __init__ (line 1044) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 1062) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 1069) | def build(self, input_shape=None): class TFDebertaV2LMPredictionHead (line 1082) | class TFDebertaV2LMPredictionHead(keras.layers.Layer): method __init__ (line 1083) | def __init__(self, config: DebertaV2Config, input_embeddings: keras.la... method build (line 1095) | def build(self, input_shape=None): method get_output_embeddings (line 1105) | def get_output_embeddings(self) -> keras.layers.Layer: method set_output_embeddings (line 1108) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 1112) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 1115) | def set_bias(self, value: tf.Variable): method call (line 1119) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaV2OnlyMLMHead (line 1131) | class TFDebertaV2OnlyMLMHead(keras.layers.Layer): method __init__ (line 1132) | def __init__(self, config: DebertaV2Config, input_embeddings: keras.la... method call (line 1136) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: method build (line 1141) | def build(self, input_shape=None): class TFDebertaV2MainLayer (line 1151) | class TFDebertaV2MainLayer(keras.layers.Layer): method __init__ (line 1154) | def __init__(self, config: DebertaV2Config, **kwargs): method get_input_embeddings (line 1162) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 1165) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 1169) | def _prune_heads(self, heads_to_prune): method call (line 1177) | def call( method build (line 1233) | def build(self, input_shape=None): class TFDebertaV2PreTrainedModel (line 1246) | class TFDebertaV2PreTrainedModel(TFPreTrainedModel): class TFDebertaV2Model (line 1347) | class TFDebertaV2Model(TFDebertaV2PreTrainedModel): method __init__ (line 1348) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1360) | def call( method build (line 1386) | def build(self, input_shape=None): class TFDebertaV2ForMaskedLM (line 1397) | class TFDebertaV2ForMaskedLM(TFDebertaV2PreTrainedModel, TFMaskedLanguag... method __init__ (line 1398) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method get_lm_head (line 1410) | def get_lm_head(self) -> keras.layers.Layer: method call (line 1420) | def call( method build (line 1465) | def build(self, input_shape=None): class TFDebertaV2ForSequenceClassification (line 1485) | class TFDebertaV2ForSequenceClassification(TFDebertaV2PreTrainedModel, T... method __init__ (line 1486) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1511) | def call( method build (line 1559) | def build(self, input_shape=None): class TFDebertaV2ForTokenClassification (line 1585) | class TFDebertaV2ForTokenClassification(TFDebertaV2PreTrainedModel, TFTo... method __init__ (line 1586) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1605) | def call( method build (line 1649) | def build(self, input_shape=None): class TFDebertaV2ForQuestionAnswering (line 1669) | class TFDebertaV2ForQuestionAnswering(TFDebertaV2PreTrainedModel, TFQues... method __init__ (line 1670) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1688) | def call( method build (line 1747) | def build(self, input_shape=None): class TFDebertaV2ForMultipleChoice (line 1766) | class TFDebertaV2ForMultipleChoice(TFDebertaV2PreTrainedModel, TFMultipl... method __init__ (line 1771) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1789) | def call( method build (line 1858) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta_v2/tokenization_deberta_v2.py class DebertaV2Tokenizer (line 33) | class DebertaV2Tokenizer(PreTrainedTokenizer): method __init__ (line 84) | def __init__( method vocab_size (line 129) | def vocab_size(self): method vocab (line 133) | def vocab(self): method get_vocab (line 136) | def get_vocab(self): method _tokenize (line 141) | 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 155) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 159) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 183) | def get_special_tokens_mask(self, token_ids_0, token_ids_1=None, alrea... method create_token_type_ids_from_sequences (line 209) | def create_token_type_ids_from_sequences(self, token_ids_0, token_ids_... method prepare_for_tokenization (line 236) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method save_vocabulary (line 242) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class SPMTokenizer (line 246) | class SPMTokenizer: method __init__ (line 271) | def __init__( method __getstate__ (line 296) | def __getstate__(self): method __setstate__ (line 301) | def __setstate__(self, d): method tokenize (line 311) | def tokenize(self, text): method convert_ids_to_tokens (line 314) | def convert_ids_to_tokens(self, ids): method decode (line 320) | def decode(self, tokens, start=-1, end=-1, raw_text=None): method add_special_token (line 353) | def add_special_token(self, token): method part_of_whole_word (line 361) | def part_of_whole_word(self, token, is_bos=False): method pad (line 376) | def pad(self): method bos (line 379) | def bos(self): method eos (line 382) | def eos(self): method unk (line 385) | def unk(self): method mask (line 388) | def mask(self): method sym (line 391) | def sym(self, id): method id (line 394) | def id(self, sym): method _encode_as_pieces (line 400) | def _encode_as_pieces(self, text): method split_to_words (line 409) | def split_to_words(self, text): method _run_split_on_punc (line 445) | def _run_split_on_punc(self, text): method save_pretrained (line 465) | def save_pretrained(self, path: str, filename_prefix: str = None): function _is_whitespace (line 475) | def _is_whitespace(char): function _is_control (line 487) | def _is_control(char): function _is_punctuation (line 499) | def _is_punctuation(char): function convert_to_unicode (line 514) | def convert_to_unicode(text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py class DebertaV2TokenizerFast (line 36) | class DebertaV2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 88) | def __init__( method can_save_slow_tokenizer (line 123) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 126) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 150) | def get_special_tokens_mask(self, token_ids_0, token_ids_1=None, alrea... method create_token_type_ids_from_sequences (line 176) | def create_token_type_ids_from_sequences(self, token_ids_0, token_ids_... method save_vocabulary (line 203) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/decision_transformer/configuration_decision_transformer.py class DecisionTransformerConfig (line 24) | class DecisionTransformerConfig(PretrainedConfig): method __init__ (line 104) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/decision_transformer/modeling_decision_transformer.py function load_tf_weights_in_gpt2 (line 47) | def load_tf_weights_in_gpt2(model, config, gpt2_checkpoint_path): class DecisionTransformerGPT2Attention (line 104) | class DecisionTransformerGPT2Attention(nn.Module): method __init__ (line 105) | def __init__(self, config, is_cross_attention=False, layer_idx=None): method prune_heads (line 149) | def prune_heads(self, heads): method _attn (line 164) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method _upcast_and_reordered_attn (line 204) | def _upcast_and_reordered_attn(self, query, key, value, attention_mask... method _split_heads (line 256) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 264) | def _merge_heads(self, tensor, num_heads, attn_head_size): method forward (line 272) | def forward( class DecisionTransformerGPT2MLP (line 327) | class DecisionTransformerGPT2MLP(nn.Module): method __init__ (line 328) | def __init__(self, intermediate_size, config): method forward (line 336) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... class DecisionTransformerGPT2Block (line 345) | class DecisionTransformerGPT2Block(nn.Module): method __init__ (line 347) | def __init__(self, config, layer_idx=None): method forward (line 364) | def forward( class DecisionTransformerGPT2PreTrainedModel (line 426) | class DecisionTransformerGPT2PreTrainedModel(PreTrainedModel): method __init__ (line 438) | def __init__(self, *inputs, **kwargs): method _init_weights (line 441) | def _init_weights(self, module): class DecisionTransformerGPT2Model (line 469) | class DecisionTransformerGPT2Model(DecisionTransformerGPT2PreTrainedModel): method __init__ (line 470) | 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 498) | def forward( class DecisionTransformerOutput (line 687) | class DecisionTransformerOutput(ModelOutput): class DecisionTransformerPreTrainedModel (line 721) | class DecisionTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 732) | def _init_weights(self, module): class DecisionTransformerModel (line 779) | class DecisionTransformerModel(DecisionTransformerPreTrainedModel): method __init__ (line 787) | def __init__(self, config): method forward (line 814) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deformable_detr/configuration_deformable_detr.py class DeformableDetrConfig (line 26) | class DeformableDetrConfig(PretrainedConfig): method __init__ (line 152) | def __init__( method num_attention_heads (line 274) | def num_attention_heads(self) -> int: method hidden_size (line 278) | def hidden_size(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/deformable_detr/convert_deformable_detr_to_pytorch.py function rename_key (line 34) | def rename_key(orig_key): function read_in_q_k_v (line 63) | def read_in_q_k_v(state_dict): function prepare_img (line 79) | def prepare_img(): function convert_deformable_detr_checkpoint (line 87) | def convert_deformable_detr_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deformable_detr/feature_extraction_deformable_detr.py function rgb_to_id (line 27) | def rgb_to_id(x): class DeformableDetrFeatureExtractor (line 36) | class DeformableDetrFeatureExtractor(DeformableDetrImageProcessor): method __init__ (line 37) | def __init__(self, *args, **kwargs) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/deformable_detr/image_processing_deformable_detr.py function get_size_with_aspect_ratio (line 88) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_resize_output_image_size (line 128) | def get_resize_output_image_size( function get_image_size_for_max_height_width (line 157) | def get_image_size_for_max_height_width( function get_numpy_to_framework_fn (line 193) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 218) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 232) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 247) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 255) | def get_max_height_width( function make_pixel_mask (line 274) | def make_pixel_mask( function convert_coco_poly_to_mask (line 293) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 328) | def prepare_coco_detection_annotation( function masks_to_boxes (line 389) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 424) | def prepare_coco_panoptic_annotation( function get_segmentation_image (line 466) | def get_segmentation_image( function get_mask_area (line 492) | def get_mask_area(seg_img: np.ndarray, target_size: Tuple[int, int], n_c... function score_labels_from_class_probabilities (line 502) | def score_labels_from_class_probabilities(logits: np.ndarray) -> Tuple[n... function post_process_panoptic_sample (line 511) | def post_process_panoptic_sample( function resize_annotation (line 597) | def resize_annotation( function binary_mask_to_rle (line 649) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 672) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 694) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 723) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 742) | def compute_segments( class DeformableDetrImageProcessor (line 802) | class DeformableDetrImageProcessor(BaseImageProcessor): method __init__ (line 858) | def __init__( method from_dict (line 930) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method prepare_annotation (line 944) | def prepare_annotation( method resize (line 977) | def resize( method resize_annotation (line 1046) | def resize_annotation( method rescale (line 1060) | def rescale( method normalize_annotation (line 1089) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method _update_annotation_for_padded_image (line 1097) | def _update_annotation_for_padded_image( method _pad_image (line 1141) | def _pad_image( method pad (line 1175) | def pad( method preprocess (line 1261) | def preprocess( method post_process (line 1527) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 1572) | def post_process_object_detection( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deformable_detr/load_custom.py function load_cuda_kernels (line 21) | def load_cuda_kernels(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deformable_detr/modeling_deformable_detr.py function load_cuda_kernels (line 59) | def load_cuda_kernels(): class MultiScaleDeformableAttentionFunction (line 112) | class MultiScaleDeformableAttentionFunction(Function): method forward (line 114) | def forward( method backward (line 139) | def backward(context, grad_output): class DeformableDetrDecoderOutput (line 161) | class DeformableDetrDecoderOutput(ModelOutput): class DeformableDetrModelOutput (line 198) | class DeformableDetrModelOutput(ModelOutput): class DeformableDetrObjectDetectionOutput (line 256) | class DeformableDetrObjectDetectionOutput(ModelOutput): function _get_clones (line 335) | def _get_clones(module, N): function inverse_sigmoid (line 339) | def inverse_sigmoid(x, eps=1e-5): class DeformableDetrFrozenBatchNorm2d (line 347) | class DeformableDetrFrozenBatchNorm2d(nn.Module): method __init__ (line 355) | def __init__(self, n): method _load_from_state_dict (line 362) | def _load_from_state_dict( method forward (line 373) | def forward(self, x): function replace_batch_norm (line 387) | def replace_batch_norm(model): class DeformableDetrConvEncoder (line 411) | class DeformableDetrConvEncoder(nn.Module): method __init__ (line 419) | def __init__(self, config): method forward (line 472) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class DeformableDetrConvModel (line 485) | class DeformableDetrConvModel(nn.Module): method __init__ (line 490) | def __init__(self, conv_encoder, position_embedding): method forward (line 495) | def forward(self, pixel_values, pixel_mask): class DeformableDetrSinePositionEmbedding (line 506) | class DeformableDetrSinePositionEmbedding(nn.Module): method __init__ (line 512) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 523) | def forward(self, pixel_values, pixel_mask): class DeformableDetrLearnedPositionEmbedding (line 545) | class DeformableDetrLearnedPositionEmbedding(nn.Module): method __init__ (line 550) | def __init__(self, embedding_dim=256): method forward (line 555) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 569) | def build_position_encoding(config): function multi_scale_deformable_attention (line 582) | def multi_scale_deformable_attention( class DeformableDetrMultiscaleDeformableAttention (line 621) | class DeformableDetrMultiscaleDeformableAttention(nn.Module): method __init__ (line 626) | def __init__(self, config: DeformableDetrConfig, num_heads: int, n_poi... method _reset_parameters (line 665) | def _reset_parameters(self): method with_pos_embed (line 686) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 689) | def forward( class DeformableDetrMultiheadAttention (line 764) | class DeformableDetrMultiheadAttention(nn.Module): method __init__ (line 771) | def __init__( method _shape (line 795) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 798) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 801) | def forward( class DeformableDetrEncoderLayer (line 881) | class DeformableDetrEncoderLayer(nn.Module): method __init__ (line 882) | def __init__(self, config: DeformableDetrConfig): method forward (line 896) | def forward( class DeformableDetrDecoderLayer (line 966) | class DeformableDetrDecoderLayer(nn.Module): method __init__ (line 967) | def __init__(self, config: DeformableDetrConfig): method forward (line 994) | def forward( class DeformableDetrPreTrainedModel (line 1077) | class DeformableDetrPreTrainedModel(PreTrainedModel): method _init_weights (line 1084) | def _init_weights(self, module): class DeformableDetrEncoder (line 1164) | class DeformableDetrEncoder(DeformableDetrPreTrainedModel): method __init__ (line 1175) | def __init__(self, config: DeformableDetrConfig): method get_reference_points (line 1186) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1216) | def forward( class DeformableDetrDecoder (line 1307) | class DeformableDetrDecoder(DeformableDetrPreTrainedModel): method __init__ (line 1322) | def __init__(self, config: DeformableDetrConfig): method forward (line 1336) | def forward( class DeformableDetrModel (line 1502) | class DeformableDetrModel(DeformableDetrPreTrainedModel): method __init__ (line 1503) | def __init__(self, config: DeformableDetrConfig): method get_encoder (line 1560) | def get_encoder(self): method get_decoder (line 1563) | def get_decoder(self): method freeze_backbone (line 1566) | def freeze_backbone(self): method unfreeze_backbone (line 1570) | def unfreeze_backbone(self): method get_valid_ratio (line 1574) | def get_valid_ratio(self, mask, dtype=torch.float32): method get_proposal_pos_embed (line 1585) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 1602) | def gen_encoder_output_proposals(self, enc_output, padding_mask, spati... method forward (line 1653) | def forward( class DeformableDetrForObjectDetection (line 1858) | class DeformableDetrForObjectDetection(DeformableDetrPreTrainedModel): method __init__ (line 1864) | def __init__(self, config: DeformableDetrConfig): method _set_aux_loss (line 1906) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1914) | def forward( function dice_loss (line 2084) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 2104) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class DeformableDetrLoss (line 2135) | class DeformableDetrLoss(nn.Module): method __init__ (line 2152) | def __init__(self, matcher, num_classes, focal_alpha, losses): method loss_labels (line 2160) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 2195) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2211) | def loss_boxes(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2236) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2243) | def _get_target_permutation_idx(self, indices): method get_loss (line 2249) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2259) | def forward(self, outputs, targets): class DeformableDetrMLPPredictionHead (line 2314) | class DeformableDetrMLPPredictionHead(nn.Module): method __init__ (line 2323) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2329) | def forward(self, x): class DeformableDetrHungarianMatcher (line 2335) | class DeformableDetrHungarianMatcher(nn.Module): method __init__ (line 2352) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2363) | def forward(self, outputs, targets): function _upcast (line 2416) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2425) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2442) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2459) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 2484) | def _max_by_axis(the_list): class NestedTensor (line 2494) | class NestedTensor: method __init__ (line 2495) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2499) | def to(self, device): method decompose (line 2508) | def decompose(self): method __repr__ (line 2511) | def __repr__(self): function nested_tensor_from_tensor_list (line 2516) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deit/configuration_deit.py class DeiTConfig (line 30) | class DeiTConfig(PretrainedConfig): method __init__ (line 90) | def __init__( class DeiTOnnxConfig (line 126) | class DeiTOnnxConfig(OnnxConfig): method inputs (line 130) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 138) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/deit/convert_deit_timm_to_pytorch.py function create_rename_keys (line 36) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 92) | def read_in_q_k_v(state_dict, config, base_model=False): function rename_key (line 118) | def rename_key(dct, old, new): function prepare_img (line 124) | def prepare_img(): function convert_deit_checkpoint (line 131) | def convert_deit_checkpoint(deit_name, pytorch_dump_folder_path): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/deit/image_processing_deit.py class DeiTImageProcessor (line 46) | class DeiTImageProcessor(BaseImageProcessor): method __init__ (line 82) | def __init__( method resize (line 114) | def resize( method preprocess (line 163) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deit/modeling_deit.py class DeiTEmbeddings (line 61) | class DeiTEmbeddings(nn.Module): method __init__ (line 66) | def __init__(self, config: DeiTConfig, use_mask_token: bool = False) -... method interpolate_pos_encoding (line 78) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 114) | def forward( class DeiTPatchEmbeddings (line 146) | class DeiTPatchEmbeddings(nn.Module): method __init__ (line 153) | def __init__(self, config): method forward (line 168) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class DeiTSelfAttention (line 179) | class DeiTSelfAttention(nn.Module): method __init__ (line 180) | def __init__(self, config: DeiTConfig) -> None: method transpose_for_scores (line 198) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 203) | def forward( class DeiTSdpaSelfAttention (line 240) | class DeiTSdpaSelfAttention(DeiTSelfAttention): method __init__ (line 241) | def __init__(self, config: DeiTConfig) -> None: method forward (line 245) | def forward( class DeiTSelfOutput (line 272) | class DeiTSelfOutput(nn.Module): method __init__ (line 278) | def __init__(self, config: DeiTConfig) -> None: method forward (line 283) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DeiTAttention (line 291) | class DeiTAttention(nn.Module): method __init__ (line 292) | def __init__(self, config: DeiTConfig) -> None: method prune_heads (line 298) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 316) | def forward( class DeiTSdpaAttention (line 331) | class DeiTSdpaAttention(DeiTAttention): method __init__ (line 332) | def __init__(self, config: DeiTConfig) -> None: class DeiTIntermediate (line 338) | class DeiTIntermediate(nn.Module): method __init__ (line 339) | def __init__(self, config: DeiTConfig) -> None: method forward (line 347) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DeiTOutput (line 355) | class DeiTOutput(nn.Module): method __init__ (line 356) | def __init__(self, config: DeiTConfig) -> None: method forward (line 361) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DeiTLayer (line 377) | class DeiTLayer(nn.Module): method __init__ (line 380) | def __init__(self, config: DeiTConfig) -> None: method forward (line 390) | def forward( class DeiTEncoder (line 420) | class DeiTEncoder(nn.Module): method __init__ (line 421) | def __init__(self, config: DeiTConfig) -> None: method forward (line 427) | def forward( class DeiTPreTrainedModel (line 471) | class DeiTPreTrainedModel(PreTrainedModel): method _init_weights (line 484) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class DeiTModel (line 539) | class DeiTModel(DeiTPreTrainedModel): method __init__ (line 540) | def __init__(self, config: DeiTConfig, add_pooling_layer: bool = True,... method get_input_embeddings (line 553) | def get_input_embeddings(self) -> DeiTPatchEmbeddings: method _prune_heads (line 556) | def _prune_heads(self, heads_to_prune): method forward (line 572) | def forward( class DeiTPooler (line 635) | class DeiTPooler(nn.Module): method __init__ (line 636) | def __init__(self, config: DeiTConfig): method forward (line 641) | def forward(self, hidden_states): class DeiTForMaskedImageModeling (line 662) | class DeiTForMaskedImageModeling(DeiTPreTrainedModel): method __init__ (line 663) | def __init__(self, config: DeiTConfig) -> None: method forward (line 682) | def forward( class DeiTForImageClassification (line 776) | class DeiTForImageClassification(DeiTPreTrainedModel): method __init__ (line 777) | def __init__(self, config: DeiTConfig) -> None: method forward (line 791) | def forward( class DeiTForImageClassificationWithTeacherOutput (line 886) | class DeiTForImageClassificationWithTeacherOutput(ModelOutput): class DeiTForImageClassificationWithTeacher (line 928) | class DeiTForImageClassificationWithTeacher(DeiTPreTrainedModel): method __init__ (line 929) | def __init__(self, config: DeiTConfig) -> None: method forward (line 953) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deit/modeling_tf_deit.py class TFDeiTForImageClassificationWithTeacherOutput (line 68) | class TFDeiTForImageClassificationWithTeacherOutput(ModelOutput): class TFDeiTEmbeddings (line 98) | class TFDeiTEmbeddings(keras.layers.Layer): method __init__ (line 103) | def __init__(self, config: DeiTConfig, use_mask_token: bool = False, *... method build (line 110) | def build(self, input_shape=None): method interpolate_pos_encoding (line 149) | def interpolate_pos_encoding(self, embeddings: tf.Tensor, height: int,... method call (line 176) | def call( class TFDeiTPatchEmbeddings (line 207) | class TFDeiTPatchEmbeddings(keras.layers.Layer): method __init__ (line 214) | def __init__(self, config: DeiTConfig, **kwargs) -> None: method call (line 231) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: method build (line 243) | def build(self, input_shape=None): class TFDeiTSelfAttention (line 253) | class TFDeiTSelfAttention(keras.layers.Layer): method __init__ (line 254) | def __init__(self, config: DeiTConfig, **kwargs): method transpose_for_scores (line 280) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 287) | def call( method build (line 328) | def build(self, input_shape=None): class TFDeiTSelfOutput (line 344) | class TFDeiTSelfOutput(keras.layers.Layer): method __init__ (line 350) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 359) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 365) | def build(self, input_shape=None): class TFDeiTAttention (line 375) | class TFDeiTAttention(keras.layers.Layer): method __init__ (line 376) | def __init__(self, config: DeiTConfig, **kwargs): method prune_heads (line 382) | def prune_heads(self, heads): method call (line 385) | def call( method build (line 402) | def build(self, input_shape=None): class TFDeiTIntermediate (line 415) | class TFDeiTIntermediate(keras.layers.Layer): method __init__ (line 416) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 429) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 435) | def build(self, input_shape=None): class TFDeiTOutput (line 445) | class TFDeiTOutput(keras.layers.Layer): method __init__ (line 446) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 455) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 462) | def build(self, input_shape=None): class TFDeiTLayer (line 471) | class TFDeiTLayer(keras.layers.Layer): method __init__ (line 474) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 485) | def call( method build (line 517) | def build(self, input_shape=None): class TFDeiTEncoder (line 539) | class TFDeiTEncoder(keras.layers.Layer): method __init__ (line 540) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 545) | def call( method build (line 583) | def build(self, input_shape=None): class TFDeiTMainLayer (line 594) | class TFDeiTMainLayer(keras.layers.Layer): method __init__ (line 597) | def __init__( method get_input_embeddings (line 609) | def get_input_embeddings(self) -> TFDeiTPatchEmbeddings: method _prune_heads (line 612) | def _prune_heads(self, heads_to_prune): method get_head_mask (line 619) | def get_head_mask(self, head_mask): method call (line 628) | def call( method build (line 689) | def build(self, input_shape=None): class TFDeiTPreTrainedModel (line 708) | class TFDeiTPreTrainedModel(TFPreTrainedModel): class TFDeiTModel (line 759) | class TFDeiTModel(TFDeiTPreTrainedModel): method __init__ (line 760) | def __init__( method call (line 778) | def call( method build (line 801) | def build(self, input_shape=None): class TFDeiTPooler (line 811) | class TFDeiTPooler(keras.layers.Layer): method __init__ (line 812) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 823) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 831) | def build(self, input_shape=None): class TFDeitPixelShuffle (line 840) | class TFDeitPixelShuffle(keras.layers.Layer): method __init__ (line 843) | def __init__(self, upscale_factor: int, **kwargs) -> None: method call (line 849) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFDeitDecoder (line 866) | class TFDeitDecoder(keras.layers.Layer): method __init__ (line 867) | def __init__(self, config: DeiTConfig, **kwargs) -> None: method call (line 875) | def call(self, inputs: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 881) | def build(self, input_shape=None): class TFDeiTForMaskedImageModeling (line 898) | class TFDeiTForMaskedImageModeling(TFDeiTPreTrainedModel): method __init__ (line 899) | def __init__(self, config: DeiTConfig) -> None: method call (line 908) | def call( method build (line 1007) | def build(self, input_shape=None): class TFDeiTForImageClassification (line 1026) | class TFDeiTForImageClassification(TFDeiTPreTrainedModel, TFSequenceClas... method __init__ (line 1027) | def __init__(self, config: DeiTConfig): method call (line 1044) | def call( method build (line 1118) | def build(self, input_shape=None): class TFDeiTForImageClassificationWithTeacher (line 1142) | class TFDeiTForImageClassificationWithTeacher(TFDeiTPreTrainedModel): method __init__ (line 1143) | def __init__(self, config: DeiTConfig) -> None: method call (line 1170) | def call( method build (line 1212) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/bort/convert_bort_original_gluonnlp_checkpoint_to_pytorch.py function convert_bort_checkpoint_to_pytorch (line 54) | def convert_bort_checkpoint_to_pytorch(bort_checkpoint_path: str, pytorc... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/deta/configuration_deta.py class DetaConfig (line 25) | class DetaConfig(PretrainedConfig): method __init__ (line 148) | def __init__( method num_attention_heads (line 262) | def num_attention_heads(self) -> int: method hidden_size (line 266) | def hidden_size(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/deta/convert_deta_resnet_to_pytorch.py function get_deta_config (line 36) | def get_deta_config(): function create_rename_keys (line 60) | def create_rename_keys(config): function rename_key (line 184) | def rename_key(dct, old, new): function read_in_decoder_q_k_v (line 189) | def read_in_decoder_q_k_v(state_dict, config): function prepare_img (line 208) | def prepare_img(): function convert_deta_checkpoint (line 216) | def convert_deta_checkpoint(model_name, pytorch_dump_folder_path, push_t... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/deta/convert_deta_swin_to_pytorch.py function get_deta_config (line 36) | def get_deta_config(model_name): function create_rename_keys (line 75) | def create_rename_keys(config): function rename_key (line 159) | def rename_key(dct, old, new): function read_in_swin_q_k_v (line 165) | def read_in_swin_q_k_v(state_dict, backbone_config): 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: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/deta/image_processing_deta.py function get_size_with_aspect_ratio (line 81) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_resize_output_image_size (line 120) | def get_resize_output_image_size( function get_image_size_for_max_height_width (line 148) | def get_image_size_for_max_height_width( function get_numpy_to_framework_fn (line 183) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 207) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 220) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 234) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 241) | def get_max_height_width( function make_pixel_mask (line 259) | def make_pixel_mask( function convert_coco_poly_to_mask (line 277) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 311) | def prepare_coco_detection_annotation( function masks_to_boxes (line 371) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 405) | def prepare_coco_panoptic_annotation( function resize_annotation (line 446) | def resize_annotation( class DetaImageProcessor (line 497) | class DetaImageProcessor(BaseImageProcessor): method __init__ (line 552) | def __init__( method prepare_annotation (line 591) | def prepare_annotation( method resize (line 623) | def resize( method resize_annotation (line 679) | def resize_annotation( method rescale (line 692) | def rescale( method normalize_annotation (line 720) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method _update_annotation_for_padded_image (line 727) | def _update_annotation_for_padded_image( method _pad_image (line 770) | def _pad_image( method pad (line 803) | def pad( method preprocess (line 888) | def preprocess( method post_process_object_detection (line 1143) | def post_process_object_detection( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/deta/modeling_deta.py function load_cuda_kernels (line 55) | def load_cuda_kernels(): class MultiScaleDeformableAttentionFunction (line 85) | class MultiScaleDeformableAttentionFunction(Function): method forward (line 87) | def forward( method backward (line 112) | def backward(context, grad_output): class DetaDecoderOutput (line 153) | class DetaDecoderOutput(ModelOutput): class DetaModelOutput (line 190) | class DetaModelOutput(ModelOutput): class DetaObjectDetectionOutput (line 251) | class DetaObjectDetectionOutput(ModelOutput): function _get_clones (line 333) | def _get_clones(module, N): function inverse_sigmoid (line 337) | def inverse_sigmoid(x, eps=1e-5): class DetaFrozenBatchNorm2d (line 344) | class DetaFrozenBatchNorm2d(nn.Module): method __init__ (line 352) | def __init__(self, n): method _load_from_state_dict (line 359) | def _load_from_state_dict( method forward (line 370) | def forward(self, x): function replace_batch_norm (line 383) | def replace_batch_norm(model): class DetaBackboneWithPositionalEncodings (line 407) | class DetaBackboneWithPositionalEncodings(nn.Module): method __init__ (line 414) | def __init__(self, config): method forward (line 431) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class DetaSinePositionEmbedding (line 452) | class DetaSinePositionEmbedding(nn.Module): method __init__ (line 458) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 469) | def forward(self, pixel_values, pixel_mask): class DetaLearnedPositionEmbedding (line 490) | class DetaLearnedPositionEmbedding(nn.Module): method __init__ (line 495) | def __init__(self, embedding_dim=256): method forward (line 500) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 513) | def build_position_encoding(config): function multi_scale_deformable_attention (line 526) | def multi_scale_deformable_attention( class DetaMultiscaleDeformableAttention (line 565) | class DetaMultiscaleDeformableAttention(nn.Module): method __init__ (line 570) | def __init__(self, config: DetaConfig, num_heads: int, n_points: int): method _reset_parameters (line 609) | def _reset_parameters(self): method with_pos_embed (line 630) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 633) | def forward( class DetaMultiheadAttention (line 708) | class DetaMultiheadAttention(nn.Module): method __init__ (line 715) | def __init__( method _shape (line 739) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 742) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 745) | def forward( class DetaEncoderLayer (line 825) | class DetaEncoderLayer(nn.Module): method __init__ (line 826) | def __init__(self, config: DetaConfig): method forward (line 842) | def forward( class DetaDecoderLayer (line 912) | class DetaDecoderLayer(nn.Module): method __init__ (line 913) | def __init__(self, config: DetaConfig): method forward (line 940) | def forward( class DetaPreTrainedModel (line 1023) | class DetaPreTrainedModel(PreTrainedModel): method _init_weights (line 1030) | def _init_weights(self, module): class DetaEncoder (line 1109) | class DetaEncoder(DetaPreTrainedModel): method __init__ (line 1120) | def __init__(self, config: DetaConfig): method get_reference_points (line 1131) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1161) | def forward( class DetaDecoder (line 1240) | class DetaDecoder(DetaPreTrainedModel): method __init__ (line 1255) | def __init__(self, config: DetaConfig): method forward (line 1269) | def forward( class DetaModel (line 1433) | class DetaModel(DetaPreTrainedModel): method __init__ (line 1434) | def __init__(self, config: DetaConfig): method get_encoder (line 1498) | def get_encoder(self): method get_decoder (line 1501) | def get_decoder(self): method freeze_backbone (line 1504) | def freeze_backbone(self): method unfreeze_backbone (line 1508) | def unfreeze_backbone(self): method get_valid_ratio (line 1512) | def get_valid_ratio(self, mask, dtype=torch.float32): method get_proposal_pos_embed (line 1523) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 1540) | def gen_encoder_output_proposals(self, enc_output, padding_mask, spati... method forward (line 1594) | def forward( class DetaForObjectDetection (line 1851) | class DetaForObjectDetection(DetaPreTrainedModel): method __init__ (line 1857) | def __init__(self, config: DetaConfig): method _set_aux_loss (line 1898) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1910) | def forward( function dice_loss (line 2092) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 2111) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class DetaLoss (line 2142) | class DetaLoss(nn.Module): method __init__ (line 2159) | def __init__( method loss_labels (line 2182) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 2216) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2231) | def loss_boxes(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2255) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2261) | def _get_target_permutation_idx(self, indices): method get_loss (line 2267) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2277) | def forward(self, outputs, targets): class DetaMLPPredictionHead (line 2339) | class DetaMLPPredictionHead(nn.Module): method __init__ (line 2348) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2354) | def forward(self, x): class DetaHungarianMatcher (line 2360) | class DetaHungarianMatcher(nn.Module): method __init__ (line 2377) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2388) | def forward(self, outputs, targets): function _upcast (line 2440) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2448) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2464) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2480) | def generalized_box_iou(boxes1, boxes2): function nonzero_tuple (line 2505) | def nonzero_tuple(x): class DetaMatcher (line 2519) | class DetaMatcher: method __init__ (line 2532) | def __init__(self, thresholds: List[float], labels: List[int], allow_l... method __call__ (line 2567) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 2608) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): function subsample_labels (line 2629) | def subsample_labels(labels: torch.Tensor, num_samples: int, positive_fr... function sample_topk_per_gt (line 2672) | def sample_topk_per_gt(pr_inds, gt_inds, iou, k): class DetaStage2Assigner (line 2687) | class DetaStage2Assigner(nn.Module): method __init__ (line 2688) | def __init__(self, num_queries, max_k=4): method _sample_proposals (line 2696) | def _sample_proposals(self, matched_idxs: torch.Tensor, matched_labels... method forward (line 2732) | def forward(self, outputs, targets, return_cost_matrix=False): method postprocess_indices (line 2761) | def postprocess_indices(self, pr_inds, gt_inds, iou): class DetaStage1Assigner (line 2766) | class DetaStage1Assigner(nn.Module): method __init__ (line 2767) | def __init__(self, t_low=0.3, t_high=0.7, max_k=4): method _subsample_labels (line 2778) | def _subsample_labels(self, label): method forward (line 2793) | def forward(self, outputs, targets): method postprocess_indices (line 2823) | def postprocess_indices(self, pr_inds, gt_inds, iou): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/efficientformer/configuration_efficientformer.py class EfficientFormerConfig (line 26) | class EfficientFormerConfig(PretrainedConfig): method __init__ (line 108) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/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: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/efficientformer/image_processing_efficientformer.py class EfficientFormerImageProcessor (line 47) | class EfficientFormerImageProcessor(BaseImageProcessor): method __init__ (line 86) | def __init__( method resize (line 133) | def resize( method preprocess (line 178) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/efficientformer/modeling_efficientformer.py class EfficientFormerPatchEmbeddings (line 53) | class EfficientFormerPatchEmbeddings(nn.Module): method __init__ (line 59) | def __init__(self, config: EfficientFormerConfig, num_channels: int, e... method forward (line 72) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class EfficientFormerSelfAttention (line 85) | class EfficientFormerSelfAttention(nn.Module): method __init__ (line 86) | def __init__(self, dim: int, key_dim: int, num_heads: int, attention_r... method train (line 113) | def train(self, mode=True): method forward (line 120) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class EfficientFormerConvStem (line 149) | class EfficientFormerConvStem(nn.Module): method __init__ (line 150) | def __init__(self, config: EfficientFormerConfig, out_channels: int): method forward (line 161) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class EfficientFormerPooling (line 170) | class EfficientFormerPooling(nn.Module): method __init__ (line 171) | def __init__(self, pool_size: int): method forward (line 175) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EfficientFormerDenseMlp (line 180) | class EfficientFormerDenseMlp(nn.Module): method __init__ (line 181) | def __init__( method forward (line 197) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EfficientFormerConvMlp (line 207) | class EfficientFormerConvMlp(nn.Module): method __init__ (line 208) | def __init__( method forward (line 228) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: function drop_path (line 242) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class EfficientFormerDropPath (line 262) | class EfficientFormerDropPath(nn.Module): method __init__ (line 265) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 269) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 272) | def extra_repr(self) -> str: class EfficientFormerFlat (line 276) | class EfficientFormerFlat(nn.Module): method __init__ (line 277) | def __init__(self): method forward (line 280) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class EfficientFormerMeta3D (line 285) | class EfficientFormerMeta3D(nn.Module): method __init__ (line 286) | def __init__(self, config: EfficientFormerConfig, dim: int, drop_path:... method forward (line 309) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class EfficientFormerMeta3DLayers (line 330) | class EfficientFormerMeta3DLayers(nn.Module): method __init__ (line 331) | def __init__(self, config: EfficientFormerConfig): method forward (line 341) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class EfficientFormerMeta4D (line 360) | class EfficientFormerMeta4D(nn.Module): method __init__ (line 361) | def __init__(self, config: EfficientFormerConfig, dim: int, drop_path:... method forward (line 376) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class EfficientFormerMeta4DLayers (line 392) | class EfficientFormerMeta4DLayers(nn.Module): method __init__ (line 393) | def __init__(self, config: EfficientFormerConfig, stage_idx: int): method forward (line 409) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class EfficientFormerIntermediateStage (line 415) | class EfficientFormerIntermediateStage(nn.Module): method __init__ (line 416) | def __init__(self, config: EfficientFormerConfig, index: int): method forward (line 420) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class EfficientFormerLastStage (line 425) | class EfficientFormerLastStage(nn.Module): method __init__ (line 426) | def __init__(self, config: EfficientFormerConfig): method forward (line 432) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class EfficientFormerEncoder (line 440) | class EfficientFormerEncoder(nn.Module): method __init__ (line 441) | def __init__(self, config: EfficientFormerConfig): method forward (line 461) | def forward( class EfficientFormerPreTrainedModel (line 497) | class EfficientFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 508) | def _init_weights(self, module: nn.Module): class EfficientFormerModel (line 549) | class EfficientFormerModel(EfficientFormerPreTrainedModel): method __init__ (line 550) | def __init__(self, config: EfficientFormerConfig): method forward (line 570) | def forward( class EfficientFormerForImageClassification (line 612) | class EfficientFormerForImageClassification(EfficientFormerPreTrainedMod... method __init__ (line 613) | def __init__(self, config: EfficientFormerConfig): method forward (line 634) | def forward( class EfficientFormerForImageClassificationWithTeacherOutput (line 697) | class EfficientFormerForImageClassificationWithTeacherOutput(ModelOutput): class EfficientFormerForImageClassificationWithTeacher (line 742) | class EfficientFormerForImageClassificationWithTeacher(EfficientFormerPr... method __init__ (line 743) | def __init__(self, config: EfficientFormerConfig): method forward (line 766) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/efficientformer/modeling_tf_efficientformer.py class TFEfficientFormerPatchEmbeddings (line 62) | class TFEfficientFormerPatchEmbeddings(keras.layers.Layer): method __init__ (line 68) | def __init__( method call (line 90) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... method build (line 99) | def build(self, input_shape=None): class TFEfficientFormerSelfAttention (line 112) | class TFEfficientFormerSelfAttention(keras.layers.Layer): method __init__ (line 113) | def __init__( method build (line 143) | def build(self, input_shape: tf.TensorShape) -> None: method call (line 182) | def call( class TFEfficientFormerConvStem (line 219) | class TFEfficientFormerConvStem(keras.layers.Layer): method __init__ (line 220) | def __init__(self, config: EfficientFormerConfig, out_channels: int, *... method call (line 248) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... method build (line 255) | def build(self, input_shape=None): class TFEfficientFormerPooling (line 276) | class TFEfficientFormerPooling(keras.layers.Layer): method __init__ (line 277) | def __init__(self, pool_size: int, **kwargs): method call (line 281) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFEfficientFormerDenseMlp (line 287) | class TFEfficientFormerDenseMlp(keras.layers.Layer): method __init__ (line 288) | def __init__( method call (line 312) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 321) | def build(self, input_shape=None): class TFEfficientFormerConvMlp (line 333) | class TFEfficientFormerConvMlp(keras.layers.Layer): method __init__ (line 334) | def __init__( method call (line 377) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... method build (line 387) | def build(self, input_shape=None): class TFEfficientFormerDropPath (line 406) | class TFEfficientFormerDropPath(keras.layers.Layer): method __init__ (line 412) | def __init__(self, drop_path: float, **kwargs): method call (line 416) | def call(self, x: tf.Tensor, training=None): class TFEfficientFormerFlat (line 426) | class TFEfficientFormerFlat(keras.layers.Layer): method __init__ (line 427) | def __init__(self, **kwargs): method call (line 430) | def call(self, hidden_states: tf.Tensor) -> Tuple[tf.Tensor]: class TFEfficientFormerMeta3D (line 436) | class TFEfficientFormerMeta3D(keras.layers.Layer): method __init__ (line 437) | def __init__(self, config: EfficientFormerConfig, dim: int, drop_path:... method build (line 465) | def build(self, input_shape=None): method call (line 502) | def call( class TFEfficientFormerMeta3DLayers (line 536) | class TFEfficientFormerMeta3DLayers(keras.layers.Layer): method __init__ (line 537) | def __init__(self, config: EfficientFormerConfig, **kwargs): method call (line 548) | def call( method build (line 569) | def build(self, input_shape=None): class TFEfficientFormerMeta4D (line 579) | class TFEfficientFormerMeta4D(keras.layers.Layer): method __init__ (line 580) | def __init__(self, config: EfficientFormerConfig, dim: int, drop_path:... method build (line 597) | def build(self, input_shape=None): method call (line 628) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> Tu... class TFEfficientFormerMeta4DLayers (line 652) | class TFEfficientFormerMeta4DLayers(keras.layers.Layer): method __init__ (line 653) | def __init__(self, config: EfficientFormerConfig, stage_idx: int, **kw... method call (line 669) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> Tu... method build (line 674) | def build(self, input_shape=None): class TFEfficientFormerIntermediateStage (line 684) | class TFEfficientFormerIntermediateStage(keras.layers.Layer): method __init__ (line 685) | def __init__(self, config: EfficientFormerConfig, index: int, **kwargs): method call (line 689) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> Tu... method build (line 693) | def build(self, input_shape=None): class TFEfficientFormerLastStage (line 702) | class TFEfficientFormerLastStage(keras.layers.Layer): method __init__ (line 703) | def __init__(self, config: EfficientFormerConfig, **kwargs): method call (line 709) | def call( method build (line 720) | def build(self, input_shape=None): class TFEfficientFormerEncoder (line 735) | class TFEfficientFormerEncoder(keras.layers.Layer): method __init__ (line 736) | def __init__(self, config: EfficientFormerConfig, **kwargs): method call (line 766) | def call( method build (line 803) | def build(self, input_shape=None): class TFEfficientFormerMainLayer (line 816) | class TFEfficientFormerMainLayer(keras.layers.Layer): method __init__ (line 819) | def __init__(self, config: EfficientFormerConfig, **kwargs) -> None: method call (line 828) | def call( method build (line 884) | def build(self, input_shape=None): class TFEfficientFormerPreTrainedModel (line 899) | class TFEfficientFormerPreTrainedModel(TFPreTrainedModel): class TFEfficientFormerModel (line 942) | class TFEfficientFormerModel(TFEfficientFormerPreTrainedModel): method __init__ (line 943) | def __init__(self, config: EfficientFormerConfig, **kwargs) -> None: method call (line 957) | def call( method build (line 974) | def build(self, input_shape=None): class TFEfficientFormerForImageClassification (line 990) | class TFEfficientFormerForImageClassification(TFEfficientFormerPreTraine... method __init__ (line 991) | def __init__(self, config: EfficientFormerConfig): method call (line 1013) | def call( method build (line 1052) | def build(self, input_shape=None): class TFEfficientFormerForImageClassificationWithTeacherOutput (line 1066) | class TFEfficientFormerForImageClassificationWithTeacherOutput(ModelOutp... class TFEfficientFormerForImageClassificationWithTeacher (line 1108) | class TFEfficientFormerForImageClassificationWithTeacher(TFEfficientForm... method __init__ (line 1109) | def __init__(self, config: EfficientFormerConfig) -> None: method call (line 1135) | def call( method build (line 1176) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/ernie_m/configuration_ernie_m.py class ErnieMConfig (line 25) | class ErnieMConfig(PretrainedConfig): method __init__ (line 80) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/ernie_m/modeling_ernie_m.py class ErnieMEmbeddings (line 48) | class ErnieMEmbeddings(nn.Module): method __init__ (line 51) | def __init__(self, config): method forward (line 62) | def forward( class ErnieMSelfAttention (line 89) | class ErnieMSelfAttention(nn.Module): method __init__ (line 90) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 116) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 121) | def forward( class ErnieMAttention (line 223) | class ErnieMAttention(nn.Module): method __init__ (line 224) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 230) | def prune_heads(self, heads): method forward (line 248) | def forward( class ErnieMEncoderLayer (line 272) | class ErnieMEncoderLayer(nn.Module): method __init__ (line 273) | def __init__(self, config): method forward (line 292) | def forward( class ErnieMEncoder (line 335) | class ErnieMEncoder(nn.Module): method __init__ (line 336) | def __init__(self, config): method forward (line 341) | def forward( class ErnieMPooler (line 382) | class ErnieMPooler(nn.Module): method __init__ (line 383) | def __init__(self, config): method forward (line 388) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErnieMPreTrainedModel (line 397) | class ErnieMPreTrainedModel(PreTrainedModel): method _init_weights (line 406) | def _init_weights(self, module): class ErnieMModel (line 485) | class ErnieMModel(ErnieMPreTrainedModel): method __init__ (line 486) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 494) | def get_input_embeddings(self): method set_input_embeddings (line 497) | def set_input_embeddings(self, value): method _prune_heads (line 500) | def _prune_heads(self, heads_to_prune): method forward (line 515) | def forward( class ErnieMForSequenceClassification (line 599) | class ErnieMForSequenceClassification(ErnieMPreTrainedModel): method __init__ (line 600) | def __init__(self, config): method forward (line 622) | def forward( class ErnieMForMultipleChoice (line 700) | class ErnieMForMultipleChoice(ErnieMPreTrainedModel): method __init__ (line 701) | def __init__(self, config): method forward (line 720) | def forward( class ErnieMForTokenClassification (line 789) | class ErnieMForTokenClassification(ErnieMPreTrainedModel): method __init__ (line 790) | def __init__(self, config): method forward (line 811) | def forward( class ErnieMForQuestionAnswering (line 869) | class ErnieMForQuestionAnswering(ErnieMPreTrainedModel): method __init__ (line 870) | def __init__(self, config): method forward (line 887) | def forward( class ErnieMForInformationExtraction (line 965) | class ErnieMForInformationExtraction(ErnieMPreTrainedModel): method __init__ (line 966) | def __init__(self, config): method forward (line 975) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/ernie_m/tokenization_ernie_m.py class ErnieMTokenizer (line 41) | class ErnieMTokenizer(PreTrainedTokenizer): method __init__ (line 73) | def __init__( method get_offset_mapping (line 117) | def get_offset_mapping(self, text): method vocab_size (line 150) | def vocab_size(self): method get_vocab (line 153) | def get_vocab(self): method __getstate__ (line 156) | def __getstate__(self): method __setstate__ (line 161) | def __setstate__(self, d): method clean_text (line 171) | def clean_text(self, text): method _tokenize (line 175) | def _tokenize(self, text, enable_sampling=False, nbest_size=64, alpha=... method convert_tokens_to_string (line 218) | def convert_tokens_to_string(self, tokens): method convert_ids_to_string (line 223) | def convert_ids_to_string(self, ids): method _convert_token_to_id (line 232) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 236) | def _convert_id_to_token(self, index): method build_inputs_with_special_tokens (line 240) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method build_offset_mapping_with_special_tokens (line 262) | def build_offset_mapping_with_special_tokens(self, offset_mapping_0, o... method get_special_tokens_mask (line 283) | def get_special_tokens_mask(self, token_ids_0, token_ids_1=None, alrea... method create_token_type_ids_from_sequences (line 312) | def create_token_type_ids_from_sequences( method is_ch_char (line 336) | def is_ch_char(self, char): method is_alpha (line 344) | def is_alpha(self, char): method is_punct (line 352) | def is_punct(self, char): method is_whitespace (line 360) | def is_whitespace(self, char): method load_vocab (line 372) | def load_vocab(self, filepath): method save_vocabulary (line 381) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/gptsan_japanese/configuration_gptsan_japanese.py class GPTSanJapaneseConfig (line 24) | class GPTSanJapaneseConfig(PretrainedConfig): method __init__ (line 96) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/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: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/gptsan_japanese/modeling_gptsan_japanese.py function router_z_loss_func (line 48) | def router_z_loss_func(router_logits: torch.Tensor) -> float: function load_balancing_loss_func (line 68) | def load_balancing_loss_func(router_probs: torch.Tensor, expert_indices:... class GPTSanJapaneseDenseActDense (line 107) | class GPTSanJapaneseDenseActDense(nn.Module): method __init__ (line 117) | def __init__(self, config: GPTSanJapaneseConfig, ext_layer=False): method forward (line 125) | def forward(self, hidden_states): class GPTSanJapaneseTop1Router (line 141) | class GPTSanJapaneseTop1Router(nn.Module): method __init__ (line 152) | def __init__(self, config: GPTSanJapaneseConfig): method _compute_router_probabilities (line 161) | def _compute_router_probabilities(self, hidden_states: torch.Tensor) -... method _cast_classifier (line 194) | def _cast_classifier(self): method forward (line 202) | def forward(self, hidden_states: torch.Tensor) -> Tuple: class GPTSanJapaneseSparseMLP (line 234) | class GPTSanJapaneseSparseMLP(nn.Module): method __init__ (line 239) | def __init__(self, config: GPTSanJapaneseConfig, expert_class: nn.Modu... method forward (line 249) | def forward(self, hidden_states): class GPTSanJapaneseLayerSparseFF (line 277) | class GPTSanJapaneseLayerSparseFF(nn.Module): method __init__ (line 287) | def __init__(self, config: GPTSanJapaneseConfig): method forward (line 293) | def forward(self, hidden_states, output_router_logits): class GPTSanJapaneseLayerDenseFF (line 314) | class GPTSanJapaneseLayerDenseFF(nn.Module): method __init__ (line 324) | def __init__(self, config: GPTSanJapaneseConfig): method forward (line 330) | def forward(self, hidden_states): class GPTSanJapaneseAttention (line 344) | class GPTSanJapaneseAttention(nn.Module): method __init__ (line 347) | def __init__( method _shape (line 378) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 381) | def forward( class GPTSanJapaneseLayerSelfAttention (line 502) | class GPTSanJapaneseLayerSelfAttention(nn.Module): method __init__ (line 507) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 517) | def forward( class GPTSanJapaneseBlock (line 588) | class GPTSanJapaneseBlock(nn.Module): method __init__ (line 593) | def __init__(self, config, ext_layer=False): method forward (line 598) | def forward( class GPTSanJapanesePreTrainedModel (line 670) | class GPTSanJapanesePreTrainedModel(PreTrainedModel): method dummy_inputs (line 683) | def dummy_inputs(self): method _init_weights (line 692) | def _init_weights(self, module): method _shift_right (line 747) | def _shift_right(self, input_ids): class GPTSanJapaneseModel (line 848) | class GPTSanJapaneseModel(GPTSanJapanesePreTrainedModel): method __init__ (line 849) | def __init__(self, config: GPTSanJapaneseConfig): method get_input_embeddings (line 876) | def get_input_embeddings(self): method set_input_embeddings (line 879) | def set_input_embeddings(self, new_embeddings): method forward (line 883) | def forward( class GPTSanJapaneseForConditionalGeneration (line 1097) | class GPTSanJapaneseForConditionalGeneration(GPTSanJapanesePreTrainedMod... method __init__ (line 1100) | def __init__(self, config: GPTSanJapaneseConfig): method forward (line 1109) | def forward( method prepare_inputs_for_generation (line 1266) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1295) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method resize_token_embeddings (line 1298) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 1303) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_input_embeddings (line 1312) | def get_input_embeddings(self): method set_input_embeddings (line 1315) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1318) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1321) | def get_output_embeddings(self): method _unpack_router_logits (line 1324) | def _unpack_router_logits(self, router_outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/gptsan_japanese/tokenization_gptsan_japanese.py function load_vocab_and_emoji (line 42) | def load_vocab_and_emoji(vocab_file, emoji_file): class GPTSanJapaneseTokenizer (line 62) | class GPTSanJapaneseTokenizer(PreTrainedTokenizer): method __init__ (line 143) | def __init__( method vocab_size (line 182) | def vocab_size(self): method get_vocab (line 186) | def get_vocab(self): method _tokenize (line 189) | 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 save_vocabulary (line 239) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method create_token_type_ids_from_sequences (line 269) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 305) | def prepare_for_tokenization(self, text, prefix_text=None, add_sep_tok... method _batch_encode_plus (line 317) | def _batch_encode_plus( class SubWordJapaneseTokenizer (line 368) | class SubWordJapaneseTokenizer: method __init__ (line 396) | def __init__(self, vocab, ids_to_tokens, emoji): method __len__ (line 417) | def __len__(self): method clean_text (line 420) | def clean_text(self, content): method tokenize (line 432) | def tokenize(self, text, clean=False): method convert_id_to_token (line 499) | def convert_id_to_token(self, index): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/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: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/graphormer/configuration_graphormer.py class GraphormerConfig (line 24) | class GraphormerConfig(PretrainedConfig): method __init__ (line 130) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/graphormer/modeling_graphormer.py function quant_noise (line 40) | def quant_noise(module: nn.Module, p: float, block_size: int): class LayerDropModuleList (line 132) | class LayerDropModuleList(nn.ModuleList): method __init__ (line 159) | def __init__(self, p: float, modules: Optional[Iterable[nn.Module]] = ... method __iter__ (line 163) | def __iter__(self) -> Iterator[nn.Module]: class GraphormerGraphNodeFeature (line 170) | class GraphormerGraphNodeFeature(nn.Module): method __init__ (line 175) | def __init__(self, config: GraphormerConfig): method forward (line 190) | def forward( class GraphormerGraphAttnBias (line 211) | class GraphormerGraphAttnBias(nn.Module): method __init__ (line 216) | def __init__(self, config: GraphormerConfig): method forward (line 236) | def forward( class GraphormerMultiheadAttention (line 293) | class GraphormerMultiheadAttention(nn.Module): method __init__ (line 299) | def __init__(self, config: GraphormerConfig): method reset_parameters (line 344) | def reset_parameters(self): method forward (line 360) | def forward( method apply_sparse_mask (line 479) | def apply_sparse_mask(self, attn_weights: torch.Tensor, tgt_len: int, ... class GraphormerGraphEncoderLayer (line 483) | class GraphormerGraphEncoderLayer(nn.Module): method __init__ (line 484) | def __init__(self, config: GraphormerConfig) -> None: method build_fc (line 521) | def build_fc( method forward (line 526) | def forward( class GraphormerGraphEncoder (line 569) | class GraphormerGraphEncoder(nn.Module): method __init__ (line 570) | def __init__(self, config: GraphormerConfig): method forward (line 617) | def forward( class GraphormerDecoderHead (line 686) | class GraphormerDecoderHead(nn.Module): method __init__ (line 687) | def __init__(self, embedding_dim: int, num_classes: int): method forward (line 694) | def forward(self, input_nodes: torch.Tensor, **unused) -> torch.Tensor: class GraphormerPreTrainedModel (line 700) | class GraphormerPreTrainedModel(PreTrainedModel): method normal_ (line 711) | def normal_(self, data: torch.Tensor): method init_graphormer_params (line 716) | def init_graphormer_params(self, module: Union[nn.Linear, nn.Embedding... method _init_weights (line 733) | def _init_weights( class GraphormerModel (line 768) | class GraphormerModel(GraphormerPreTrainedModel): method __init__ (line 776) | def __init__(self, config: GraphormerConfig): method reset_output_layer_parameters (line 794) | def reset_output_layer_parameters(self): method forward (line 797) | def forward( method max_nodes (line 834) | def max_nodes(self): class GraphormerForGraphClassification (line 839) | class GraphormerForGraphClassification(GraphormerPreTrainedModel): method __init__ (line 851) | def __init__(self, config: GraphormerConfig): method forward (line 862) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/jukebox/configuration_jukebox.py function full_dense_attention (line 113) | def full_dense_attention(layer): function raw_column_previous_row_attention (line 117) | def raw_column_previous_row_attention(layer): function large_separated_enc_dec_w_lyrics (line 121) | def large_separated_enc_dec_w_lyrics(layer): function enc_dec_with_lyrics (line 125) | def enc_dec_with_lyrics(layer): class JukeboxPriorConfig (line 139) | class JukeboxPriorConfig(PretrainedConfig): method __init__ (line 255) | def __init__( method from_pretrained (line 348) | def from_pretrained( class JukeboxVQVAEConfig (line 368) | class JukeboxVQVAEConfig(PretrainedConfig): method __init__ (line 425) | def __init__( method from_pretrained (line 473) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class JukeboxConfig (line 491) | class JukeboxConfig(PretrainedConfig): method __init__ (line 548) | def __init__( method from_configs (line 595) | def from_configs(cls, prior_configs: List[JukeboxPriorConfig], vqvae_c... method to_dict (line 606) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/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: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/jukebox/modeling_jukebox.py function filter_logits (line 37) | def filter_logits(logits, top_k=0, top_p=0.0, filter_value=-float("Inf")): function get_relevant_lyric_tokens (line 75) | def get_relevant_lyric_tokens(full_tokens, max_n_lyric_tokens, total_len... function get_starts (line 109) | def get_starts(total_length, n_ctx, hop_length): function get_alignment (line 119) | def get_alignment(music_tokens, labels, prior, config): function save_temp_audio (line 176) | def save_temp_audio(fname, lvl, metas, aud): function get_mask (line 187) | def get_mask(mask, query_length, key_value_length, blocks, spread, devic... class JukeboxConv1D (line 214) | class JukeboxConv1D(nn.Module): method __init__ (line 215) | def __init__(self, input_width, output_width): method forward (line 224) | def forward(self, hidden_states): class JukeboxResConv1DBlock (line 235) | class JukeboxResConv1DBlock(nn.Module): method __init__ (line 236) | def __init__(self, config, conv_width, depth=1, res_scale=1.0): method forward (line 247) | def forward(self, hidden_states): class JukeboxResnet1D (line 256) | class JukeboxResnet1D(nn.Module): method __init__ (line 257) | def __init__(self, config, conv_width, n_depth, reverse_dilation=False): method forward (line 271) | def forward(self, hidden_states): class JukeboxEncoderConvBlock (line 277) | class JukeboxEncoderConvBlock(nn.Module): method __init__ (line 278) | def __init__(self, config, embed_dim, hidden_dim, depth, down_t, strid... method forward (line 290) | def forward(self, hidden_states): class JukeboxEncoder (line 297) | class JukeboxEncoder(nn.Module): method __init__ (line 298) | def __init__(self, config, width, depth, levels, downs_t, strides_t): method forward (line 311) | def forward(self, hidden_states): class JukeboxDecoderConvBock (line 323) | class JukeboxDecoderConvBock(nn.Module): method __init__ (line 324) | def __init__(self, config, embed_dim, hidden_dim, depth, down_t, strid... method forward (line 342) | def forward(self, hidden_states): class JukeboxDecoder (line 349) | class JukeboxDecoder(nn.Module): method __init__ (line 350) | def __init__(self, config, hidden_dim, depth, levels, downs_t, strides... method forward (line 361) | def forward(self, hidden_states, all_levels=True): class JukeboxBottleneckBlock (line 376) | class JukeboxBottleneckBlock(nn.Module): method __init__ (line 377) | def __init__(self, config: JukeboxVQVAEConfig): method _tile (line 388) | def _tile(self, hidden_states): method init_codebook (line 397) | def init_codebook(self, hidden_states): method update_codebook (line 405) | def update_codebook(self, hidden_states, latent_states): method preprocess (line 435) | def preprocess(self, hidden_states): method postprocess (line 452) | def postprocess(self, latent_states, dequantised_states, x_shape): method quantise (line 458) | def quantise(self, latent_states): method dequantise (line 470) | def dequantise(self, music_tokens): method encode (line 474) | def encode(self, latent_states): method decode (line 487) | def decode(self, music_tokens): method forward (line 499) | def forward(self, hidden_states, update_codebook=True): class JukeboxBottleneck (line 530) | class JukeboxBottleneck(nn.Module): method __init__ (line 531) | def __init__(self, config, levels): method encode (line 538) | def encode(self, raw_audio): method decode (line 544) | def decode(self, music_tokens, start_level=0, end_level=None): method forward (line 552) | def forward(self, input_audio): class JukeboxVQVAE (line 596) | class JukeboxVQVAE(PreTrainedModel): method _init_weights (line 600) | def _init_weights(self, module): method __init__ (line 617) | def __init__(self, config: JukeboxVQVAEConfig): method _decode (line 656) | def _decode(self, music_tokens, start_level=0, end_level=None): method decode (line 667) | def decode(self, music_tokens, start_level=0, end_level=None, bs_chunk... method _encode (line 690) | def _encode(self, raw_audio, start_level=0, end_level=None): method encode (line 703) | def encode(self, input_audio, start_level=0, end_level=None, bs_chunks... method sample (line 726) | def sample(self, n_samples): method forward (line 733) | def forward(self, raw_audio: torch.FloatTensor) -> Tuple[torch.Tensor,... class JukeboxMLP (line 781) | class JukeboxMLP(nn.Module): method __init__ (line 782) | def __init__(self, config): method forward (line 793) | def forward(self, hidden_states): class JukeboxLayerNorm (line 801) | class JukeboxLayerNorm(FusedLayerNorm): method __init__ (line 802) | def __init__(self, normalized_shape, eps=1e-5, elementwise_affine=True): method forward (line 807) | def forward(self, input): class JukeboxAttention (line 814) | class JukeboxAttention(nn.Module): method __init__ (line 815) | def __init__(self, config, n_ctx, attn_func="dense_attn"): method _attn (line 869) | def _attn(self, query_states, key_states, value_states, sample): method merge_heads (line 903) | def merge_heads(self, hidden_states): method split_heads (line 908) | def split_heads(self, hidden_states, is_key=False): method dense_attn (line 920) | def dense_attn(self, query, key, value, sample): method block_attn (line 928) | def block_attn(self, query, key, value, sample): method transpose_block_attn (line 944) | def transpose_block_attn(self, query, key, value, sample): method prev_block_attn (line 973) | def prev_block_attn(self, query, key, value, sample): method summary_attn (line 1010) | def summary_attn(self, query, key, value, sample): method summary_spread_attn (line 1029) | def summary_spread_attn(self, query, key, value, sample): method prime_attn (line 1047) | def prime_attn(self, query, key, value, sample): method factored_qkv (line 1053) | def factored_qkv(self, hidden_states, last_encoder_hidden_states=None,... method prime_qkv (line 1076) | def prime_qkv(self, hidden_states, last_encoder_hidden_states=None, sa... method decode_qkv (line 1090) | def decode_qkv(self, hidden_states, last_encoder_hidden_states=None, s... method forward (line 1104) | def forward(self, hidden_states, last_encoder_hidden_states=None, samp... method _encoder_len (line 1118) | def _encoder_len(self): method _offset (line 1123) | def _offset(self, curr_ctx): method _pad_to_block_ctx (line 1128) | def _pad_to_block_ctx(self, hidden_states, query=False): method _cache_len (line 1138) | def _cache_len(self): method _suff_cache_len (line 1141) | def _suff_cache_len(self): method _slice_cache (line 1159) | def _slice_cache(self, start, end=None): method _append_cache (line 1163) | def _append_cache(self, key, value): method del_cache (line 1179) | def del_cache(self): class JukeboxBlock (line 1188) | class JukeboxBlock(nn.Module): method __init__ (line 1189) | def __init__(self, config, n_ctx, attn_func="dense_attn"): method forward (line 1200) | def forward(self, hidden_states, last_encoder_hidden_states, sample=Fa... class JukeboxLayerStack (line 1214) | class JukeboxLayerStack(nn.Module): method __init__ (line 1215) | def __init__(self, config, n_ctx): method set_record_attn (line 1235) | def set_record_attn(self, record_attn): method forward (line 1256) | def forward(self, hidden_states, last_encoder_hidden_states=None, samp... method del_cache (line 1269) | def del_cache(self): class JukeboxPositionalEmbedding (line 1274) | class JukeboxPositionalEmbedding(nn.Module): method __init__ (line 1275) | def __init__(self, embed_dim, width): method forward (line 1279) | def forward(self): class JukeboxConditionalAutoregressive (line 1284) | class JukeboxConditionalAutoregressive(nn.Module): method __init__ (line 1285) | def __init__( method forward (line 1348) | def forward( method get_emb (line 1418) | def get_emb(self, sample_t, n_samples, tokens, audio_conditioning, met... method sample (line 1437) | def sample( method split_chunks (line 1496) | def split_chunks(self, length, chunk_size): method primed_sample (line 1501) | def primed_sample( class JukeboxMusicTokenConditioner (line 1614) | class JukeboxMusicTokenConditioner(nn.Module): method __init__ (line 1620) | def __init__(self, config, level): method forward (line 1636) | def forward(self, music_tokens, raw_audio_conditionning=None): class JukeboxRangeEmbedding (line 1659) | class JukeboxRangeEmbedding(nn.Module): method __init__ (line 1669) | def __init__(self, n_time, embed_dim, range, out_width, clamp=False): method forward (line 1677) | def forward(self, pos_start, pos_end=None): class JukeboxLabelConditioner (line 1707) | class JukeboxLabelConditioner(nn.Module): method __init__ (line 1708) | def __init__(self, config, include_time_signal): method forward (line 1733) | def forward(self, metadata): class JukeboxPrior (line 1763) | class JukeboxPrior(PreTrainedModel): method _init_weights (line 1789) | def _init_weights(self, module): method __init__ (line 1816) | def __init__(self, config: JukeboxPriorConfig, level=None, nb_priors=3... method get_metadata (line 1905) | def get_metadata(self, labels, start, total_length, offset, get_indice... method set_metadata_lyric_tokens (line 1922) | def set_metadata_lyric_tokens(self, labels): method get_music_tokens_conds (line 1947) | def get_music_tokens_conds(self, music_tokens, start, end): method prior_preprocess (line 1963) | def prior_preprocess(self, tokens, conds): method prior_postprocess (line 1980) | def prior_postprocess(self, tokens): method embed_tokens (line 1998) | def embed_tokens(self, music_tokens_conds): method encode (line 2008) | def encode(self, hidden_states, start_level=None, end_level=None, bs_c... method decode (line 2023) | def decode(self, music_tokens, start_level=None, end_level=None, bs_ch... method get_cond (line 2037) | def get_cond(self, music_tokens_conds, metadata): method sample (line 2053) | def sample( method get_encoder_states (line 2148) | def get_encoder_states(self, lyric_tokens, sample=False): method get_encoder_loss (line 2163) | def get_encoder_loss(self, last_encoder_hidden_states, target_lyrics): method forward_tokens (line 2176) | def forward_tokens( method forward (line 2221) | def forward( class JukeboxPreTrainedModel (line 2257) | class JukeboxPreTrainedModel(PreTrainedModel): method _init_weights (line 2267) | def _init_weights(self, module): method __init__ (line 2271) | def __init__(self, *inputs, **kwargs): class JukeboxModel (line 2293) | class JukeboxModel(JukeboxPreTrainedModel): method __init__ (line 2296) | def __init__(self, config): method set_shared_params (line 2305) | def set_shared_params(self, model_config): method decode (line 2318) | def decode(self, music_tokens, start_level=0, end_level=None, bs_chunk... method encode (line 2321) | def encode(self, input_audio, start_level=0, end_level=None, bs_chunks... method split_batch (line 2324) | def split_batch(self, obj, n_samples, split_size): method sample_partial_window (line 2336) | def sample_partial_window( method sample_single_window (line 2353) | def sample_single_window(self, music_tokens, labels, offset, sampling_... method sample_level (line 2412) | def sample_level( method _sample (line 2429) | def _sample( method ancestral_sample (line 2582) | def ancestral_sample(self, labels, n_samples=1, **sampling_kwargs) -> ... method continue_sample (line 2623) | def continue_sample(self, music_tokens, labels, **sampling_kwargs) -> ... method upsample (line 2638) | def upsample(self, music_tokens, labels, **sampling_kwargs) -> List[to... method primed_sample (line 2655) | def primed_sample(self, raw_audio, labels, **sampling_kwargs) -> List[... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/jukebox/tokenization_jukebox.py class JukeboxTokenizer (line 42) | class JukeboxTokenizer(PreTrainedTokenizer): method __init__ (line 100) | def __init__( method vocab_size (line 144) | def vocab_size(self): method get_vocab (line 147) | def get_vocab(self): method _convert_token_to_id (line 154) | def _convert_token_to_id(self, list_artists, list_genres, list_lyrics): method _tokenize (line 167) | def _tokenize(self, lyrics): method tokenize (line 177) | def tokenize(self, artist, genre, lyrics, **kwargs): method prepare_for_tokenization (line 185) | def prepare_for_tokenization( method _run_strip_accents (line 230) | def _run_strip_accents(self, text): method _normalize (line 241) | def _normalize(self, text: str) -> str: method convert_lyric_tokens_to_string (line 262) | def convert_lyric_tokens_to_string(self, lyrics: List[str]) -> str: method convert_to_tensors (line 265) | def convert_to_tensors( method __call__ (line 326) | def __call__(self, artist, genres, lyrics="", return_tensors="pt") -> ... method save_vocabulary (line 353) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _convert_id_to_token (line 389) | def _convert_id_to_token(self, artists_index, genres_index, lyric_index): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/mctct/configuration_mctct.py class MCTCTConfig (line 24) | class MCTCTConfig(PretrainedConfig): method __init__ (line 115) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/mctct/feature_extraction_mctct.py class MCTCTFeatureExtractor (line 33) | class MCTCTFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 70) | def __init__( method _extract_mfsc_features (line 107) | def _extract_mfsc_features(self, one_waveform: np.array) -> np.ndarray: method _normalize_one (line 138) | def _normalize_one(self, x, input_length, padding_value): method normalize (line 155) | def normalize( method __call__ (line 161) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/mctct/modeling_mctct.py class MCTCTConv1dSubsampler (line 54) | class MCTCTConv1dSubsampler(nn.Module): method __init__ (line 60) | def __init__(self, config): method forward (line 99) | def forward(self, input_features): class MCTCTEmbeddings (line 115) | class MCTCTEmbeddings(nn.Module): method __init__ (line 118) | def __init__(self, config): method forward (line 140) | def forward( class MCTCTSelfAttention (line 173) | class MCTCTSelfAttention(nn.Module): method __init__ (line 174) | def __init__(self, config): method transpose_for_scores (line 197) | def transpose_for_scores(self, x): method reshape_fortran (line 202) | def reshape_fortran(self, x, shape): method relative_position_embedding_rotate (line 207) | def relative_position_embedding_rotate(self, scores): method forward (line 232) | def forward( class MCTCTLayerNorm (line 281) | class MCTCTLayerNorm(nn.Module): method __init__ (line 282) | def __init__(self): method forward (line 287) | def forward(self, hidden_states): class MCTCTSelfOutput (line 291) | class MCTCTSelfOutput(nn.Module): method __init__ (line 292) | def __init__(self, config): method forward (line 299) | def forward(self, hidden_states, input_tensor): class MCTCTAttention (line 306) | class MCTCTAttention(nn.Module): method __init__ (line 307) | def __init__(self, config): method prune_heads (line 313) | def prune_heads(self, heads): method forward (line 331) | def forward( class MCTCTIntermediate (line 350) | class MCTCTIntermediate(nn.Module): method __init__ (line 351) | def __init__(self, config): method forward (line 359) | def forward(self, hidden_states): class MCTCTOutput (line 365) | class MCTCTOutput(nn.Module): method __init__ (line 366) | def __init__(self, config): method forward (line 372) | def forward(self, hidden_states, input_tensor): class MCTCTLayer (line 379) | class MCTCTLayer(nn.Module): method __init__ (line 380) | def __init__(self, config: MCTCTConfig): method forward (line 391) | def forward( method feed_forward_chunk (line 412) | def feed_forward_chunk(self, attention_output): class MCTCTPreTrainedModel (line 418) | class MCTCTPreTrainedModel(PreTrainedModel): method _init_weights (line 429) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 453) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... method _get_feature_vector_attention_mask (line 467) | def _get_feature_vector_attention_mask(self, feature_vector_length, at... class MCTCTEncoder (line 530) | class MCTCTEncoder(MCTCTPreTrainedModel): method __init__ (line 531) | def __init__(self, config: MCTCTConfig): method forward (line 541) | def forward( class MCTCTModel (line 630) | class MCTCTModel(MCTCTPreTrainedModel): method __init__ (line 631) | def __init__(self, config): method forward (line 648) | def forward( class MCTCTForCTC (line 690) | class MCTCTForCTC(MCTCTPreTrainedModel): method __init__ (line 691) | def __init__(self, config): method forward (line 718) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/mctct/processing_mctct.py class MCTCTProcessor (line 25) | class MCTCTProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 47) | def __call__(self, *args, **kwargs): method batch_decode (line 85) | def batch_decode(self, *args, **kwargs): method pad (line 92) | def pad(self, *args, **kwargs): method decode (line 122) | def decode(self, *args, **kwargs): method as_target_processor (line 130) | def as_target_processor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/mega/configuration_mega.py class MegaConfig (line 28) | class MegaConfig(PretrainedConfig): method __init__ (line 148) | def __init__( class MegaOnnxConfig (line 228) | class MegaOnnxConfig(OnnxConfig): method inputs (line 230) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/mega/convert_mega_original_pytorch_checkpoint_to_pytorch.py class MegaLM (line 52) | class MegaLM(nn.Module): method __init__ (line 55) | def __init__(self, mega_args, depth, vocab_size): method forward (line 62) | def forward(self, input_ids, attention_mask, batch_first=True, ignore_... class OriginalMegaForMaskedLM (line 102) | class OriginalMegaForMaskedLM(nn.Module): method __init__ (line 105) | def __init__(self, mega_args, depth, vocab_size): method forward (line 111) | def forward(self, input_ids, attention_mask, batch_first=True, ignore_... function convert_checkpoint_to_huggingface (line 124) | def convert_checkpoint_to_huggingface(pretrained_checkpoint_path, output... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/mega/modeling_mega.py class MegaEmbeddings (line 54) | class MegaEmbeddings(nn.Module): method __init__ (line 60) | def __init__(self, config: MegaConfig): method forward (line 74) | def forward(self, input_ids=None, token_type_ids=None, inputs_embeds=N... class MegaSimpleRelativePositionalBias (line 108) | class MegaSimpleRelativePositionalBias(nn.Module): method __init__ (line 113) | def __init__(self, config: MegaConfig): method forward (line 119) | def forward(self, seq_len): class MegaRotaryRelativePositionalBias (line 138) | class MegaRotaryRelativePositionalBias(nn.Module): method __init__ (line 147) | def __init__(self, config: MegaConfig): method get_sinusoid_embeddings (line 164) | def get_sinusoid_embeddings(max_positions: int, embedding_dim: int): method rotary (line 171) | def rotary(self, input): method forward (line 184) | def forward(self, seq_len): class MegaDropout (line 191) | class MegaDropout(nn.Module): method __init__ (line 200) | def __init__(self, dropout_probability, is_featurewise=False): method forward (line 205) | def forward(self, input, batch_first: bool = False): class MegaRMSNorm (line 229) | class MegaRMSNorm(nn.Module): method __init__ (line 235) | def __init__(self, number_features, eps=1e-6, affine=True): method forward (line 245) | def forward(self, input): method extra_repr (line 253) | def extra_repr(self): class MegaScaleNorm (line 257) | class MegaScaleNorm(nn.Module): method __init__ (line 263) | def __init__(self, dim, eps=1e-6, affine=True): method forward (line 273) | def forward(self, input): class MegaSequenceNorm (line 282) | class MegaSequenceNorm(nn.Module): method __init__ (line 288) | def __init__(self, norm_type, embedding_dim, eps=1e-5, affine=True, ex... method forward (line 303) | def forward(self, input): class MegaMultiDimensionDampedEma (line 318) | class MegaMultiDimensionDampedEma(nn.Module): method __init__ (line 325) | def __init__(self, config: MegaConfig): method _compute_ema_coefficients (line 349) | def _compute_ema_coefficients(self): method _compute_efficient_ema_kernel (line 357) | def _compute_efficient_ema_kernel(self, length: int): method get_ema_coefficients (line 369) | def get_ema_coefficients(self): method get_ema_kernel (line 377) | def get_ema_kernel(self, length: int): method fft_convolution (line 386) | def fft_convolution(self, inputs, kernel, length): method ema_step (line 393) | def ema_step(self, inputs, length, past_state=None): method one_ema_step (line 435) | def one_ema_step(self, inputs, past_state=None): method forward (line 447) | def forward( class MegaGatedCrossAttention (line 527) | class MegaGatedCrossAttention(nn.Module): method __init__ (line 534) | def __init__(self, config: MegaConfig): method element_attention (line 570) | def element_attention(self, query, key, key_padding_mask, pidx): method softmax_attention (line 600) | def softmax_attention(self, query, key, key_padding_mask, pidx): method forward (line 626) | def forward( class MegaMovingAverageGatedAttention (line 785) | class MegaMovingAverageGatedAttention(nn.Module): method __init__ (line 794) | def __init__(self, config: MegaConfig): method element_attention (line 835) | def element_attention(self, query, key, padding_mask, causal_mask): method softmax_attention (line 874) | def softmax_attention(self, query, key, padding_mask, causal_mask): method forward (line 912) | def forward( class MegaNormalizedFeedForwardNetwork (line 1121) | class MegaNormalizedFeedForwardNetwork(nn.Module): method __init__ (line 1127) | def __init__(self, config: MegaConfig): method forward (line 1148) | def forward(self, inputs): class MegaBlock (line 1166) | class MegaBlock(nn.Module): method __init__ (line 1167) | def __init__(self, config: MegaConfig): method forward (line 1181) | def forward( class MegaPooler (line 1316) | class MegaPooler(nn.Module): method __init__ (line 1317) | def __init__(self, config): method forward (line 1322) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegaPreTrainedModel (line 1331) | class MegaPreTrainedModel(PreTrainedModel): method _init_weights (line 1342) | def _init_weights(self, module): class MegaModel (line 1447) | class MegaModel(MegaPreTrainedModel): method __init__ (line 1464) | def __init__(self, config: MegaConfig, add_pooling_layer=True): method get_input_embeddings (line 1476) | def get_input_embeddings(self): method set_input_embeddings (line 1479) | def set_input_embeddings(self, value): method forward (line 1488) | def forward( class MegaForCausalLM (line 1647) | class MegaForCausalLM(MegaPreTrainedModel): method __init__ (line 1650) | def __init__(self, config: MegaConfig): method get_output_embeddings (line 1670) | def get_output_embeddings(self): method set_output_embeddings (line 1673) | def set_output_embeddings(self, new_embeddings): method forward (line 1678) | def forward( method prepare_inputs_for_generation (line 1786) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1798) | def _reorder_cache(self, past_key_values, beam_idx): class MegaForMaskedLM (line 1808) | class MegaForMaskedLM(MegaPreTrainedModel): method __init__ (line 1811) | def __init__(self, config: MegaConfig): method get_output_embeddings (line 1833) | def get_output_embeddings(self): method set_output_embeddings (line 1836) | def set_output_embeddings(self, new_embeddings): method forward (line 1848) | def forward( class MegaForSequenceClassification (line 1912) | class MegaForSequenceClassification(MegaPreTrainedModel): method __init__ (line 1913) | def __init__(self, config): method forward (line 1930) | def forward( class MegaForMultipleChoice (line 2003) | class MegaForMultipleChoice(MegaPreTrainedModel): method __init__ (line 2004) | def __init__(self, config): method forward (line 2020) | def forward( class MegaForTokenClassification (line 2088) | class MegaForTokenClassification(MegaPreTrainedModel): method __init__ (line 2089) | def __init__(self, config): method forward (line 2109) | def forward( class MegaClassificationHead (line 2159) | class MegaClassificationHead(nn.Module): method __init__ (line 2162) | def __init__(self, config): method forward (line 2171) | def forward(self, features, **kwargs): class MegaForQuestionAnswering (line 2188) | class MegaForQuestionAnswering(MegaPreTrainedModel): method __init__ (line 2189) | def __init__(self, config): method forward (line 2205) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/mmbt/configuration_mmbt.py class MMBTConfig (line 24) | class MMBTConfig: method __init__ (line 38) | def __init__(self, config, num_labels=None, modal_hidden_size=2048): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/mmbt/modeling_mmbt.py class ModalEmbeddings (line 32) | class ModalEmbeddings(nn.Module): method __init__ (line 35) | def __init__(self, config, encoder, embeddings): method forward (line 46) | def forward(self, input_modal, start_token=None, end_token=None, posit... class MMBTModel (line 180) | class MMBTModel(nn.Module, ModuleUtilsMixin): method __init__ (line 181) | def __init__(self, config, transformer, encoder): method forward (line 189) | def forward( method get_input_embeddings (line 298) | def get_input_embeddings(self): method set_input_embeddings (line 301) | def set_input_embeddings(self, value): class MMBTForClassification (line 312) | class MMBTForClassification(nn.Module): method __init__ (line 342) | def __init__(self, config, transformer, encoder): method forward (line 350) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/nat/configuration_nat.py class NatConfig (line 25) | class NatConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 100) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/nat/modeling_nat.py function natten2dqkrpb (line 49) | def natten2dqkrpb(*args, **kwargs): function natten2dav (line 52) | def natten2dav(*args, **kwargs): class NatEncoderOutput (line 74) | class NatEncoderOutput(ModelOutput): class NatModelOutput (line 107) | class NatModelOutput(ModelOutput): class NatImageClassifierOutput (line 143) | class NatImageClassifierOutput(ModelOutput): class NatEmbeddings (line 178) | class NatEmbeddings(nn.Module): method __init__ (line 183) | def __init__(self, config): method forward (line 191) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class NatPatchEmbeddings (line 200) | class NatPatchEmbeddings(nn.Module): method __init__ (line 207) | def __init__(self, config): method forward (line 224) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> torch.... class NatDownsampler (line 236) | class NatDownsampler(nn.Module): method __init__ (line 247) | def __init__(self, dim: int, norm_layer: nn.Module = nn.LayerNorm) -> ... method forward (line 253) | def forward(self, input_feature: torch.Tensor) -> torch.Tensor: function drop_path (line 259) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class NatDropPath (line 279) | class NatDropPath(nn.Module): method __init__ (line 282) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 286) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 289) | def extra_repr(self) -> str: class NeighborhoodAttention (line 293) | class NeighborhoodAttention(nn.Module): method __init__ (line 294) | def __init__(self, config, dim, num_heads, kernel_size): method transpose_for_scores (line 315) | def transpose_for_scores(self, x): method forward (line 320) | def forward( class NeighborhoodAttentionOutput (line 354) | class NeighborhoodAttentionOutput(nn.Module): method __init__ (line 355) | def __init__(self, config, dim): method forward (line 360) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NeighborhoodAttentionModule (line 367) | class NeighborhoodAttentionModule(nn.Module): method __init__ (line 368) | def __init__(self, config, dim, num_heads, kernel_size): method prune_heads (line 374) | def prune_heads(self, heads): method forward (line 392) | def forward( class NatIntermediate (line 403) | class NatIntermediate(nn.Module): method __init__ (line 404) | def __init__(self, config, dim): method forward (line 412) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NatOutput (line 418) | class NatOutput(nn.Module): method __init__ (line 419) | def __init__(self, config, dim): method forward (line 424) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NatLayer (line 430) | class NatLayer(nn.Module): method __init__ (line 431) | def __init__(self, config, dim, num_heads, drop_path_rate=0.0): method maybe_pad (line 447) | def maybe_pad(self, hidden_states, height, width): method forward (line 458) | def forward( class NatStage (line 497) | class NatStage(nn.Module): method __init__ (line 498) | def __init__(self, config, dim, depth, num_heads, drop_path_rate, down... method forward (line 522) | def forward( class NatEncoder (line 543) | class NatEncoder(nn.Module): method __init__ (line 544) | def __init__(self, config): method forward (line 563) | def forward( class NatPreTrainedModel (line 612) | class NatPreTrainedModel(PreTrainedModel): method _init_weights (line 622) | def _init_weights(self, module): class NatModel (line 668) | class NatModel(NatPreTrainedModel): method __init__ (line 669) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 687) | def get_input_embeddings(self): method _prune_heads (line 690) | def _prune_heads(self, heads_to_prune): method forward (line 706) | def forward( class NatForImageClassification (line 760) | class NatForImageClassification(NatPreTrainedModel): method __init__ (line 761) | def __init__(self, config): method forward (line 784) | def forward( class NatBackbone (line 851) | class NatBackbone(NatPreTrainedModel, BackboneMixin): method __init__ (line 852) | def __init__(self, config): method get_input_embeddings (line 871) | def get_input_embeddings(self): method forward (line 876) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/nezha/configuration_nezha.py class NezhaConfig (line 4) | class NezhaConfig(PretrainedConfig): method __init__ (line 64) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/nezha/modeling_nezha.py function load_tf_weights_in_nezha (line 58) | def load_tf_weights_in_nezha(model, config, tf_checkpoint_path): class NezhaRelativePositionsEncoding (line 131) | class NezhaRelativePositionsEncoding(nn.Module): method __init__ (line 134) | def __init__(self, length, depth, max_relative_position=127): method forward (line 159) | def forward(self, length): class NezhaEmbeddings (line 163) | class NezhaEmbeddings(nn.Module): method __init__ (line 166) | def __init__(self, config): method forward (line 179) | def forward( class NezhaSelfAttention (line 214) | class NezhaSelfAttention(nn.Module): method __init__ (line 215) | def __init__(self, config): method transpose_for_scores (line 239) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 244) | def forward( class NezhaSelfOutput (line 349) | class NezhaSelfOutput(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 NezhaAttention (line 363) | class NezhaAttention(nn.Module): method __init__ (line 364) | def __init__(self, config): method prune_heads (line 370) | def prune_heads(self, heads): method forward (line 388) | def forward( class NezhaIntermediate (line 412) | class NezhaIntermediate(nn.Module): method __init__ (line 413) | def __init__(self, config): method forward (line 421) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NezhaOutput (line 427) | class NezhaOutput(nn.Module): method __init__ (line 428) | def __init__(self, config): method forward (line 434) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NezhaLayer (line 441) | class NezhaLayer(nn.Module): method __init__ (line 442) | def __init__(self, config): method forward (line 456) | def forward( method feed_forward_chunk (line 521) | def feed_forward_chunk(self, attention_output): class NezhaEncoder (line 527) | class NezhaEncoder(nn.Module): method __init__ (line 528) | def __init__(self, config): method forward (line 534) | def forward( class NezhaPooler (line 620) | class NezhaPooler(nn.Module): method __init__ (line 621) | def __init__(self, config): method forward (line 626) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NezhaPredictionHeadTransform (line 635) | class NezhaPredictionHeadTransform(nn.Module): method __init__ (line 636) | def __init__(self, config): method forward (line 645) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NezhaLMPredictionHead (line 652) | class NezhaLMPredictionHead(nn.Module): method __init__ (line 653) | def __init__(self, config): method _tie_weights (line 666) | def _tie_weights(self): method forward (line 669) | def forward(self, hidden_states): class NezhaOnlyMLMHead (line 675) | class NezhaOnlyMLMHead(nn.Module): method __init__ (line 676) | def __init__(self, config): method forward (line 680) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class NezhaOnlyNSPHead (line 685) | class NezhaOnlyNSPHead(nn.Module): method __init__ (line 686) | def __init__(self, config): method forward (line 690) | def forward(self, pooled_output): class NezhaPreTrainingHeads (line 695) | class NezhaPreTrainingHeads(nn.Module): method __init__ (line 696) | def __init__(self, config): method forward (line 701) | def forward(self, sequence_output, pooled_output): class NezhaPreTrainedModel (line 707) | class NezhaPreTrainedModel(PreTrainedModel): method _init_weights (line 718) | def _init_weights(self, module): class NezhaForPreTrainingOutput (line 736) | class NezhaForPreTrainingOutput(ModelOutput): class NezhaModel (line 834) | class NezhaModel(NezhaPreTrainedModel): method __init__ (line 847) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 859) | def get_input_embeddings(self): method set_input_embeddings (line 862) | def set_input_embeddings(self, value): method _prune_heads (line 865) | def _prune_heads(self, heads_to_prune): method forward (line 879) | def forward( class NezhaForPreTraining (line 1014) | class NezhaForPreTraining(NezhaPreTrainedModel): method __init__ (line 1017) | def __init__(self, config): method get_output_embeddings (line 1026) | def get_output_embeddings(self): method set_output_embeddings (line 1029) | def set_output_embeddings(self, new_embeddings): method forward (line 1035) | def forward( class NezhaForMaskedLM (line 1117) | class NezhaForMaskedLM(NezhaPreTrainedModel): method __init__ (line 1120) | 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 1148) | def forward( method prepare_inputs_for_generation (line 1203) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class NezhaForNextSentencePrediction (line 1224) | class NezhaForNextSentencePrediction(NezhaPreTrainedModel): method __init__ (line 1225) | def __init__(self, config): method forward (line 1236) | def forward( class NezhaForSequenceClassification (line 1327) | class NezhaForSequenceClassification(NezhaPreTrainedModel): method __init__ (line 1328) | def __init__(self, config): method forward (line 1349) | def forward( class NezhaForMultipleChoice (line 1426) | class NezhaForMultipleChoice(NezhaPreTrainedModel): method __init__ (line 1427) | def __init__(self, config): method forward (line 1446) | def forward( class NezhaForTokenClassification (line 1518) | class NezhaForTokenClassification(NezhaPreTrainedModel): method __init__ (line 1519) | def __init__(self, config): method forward (line 1539) | def forward( class NezhaForQuestionAnswering (line 1597) | class NezhaForQuestionAnswering(NezhaPreTrainedModel): method __init__ (line 1598) | def __init__(self, config): method forward (line 1614) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/open_llama/configuration_open_llama.py class OpenLlamaConfig (line 29) | class OpenLlamaConfig(PretrainedConfig): method __init__ (line 94) | def __init__( method _rope_scaling_validation (line 148) | def _rope_scaling_validation(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/open_llama/modeling_open_llama.py class OpenLlamaRMSNorm (line 49) | class OpenLlamaRMSNorm(nn.Module): method __init__ (line 50) | def __init__(self, hidden_size, eps=1e-6): method forward (line 58) | def forward(self, hidden_states): method extra_repr (line 65) | def extra_repr(self): class OpenLlamaRotaryEmbedding (line 69) | class OpenLlamaRotaryEmbedding(nn.Module): method __init__ (line 70) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 84) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 94) | def forward(self, x, seq_len=None): class OpenLlamaLinearScalingRotaryEmbedding (line 105) | class OpenLlamaLinearScalingRotaryEmbedding(OpenLlamaRotaryEmbedding): method __init__ (line 108) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 112) | def _set_cos_sin_cache(self, seq_len, device, dtype): class OpenLlamaDynamicNTKScalingRotaryEmbedding (line 124) | class OpenLlamaDynamicNTKScalingRotaryEmbedding(OpenLlamaRotaryEmbedding): method __init__ (line 127) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 131) | def _set_cos_sin_cache(self, seq_len, device, dtype): function rotate_half (line 150) | def rotate_half(x): function apply_rotary_pos_emb (line 157) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class OpenLlamaMLP (line 185) | class OpenLlamaMLP(nn.Module): method __init__ (line 186) | def __init__( method forward (line 200) | def forward(self, x): class OpenLlamaAttention (line 205) | class OpenLlamaAttention(nn.Module): method __init__ (line 208) | def __init__(self, config: OpenLlamaConfig): method _init_rope (line 229) | def _init_rope(self): method _shape (line 256) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 259) | def forward( class OpenLlamaDecoderLayer (line 336) | class OpenLlamaDecoderLayer(nn.Module): method __init__ (line 337) | def __init__(self, config: OpenLlamaConfig): method forward (line 350) | def forward( class OpenLlamaPreTrainedModel (line 426) | class OpenLlamaPreTrainedModel(PreTrainedModel): method _init_weights (line 432) | def _init_weights(self, module): class OpenLlamaModel (line 515) | class OpenLlamaModel(OpenLlamaPreTrainedModel): method __init__ (line 523) | def __init__(self, config: OpenLlamaConfig): method get_input_embeddings (line 540) | def get_input_embeddings(self): method set_input_embeddings (line 543) | def set_input_embeddings(self, value): method forward (line 547) | def forward( class OpenLlamaForCausalLM (line 673) | class OpenLlamaForCausalLM(OpenLlamaPreTrainedModel): method __init__ (line 674) | def __init__(self, config): method get_input_embeddings (line 685) | def get_input_embeddings(self): method set_input_embeddings (line 688) | def set_input_embeddings(self, value): method get_output_embeddings (line 691) | def get_output_embeddings(self): method set_output_embeddings (line 694) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 697) | def set_decoder(self, decoder): method get_decoder (line 700) | def get_decoder(self): method forward (line 705) | def forward( method prepare_inputs_for_generation (line 798) | def prepare_inputs_for_generation( method _reorder_cache (line 838) | def _reorder_cache(past_key_values, beam_idx): class OpenLlamaForSequenceClassification (line 862) | class OpenLlamaForSequenceClassification(OpenLlamaPreTrainedModel): method __init__ (line 863) | def __init__(self, config): method get_input_embeddings (line 872) | def get_input_embeddings(self): method set_input_embeddings (line 875) | def set_input_embeddings(self, value): method forward (line 879) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/qdqbert/configuration_qdqbert.py class QDQBertConfig (line 24) | class QDQBertConfig(PretrainedConfig): method __init__ (line 86) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/qdqbert/modeling_qdqbert.py function load_tf_weights_in_qdqbert (line 72) | def load_tf_weights_in_qdqbert(model, tf_checkpoint_path): class QDQBertEmbeddings (line 145) | class QDQBertEmbeddings(nn.Module): method __init__ (line 148) | def __init__(self, config): method forward (line 167) | def forward( class QDQBertSelfAttention (line 209) | class QDQBertSelfAttention(nn.Module): method __init__ (line 210) | def __init__(self, config): method transpose_for_scores (line 239) | def transpose_for_scores(self, x): method forward (line 244) | def forward( class QDQBertSelfOutput (line 343) | class QDQBertSelfOutput(nn.Module): method __init__ (line 344) | def __init__(self, config): method forward (line 356) | def forward(self, hidden_states, input_tensor): class QDQBertAttention (line 367) | class QDQBertAttention(nn.Module): method __init__ (line 368) | def __init__(self, config): method prune_heads (line 374) | def prune_heads(self, heads): method forward (line 392) | def forward( class QDQBertIntermediate (line 416) | class QDQBertIntermediate(nn.Module): method __init__ (line 417) | def __init__(self, config): method forward (line 426) | def forward(self, hidden_states): class QDQBertOutput (line 432) | class QDQBertOutput(nn.Module): method __init__ (line 433) | def __init__(self, config): method forward (line 444) | def forward(self, hidden_states, input_tensor): class QDQBertLayer (line 455) | class QDQBertLayer(nn.Module): method __init__ (line 456) | def __init__(self, config): method forward (line 469) | def forward( method feed_forward_chunk (line 532) | def feed_forward_chunk(self, attention_output): class QDQBertEncoder (line 539) | class QDQBertEncoder(nn.Module): method __init__ (line 540) | def __init__(self, config): method forward (line 546) | def forward( class QDQBertPooler (line 630) | class QDQBertPooler(nn.Module): method __init__ (line 631) | def __init__(self, config): method forward (line 636) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class QDQBertPredictionHeadTransform (line 645) | class QDQBertPredictionHeadTransform(nn.Module): method __init__ (line 646) | def __init__(self, config): method forward (line 655) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class QDQBertLMPredictionHead (line 663) | class QDQBertLMPredictionHead(nn.Module): method __init__ (line 664) | def __init__(self, config): method _tie_weights (line 677) | def _tie_weights(self): method forward (line 680) | def forward(self, hidden_states): class QDQBertOnlyMLMHead (line 687) | class QDQBertOnlyMLMHead(nn.Module): method __init__ (line 688) | def __init__(self, config): method forward (line 692) | def forward(self, sequence_output): class QDQBertOnlyNSPHead (line 697) | class QDQBertOnlyNSPHead(nn.Module): method __init__ (line 698) | def __init__(self, config): method forward (line 702) | def forward(self, pooled_output): class QDQBertPreTrainingHeads (line 708) | class QDQBertPreTrainingHeads(nn.Module): method __init__ (line 709) | def __init__(self, config): method forward (line 714) | def forward(self, sequence_output, pooled_output): class QDQBertPreTrainedModel (line 721) | class QDQBertPreTrainedModel(PreTrainedModel): method _init_weights (line 732) | def _init_weights(self, module): class QDQBertModel (line 819) | class QDQBertModel(QDQBertPreTrainedModel): method __init__ (line 832) | def __init__(self, config, add_pooling_layer: bool = True): method get_input_embeddings (line 845) | def get_input_embeddings(self): method set_input_embeddings (line 848) | def set_input_embeddings(self, value): method _prune_heads (line 851) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]): method forward (line 865) | def forward( class QDQBertLMHeadModel (line 1000) | class QDQBertLMHeadModel(QDQBertPreTrainedModel): method __init__ (line 1003) | def __init__(self, config): method get_output_embeddings (line 1015) | def get_output_embeddings(self): method set_output_embeddings (line 1018) | def set_output_embeddings(self, new_embeddings): method forward (line 1024) | def forward( method prepare_inputs_for_generation (line 1127) | def prepare_inputs_for_generation( method _reorder_cache (line 1154) | def _reorder_cache(self, past_key_values, beam_idx): class QDQBertForMaskedLM (line 1164) | class QDQBertForMaskedLM(QDQBertPreTrainedModel): method __init__ (line 1167) | def __init__(self, config): method get_output_embeddings (line 1182) | def get_output_embeddings(self): method set_output_embeddings (line 1185) | def set_output_embeddings(self, new_embeddings): method forward (line 1195) | def forward( method prepare_inputs_for_generation (line 1252) | def prepare_inputs_for_generation( class QDQBertForNextSentencePrediction (line 1275) | class QDQBertForNextSentencePrediction(QDQBertPreTrainedModel): method __init__ (line 1276) | def __init__(self, config): method forward (line 1287) | def forward( class QDQBertForSequenceClassification (line 1379) | class QDQBertForSequenceClassification(QDQBertPreTrainedModel): method __init__ (line 1380) | def __init__(self, config): method forward (line 1397) | def forward( class QDQBertForMultipleChoice (line 1476) | class QDQBertForMultipleChoice(QDQBertPreTrainedModel): method __init__ (line 1477) | def __init__(self, config): method forward (line 1493) | def forward( class QDQBertForTokenClassification (line 1567) | class QDQBertForTokenClassification(QDQBertPreTrainedModel): method __init__ (line 1568) | def __init__(self, config): method forward (line 1585) | def forward( class QDQBertForQuestionAnswering (line 1645) | class QDQBertForQuestionAnswering(QDQBertPreTrainedModel): method __init__ (line 1646) | def __init__(self, config): method forward (line 1662) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/realm/configuration_realm.py class RealmConfig (line 24) | class RealmConfig(PretrainedConfig): method __init__ (line 111) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/realm/modeling_realm.py function load_tf_weights_in_realm (line 46) | def load_tf_weights_in_realm(model, config, tf_checkpoint_path): class RealmEmbeddings (line 153) | class RealmEmbeddings(nn.Module): method __init__ (line 156) | def __init__(self, config): method forward (line 175) | def forward( class RealmSelfAttention (line 217) | class RealmSelfAttention(nn.Module): method __init__ (line 218) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 244) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 249) | def forward( class RealmSelfOutput (line 351) | class RealmSelfOutput(nn.Module): method __init__ (line 352) | def __init__(self, config): method forward (line 358) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RealmAttention (line 370) | class RealmAttention(nn.Module): method __init__ (line 371) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 379) | def prune_heads(self, heads): method forward (line 397) | def forward( class RealmIntermediate (line 421) | class RealmIntermediate(nn.Module): method __init__ (line 422) | def __init__(self, config): method forward (line 430) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RealmOutput (line 436) | class RealmOutput(nn.Module): method __init__ (line 437) | def __init__(self, config): method forward (line 443) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RealmLayer (line 450) | class RealmLayer(nn.Module): method __init__ (line 451) | def __init__(self, config): method forward (line 465) | def forward( method feed_forward_chunk (line 530) | def feed_forward_chunk(self, attention_output): class RealmEncoder (line 536) | class RealmEncoder(nn.Module): method __init__ (line 537) | def __init__(self, config): method forward (line 543) | def forward( class RealmPooler (line 629) | class RealmPooler(nn.Module): method __init__ (line 630) | def __init__(self, config): method forward (line 635) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RealmEmbedderOutput (line 645) | class RealmEmbedderOutput(ModelOutput): class RealmScorerOutput (line 672) | class RealmScorerOutput(ModelOutput): class RealmReaderOutput (line 691) | class RealmReaderOutput(ModelOutput): class RealmForOpenQAOutput (line 741) | class RealmForOpenQAOutput(ModelOutput): class RealmPredictionHeadTransform (line 757) | class RealmPredictionHeadTransform(nn.Module): method __init__ (line 758) | def __init__(self, config): method forward (line 767) | def forward(self, hidden_states): class RealmLMPredictionHead (line 774) | class RealmLMPredictionHead(nn.Module): method __init__ (line 775) | def __init__(self, config): method _tie_weights (line 788) | def _tie_weights(self): method forward (line 791) | def forward(self, hidden_states): class RealmOnlyMLMHead (line 797) | class RealmOnlyMLMHead(nn.Module): method __init__ (line 798) | def __init__(self, config): method forward (line 802) | def forward(self, sequence_output): class RealmScorerProjection (line 807) | class RealmScorerProjection(nn.Module): method __init__ (line 808) | def __init__(self, config): method forward (line 814) | def forward(self, hidden_states): class RealmReaderProjection (line 820) | class RealmReaderProjection(nn.Module): method __init__ (line 821) | def __init__(self, config): method forward (line 829) | def forward(self, hidden_states, block_mask): class RealmPreTrainedModel (line 948) | class RealmPreTrainedModel(PreTrainedModel): method _init_weights (line 958) | def _init_weights(self, module): method _flatten_inputs (line 974) | def _flatten_inputs(self, *inputs): class RealmBertModel (line 988) | class RealmBertModel(RealmPreTrainedModel): method __init__ (line 993) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1006) | def get_input_embeddings(self): method set_input_embeddings (line 1009) | def set_input_embeddings(self, value): method _prune_heads (line 1012) | def _prune_heads(self, heads_to_prune): method forward (line 1020) | def forward( class RealmEmbedder (line 1135) | class RealmEmbedder(RealmPreTrainedModel): method __init__ (line 1138) | def __init__(self, config): method get_input_embeddings (line 1145) | def get_input_embeddings(self): method set_input_embeddings (line 1148) | def set_input_embeddings(self, value): method forward (line 1153) | def forward( class RealmScorer (line 1217) | class RealmScorer(RealmPreTrainedModel): method __init__ (line 1224) | def __init__(self, config, query_embedder=None): method forward (line 1235) | def forward( class RealmKnowledgeAugEncoder (line 1365) | class RealmKnowledgeAugEncoder(RealmPreTrainedModel): method __init__ (line 1368) | def __init__(self, config): method get_input_embeddings (line 1374) | def get_input_embeddings(self): method set_input_embeddings (line 1377) | def set_input_embeddings(self, value): method get_output_embeddings (line 1380) | def get_output_embeddings(self): method set_output_embeddings (line 1383) | def set_output_embeddings(self, new_embeddings): method forward (line 1391) | def forward( class RealmReader (line 1515) | class RealmReader(RealmPreTrainedModel): method __init__ (line 1516) | def __init__(self, config): method forward (line 1528) | def forward( class RealmForOpenQA (line 1719) | class RealmForOpenQA(RealmPreTrainedModel): method __init__ (line 1720) | def __init__(self, config, retriever=None): method searcher_beam_size (line 1737) | def searcher_beam_size(self): method block_embedding_to (line 1742) | def block_embedding_to(self, device): method forward (line 1754) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/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: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/realm/tokenization_realm.py function load_vocab (line 32) | def load_vocab(vocab_file): function whitespace_tokenize (line 43) | def whitespace_tokenize(text): class RealmTokenizer (line 52) | class RealmTokenizer(PreTrainedTokenizer): method __init__ (line 99) | def __init__( method do_lower_case (line 145) | def do_lower_case(self): method vocab_size (line 149) | def vocab_size(self): method get_vocab (line 152) | def get_vocab(self): method _tokenize (line 155) | def _tokenize(self, text): method _convert_token_to_id (line 168) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 172) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 176) | def convert_tokens_to_string(self, tokens): method batch_encode_candidates (line 181) | def batch_encode_candidates(self, text, **kwargs): method build_inputs_with_special_tokens (line 254) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 279) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 307) | def create_token_type_ids_from_sequences( method save_vocabulary (line 336) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 357) | class BasicTokenizer: method __init__ (line 377) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 385) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 422) | def _run_strip_accents(self, text): method _run_split_on_punc (line 433) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 455) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 468) | def _is_chinese_char(self, cp): method _clean_text (line 492) | def _clean_text(self, text): class WordpieceTokenizer (line 506) | class WordpieceTokenizer: method __init__ (line 509) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 514) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/realm/tokenization_realm_fast.py class RealmTokenizerFast (line 33) | class RealmTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 79) | def __init__( method batch_encode_candidates (line 121) | def batch_encode_candidates(self, text, **kwargs): method build_inputs_with_special_tokens (line 194) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 218) | def create_token_type_ids_from_sequences( method save_vocabulary (line 247) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/retribert/configuration_retribert.py class RetriBertConfig (line 24) | class RetriBertConfig(PretrainedConfig): method __init__ (line 71) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/retribert/modeling_retribert.py class RetriBertPreTrainedModel (line 36) | class RetriBertPreTrainedModel(PreTrainedModel): method _init_weights (line 46) | def _init_weights(self, module): class RetriBertModel (line 82) | class RetriBertModel(RetriBertPreTrainedModel): method __init__ (line 83) | def __init__(self, config: RetriBertConfig) -> None: method embed_sentences_checkpointed (line 98) | def embed_sentences_checkpointed( method embed_questions (line 142) | def embed_questions( method embed_answers (line 156) | def embed_answers( method forward (line 170) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/retribert/tokenization_retribert.py function load_vocab (line 31) | def load_vocab(vocab_file): function whitespace_tokenize (line 42) | def whitespace_tokenize(text): class RetriBertTokenizer (line 51) | class RetriBertTokenizer(PreTrainedTokenizer): method __init__ (line 97) | def __init__( method do_lower_case (line 145) | def do_lower_case(self): method vocab_size (line 149) | def vocab_size(self): method get_vocab (line 152) | def get_vocab(self): method _tokenize (line 155) | def _tokenize(self, text, split_special_tokens=False): method _convert_token_to_id (line 170) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 174) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 178) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 183) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 208) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 236) | def create_token_type_ids_from_sequences( method save_vocabulary (line 265) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 286) | class BasicTokenizer: method __init__ (line 309) | def __init__( method tokenize (line 325) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 363) | def _run_strip_accents(self, text): method _run_split_on_punc (line 374) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 396) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 409) | def _is_chinese_char(self, cp): method _clean_text (line 433) | def _clean_text(self, text): class WordpieceTokenizer (line 447) | class WordpieceTokenizer: method __init__ (line 450) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 455) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/retribert/tokenization_retribert_fast.py class RetriBertTokenizerFast (line 32) | class RetriBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 79) | def __init__( method build_inputs_with_special_tokens (line 121) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 145) | def create_token_type_ids_from_sequences( method save_vocabulary (line 174) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/speech_to_text_2/configuration_speech_to_text_2.py class Speech2Text2Config (line 24) | class Speech2Text2Config(PretrainedConfig): method __init__ (line 87) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/speech_to_text_2/modeling_speech_to_text_2.py class Speech2Text2SinusoidalPositionalEmbedding (line 39) | class Speech2Text2SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 42) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 49) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 60) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 78) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 92) | def create_position_ids_from_input_ids( class Speech2Text2Attention (line 109) | class Speech2Text2Attention(nn.Module): method __init__ (line 112) | def __init__( method _shape (line 143) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 146) | def forward( class Speech2Text2DecoderLayer (line 267) | class Speech2Text2DecoderLayer(nn.Module): method __init__ (line 268) | def __init__(self, config: Speech2Text2Config): method forward (line 297) | def forward( class Speech2Text2PreTrainedModel (line 387) | class Speech2Text2PreTrainedModel(PreTrainedModel): method _init_weights (line 392) | def _init_weights(self, module): class Speech2Text2Decoder (line 421) | class Speech2Text2Decoder(Speech2Text2PreTrainedModel): method __init__ (line 430) | def __init__(self, config: Speech2Text2Config): method get_input_embeddings (line 452) | def get_input_embeddings(self): method set_input_embeddings (line 455) | def set_input_embeddings(self, value): method forward (line 458) | def forward( class Speech2Text2DecoderWrapper (line 671) | class Speech2Text2DecoderWrapper(Speech2Text2PreTrainedModel): method __init__ (line 677) | def __init__(self, config): method forward (line 681) | def forward(self, *args, **kwargs): class Speech2Text2ForCausalLM (line 690) | class Speech2Text2ForCausalLM(Speech2Text2PreTrainedModel): method __init__ (line 693) | def __init__(self, config): method get_input_embeddings (line 705) | def get_input_embeddings(self): method set_input_embeddings (line 708) | def set_input_embeddings(self, value): method get_output_embeddings (line 711) | def get_output_embeddings(self): method set_output_embeddings (line 714) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 717) | def set_decoder(self, decoder): method get_decoder (line 720) | def get_decoder(self): method forward (line 724) | def forward( method prepare_inputs_for_generation (line 890) | def prepare_inputs_for_generation( method _reorder_cache (line 917) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/speech_to_text_2/processing_speech_to_text_2.py class Speech2Text2Processor (line 25) | class Speech2Text2Processor(ProcessorMixin): method __init__ (line 43) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 48) | def __call__(self, *args, **kwargs): method batch_decode (line 87) | def batch_decode(self, *args, **kwargs): method decode (line 94) | def decode(self, *args, **kwargs): method as_target_processor (line 102) | def as_target_processor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/speech_to_text_2/tokenization_speech_to_text_2.py function get_pairs (line 39) | def get_pairs(word): class Speech2Text2Tokenizer (line 55) | class Speech2Text2Tokenizer(PreTrainedTokenizer): method __init__ (line 82) | 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): method _tokenize (line 176) | def _tokenize(self, text): method _convert_token_to_id (line 199) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 203) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 208) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method save_vocabulary (line 220) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/tapex/tokenization_tapex.py class TapexTruncationStrategy (line 40) | class TapexTruncationStrategy(ExplicitEnum): function bytes_to_unicode (line 103) | def bytes_to_unicode(): function get_pairs (line 125) | def get_pairs(word): class IndexedRowTableLinearize (line 138) | class IndexedRowTableLinearize: method process_table (line 143) | def process_table(self, table_content: Dict): method process_header (line 156) | def process_header(self, headers: List): method process_row (line 162) | def process_row(self, row: List, row_index: int): class TapexTokenizer (line 177) | class TapexTokenizer(PreTrainedTokenizer): method __init__ (line 252) | def __init__( method build_inputs_with_special_tokens (line 318) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 341) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 366) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 387) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method vocab_size (line 394) | def vocab_size(self): method get_vocab (line 397) | def get_vocab(self): method bpe (line 400) | def bpe(self, token): method _tokenize (line 442) | def _tokenize(self, text): 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 save_vocabulary (line 466) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 496) | def __call__( method source_call_func (line 573) | def source_call_func( method batch_encode_plus (line 661) | def batch_encode_plus( method _batch_encode_plus (line 718) | def _batch_encode_plus( method _batch_prepare_for_model (line 777) | def _batch_prepare_for_model( method encode (line 848) | def encode( method encode_plus (line 880) | def encode_plus( method _encode_plus (line 928) | def _encode_plus( method target_call_func (line 986) | def target_call_func( method target_batch_encode_plus (line 1051) | def target_batch_encode_plus( method _target_batch_encode_plus (line 1104) | def _target_batch_encode_plus( method target_encode (line 1164) | def target_encode( method target_encode_plus (line 1195) | def target_encode_plus( method _target_encode_plus (line 1246) | def _target_encode_plus( method prepare_table_query (line 1300) | def prepare_table_query( method truncate_table_cells (line 1344) | def truncate_table_cells(self, table_content: Dict, question: str, ans... method truncate_cell (line 1360) | def truncate_cell(self, cell_value): method truncate_table_rows (line 1375) | def truncate_table_rows( method estimate_delete_ratio (line 1404) | def estimate_delete_ratio(self, table_content: Dict, question: str, ma... method delete_unrelated_rows (line 1430) | def delete_unrelated_rows(self, table_content: Dict, question: str, an... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/trajectory_transformer/configuration_trajectory_transformer.py class TrajectoryTransformerConfig (line 24) | class TrajectoryTransformerConfig(PretrainedConfig): method __init__ (line 105) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/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: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/trajectory_transformer/modeling_trajectory_transformer.py function load_tf_weights_in_trajectory_transformer (line 45) | def load_tf_weights_in_trajectory_transformer(model, config, tf_checkpoi... class TrajectoryTransformerOutput (line 119) | class TrajectoryTransformerOutput(ModelOutput): class TrajectoryTransformerPreTrainedModel (line 149) | class TrajectoryTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 161) | def _init_weights(self, module): class EinLinear (line 220) | class EinLinear(nn.Module): method __init__ (line 221) | def __init__(self, n_models, in_features, out_features, bias): method reset_parameters (line 232) | def reset_parameters(self): method forward (line 240) | def forward(self, input): class CausalSelfAttention (line 253) | class CausalSelfAttention(nn.Module): method __init__ (line 254) | def __init__(self, config): method forward (line 287) | def forward( class Block (line 349) | class Block(nn.Module): method __init__ (line 350) | def __init__(self, config): method forward (line 362) | def forward( class TrajectoryTransformerModel (line 398) | class TrajectoryTransformerModel(TrajectoryTransformerPreTrainedModel): method __init__ (line 401) | def __init__(self, config): method get_block_size (line 432) | def get_block_size(self): method offset_tokens (line 435) | def offset_tokens(self, trajectories): method pad_to_full_observation (line 447) | def pad_to_full_observation(self, hidden_states): method forward (line 463) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/transfo_xl/configuration_transfo_xl.py class TransfoXLConfig (line 25) | class TransfoXLConfig(PretrainedConfig): method __init__ (line 114) | def __init__( method max_position_embeddings (line 176) | def max_position_embeddings(self): method max_position_embeddings (line 182) | def max_position_embeddings(self, value): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/transfo_xl/convert_transfo_xl_original_tf_checkpoint_to_pytorch.py function convert_transfo_xl_checkpoint_to_pytorch (line 40) | def convert_transfo_xl_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/transfo_xl/modeling_tf_transfo_xl.py class TFPositionalEmbedding (line 55) | class TFPositionalEmbedding(keras.layers.Layer): method __init__ (line 56) | def __init__(self, demb, **kwargs): method call (line 61) | def call(self, pos_seq, bsz=None): class TFPositionwiseFF (line 72) | class TFPositionwiseFF(keras.layers.Layer): method __init__ (line 73) | def __init__(self, d_model, d_inner, dropout, pre_lnorm=False, layer_n... method call (line 91) | def call(self, inp, training=False): class TFRelPartialLearnableMultiHeadAttn (line 115) | class TFRelPartialLearnableMultiHeadAttn(keras.layers.Layer): method __init__ (line 116) | def __init__( method build (line 166) | def build(self, input_shape): method _rel_shift (line 176) | def _rel_shift(self, x): method call (line 186) | def call(self, w, r, attn_mask, mems, head_mask, output_attentions, tr... class TFRelPartialLearnableDecoderLayer (line 267) | class TFRelPartialLearnableDecoderLayer(keras.layers.Layer): method __init__ (line 268) | def __init__( method call (line 310) | def call(self, dec_inp, r, dec_attn_mask, mems, head_mask, output_atte... class TFTransfoEmbeddings (line 319) | class TFTransfoEmbeddings(keras.layers.Layer): method __init__ (line 320) | def __init__(self, vocab_size, emb_size, init_std, **kwargs): method build (line 327) | def build(self, input_shape): method call (line 336) | def call(self, inputs): class TFAdaptiveEmbedding (line 340) | class TFAdaptiveEmbedding(keras.layers.Layer): method __init__ (line 341) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, init_... method build (line 374) | def build(self, input_shape): method call (line 388) | def call(self, inp): class TFTransfoXLMainLayer (line 417) | class TFTransfoXLMainLayer(keras.layers.Layer): method __init__ (line 420) | def __init__(self, config, **kwargs): method build (line 483) | def build(self, input_shape): method get_input_embeddings (line 493) | def get_input_embeddings(self): method set_input_embeddings (line 496) | def set_input_embeddings(self, value): method backward_compatible (line 499) | def backward_compatible(self): method reset_memory_length (line 502) | def reset_memory_length(self, mem_len): method _prune_heads (line 505) | def _prune_heads(self, heads): method init_mems (line 508) | def init_mems(self, bsz): method _update_mems (line 519) | def _update_mems(self, hids, mems, mlen, qlen): method call (line 540) | def call( class TFTransfoXLPreTrainedModel (line 658) | class TFTransfoXLPreTrainedModel(TFPreTrainedModel): class TFTransfoXLModelOutput (line 669) | class TFTransfoXLModelOutput(ModelOutput): class TFTransfoXLLMHeadModelOutput (line 700) | class TFTransfoXLLMHeadModelOutput(ModelOutput): class TFTransfoXLSequenceClassifierOutputWithPast (line 733) | class TFTransfoXLSequenceClassifierOutputWithPast(ModelOutput): class TFTransfoXLModel (line 851) | class TFTransfoXLModel(TFTransfoXLPreTrainedModel): method __init__ (line 852) | def __init__(self, config, *inputs, **kwargs): method call (line 863) | def call( class TFTransfoXLLMHeadModel (line 895) | class TFTransfoXLLMHeadModel(TFTransfoXLPreTrainedModel): method __init__ (line 896) | def __init__(self, config): method _resize_token_embeddings (line 909) | def _resize_token_embeddings(self, new_num_tokens): method get_output_embeddings (line 912) | def get_output_embeddings(self): method reset_memory_length (line 918) | def reset_memory_length(self, mem_len): method init_mems (line 921) | def init_mems(self, bsz): method call (line 931) | def call( method prepare_inputs_for_generation (line 975) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method tf_to_pt_weight_rename (line 987) | def tf_to_pt_weight_rename(self, tf_weight): class TFTransfoXLForSequenceClassification (line 1017) | class TFTransfoXLForSequenceClassification(TFTransfoXLPreTrainedModel, T... method __init__ (line 1018) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 1029) | def get_output_embeddings(self): method call (line 1044) | def call( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/transfo_xl/modeling_tf_transfo_xl_utilities.py class TFAdaptiveSoftmaxMask (line 26) | class TFAdaptiveSoftmaxMask(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: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/transfo_xl/modeling_transfo_xl.py function build_tf_to_pytorch_map (line 47) | def build_tf_to_pytorch_map(model, config): function load_tf_weights_in_transfo_xl (line 115) | def load_tf_weights_in_transfo_xl(model, config, tf_path): class PositionalEmbedding (line 174) | class PositionalEmbedding(nn.Module): method __init__ (line 175) | def __init__(self, demb): method forward (line 183) | def forward(self, pos_seq, bsz=None): class PositionwiseFF (line 193) | class PositionwiseFF(nn.Module): method __init__ (line 194) | def __init__(self, d_model, d_inner, dropout, pre_lnorm=False, layer_n... method forward (line 213) | def forward(self, inp): class RelPartialLearnableMultiHeadAttn (line 230) | class RelPartialLearnableMultiHeadAttn(nn.Module): method __init__ (line 231) | def __init__( method _rel_shift (line 271) | def _rel_shift(self, x): method forward (line 283) | def forward(self, w, r, attn_mask=None, mems=None, head_mask=None, out... class RelPartialLearnableDecoderLayer (line 368) | class RelPartialLearnableDecoderLayer(nn.Module): method __init__ (line 369) | def __init__(self, n_head, d_model, d_head, d_inner, dropout, layer_no... method forward (line 379) | def forward(self, dec_inp, r, dec_attn_mask=None, mems=None, head_mask... class AdaptiveEmbedding (line 395) | class AdaptiveEmbedding(nn.Module): method __init__ (line 396) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, sampl... method forward (line 423) | def forward(self, inp): class TransfoXLPreTrainedModel (line 455) | class TransfoXLPreTrainedModel(PreTrainedModel): method _init_weight (line 465) | def _init_weight(self, weight): method _init_bias (line 471) | def _init_bias(self, bias): method _init_weights (line 474) | def _init_weights(self, m): method resize_token_embeddings (line 514) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _get_new_num_tokens_layer (line 553) | def _get_new_num_tokens_layer(self, new_num_tokens, layer): method _get_embedding_shapes (line 566) | def _get_embedding_shapes(self): method _resize_token_embeddings (line 570) | def _resize_token_embeddings(self, new_num_tokens, layer=-1): method _resize_cutoffs (line 581) | def _resize_cutoffs(self, new_num_tokens, new_emb_size, new_embedding_... class TransfoXLModelOutput (line 596) | class TransfoXLModelOutput(ModelOutput): class TransfoXLSequenceClassifierOutputWithPast (line 627) | class TransfoXLSequenceClassifierOutputWithPast(ModelOutput): class TransfoXLLMHeadModelOutput (line 661) | class TransfoXLLMHeadModelOutput(ModelOutput): method logits (line 697) | def logits(self): class TransfoXLModel (line 760) | class TransfoXLModel(TransfoXLPreTrainedModel): method __init__ (line 761) | def __init__(self, config): method get_input_embeddings (line 816) | def get_input_embeddings(self): method set_input_embeddings (line 819) | def set_input_embeddings(self, new_embeddings): method backward_compatible (line 822) | def backward_compatible(self): method reset_memory_length (line 825) | def reset_memory_length(self, mem_len): method _prune_heads (line 828) | def _prune_heads(self, heads): method init_mems (line 832) | def init_mems(self, bsz): method _update_mems (line 844) | def _update_mems(self, hids, mems, mlen, qlen): method forward (line 869) | def forward( class TransfoXLLMHeadModel (line 1002) | class TransfoXLLMHeadModel(TransfoXLPreTrainedModel): method __init__ (line 1005) | def __init__(self, config): method tie_weights (line 1031) | def tie_weights(self): method reset_memory_length (line 1052) | def reset_memory_length(self, mem_len): method init_mems (line 1055) | def init_mems(self, bsz): method forward (line 1064) | def forward( method get_output_embeddings (line 1139) | def get_output_embeddings(self): method prepare_inputs_for_generation (line 1146) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _resize_cutoffs (line 1158) | def _resize_cutoffs(self, new_num_tokens, new_emb_size, new_embedding_... method _reorder_cache (line 1166) | def _reorder_cache(mems: List[torch.Tensor], beam_idx: torch.Tensor) -... class TransfoXLForSequenceClassification (line 1190) | class TransfoXLForSequenceClassification(TransfoXLPreTrainedModel): method __init__ (line 1191) | def __init__(self, config): method forward (line 1205) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/transfo_xl/modeling_transfo_xl_utilities.py class ProjectedAdaptiveLogSoftmax (line 28) | class ProjectedAdaptiveLogSoftmax(nn.Module): method __init__ (line 29) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, keep_... method _compute_logit (line 70) | def _compute_logit(self, hidden, weight, bias, proj): method forward (line 84) | def forward(self, hidden, labels=None, keep_order=False): method log_prob (line 193) | def log_prob(self, hidden): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/transfo_xl/tokenization_transfo_xl.py function tokenize_numbers (line 67) | def tokenize_numbers(text_array: List[str]) -> List[str]: function detokenize_numbers (line 93) | def detokenize_numbers(text: str) -> str: class TransfoXLTokenizer (line 114) | class TransfoXLTokenizer(PreTrainedTokenizer): method __init__ (line 157) | def __init__( method do_lower_case (line 266) | def do_lower_case(self): method _compile_space_around_punctuation_pattern (line 269) | def _compile_space_around_punctuation_pattern(self): method count_file (line 274) | def count_file(self, path, verbose=False, add_eos=False): method count_sents (line 290) | def count_sents(self, sents, verbose=False): method _build_from_file (line 301) | def _build_from_file(self, vocab_file): method save_vocabulary (line 316) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_vocab (line 328) | def build_vocab(self): method encode_file (line 349) | def encode_file(self, path, ordered=False, verbose=False, add_eos=True... method encode_sents (line 367) | def encode_sents(self, sents, ordered=False, verbose=False): method add_special (line 381) | def add_special(self, sym): method add_symbol (line 387) | def add_symbol(self, sym): method move_added_token (line 392) | def move_added_token(self, token: str, target_idx: int): method moses_punct_norm (line 418) | def moses_punct_norm(self, text): method moses_tokenize (line 421) | def moses_tokenize(self, text): method moses_pipeline (line 426) | def moses_pipeline(self, text: str) -> List[str]: method _convert_id_to_token (line 451) | def _convert_id_to_token(self, idx): method _convert_token_to_id (line 456) | def _convert_token_to_id(self, sym): method convert_tokens_to_string (line 473) | def convert_tokens_to_string(self, tokens): method convert_to_tensor (line 482) | def convert_to_tensor(self, symbols): method vocab_size (line 486) | def vocab_size(self): method get_vocab (line 489) | def get_vocab(self): method _tokenize (line 494) | def _tokenize(self, line, add_eos=False, add_double_eos=False): class LMOrderedIterator (line 514) | class LMOrderedIterator: method __init__ (line 515) | def __init__(self, data, bsz, bptt, device="cpu", ext_len=None): method get_batch (line 537) | def get_batch(self, i, bptt=None): method get_fixlen_iter (line 553) | def get_fixlen_iter(self, start=0): method get_varlen_iter (line 557) | def get_varlen_iter(self, start=0, std=5, min_len=5, max_deviation=3): method __iter__ (line 569) | def __iter__(self): class LMShuffledIterator (line 573) | class LMShuffledIterator: method __init__ (line 574) | def __init__(self, data, bsz, bptt, device="cpu", ext_len=None, shuffl... method get_sent_stream (line 587) | def get_sent_stream(self): method stream_iterator (line 596) | def stream_iterator(self, sent_stream): method __iter__ (line 643) | def __iter__(self): class LMMultiFileIterator (line 651) | class LMMultiFileIterator(LMShuffledIterator): method __init__ (line 652) | def __init__(self, paths, vocab, bsz, bptt, device="cpu", ext_len=None... method get_sent_stream (line 663) | def get_sent_stream(self, path): method __iter__ (line 671) | def __iter__(self): class TransfoXLCorpus (line 682) | class TransfoXLCorpus: method from_pretrained (line 685) | def from_pretrained(cls, pretrained_model_name_or_path, cache_dir=None... method __init__ (line 720) | def __init__(self, *args, **kwargs): method build_corpus (line 727) | def build_corpus(self, path, dataset): method get_iterator (line 761) | def get_iterator(self, split, *args, **kwargs): function get_lm_corpus (line 782) | def get_lm_corpus(datadir, dataset): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/tvlt/configuration_tvlt.py class TvltConfig (line 24) | class TvltConfig(PretrainedConfig): method __init__ (line 112) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/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: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/tvlt/image_processing_tvlt.py function make_batched (line 47) | def make_batched(videos) -> List[List[ImageInput]]: class TvltImageProcessor (line 70) | class TvltImageProcessor(BaseImageProcessor): method __init__ (line 121) | def __init__( method resize (line 176) | def resize( method _preprocess_image (line 220) | def _preprocess_image( method preprocess (line 277) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/tvlt/modeling_tvlt.py class TvltModelOutput (line 49) | class TvltModelOutput(ModelOutput): class TvltDecoderOutput (line 90) | class TvltDecoderOutput(ModelOutput): class TvltForPreTrainingOutput (line 113) | class TvltForPreTrainingOutput(ModelOutput): function generate_pixel_mask_noise (line 146) | def generate_pixel_mask_noise(pixel_values, pixel_mask=None, mask_ratio=... function generate_audio_mask_noise (line 155) | def generate_audio_mask_noise(audio_values, audio_mask=None, mask_ratio=... function random_masking (line 173) | def random_masking(sequence, noise, len_keep, attention_masks=None): class TvltPixelEmbeddings (line 202) | class TvltPixelEmbeddings(nn.Module): method __init__ (line 205) | def __init__(self, config): method forward (line 217) | def forward(self, pixel_values, attention_masks=None): class TvltAudioEmbeddings (line 229) | class TvltAudioEmbeddings(nn.Module): method __init__ (line 232) | def __init__(self, config): method forward (line 246) | def forward(self, audio_values, attention_masks=None): class TvltPixelPatchEmbeddings (line 258) | class TvltPixelPatchEmbeddings(nn.Module): method __init__ (line 265) | def __init__(self, config): method forward (line 281) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class TvltAudioPatchEmbeddings (line 299) | class TvltAudioPatchEmbeddings(nn.Module): method __init__ (line 306) | def __init__(self, config): method forward (line 327) | def forward(self, audio_values: torch.Tensor) -> torch.Tensor: class TvltSelfAttention (line 343) | class TvltSelfAttention(nn.Module): method __init__ (line 344) | def __init__(self, config): method transpose_for_scores (line 362) | def transpose_for_scores(self, x): method forward (line 367) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class TvltSelfOutput (line 403) | class TvltSelfOutput(nn.Module): method __init__ (line 409) | def __init__(self, config: TvltConfig) -> None: method forward (line 414) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TvltAttention (line 421) | class TvltAttention(nn.Module): method __init__ (line 422) | def __init__(self, config): method prune_heads (line 428) | def prune_heads(self, heads): method forward (line 446) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class TvltIntermediate (line 455) | class TvltIntermediate(nn.Module): method __init__ (line 456) | def __init__(self, config: TvltConfig) -> None: method forward (line 464) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TvltOutput (line 471) | class TvltOutput(nn.Module): method __init__ (line 472) | def __init__(self, config: TvltConfig) -> None: method forward (line 477) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TvltLayer (line 486) | class TvltLayer(nn.Module): method __init__ (line 489) | def __init__(self, config): method forward (line 499) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class TvltEncoder (line 524) | class TvltEncoder(nn.Module): method __init__ (line 525) | def __init__(self, config): method forward (line 531) | def forward( class TvltPreTrainedModel (line 577) | class TvltPreTrainedModel(PreTrainedModel): method _init_weights (line 588) | def _init_weights(self, module): class TvltModel (line 661) | class TvltModel(TvltPreTrainedModel): method __init__ (line 662) | def __init__(self, config): method get_input_embeddings (line 680) | def get_input_embeddings(self): method _prune_heads (line 683) | def _prune_heads(self, heads_to_prune): method forward (line 693) | def forward( class TvltDecoder (line 824) | class TvltDecoder(nn.Module): method __init__ (line 825) | def __init__(self, config): method forward (line 842) | def forward( class TvltForPreTraining (line 886) | class TvltForPreTraining(TvltPreTrainedModel): method __init__ (line 887) | def __init__(self, config): method patchify_pixel (line 941) | def patchify_pixel(self, pixel_values): method patchify_audio (line 969) | def patchify_audio(self, audio_values): method pixel_mae_loss (line 996) | def pixel_mae_loss(self, pixel_values, pixel_predictions, mask): method audio_mae_loss (line 1003) | def audio_mae_loss(self, audio_values, audio_predictions, mask): method concatenate_mask (line 1010) | def concatenate_mask(self, mask_token, sequence, ids_restore): method forward (line 1021) | def forward( class TvltPooler (line 1160) | class TvltPooler(nn.Module): method __init__ (line 1161) | def __init__(self, config): method forward (line 1166) | def forward(self, hidden_states): class TvltMatchingHead (line 1173) | class TvltMatchingHead(nn.Module): method __init__ (line 1174) | def __init__(self, config): method forward (line 1179) | def forward(self, hidden_states): class TvltMAEHead (line 1184) | class TvltMAEHead(nn.Module): method __init__ (line 1185) | def __init__(self, config, output_dim=None): method forward (line 1190) | def forward(self, hidden_states): class TvltForAudioVisualClassification (line 1202) | class TvltForAudioVisualClassification(TvltPreTrainedModel): method __init__ (line 1203) | def __init__(self, config): method forward (line 1222) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/tvlt/processing_tvlt.py class TvltProcessor (line 22) | class TvltProcessor(ProcessorMixin): method __init__ (line 40) | def __init__(self, image_processor, feature_extractor): method __call__ (line 46) | def __call__( method model_input_names (line 86) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/van/configuration_van.py class VanConfig (line 24) | class VanConfig(PretrainedConfig): method __init__ (line 77) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/van/convert_van_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 53) | def __call__(self, x: Tensor): method parametrized (line 61) | def parametrized(self): class ModuleTransfer (line 67) | class ModuleTransfer: method __call__ (line 74) | def __call__(self, x: Tensor): function copy_parameters (line 97) | def copy_parameters(from_model: nn.Module, our_model: nn.Module) -> nn.M... function convert_weight_and_push (line 121) | def convert_weight_and_push( function convert_weights_and_push (line 166) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/van/modeling_van.py function drop_path (line 51) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class VanDropPath (line 71) | class VanDropPath(nn.Module): method __init__ (line 74) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 78) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 81) | def extra_repr(self) -> str: class VanOverlappingPatchEmbedder (line 85) | class VanOverlappingPatchEmbedder(nn.Module): method __init__ (line 92) | def __init__(self, in_channels: int, hidden_size: int, patch_size: int... method forward (line 99) | def forward(self, input: torch.Tensor) -> torch.Tensor: class VanMlpLayer (line 105) | class VanMlpLayer(nn.Module): method __init__ (line 111) | def __init__( method forward (line 127) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLargeKernelAttention (line 137) | class VanLargeKernelAttention(nn.Module): method __init__ (line 142) | def __init__(self, hidden_size: int): method forward (line 150) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLargeKernelAttentionLayer (line 157) | class VanLargeKernelAttentionLayer(nn.Module): method __init__ (line 162) | def __init__(self, hidden_size: int): method forward (line 166) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanSpatialAttentionLayer (line 172) | class VanSpatialAttentionLayer(nn.Module): method __init__ (line 178) | def __init__(self, hidden_size: int, hidden_act: str = "gelu"): method forward (line 191) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLayerScaling (line 200) | class VanLayerScaling(nn.Module): method __init__ (line 205) | def __init__(self, hidden_size: int, initial_value: float = 1e-2): method forward (line 209) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLayer (line 215) | class VanLayer(nn.Module): method __init__ (line 220) | def __init__( method forward (line 238) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanStage (line 258) | class VanStage(nn.Module): method __init__ (line 263) | def __init__( method forward (line 289) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanEncoder (line 301) | class VanEncoder(nn.Module): method __init__ (line 306) | def __init__(self, config: VanConfig): method forward (line 336) | def forward( class VanPreTrainedModel (line 356) | class VanPreTrainedModel(PreTrainedModel): method _init_weights (line 367) | def _init_weights(self, module): class VanModel (line 414) | class VanModel(VanPreTrainedModel): method __init__ (line 415) | def __init__(self, config): method forward (line 432) | def forward( class VanForImageClassification (line 469) | class VanForImageClassification(VanPreTrainedModel): method __init__ (line 470) | def __init__(self, config): method forward (line 488) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/vit_hybrid/configuration_vit_hybrid.py class ViTHybridConfig (line 26) | class ViTHybridConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/vit_hybrid/convert_vit_hybrid_timm_to_pytorch.py function create_rename_keys (line 45) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 120) | def read_in_q_k_v(state_dict, config, base_model=False): function remove_classification_head_ (line 146) | def remove_classification_head_(state_dict): function rename_key (line 152) | def rename_key(dct, old, new): function prepare_img (line 158) | def prepare_img(): function convert_vit_checkpoint (line 165) | def convert_vit_checkpoint(vit_name, pytorch_dump_folder_path, push_to_h... FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/vit_hybrid/image_processing_vit_hybrid.py class ViTHybridImageProcessor (line 52) | class ViTHybridImageProcessor(BaseImageProcessor): method __init__ (line 93) | def __init__( method resize (line 143) | def resize( method preprocess (line 192) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/vit_hybrid/modeling_vit_hybrid.py class ViTHybridEmbeddings (line 49) | class ViTHybridEmbeddings(nn.Module): method __init__ (line 54) | def __init__(self, config: ViTHybridConfig, use_mask_token: bool = Fal... method interpolate_pos_encoding (line 65) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 99) | def forward( class ViTHybridPatchEmbeddings (line 130) | class ViTHybridPatchEmbeddings(nn.Module): method __init__ (line 137) | def __init__(self, config, feature_size=None): method forward (line 169) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class ViTHybridSelfAttention (line 188) | class ViTHybridSelfAttention(nn.Module): method __init__ (line 189) | def __init__(self, config: ViTHybridConfig) -> None: method transpose_for_scores (line 207) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 212) | def forward( class ViTHybridSdpaSelfAttention (line 248) | class ViTHybridSdpaSelfAttention(ViTHybridSelfAttention): method __init__ (line 249) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 253) | def forward( class ViTHybridSelfOutput (line 279) | class ViTHybridSelfOutput(nn.Module): method __init__ (line 285) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 290) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTHybridAttention (line 297) | class ViTHybridAttention(nn.Module): method __init__ (line 298) | def __init__(self, config: ViTHybridConfig) -> None: method prune_heads (line 304) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 322) | def forward( class ViTHybridSdpaAttention (line 336) | class ViTHybridSdpaAttention(ViTHybridAttention): method __init__ (line 337) | def __init__(self, config: ViTHybridConfig) -> None: class ViTHybridIntermediate (line 342) | class ViTHybridIntermediate(nn.Module): method __init__ (line 343) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 351) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTHybridOutput (line 358) | class ViTHybridOutput(nn.Module): method __init__ (line 359) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 364) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTHybridLayer (line 379) | class ViTHybridLayer(nn.Module): method __init__ (line 382) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 392) | def forward( class ViTHybridEncoder (line 422) | class ViTHybridEncoder(nn.Module): method __init__ (line 423) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 429) | def forward( class ViTHybridPreTrainedModel (line 473) | class ViTHybridPreTrainedModel(PreTrainedModel): method _init_weights (line 486) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class ViTHybridModel (line 551) | class ViTHybridModel(ViTHybridPreTrainedModel): method __init__ (line 552) | def __init__(self, config: ViTHybridConfig, add_pooling_layer: bool = ... method get_input_embeddings (line 565) | def get_input_embeddings(self) -> ViTHybridPatchEmbeddings: method _prune_heads (line 568) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 584) | def forward( class ViTHybridPooler (line 646) | class ViTHybridPooler(nn.Module): method __init__ (line 647) | def __init__(self, config: ViTHybridConfig): method forward (line 652) | def forward(self, hidden_states): class ViTHybridForImageClassification (line 668) | class ViTHybridForImageClassification(ViTHybridPreTrainedModel): method __init__ (line 669) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 688) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/xlm_prophetnet/configuration_xlm_prophetnet.py class XLMProphetNetConfig (line 26) | class XLMProphetNetConfig(PretrainedConfig): method __init__ (line 103) | def __init__( method num_hidden_layers (line 170) | def num_hidden_layers(self) -> int: method num_hidden_layers (line 174) | def num_hidden_layers(self, value): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/xlm_prophetnet/modeling_xlm_prophetnet.py function softmax (line 174) | def softmax(hidden_state, dim, onnx_trace=False): function ngram_attention_bias (line 181) | def ngram_attention_bias(sequence_length, ngram, device, dtype): function compute_relative_buckets (line 198) | def compute_relative_buckets(num_buckets, max_distance, relative_positio... function compute_all_stream_relative_buckets (line 225) | def compute_all_stream_relative_buckets(num_buckets, max_distance, posit... class XLMProphetNetSeq2SeqLMOutput (line 249) | class XLMProphetNetSeq2SeqLMOutput(ModelOutput): method decoder_cross_attentions (line 324) | def decoder_cross_attentions(self): class XLMProphetNetSeq2SeqModelOutput (line 334) | class XLMProphetNetSeq2SeqModelOutput(ModelOutput): method decoder_cross_attentions (line 410) | def decoder_cross_attentions(self): class XLMProphetNetDecoderModelOutput (line 420) | class XLMProphetNetDecoderModelOutput(ModelOutput): class XLMProphetNetDecoderLMOutput (line 480) | class XLMProphetNetDecoderLMOutput(ModelOutput): class XLMProphetNetPreTrainedModel (line 541) | class XLMProphetNetPreTrainedModel(PreTrainedModel): method _init_weights (line 546) | def _init_weights(self, module): method _shift_right (line 556) | def _shift_right(self, input_ids): class XLMProphetNetPositionalEmbeddings (line 579) | class XLMProphetNetPositionalEmbeddings(nn.Embedding): method __init__ (line 586) | def __init__(self, config: XLMProphetNetConfig) -> None: method forward (line 590) | def forward(self, inputs_shape, device, attention_mask=None, past_key_... method _forward (line 618) | def _forward(self, position_ids): class XLMProphetNetAttention (line 622) | class XLMProphetNetAttention(nn.Module): method __init__ (line 625) | def __init__( method _shape (line 649) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 652) | def forward( class XLMProphetNetFeedForward (line 751) | class XLMProphetNetFeedForward(nn.Module): method __init__ (line 756) | def __init__(self, config: XLMProphetNetConfig, ffn_dim: int): method forward (line 764) | def forward(self, hidden_states): class XLMProphetNetNgramSelfAttention (line 774) | class XLMProphetNetNgramSelfAttention(nn.Module): method __init__ (line 775) | def __init__(self, config: XLMProphetNetConfig): method _shape (line 804) | def _shape(self, tensor, seq_len, batch_size): method prepare_for_onnx_export_ (line 807) | def prepare_for_onnx_export_(self): method forward (line 810) | def forward( method get_main_relative_pos_embeddings (line 988) | def get_main_relative_pos_embeddings( method get_predict_relative_pos_embeddings (line 1033) | def get_predict_relative_pos_embeddings( class XLMProphetNetEncoderLayer (line 1093) | class XLMProphetNetEncoderLayer(nn.Module): method __init__ (line 1098) | def __init__(self, config: XLMProphetNetConfig): method forward (line 1108) | def forward( class XLMProphetNetDecoderLayer (line 1136) | class XLMProphetNetDecoderLayer(nn.Module): method __init__ (line 1141) | def __init__(self, config: XLMProphetNetConfig): method forward (line 1156) | def forward( class XLMProphetNetEncoder (line 1224) | class XLMProphetNetEncoder(XLMProphetNetPreTrainedModel): method __init__ (line 1231) | def __init__(self, config: XLMProphetNetConfig, word_embeddings: nn.Em... method get_input_embeddings (line 1248) | def get_input_embeddings(self): method set_input_embeddings (line 1251) | def set_input_embeddings(self, value): method forward (line 1256) | def forward( class XLMProphetNetDecoder (line 1358) | class XLMProphetNetDecoder(XLMProphetNetPreTrainedModel): method __init__ (line 1365) | def __init__(self, config: XLMProphetNetConfig, word_embeddings: Optio... method get_input_embeddings (line 1389) | def get_input_embeddings(self): method set_input_embeddings (line 1392) | def set_input_embeddings(self, value): method forward (line 1397) | def forward( method compute_buffered_relative_buckets (line 1640) | def compute_buffered_relative_buckets(self, position_ids): method prepare_attention_mask (line 1662) | def prepare_attention_mask(self, hidden_states, attention_mask): method prepare_predict_attention_mask (line 1686) | def prepare_predict_attention_mask(self, hidden_states, attention_mask): class XLMProphetNetModel (line 1726) | class XLMProphetNetModel(XLMProphetNetPreTrainedModel): method __init__ (line 1729) | def __init__(self, config: XLMProphetNetConfig): method get_input_embeddings (line 1746) | def get_input_embeddings(self): method set_input_embeddings (line 1749) | def set_input_embeddings(self, value): method _tie_weights (line 1754) | def _tie_weights(self): method get_encoder (line 1759) | def get_encoder(self): method get_decoder (line 1762) | def get_decoder(self): method forward (line 1767) | def forward( class XLMProphetNetForConditionalGeneration (line 1860) | class XLMProphetNetForConditionalGeneration(XLMProphetNetPreTrainedModel): method __init__ (line 1863) | def __init__(self, config: XLMProphetNetConfig): method get_output_embeddings (line 1874) | def get_output_embeddings(self): method set_output_embeddings (line 1877) | def set_output_embeddings(self, new_embeddings): method _tie_weights (line 1880) | def _tie_weights(self): method get_input_embeddings (line 1884) | def get_input_embeddings(self): method forward (line 1889) | def forward( method _compute_loss (line 1993) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2021) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2050) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2054) | def _reorder_cache(past_key_values, beam_idx): method get_encoder (line 2064) | def get_encoder(self): method get_decoder (line 2067) | def get_decoder(self): class XLMProphetNetForCausalLM (line 2076) | class XLMProphetNetForCausalLM(XLMProphetNetPreTrainedModel): method __init__ (line 2083) | def __init__(self, config: XLMProphetNetConfig): method get_input_embeddings (line 2099) | def get_input_embeddings(self): method set_input_embeddings (line 2102) | def set_input_embeddings(self, value): method get_output_embeddings (line 2105) | def get_output_embeddings(self): method set_output_embeddings (line 2108) | def set_output_embeddings(self, new_embeddings): method _tie_weights (line 2111) | def _tie_weights(self): method set_decoder (line 2115) | def set_decoder(self, decoder): method get_decoder (line 2118) | def get_decoder(self): method forward (line 2123) | def forward( method _compute_loss (line 2255) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2283) | def prepare_inputs_for_generation( method _reorder_cache (line 2308) | def _reorder_cache(past_key_values, beam_idx): class XLMProphetNetDecoderWrapper (line 2317) | class XLMProphetNetDecoderWrapper(XLMProphetNetPreTrainedModel): method __init__ (line 2323) | def __init__(self, config: XLMProphetNetConfig): method _tie_weights (line 2332) | def _tie_weights(self): method forward (line 2335) | def forward(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/deprecated/xlm_prophetnet/tokenization_xlm_prophetnet.py function load_vocab (line 32) | def load_vocab(vocab_file): class XLMProphetNetTokenizer (line 43) | class XLMProphetNetTokenizer(PreTrainedTokenizer): method __init__ (line 113) | def __init__( method can_save_slow_tokenizer (line 173) | def can_save_slow_tokenizer(self) -> bool: method __getstate__ (line 176) | def __getstate__(self): method __setstate__ (line 181) | def __setstate__(self, d): method get_special_tokens_mask (line 199) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 227) | def create_token_type_ids_from_sequences( method vocab_size (line 252) | def vocab_size(self): method get_vocab (line 255) | def get_vocab(self): method _tokenize (line 260) | def _tokenize(self, text: str) -> str: method _convert_token_to_id (line 263) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 272) | 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 283) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 300) | def build_inputs_with_special_tokens( FILE: mplsandbox_for_rl/transformers/src/transformers/models/depth_anything/configuration_depth_anything.py class DepthAnythingConfig (line 28) | class DepthAnythingConfig(PretrainedConfig): method __init__ (line 93) | def __init__( method to_dict (line 154) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/depth_anything/convert_depth_anything_to_hf.py function get_dpt_config (line 34) | def get_dpt_config(model_name): function create_rename_keys (line 79) | def create_rename_keys(config): function read_in_q_k_v (line 152) | def read_in_q_k_v(state_dict, config): function rename_key (line 171) | def rename_key(dct, old, new): function prepare_img (line 177) | def prepare_img(): function convert_dpt_checkpoint (line 201) | def convert_dpt_checkpoint(model_name, pytorch_dump_folder_path, push_to... FILE: mplsandbox_for_rl/transformers/src/transformers/models/depth_anything/modeling_depth_anything.py class DepthAnythingReassembleLayer (line 68) | class DepthAnythingReassembleLayer(nn.Module): method __init__ (line 69) | def __init__(self, config, channels, factor): method forward (line 83) | def forward(self, hidden_state): class DepthAnythingReassembleStage (line 90) | class DepthAnythingReassembleStage(nn.Module): method __init__ (line 105) | def __init__(self, config): method forward (line 113) | def forward(self, hidden_states: List[torch.Tensor], patch_height=None... class DepthAnythingPreActResidualLayer (line 133) | class DepthAnythingPreActResidualLayer(nn.Module): method __init__ (line 142) | def __init__(self, config): method forward (line 165) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class DepthAnythingFeatureFusionLayer (line 175) | class DepthAnythingFeatureFusionLayer(nn.Module): method __init__ (line 183) | def __init__(self, config): method forward (line 191) | def forward(self, hidden_state, residual=None, size=None): class DepthAnythingFeatureFusionStage (line 214) | class DepthAnythingFeatureFusionStage(nn.Module): method __init__ (line 216) | def __init__(self, config): method forward (line 222) | def forward(self, hidden_states, size=None): class DepthAnythingPreTrainedModel (line 244) | class DepthAnythingPreTrainedModel(PreTrainedModel): method _init_weights (line 255) | def _init_weights(self, module): class DepthAnythingNeck (line 268) | class DepthAnythingNeck(nn.Module): method __init__ (line 280) | def __init__(self, config): method forward (line 293) | def forward(self, hidden_states: List[torch.Tensor], patch_height=None... class DepthAnythingDepthEstimationHead (line 316) | class DepthAnythingDepthEstimationHead(nn.Module): method __init__ (line 324) | def __init__(self, config): method forward (line 343) | def forward(self, hidden_states: List[torch.Tensor], patch_height, pat... class DepthAnythingForDepthEstimation (line 368) | class DepthAnythingForDepthEstimation(DepthAnythingPreTrainedModel): method __init__ (line 371) | def __init__(self, config): method forward (line 383) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/detr/configuration_detr.py class DetrConfig (line 32) | class DetrConfig(PretrainedConfig): method __init__ (line 142) | def __init__( method num_attention_heads (line 248) | def num_attention_heads(self) -> int: method hidden_size (line 252) | def hidden_size(self) -> int: method from_backbone_config (line 256) | def from_backbone_config(cls, backbone_config: PretrainedConfig, **kwa... class DetrOnnxConfig (line 268) | class DetrOnnxConfig(OnnxConfig): method inputs (line 272) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 281) | def atol_for_validation(self) -> float: method default_onnx_opset (line 285) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/detr/convert_detr_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 110) | def rename_key(state_dict, old, new): function rename_backbone_keys (line 115) | def rename_backbone_keys(state_dict): function read_in_q_k_v (line 127) | def read_in_q_k_v(state_dict, is_panoptic=False): function prepare_img (line 171) | def prepare_img(): function convert_detr_checkpoint (line 179) | def convert_detr_checkpoint(model_name, pytorch_dump_folder_path): FILE: mplsandbox_for_rl/transformers/src/transformers/models/detr/convert_detr_to_pytorch.py function get_detr_config (line 34) | def get_detr_config(model_name): function create_rename_keys (line 61) | def create_rename_keys(config): function rename_key (line 231) | def rename_key(state_dict, old, new): function read_in_q_k_v (line 236) | def read_in_q_k_v(state_dict, is_panoptic=False): function prepare_img (line 280) | def prepare_img(): function convert_detr_checkpoint (line 288) | def convert_detr_checkpoint(model_name, pytorch_dump_folder_path=None, p... FILE: mplsandbox_for_rl/transformers/src/transformers/models/detr/feature_extraction_detr.py function rgb_to_id (line 27) | def rgb_to_id(x): class DetrFeatureExtractor (line 36) | class DetrFeatureExtractor(DetrImageProcessor): method __init__ (line 37) | def __init__(self, *args, **kwargs) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/detr/image_processing_detr.py function get_size_with_aspect_ratio (line 88) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_image_size_for_max_height_width (line 127) | def get_image_size_for_max_height_width( function get_resize_output_image_size (line 162) | def get_resize_output_image_size( function get_numpy_to_framework_fn (line 190) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 214) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 227) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 242) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 250) | def get_max_height_width( function make_pixel_mask (line 269) | def make_pixel_mask( function convert_coco_poly_to_mask (line 288) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 323) | def prepare_coco_detection_annotation( function masks_to_boxes (line 383) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 417) | def prepare_coco_panoptic_annotation( function get_segmentation_image (line 458) | def get_segmentation_image( function get_mask_area (line 483) | def get_mask_area(seg_img: np.ndarray, target_size: Tuple[int, int], n_c... function score_labels_from_class_probabilities (line 492) | def score_labels_from_class_probabilities(logits: np.ndarray) -> Tuple[n... function post_process_panoptic_sample (line 500) | def post_process_panoptic_sample( function resize_annotation (line 585) | def resize_annotation( function binary_mask_to_rle (line 637) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 660) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 681) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 709) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 727) | def compute_segments( class DetrImageProcessor (line 787) | class DetrImageProcessor(BaseImageProcessor): method __init__ (line 842) | def __init__( method from_dict (line 913) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method prepare_annotation (line 926) | def prepare_annotation( method resize (line 958) | def resize( method resize_annotation (line 1026) | def resize_annotation( method rescale (line 1040) | def rescale( method normalize_annotation (line 1068) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method _update_annotation_for_padded_image (line 1075) | def _update_annotation_for_padded_image( method _pad_image (line 1118) | def _pad_image( method pad (line 1151) | def pad( method preprocess (line 1236) | def preprocess( method post_process (line 1503) | def post_process(self, outputs, target_sizes): method post_process_segmentation (line 1544) | def post_process_segmentation(self, outputs, target_sizes, threshold=0... method post_process_instance (line 1589) | def post_process_instance(self, results, outputs, orig_target_sizes, m... method post_process_panoptic (line 1635) | def post_process_panoptic(self, outputs, processed_sizes, target_sizes... method post_process_object_detection (line 1773) | def post_process_object_detection( method post_process_semantic_segmentation (line 1826) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... method post_process_instance_segmentation (line 1874) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1958) | def post_process_panoptic_segmentation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/detr/modeling_detr.py class DetrDecoderOutput (line 66) | class DetrDecoderOutput(BaseModelOutputWithCrossAttentions): class DetrModelOutput (line 96) | class DetrModelOutput(Seq2SeqModelOutput): class DetrObjectDetectionOutput (line 136) | class DetrObjectDetectionOutput(ModelOutput): class DetrSegmentationOutput (line 199) | class DetrSegmentationOutput(ModelOutput): class DetrFrozenBatchNorm2d (line 270) | class DetrFrozenBatchNorm2d(nn.Module): method __init__ (line 278) | def __init__(self, n): method _load_from_state_dict (line 285) | def _load_from_state_dict( method forward (line 296) | def forward(self, x): function replace_batch_norm (line 309) | def replace_batch_norm(model): class DetrConvEncoder (line 333) | class DetrConvEncoder(nn.Module): method __init__ (line 341) | def __init__(self, config): method forward (line 393) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class DetrConvModel (line 405) | class DetrConvModel(nn.Module): method __init__ (line 410) | def __init__(self, conv_encoder, position_embedding): method forward (line 415) | def forward(self, pixel_values, pixel_mask): class DetrSinePositionEmbedding (line 426) | class DetrSinePositionEmbedding(nn.Module): method __init__ (line 432) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 443) | def forward(self, pixel_values, pixel_mask): class DetrLearnedPositionEmbedding (line 463) | class DetrLearnedPositionEmbedding(nn.Module): method __init__ (line 468) | def __init__(self, embedding_dim=256): method forward (line 473) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 486) | def build_position_encoding(config): class DetrAttention (line 499) | class DetrAttention(nn.Module): method __init__ (line 506) | def __init__( method _shape (line 530) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 533) | def with_pos_embed(self, tensor: torch.Tensor, object_queries: Optiona... method forward (line 536) | def forward( class DetrEncoderLayer (line 628) | class DetrEncoderLayer(nn.Module): method __init__ (line 629) | def __init__(self, config: DetrConfig): method forward (line 645) | def forward( class DetrDecoderLayer (line 699) | class DetrDecoderLayer(nn.Module): method __init__ (line 700) | def __init__(self, config: DetrConfig): method forward (line 724) | def forward( class DetrPreTrainedModel (line 804) | class DetrPreTrainedModel(PreTrainedModel): method _init_weights (line 810) | def _init_weights(self, module): class DetrEncoder (line 888) | class DetrEncoder(DetrPreTrainedModel): method __init__ (line 903) | def __init__(self, config: DetrConfig): method forward (line 916) | def forward( class DetrDecoder (line 1002) | class DetrDecoder(DetrPreTrainedModel): method __init__ (line 1017) | def __init__(self, config: DetrConfig): method forward (line 1030) | def forward( class DetrModel (line 1185) | class DetrModel(DetrPreTrainedModel): method __init__ (line 1186) | def __init__(self, config: DetrConfig): method get_encoder (line 1205) | def get_encoder(self): method get_decoder (line 1208) | def get_decoder(self): method freeze_backbone (line 1211) | def freeze_backbone(self): method unfreeze_backbone (line 1215) | def unfreeze_backbone(self): method forward (line 1221) | def forward( class DetrForObjectDetection (line 1353) | class DetrForObjectDetection(DetrPreTrainedModel): method __init__ (line 1354) | def __init__(self, config: DetrConfig): method _set_aux_loss (line 1373) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1381) | def forward( class DetrForSegmentation (line 1527) | class DetrForSegmentation(DetrPreTrainedModel): method __init__ (line 1528) | def __init__(self, config: DetrConfig): method forward (line 1551) | def forward( function _expand (line 1753) | def _expand(tensor, length: int): class DetrMaskHeadSmallConv (line 1758) | class DetrMaskHeadSmallConv(nn.Module): method __init__ (line 1763) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 1797) | def forward(self, x: Tensor, bbox_mask: Tensor, fpns: List[Tensor]): class DetrMHAttentionMap (line 1838) | class DetrMHAttentionMap(nn.Module): method __init__ (line 1841) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0.0, bias... method forward (line 1852) | def forward(self, q, k, mask: Optional[Tensor] = None): function dice_loss (line 1866) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 1885) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class DetrLoss (line 1917) | class DetrLoss(nn.Module): method __init__ (line 1942) | def __init__(self, matcher, num_classes, eos_coef, losses): method loss_labels (line 1953) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 1975) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 1990) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 2014) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2047) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2053) | def _get_target_permutation_idx(self, indices): method get_loss (line 2059) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2070) | def forward(self, outputs, targets): class DetrMLPPredictionHead (line 2117) | class DetrMLPPredictionHead(nn.Module): method __init__ (line 2126) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2132) | def forward(self, x): class DetrHungarianMatcher (line 2139) | class DetrHungarianMatcher(nn.Module): method __init__ (line 2156) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2167) | def forward(self, outputs, targets): function _upcast (line 2220) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2228) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2245) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2261) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 2286) | def _max_by_axis(the_list): class NestedTensor (line 2295) | class NestedTensor: method __init__ (line 2296) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2300) | def to(self, device): method decompose (line 2309) | def decompose(self): method __repr__ (line 2312) | def __repr__(self): function nested_tensor_from_tensor_list (line 2316) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/dinat/configuration_dinat.py class DinatConfig (line 25) | class DinatConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 102) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/dinat/modeling_dinat.py function natten2dqkrpb (line 49) | def natten2dqkrpb(*args, **kwargs): function natten2dav (line 52) | def natten2dav(*args, **kwargs): class DinatEncoderOutput (line 74) | class DinatEncoderOutput(ModelOutput): class DinatModelOutput (line 107) | class DinatModelOutput(ModelOutput): class DinatImageClassifierOutput (line 143) | class DinatImageClassifierOutput(ModelOutput): class DinatEmbeddings (line 178) | class DinatEmbeddings(nn.Module): method __init__ (line 183) | def __init__(self, config): method forward (line 191) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class DinatPatchEmbeddings (line 200) | class DinatPatchEmbeddings(nn.Module): method __init__ (line 207) | def __init__(self, config): method forward (line 224) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> torch.... class DinatDownsampler (line 236) | class DinatDownsampler(nn.Module): method __init__ (line 247) | def __init__(self, dim: int, norm_layer: nn.Module = nn.LayerNorm) -> ... method forward (line 253) | def forward(self, input_feature: torch.Tensor) -> torch.Tensor: function drop_path (line 260) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class DinatDropPath (line 281) | class DinatDropPath(nn.Module): method __init__ (line 284) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 288) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 291) | def extra_repr(self) -> str: class NeighborhoodAttention (line 295) | class NeighborhoodAttention(nn.Module): method __init__ (line 296) | def __init__(self, config, dim, num_heads, kernel_size, dilation): method transpose_for_scores (line 318) | def transpose_for_scores(self, x): method forward (line 323) | def forward( class NeighborhoodAttentionOutput (line 357) | class NeighborhoodAttentionOutput(nn.Module): method __init__ (line 358) | def __init__(self, config, dim): method forward (line 363) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NeighborhoodAttentionModule (line 370) | class NeighborhoodAttentionModule(nn.Module): method __init__ (line 371) | def __init__(self, config, dim, num_heads, kernel_size, dilation): method prune_heads (line 377) | def prune_heads(self, heads): method forward (line 395) | def forward( class DinatIntermediate (line 406) | class DinatIntermediate(nn.Module): method __init__ (line 407) | def __init__(self, config, dim): method forward (line 415) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DinatOutput (line 421) | class DinatOutput(nn.Module): method __init__ (line 422) | def __init__(self, config, dim): method forward (line 427) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DinatLayer (line 433) | class DinatLayer(nn.Module): method __init__ (line 434) | def __init__(self, config, dim, num_heads, dilation, drop_path_rate=0.0): method maybe_pad (line 454) | def maybe_pad(self, hidden_states, height, width): method forward (line 465) | def forward( class DinatStage (line 504) | class DinatStage(nn.Module): method __init__ (line 505) | def __init__(self, config, dim, depth, num_heads, dilations, drop_path... method forward (line 530) | def forward( class DinatEncoder (line 551) | class DinatEncoder(nn.Module): method __init__ (line 552) | def __init__(self, config): method forward (line 572) | def forward( class DinatPreTrainedModel (line 621) | class DinatPreTrainedModel(PreTrainedModel): method _init_weights (line 631) | def _init_weights(self, module): class DinatModel (line 676) | class DinatModel(DinatPreTrainedModel): method __init__ (line 677) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 695) | def get_input_embeddings(self): method _prune_heads (line 698) | def _prune_heads(self, heads_to_prune): method forward (line 714) | def forward( class DinatForImageClassification (line 768) | class DinatForImageClassification(DinatPreTrainedModel): method __init__ (line 769) | def __init__(self, config): method forward (line 792) | def forward( class DinatBackbone (line 859) | class DinatBackbone(DinatPreTrainedModel, BackboneMixin): method __init__ (line 860) | def __init__(self, config): method get_input_embeddings (line 879) | def get_input_embeddings(self): method forward (line 884) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/dinov2/configuration_dinov2.py class Dinov2Config (line 31) | class Dinov2Config(BackboneConfigMixin, PretrainedConfig): method __init__ (line 109) | def __init__( class Dinov2OnnxConfig (line 159) | class Dinov2OnnxConfig(OnnxConfig): method inputs (line 163) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 171) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/dinov2/convert_dinov2_to_hf.py function get_dinov2_config (line 40) | def get_dinov2_config(model_name, image_classifier=False): function create_rename_keys (line 71) | def create_rename_keys(config): function rename_key (line 114) | def rename_key(dct, old, new): function read_in_q_k_v (line 120) | def read_in_q_k_v(state_dict, config): function prepare_img (line 139) | def prepare_img(): function convert_dinov2_checkpoint (line 146) | def convert_dinov2_checkpoint(model_name, pytorch_dump_folder_path, push... FILE: mplsandbox_for_rl/transformers/src/transformers/models/dinov2/modeling_dinov2.py class Dinov2Embeddings (line 60) | class Dinov2Embeddings(nn.Module): method __init__ (line 65) | def __init__(self, config: Dinov2Config) -> None: method interpolate_pos_encoding (line 76) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 111) | def forward(self, pixel_values: torch.Tensor, bool_masked_pos: Optiona... class Dinov2PatchEmbeddings (line 133) | class Dinov2PatchEmbeddings(nn.Module): method __init__ (line 140) | def __init__(self, config): method forward (line 155) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class Dinov2SelfAttention (line 167) | class Dinov2SelfAttention(nn.Module): method __init__ (line 168) | def __init__(self, config: Dinov2Config) -> None: method transpose_for_scores (line 186) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 191) | def forward( class Dinov2SelfOutput (line 228) | class Dinov2SelfOutput(nn.Module): method __init__ (line 234) | def __init__(self, config: Dinov2Config) -> None: method forward (line 239) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Dinov2Attention (line 247) | class Dinov2Attention(nn.Module): method __init__ (line 248) | def __init__(self, config: Dinov2Config) -> None: method prune_heads (line 254) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 272) | def forward( class Dinov2LayerScale (line 286) | class Dinov2LayerScale(nn.Module): method __init__ (line 287) | def __init__(self, config) -> None: method forward (line 291) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: function drop_path (line 296) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class Dinov2DropPath (line 317) | class Dinov2DropPath(nn.Module): method __init__ (line 320) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 324) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 327) | def extra_repr(self) -> str: class Dinov2MLP (line 331) | class Dinov2MLP(nn.Module): method __init__ (line 332) | def __init__(self, config) -> None: method forward (line 343) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class Dinov2SwiGLUFFN (line 350) | class Dinov2SwiGLUFFN(nn.Module): method __init__ (line 351) | def __init__(self, config) -> None: method forward (line 360) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class Dinov2Layer (line 367) | class Dinov2Layer(nn.Module): method __init__ (line 370) | def __init__(self, config: Dinov2Config) -> None: method forward (line 386) | def forward( class Dinov2Encoder (line 419) | class Dinov2Encoder(nn.Module): method __init__ (line 420) | def __init__(self, config: Dinov2Config) -> None: method forward (line 426) | def forward( class Dinov2PreTrainedModel (line 470) | class Dinov2PreTrainedModel(PreTrainedModel): method _init_weights (line 482) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class Dinov2Model (line 573) | class Dinov2Model(Dinov2PreTrainedModel): method __init__ (line 574) | def __init__(self, config: Dinov2Config): method get_input_embeddings (line 586) | def get_input_embeddings(self) -> Dinov2PatchEmbeddings: method _prune_heads (line 589) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 605) | def forward( class Dinov2ForImageClassification (line 662) | class Dinov2ForImageClassification(Dinov2PreTrainedModel): method __init__ (line 663) | def __init__(self, config: Dinov2Config) -> None: method forward (line 684) | def forward( class Dinov2Backbone (line 761) | class Dinov2Backbone(Dinov2PreTrainedModel, BackboneMixin): method __init__ (line 762) | def __init__(self, config): method get_input_embeddings (line 775) | def get_input_embeddings(self) -> Dinov2PatchEmbeddings: method forward (line 780) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/dinov2/modeling_flax_dinov2.py class FlaxDinov2PatchEmbeddings (line 91) | class FlaxDinov2PatchEmbeddings(nn.Module): method setup (line 95) | def setup(self): method __call__ (line 116) | def __call__(self, pixel_values): class FlaxDinov2Embeddings (line 127) | class FlaxDinov2Embeddings(nn.Module): method setup (line 133) | def setup(self): method interpolate_pos_encoding (line 153) | def interpolate_pos_encoding(self, config, hidden_states, height, widt... method __call__ (line 191) | def __call__(self, pixel_values, deterministic=True): class FlaxDinov2SelfAttention (line 210) | class FlaxDinov2SelfAttention(nn.Module): method setup (line 214) | def setup(self): method __call__ (line 246) | def __call__(self, hidden_states, deterministic: bool = True, output_a... class FlaxDinov2SelfOutput (line 282) | class FlaxDinov2SelfOutput(nn.Module): method setup (line 286) | def setup(self): method __call__ (line 296) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxDinov2Attention (line 303) | class FlaxDinov2Attention(nn.Module): method setup (line 307) | def setup(self): method __call__ (line 311) | def __call__(self, hidden_states, deterministic=True, output_attention... function ones_with_scale (line 324) | def ones_with_scale(key, shape, scale, dtype=jnp.float32): class FlaxDinov2LayerScale (line 328) | class FlaxDinov2LayerScale(nn.Module): method setup (line 332) | def setup(self): method __call__ (line 340) | def __call__(self, hidden_states): class FlaxDinov2DropPath (line 345) | class FlaxDinov2DropPath(nn.Module): method __call__ (line 351) | def __call__(self, inputs, deterministic: Optional[bool] = True): class FlaxDinov2MLP (line 366) | class FlaxDinov2MLP(nn.Module): method setup (line 370) | def setup(self): method __call__ (line 390) | def __call__(self, hidden_states): class FlaxDinov2SwiGLUFFN (line 397) | class FlaxDinov2SwiGLUFFN(nn.Module): method setup (line 401) | def setup(self): method __call__ (line 420) | def __call__(self, hidden_states): class FlaxDinov2Layer (line 427) | class FlaxDinov2Layer(nn.Module): method setup (line 431) | def setup(self): method __call__ (line 445) | def __call__(self, hidden_states, deterministic: bool = True, output_a... class FlaxDinov2LayerCollection (line 475) | class FlaxDinov2LayerCollection(nn.Module): method setup (line 479) | def setup(self): method __call__ (line 484) | def __call__( class FlaxDinov2Encoder (line 519) | class FlaxDinov2Encoder(nn.Module): method setup (line 523) | def setup(self): method __call__ (line 526) | def __call__( class FlaxDinov2PreTrainedModel (line 543) | class FlaxDinov2PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 554) | def __init__( method init_weights (line 568) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 589) | def __call__( class FlaxDinov2Module (line 624) | class FlaxDinov2Module(nn.Module): method setup (line 628) | def setup(self): method __call__ (line 633) | def __call__( class FlaxDinov2Model (line 671) | class FlaxDinov2Model(FlaxDinov2PreTrainedModel): class FlaxDinov2ForImageClassificationModule (line 703) | class FlaxDinov2ForImageClassificationModule(nn.Module): method setup (line 707) | def setup(self): method __call__ (line 717) | def __call__( class FlaxDinov2ForImageClassification (line 761) | class FlaxDinov2ForImageClassification(FlaxDinov2PreTrainedModel): FILE: mplsandbox_for_rl/transformers/src/transformers/models/distilbert/configuration_distilbert.py class DistilBertConfig (line 28) | class DistilBertConfig(PretrainedConfig): method __init__ (line 92) | def __init__( class DistilBertOnnxConfig (line 126) | class DistilBertOnnxConfig(OnnxConfig): method inputs (line 128) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/distilbert/modeling_distilbert.py function create_sinusoidal_embeddings (line 66) | def create_sinusoidal_embeddings(n_pos: int, dim: int, out: torch.Tensor): function _create_sinusoidal_embeddings (line 77) | def _create_sinusoidal_embeddings(n_pos: int, dim: int, out: torch.Tensor): class Embeddings (line 85) | class Embeddings(nn.Module): method __init__ (line 86) | def __init__(self, config: PretrainedConfig): method forward (line 97) | def forward(self, input_ids: torch.Tensor, input_embeds: Optional[torc... class MultiHeadSelfAttention (line 131) | class MultiHeadSelfAttention(nn.Module): method __init__ (line 132) | def __init__(self, config: PretrainedConfig): method prune_heads (line 154) | def prune_heads(self, heads: List[int]): method forward (line 170) | def forward( class DistilBertFlashAttention2 (line 235) | class DistilBertFlashAttention2(MultiHeadSelfAttention): method __init__ (line 243) | def __init__(self, *args, **kwargs): method forward (line 251) | def forward( class FFN (line 332) | class FFN(nn.Module): method __init__ (line 333) | def __init__(self, config: PretrainedConfig): method forward (line 342) | def forward(self, input: torch.Tensor) -> torch.Tensor: method ff_chunk (line 345) | def ff_chunk(self, input: torch.Tensor) -> torch.Tensor: class TransformerBlock (line 359) | class TransformerBlock(nn.Module): method __init__ (line 360) | def __init__(self, config: PretrainedConfig): method forward (line 373) | def forward( class Transformer (line 417) | class Transformer(nn.Module): method __init__ (line 418) | def __init__(self, config: PretrainedConfig): method forward (line 424) | def forward( class DistilBertPreTrainedModel (line 495) | class DistilBertPreTrainedModel(PreTrainedModel): method _init_weights (line 507) | def _init_weights(self, module: nn.Module): class DistilBertModel (line 585) | class DistilBertModel(DistilBertPreTrainedModel): method __init__ (line 586) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 596) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 602) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_input_embeddings (line 644) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 647) | def set_input_embeddings(self, new_embeddings: nn.Embedding): method _prune_heads (line 650) | def _prune_heads(self, heads_to_prune: Dict[int, List[List[int]]]): method forward (line 664) | def forward( class DistilBertForMaskedLM (line 717) | class DistilBertForMaskedLM(DistilBertPreTrainedModel): method __init__ (line 720) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 735) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 741) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_output_embeddings (line 755) | def get_output_embeddings(self) -> nn.Module: method set_output_embeddings (line 758) | def set_output_embeddings(self, new_embeddings: nn.Module): method forward (line 767) | def forward( class DistilBertForSequenceClassification (line 824) | class DistilBertForSequenceClassification(DistilBertPreTrainedModel): method __init__ (line 825) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 838) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 844) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 864) | def forward( class DistilBertForQuestionAnswering (line 941) | class DistilBertForQuestionAnswering(DistilBertPreTrainedModel): method __init__ (line 942) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 955) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 961) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 981) | def forward( class DistilBertForTokenClassification (line 1059) | class DistilBertForTokenClassification(DistilBertPreTrainedModel): method __init__ (line 1060) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 1071) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 1077) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 1097) | def forward( class DistilBertForMultipleChoice (line 1153) | class DistilBertForMultipleChoice(DistilBertPreTrainedModel): method __init__ (line 1154) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 1165) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 1171) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 1189) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/distilbert/modeling_flax_distilbert.py function get_angles (line 96) | def get_angles(pos, i, d_model): function positional_encoding (line 101) | def positional_encoding(position, d_model): class FlaxEmbeddings (line 116) | class FlaxEmbeddings(nn.Module): method setup (line 122) | def setup(self): method __call__ (line 139) | def __call__(self, input_ids, deterministic: bool = True): class FlaxMultiHeadSelfAttention (line 161) | class FlaxMultiHeadSelfAttention(nn.Module): method setup (line 165) | def setup(self): method __call__ (line 194) | def __call__( class FlaxFFN (line 244) | class FlaxFFN(nn.Module): method setup (line 248) | def setup(self): method __call__ (line 265) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxTransformerBlock (line 273) | class FlaxTransformerBlock(nn.Module): method setup (line 277) | def setup(self): method __call__ (line 288) | def __call__( class FlaxTransformer (line 320) | class FlaxTransformer(nn.Module): method setup (line 324) | def setup(self): method __call__ (line 329) | def __call__( class FlaxTransformerEncoder (line 371) | class FlaxTransformerEncoder(nn.Module): method setup (line 375) | def setup(self): method __call__ (line 378) | def __call__( class FlaxDistilBertLMDecoder (line 397) | class FlaxDistilBertLMDecoder(nn.Module): method setup (line 402) | def setup(self): method __call__ (line 405) | def __call__(self, inputs, kernel): class FlaxDistilBertPreTrainedModel (line 414) | class FlaxDistilBertPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 424) | def __init__( method init_weights (line 436) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 457) | def __call__( class FlaxDistilBertModule (line 495) | class FlaxDistilBertModule(nn.Module): method setup (line 499) | def setup(self): method __call__ (line 503) | def __call__( class FlaxDistilBertModel (line 533) | class FlaxDistilBertModel(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForMaskedLMModule (line 540) | class FlaxDistilBertForMaskedLMModule(nn.Module): method setup (line 544) | def setup(self): method __call__ (line 564) | def __call__( class FlaxDistilBertForMaskedLM (line 606) | class FlaxDistilBertForMaskedLM(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForSequenceClassificationModule (line 613) | class FlaxDistilBertForSequenceClassificationModule(nn.Module): method setup (line 617) | def setup(self): method __call__ (line 630) | def __call__( class FlaxDistilBertForSequenceClassification (line 673) | class FlaxDistilBertForSequenceClassification(FlaxDistilBertPreTrainedMo... class FlaxDistilBertForMultipleChoiceModule (line 685) | class FlaxDistilBertForMultipleChoiceModule(nn.Module): method setup (line 689) | def setup(self): method __call__ (line 702) | def __call__( class FlaxDistilBertForMultipleChoice (line 752) | class FlaxDistilBertForMultipleChoice(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForTokenClassificationModule (line 767) | class FlaxDistilBertForTokenClassificationModule(nn.Module): method setup (line 771) | def setup(self): method __call__ (line 776) | def __call__( class FlaxDistilBertForTokenClassification (line 817) | class FlaxDistilBertForTokenClassification(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForQuestionAnsweringModule (line 829) | class FlaxDistilBertForQuestionAnsweringModule(nn.Module): method setup (line 833) | def setup(self): method __call__ (line 839) | def __call__( class FlaxDistilBertForQuestionAnswering (line 886) | class FlaxDistilBertForQuestionAnswering(FlaxDistilBertPreTrainedModel): FILE: mplsandbox_for_rl/transformers/src/transformers/models/distilbert/modeling_tf_distilbert.py class TFEmbeddings (line 65) | class TFEmbeddings(keras.layers.Layer): method __init__ (line 68) | def __init__(self, config, **kwargs): method build (line 77) | def build(self, input_shape=None): method call (line 99) | def call(self, input_ids=None, position_ids=None, inputs_embeds=None, ... class TFMultiHeadSelfAttention (line 125) | class TFMultiHeadSelfAttention(keras.layers.Layer): method __init__ (line 126) | def __init__(self, config, **kwargs): method prune_heads (line 152) | def prune_heads(self, heads): method call (line 155) | def call(self, query, key, value, mask, head_mask, output_attentions, ... method build (line 211) | def build(self, input_shape=None): class TFFFN (line 229) | class TFFFN(keras.layers.Layer): method __init__ (line 230) | def __init__(self, config, **kwargs): method call (line 242) | def call(self, input, training=False): method build (line 249) | def build(self, input_shape=None): class TFTransformerBlock (line 261) | class TFTransformerBlock(keras.layers.Layer): method __init__ (line 262) | def __init__(self, config, **kwargs): method call (line 283) | def call(self, x, attn_mask, head_mask, output_attentions, training=Fa... method build (line 310) | def build(self, input_shape=None): class TFTransformer (line 328) | class TFTransformer(keras.layers.Layer): method __init__ (line 329) | def __init__(self, config, **kwargs): method call (line 337) | def call(self, x, attn_mask, head_mask, output_attentions, output_hidd... method build (line 382) | def build(self, input_shape=None): class TFDistilBertMainLayer (line 393) | class TFDistilBertMainLayer(keras.layers.Layer): method __init__ (line 396) | def __init__(self, config, **kwargs): method get_input_embeddings (line 408) | def get_input_embeddings(self): method set_input_embeddings (line 411) | def set_input_embeddings(self, value): method _prune_heads (line 415) | def _prune_heads(self, heads_to_prune): method call (line 419) | def call( method build (line 467) | def build(self, input_shape=None): class TFDistilBertPreTrainedModel (line 480) | class TFDistilBertPreTrainedModel(TFPreTrainedModel): class TFDistilBertModel (line 579) | class TFDistilBertModel(TFDistilBertPreTrainedModel): method __init__ (line 580) | def __init__(self, config, *inputs, **kwargs): method call (line 591) | def call( method build (line 614) | def build(self, input_shape=None): class TFDistilBertLMHead (line 623) | class TFDistilBertLMHead(keras.layers.Layer): method __init__ (line 624) | def __init__(self, config, input_embeddings, **kwargs): method build (line 634) | def build(self, input_shape): method get_output_embeddings (line 639) | def get_output_embeddings(self): method set_output_embeddings (line 642) | def set_output_embeddings(self, value): method get_bias (line 646) | def get_bias(self): method set_bias (line 649) | def set_bias(self, value): method call (line 653) | def call(self, hidden_states): class TFDistilBertForMaskedLM (line 667) | class TFDistilBertForMaskedLM(TFDistilBertPreTrainedModel, TFMaskedLangu... method __init__ (line 668) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 680) | def get_lm_head(self): method get_prefix_bias_name (line 683) | def get_prefix_bias_name(self): method call (line 694) | def call( method build (line 741) | def build(self, input_shape=None): class TFDistilBertForSequenceClassification (line 766) | class TFDistilBertForSequenceClassification(TFDistilBertPreTrainedModel,... method __init__ (line 767) | def __init__(self, config, *inputs, **kwargs): method call (line 791) | def call( method build (line 838) | def build(self, input_shape=None): class TFDistilBertForTokenClassification (line 860) | class TFDistilBertForTokenClassification(TFDistilBertPreTrainedModel, TF... method __init__ (line 861) | def __init__(self, config, *inputs, **kwargs): method call (line 879) | def call( method build (line 921) | def build(self, input_shape=None): class TFDistilBertForMultipleChoice (line 940) | class TFDistilBertForMultipleChoice(TFDistilBertPreTrainedModel, TFMulti... method __init__ (line 941) | def __init__(self, config, *inputs, **kwargs): method call (line 966) | def call( method build (line 1027) | def build(self, input_shape=None): class TFDistilBertForQuestionAnswering (line 1049) | class TFDistilBertForQuestionAnswering(TFDistilBertPreTrainedModel, TFQu... method __init__ (line 1050) | def __init__(self, config, *inputs, **kwargs): method call (line 1068) | def call( method build (line 1126) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/distilbert/tokenization_distilbert.py function load_vocab (line 32) | def load_vocab(vocab_file): function whitespace_tokenize (line 44) | def whitespace_tokenize(text): class DistilBertTokenizer (line 53) | class DistilBertTokenizer(PreTrainedTokenizer): method __init__ (line 98) | def __init__( method do_lower_case (line 146) | def do_lower_case(self): method vocab_size (line 151) | def vocab_size(self): method get_vocab (line 155) | def get_vocab(self): method _tokenize (line 159) | def _tokenize(self, text, split_special_tokens=False): method _convert_token_to_id (line 175) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 180) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 185) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 191) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 217) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 246) | def create_token_type_ids_from_sequences( method save_vocabulary (line 276) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 298) | class BasicTokenizer: method __init__ (line 321) | def __init__( method tokenize (line 337) | 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: 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: mplsandbox_for_rl/transformers/src/transformers/models/distilbert/tokenization_distilbert_fast.py class DistilBertTokenizerFast (line 32) | class DistilBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 76) | def __init__( method build_inputs_with_special_tokens (line 119) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 144) | def create_token_type_ids_from_sequences( method save_vocabulary (line 174) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/dit/convert_dit_unilm_to_pytorch.py function create_rename_keys (line 36) | def create_rename_keys(config, has_lm_head=False, is_semantic=False): function read_in_q_k_v (line 91) | def read_in_q_k_v(state_dict, config, has_lm_head=False, is_semantic=Fal... function rename_key (line 120) | def rename_key(dct, old, new): function prepare_img (line 126) | def prepare_img(): function convert_dit_checkpoint (line 133) | def convert_dit_checkpoint(checkpoint_url, pytorch_dump_folder_path, pus... FILE: mplsandbox_for_rl/transformers/src/transformers/models/donut/configuration_donut_swin.py class DonutSwinConfig (line 24) | class DonutSwinConfig(PretrainedConfig): method __init__ (line 91) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/donut/image_processing_donut.py class DonutImageProcessor (line 53) | class DonutImageProcessor(BaseImageProcessor): method __init__ (line 92) | def __init__( method align_long_axis (line 127) | def align_long_axis( method pad_image (line 163) | def pad_image( method pad (line 205) | def pad(self, *args, **kwargs): method thumbnail (line 209) | def thumbnail( method resize (line 259) | def resize( method preprocess (line 299) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/donut/modeling_donut_swin.py class DonutSwinEncoderOutput (line 55) | class DonutSwinEncoderOutput(ModelOutput): class DonutSwinModelOutput (line 89) | class DonutSwinModelOutput(ModelOutput): function window_partition (line 125) | def window_partition(input_feature, window_size): function window_reverse (line 138) | def window_reverse(windows, window_size, height, width): class DonutSwinEmbeddings (line 149) | class DonutSwinEmbeddings(nn.Module): method __init__ (line 154) | def __init__(self, config, use_mask_token=False): method interpolate_pos_encoding (line 170) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 202) | def forward( class DonutSwinPatchEmbeddings (line 231) | class DonutSwinPatchEmbeddings(nn.Module): method __init__ (line 238) | def __init__(self, config): method maybe_pad (line 253) | def maybe_pad(self, pixel_values, height, width): method forward (line 262) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class DonutSwinPatchMerging (line 275) | class DonutSwinPatchMerging(nn.Module): method __init__ (line 288) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 295) | def maybe_pad(self, input_feature, height, width): method forward (line 303) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... function drop_path (line 330) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class DonutSwinDropPath (line 351) | class DonutSwinDropPath(nn.Module): method __init__ (line 354) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 358) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 361) | def extra_repr(self) -> str: class DonutSwinSelfAttention (line 366) | class DonutSwinSelfAttention(nn.Module): method __init__ (line 367) | def __init__(self, config, dim, num_heads, window_size): method transpose_for_scores (line 404) | def transpose_for_scores(self, x): method forward (line 409) | def forward( class DonutSwinSelfOutput (line 467) | class DonutSwinSelfOutput(nn.Module): method __init__ (line 468) | def __init__(self, config, dim): method forward (line 473) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DonutSwinAttention (line 481) | class DonutSwinAttention(nn.Module): method __init__ (line 482) | def __init__(self, config, dim, num_heads, window_size): method prune_heads (line 488) | def prune_heads(self, heads): method forward (line 506) | def forward( class DonutSwinIntermediate (line 520) | class DonutSwinIntermediate(nn.Module): method __init__ (line 521) | def __init__(self, config, dim): method forward (line 529) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DonutSwinOutput (line 536) | class DonutSwinOutput(nn.Module): method __init__ (line 537) | def __init__(self, config, dim): method forward (line 542) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DonutSwinLayer (line 549) | class DonutSwinLayer(nn.Module): method __init__ (line 550) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 563) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 571) | def get_attn_mask(self, height, width, dtype, device): method maybe_pad (line 599) | def maybe_pad(self, hidden_states, height, width): method forward (line 606) | def forward( class DonutSwinStage (line 675) | class DonutSwinStage(nn.Module): method __init__ (line 676) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 701) | def forward( class DonutSwinEncoder (line 735) | class DonutSwinEncoder(nn.Module): method __init__ (line 736) | def __init__(self, config, grid_size): method forward (line 758) | def forward( class DonutSwinPreTrainedModel (line 837) | class DonutSwinPreTrainedModel(PreTrainedModel): method _init_weights (line 849) | def _init_weights(self, module): class DonutSwinModel (line 901) | class DonutSwinModel(DonutSwinPreTrainedModel): method __init__ (line 902) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 916) | def get_input_embeddings(self): method _prune_heads (line 919) | def _prune_heads(self, heads_to_prune): method forward (line 935) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/donut/processing_donut.py class DonutProcessor (line 26) | class DonutProcessor(ProcessorMixin): method __init__ (line 46) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 66) | def __call__(self, *args, **kwargs): method batch_decode (line 99) | def batch_decode(self, *args, **kwargs): method decode (line 106) | def decode(self, *args, **kwargs): method as_target_processor (line 114) | def as_target_processor(self): method token2json (line 129) | def token2json(self, tokens, is_inner_value=False, added_vocab=None): method feature_extractor_class (line 184) | def feature_extractor_class(self): method feature_extractor (line 192) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpr/configuration_dpr.py class DPRConfig (line 24) | class DPRConfig(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/dpr/modeling_dpr.py class DPRContextEncoderOutput (line 48) | class DPRContextEncoderOutput(ModelOutput): class DPRQuestionEncoderOutput (line 76) | class DPRQuestionEncoderOutput(ModelOutput): class DPRReaderOutput (line 104) | class DPRReaderOutput(ModelOutput): class DPRPreTrainedModel (line 136) | class DPRPreTrainedModel(PreTrainedModel): method _init_weights (line 139) | def _init_weights(self, module): class DPREncoder (line 156) | class DPREncoder(DPRPreTrainedModel): method __init__ (line 159) | def __init__(self, config: DPRConfig): method forward (line 170) | def forward( method embeddings_size (line 206) | def embeddings_size(self) -> int: class DPRSpanPredictor (line 212) | class DPRSpanPredictor(DPRPreTrainedModel): method __init__ (line 215) | def __init__(self, config: DPRConfig): method forward (line 223) | def forward( class DPRPretrainedContextEncoder (line 274) | class DPRPretrainedContextEncoder(DPRPreTrainedModel): class DPRPretrainedQuestionEncoder (line 285) | class DPRPretrainedQuestionEncoder(DPRPreTrainedModel): class DPRPretrainedReader (line 296) | class DPRPretrainedReader(DPRPreTrainedModel): class DPRContextEncoder (line 425) | class DPRContextEncoder(DPRPretrainedContextEncoder): method __init__ (line 426) | def __init__(self, config: DPRConfig): method forward (line 435) | def forward( class DPRQuestionEncoder (line 506) | class DPRQuestionEncoder(DPRPretrainedQuestionEncoder): method __init__ (line 507) | def __init__(self, config: DPRConfig): method forward (line 516) | def forward( class DPRReader (line 588) | class DPRReader(DPRPretrainedReader): method __init__ (line 589) | def __init__(self, config: DPRConfig): method forward (line 598) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpr/modeling_tf_dpr.py class TFDPRContextEncoderOutput (line 49) | class TFDPRContextEncoderOutput(ModelOutput): class TFDPRQuestionEncoderOutput (line 77) | class TFDPRQuestionEncoderOutput(ModelOutput): class TFDPRReaderOutput (line 105) | class TFDPRReaderOutput(ModelOutput): class TFDPREncoderLayer (line 137) | class TFDPREncoderLayer(keras.layers.Layer): method __init__ (line 140) | def __init__(self, config: DPRConfig, **kwargs): method call (line 156) | def call( method embeddings_size (line 194) | def embeddings_size(self) -> int: method build (line 199) | def build(self, input_shape=None): class TFDPRSpanPredictorLayer (line 211) | class TFDPRSpanPredictorLayer(keras.layers.Layer): method __init__ (line 214) | def __init__(self, config: DPRConfig, **kwargs): method call (line 227) | def call( method build (line 274) | def build(self, input_shape=None): class TFDPRSpanPredictor (line 289) | class TFDPRSpanPredictor(TFPreTrainedModel): method __init__ (line 292) | def __init__(self, config: DPRConfig, **kwargs): method call (line 297) | def call( class TFDPREncoder (line 321) | class TFDPREncoder(TFPreTrainedModel): method __init__ (line 324) | def __init__(self, config: DPRConfig, **kwargs): method call (line 330) | def call( class TFDPRPretrainedContextEncoder (line 358) | class TFDPRPretrainedContextEncoder(TFPreTrainedModel): class TFDPRPretrainedQuestionEncoder (line 368) | class TFDPRPretrainedQuestionEncoder(TFPreTrainedModel): class TFDPRPretrainedReader (line 378) | class TFDPRPretrainedReader(TFPreTrainedModel): class TFDPRContextEncoder (line 538) | class TFDPRContextEncoder(TFDPRPretrainedContextEncoder): method __init__ (line 539) | def __init__(self, config: DPRConfig, *args, **kwargs): method get_input_embeddings (line 543) | def get_input_embeddings(self): method call (line 553) | def call( method build (line 614) | def build(self, input_shape=None): class TFDPRQuestionEncoder (line 627) | class TFDPRQuestionEncoder(TFDPRPretrainedQuestionEncoder): method __init__ (line 628) | def __init__(self, config: DPRConfig, *args, **kwargs): method get_input_embeddings (line 632) | def get_input_embeddings(self): method call (line 642) | def call( method build (line 702) | def build(self, input_shape=None): class TFDPRReader (line 715) | class TFDPRReader(TFDPRPretrainedReader): method __init__ (line 716) | def __init__(self, config: DPRConfig, *args, **kwargs): method get_input_embeddings (line 720) | def get_input_embeddings(self): method call (line 730) | def call( method build (line 784) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpr/tokenization_dpr.py class DPRContextEncoderTokenizer (line 30) | class DPRContextEncoderTokenizer(BertTokenizer): class DPRQuestionEncoderTokenizer (line 43) | class DPRQuestionEncoderTokenizer(BertTokenizer): class CustomDPRReaderTokenizerMixin (line 133) | class CustomDPRReaderTokenizerMixin: method __call__ (line 134) | def __call__( method decode_best_spans (line 193) | def decode_best_spans( method _get_best_spans (line 269) | def _get_best_spans( class DPRReaderTokenizer (line 306) | class DPRReaderTokenizer(CustomDPRReaderTokenizerMixin, BertTokenizer): FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpr/tokenization_dpr_fast.py class DPRContextEncoderTokenizerFast (line 31) | class DPRContextEncoderTokenizerFast(BertTokenizerFast): class DPRQuestionEncoderTokenizerFast (line 45) | class DPRQuestionEncoderTokenizerFast(BertTokenizerFast): class CustomDPRReaderTokenizerMixin (line 134) | class CustomDPRReaderTokenizerMixin: method __call__ (line 135) | def __call__( method decode_best_spans (line 193) | def decode_best_spans( method _get_best_spans (line 269) | def _get_best_spans( class DPRReaderTokenizerFast (line 304) | class DPRReaderTokenizerFast(CustomDPRReaderTokenizerMixin, BertTokenize... FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpt/configuration_dpt.py class DPTConfig (line 29) | class DPTConfig(PretrainedConfig): method __init__ (line 140) | def __init__( method to_dict (line 272) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpt/convert_dinov2_depth_to_hf.py function get_dpt_config (line 36) | def get_dpt_config(model_name): function create_rename_keys_dpt (line 72) | def create_rename_keys_dpt(config): function create_rename_keys_backbone (line 115) | def create_rename_keys_backbone(config): function read_in_q_k_v (line 159) | def read_in_q_k_v(state_dict, config): function rename_key (line 178) | def rename_key(dct, old, new): function prepare_img (line 184) | def prepare_img(): function get_original_pixel_values (line 202) | def get_original_pixel_values(image): function convert_dpt_checkpoint (line 243) | def convert_dpt_checkpoint(model_name, pytorch_dump_folder_path, push_to... FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpt/convert_dpt_beit_to_hf.py function get_dpt_config (line 32) | def get_dpt_config(model_name): function create_rename_keys (line 71) | def create_rename_keys(config): function remove_ignore_keys_ (line 137) | def remove_ignore_keys_(state_dict): function read_in_q_k_v (line 144) | def read_in_q_k_v(state_dict, config): function rename_key (line 161) | def rename_key(dct, old, new): function prepare_img (line 167) | def prepare_img(): function convert_dpt_checkpoint (line 174) | def convert_dpt_checkpoint(model_name, pytorch_dump_folder_path, push_to... FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpt/convert_dpt_hybrid_to_pytorch.py function get_dpt_config (line 34) | def get_dpt_config(checkpoint_url): function remove_ignore_keys_ (line 73) | def remove_ignore_keys_(state_dict): function rename_key (line 79) | def rename_key(name): function read_in_q_k_v (line 192) | def read_in_q_k_v(state_dict, config): function prepare_img (line 213) | def prepare_img(): function convert_dpt_checkpoint (line 220) | def convert_dpt_checkpoint(checkpoint_url, pytorch_dump_folder_path, pus... FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpt/convert_dpt_swinv2_to_hf.py function get_dpt_config (line 32) | def get_dpt_config(model_name): function create_rename_keys (line 84) | def create_rename_keys(config): function remove_ignore_keys_ (line 150) | def remove_ignore_keys_(state_dict): function read_in_q_k_v (line 157) | def read_in_q_k_v(state_dict, config, model): function rename_key (line 173) | def rename_key(dct, old, new): function prepare_img (line 179) | def prepare_img(): function convert_dpt_checkpoint (line 186) | def convert_dpt_checkpoint(model_name, pytorch_dump_folder_path, verify_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpt/convert_dpt_to_pytorch.py function get_dpt_config (line 34) | def get_dpt_config(checkpoint_url): function remove_ignore_keys_ (line 61) | def remove_ignore_keys_(state_dict): function rename_key (line 67) | def rename_key(name): function read_in_q_k_v (line 160) | def read_in_q_k_v(state_dict, config): function prepare_img (line 181) | def prepare_img(): function convert_dpt_checkpoint (line 188) | def convert_dpt_checkpoint(checkpoint_url, pytorch_dump_folder_path, pus... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/dpt/image_processing_dpt.py function get_resize_output_image_size (line 53) | def get_resize_output_image_size( class DPTImageProcessor (line 95) | class DPTImageProcessor(BaseImageProcessor): method __init__ (line 136) | def __init__( method resize (line 168) | def resize( method pad_image (line 223) | def pad_image( method preprocess (line 269) | def preprocess( method post_process_semantic_segmentation (line 422) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: mplsandbox_for_rl/transformers/src/transformers/models/dpt/modeling_dpt.py class BaseModelOutputWithIntermediateActivations (line 58) | class BaseModelOutputWithIntermediateActivations(ModelOutput): class BaseModelOutputWithPoolingAndIntermediateActivations (line 75) | class BaseModelOutputWithPoolingAndIntermediateActivations(ModelOutput): class DPTViTHybridEmbeddings (line 110) | class DPTViTHybridEmbeddings(nn.Module): method __init__ (line 117) | def __init__(self, config, feature_size=None): method _resize_pos_embed (line 151) | def _resize_pos_embed(self, posemb, grid_size_height, grid_size_width,... method forward (line 165) | def forward( class DPTViTEmbeddings (line 209) | class DPTViTEmbeddings(nn.Module): method __init__ (line 215) | def __init__(self, config): method _resize_pos_embed (line 225) | def _resize_pos_embed(self, posemb, grid_size_height, grid_size_width,... method forward (line 239) | def forward(self, pixel_values, return_dict=False): class DPTViTPatchEmbeddings (line 267) | class DPTViTPatchEmbeddings(nn.Module): method __init__ (line 273) | def __init__(self, config): method forward (line 288) | def forward(self, pixel_values): class DPTViTSelfAttention (line 299) | class DPTViTSelfAttention(nn.Module): method __init__ (line 300) | def __init__(self, config: DPTConfig) -> None: method transpose_for_scores (line 318) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 323) | def forward( class DPTViTSelfOutput (line 360) | class DPTViTSelfOutput(nn.Module): method __init__ (line 366) | def __init__(self, config: DPTConfig) -> None: method forward (line 371) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DPTViTAttention (line 378) | class DPTViTAttention(nn.Module): method __init__ (line 379) | def __init__(self, config: DPTConfig) -> None: method prune_heads (line 386) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 405) | def forward( class DPTViTIntermediate (line 420) | class DPTViTIntermediate(nn.Module): method __init__ (line 421) | def __init__(self, config: DPTConfig) -> None: method forward (line 429) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DPTViTOutput (line 437) | class DPTViTOutput(nn.Module): method __init__ (line 438) | def __init__(self, config: DPTConfig) -> None: method forward (line 443) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DPTViTLayer (line 453) | class DPTViTLayer(nn.Module): method __init__ (line 456) | def __init__(self, config: DPTConfig) -> None: method forward (line 466) | def forward( class DPTViTEncoder (line 496) | class DPTViTEncoder(nn.Module): method __init__ (line 497) | def __init__(self, config: DPTConfig) -> None: method forward (line 503) | def forward( class DPTReassembleStage (line 547) | class DPTReassembleStage(nn.Module): method __init__ (line 563) | def __init__(self, config): method _init_reassemble_dpt_hybrid (line 575) | def _init_reassemble_dpt_hybrid(self, config): method _init_reassemble_dpt (line 601) | def _init_reassemble_dpt(self, config): method forward (line 613) | def forward(self, hidden_states: List[torch.Tensor], patch_height=None... function _get_backbone_hidden_size (line 651) | def _get_backbone_hidden_size(config): class DPTReassembleLayer (line 658) | class DPTReassembleLayer(nn.Module): method __init__ (line 659) | def __init__(self, config, channels, factor): method forward (line 674) | def forward(self, hidden_state): class DPTFeatureFusionStage (line 680) | class DPTFeatureFusionStage(nn.Module): method __init__ (line 681) | def __init__(self, config): method forward (line 687) | def forward(self, hidden_states): class DPTPreActResidualLayer (line 703) | class DPTPreActResidualLayer(nn.Module): method __init__ (line 712) | def __init__(self, config): method forward (line 746) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class DPTFeatureFusionLayer (line 764) | class DPTFeatureFusionLayer(nn.Module): method __init__ (line 774) | def __init__(self, config, align_corners=True): method forward (line 784) | def forward(self, hidden_state, residual=None): class DPTPreTrainedModel (line 801) | class DPTPreTrainedModel(PreTrainedModel): method _init_weights (line 812) | def _init_weights(self, module): class DPTModel (line 863) | class DPTModel(DPTPreTrainedModel): method __init__ (line 864) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 881) | def get_input_embeddings(self): method _prune_heads (line 887) | def _prune_heads(self, heads_to_prune): method forward (line 903) | def forward( class DPTViTPooler (line 954) | class DPTViTPooler(nn.Module): method __init__ (line 955) | def __init__(self, config: DPTConfig): method forward (line 960) | def forward(self, hidden_states): class DPTNeck (line 969) | class DPTNeck(nn.Module): method __init__ (line 981) | def __init__(self, config): method forward (line 998) | def forward(self, hidden_states: List[torch.Tensor], patch_height=None... class DPTDepthEstimationHead (line 1022) | class DPTDepthEstimationHead(nn.Module): method __init__ (line 1029) | def __init__(self, config): method forward (line 1048) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: class DPTForDepthEstimation (line 1069) | class DPTForDepthEstimation(DPTPreTrainedModel): method __init__ (line 1070) | def __init__(self, config): method forward (line 1090) | def forward( class DPTSemanticSegmentationHead (line 1205) | class DPTSemanticSegmentationHead(nn.Module): method __init__ (line 1206) | def __init__(self, config): method forward (line 1221) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: class DPTAuxiliaryHead (line 1230) | class DPTAuxiliaryHead(nn.Module): method __init__ (line 1231) | def __init__(self, config): method forward (line 1243) | def forward(self, hidden_states): class DPTForSemanticSegmentation (line 1255) | class DPTForSemanticSegmentation(DPTPreTrainedModel): method __init__ (line 1256) | def __init__(self, config): method forward (line 1273) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/efficientnet/configuration_efficientnet.py class EfficientNetConfig (line 30) | class EfficientNetConfig(PretrainedConfig): method __init__ (line 102) | def __init__( class EfficientNetOnnxConfig (line 153) | class EfficientNetOnnxConfig(OnnxConfig): method inputs (line 157) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 165) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/efficientnet/image_processing_efficientnet.py class EfficientNetImageProcessor (line 46) | class EfficientNetImageProcessor(BaseImageProcessor): method __init__ (line 87) | def __init__( method resize (line 123) | def resize( method rescale (line 171) | def rescale( method preprocess (line 212) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/efficientnet/modeling_efficientnet.py function round_filters (line 80) | def round_filters(config: EfficientNetConfig, num_channels: int): function correct_pad (line 95) | def correct_pad(kernel_size: Union[int, Tuple], adjust: bool = True): class EfficientNetEmbeddings (line 115) | class EfficientNetEmbeddings(nn.Module): method __init__ (line 120) | def __init__(self, config: EfficientNetConfig): method forward (line 131) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class EfficientNetDepthwiseConv2d (line 140) | class EfficientNetDepthwiseConv2d(nn.Conv2d): method __init__ (line 141) | def __init__( class EfficientNetExpansionLayer (line 166) | class EfficientNetExpansionLayer(nn.Module): method __init__ (line 171) | def __init__(self, config: EfficientNetConfig, in_dim: int, out_dim: i... method forward (line 183) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class EfficientNetDepthwiseLayer (line 192) | class EfficientNetDepthwiseLayer(nn.Module): method __init__ (line 197) | def __init__( method forward (line 219) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class EfficientNetSqueezeExciteLayer (line 231) | class EfficientNetSqueezeExciteLayer(nn.Module): method __init__ (line 236) | def __init__(self, config: EfficientNetConfig, in_dim: int, expand_dim... method forward (line 257) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class EfficientNetFinalBlockLayer (line 270) | class EfficientNetFinalBlockLayer(nn.Module): method __init__ (line 275) | def __init__( method forward (line 292) | def forward(self, embeddings: torch.FloatTensor, hidden_states: torch.... class EfficientNetBlock (line 303) | class EfficientNetBlock(nn.Module): method __init__ (line 330) | def __init__( method forward (line 371) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class EfficientNetEncoder (line 384) | class EfficientNetEncoder(nn.Module): method __init__ (line 393) | def __init__(self, config: EfficientNetConfig): method forward (line 448) | def forward( class EfficientNetPreTrainedModel (line 474) | class EfficientNetPreTrainedModel(PreTrainedModel): method _init_weights (line 485) | def _init_weights(self, module): class EfficientNetModel (line 502) | class EfficientNetModel(EfficientNetPreTrainedModel): method __init__ (line 503) | def __init__(self, config: EfficientNetConfig): method forward (line 528) | def forward( class EfficientNetForImageClassification (line 572) | class EfficientNetForImageClassification(EfficientNetPreTrainedModel): method __init__ (line 573) | def __init__(self, config): method forward (line 592) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/electra/configuration_electra.py class ElectraConfig (line 29) | class ElectraConfig(PretrainedConfig): method __init__ (line 121) | def __init__( class ElectraOnnxConfig (line 171) | class ElectraOnnxConfig(OnnxConfig): method inputs (line 173) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/electra/convert_electra_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 28) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: mplsandbox_for_rl/transformers/src/transformers/models/electra/modeling_electra.py function load_tf_weights_in_electra (line 57) | def load_tf_weights_in_electra(model, config, tf_checkpoint_path, discri... class ElectraEmbeddings (line 139) | class ElectraEmbeddings(nn.Module): method __init__ (line 142) | def __init__(self, config): method forward (line 163) | def forward( class ElectraSelfAttention (line 206) | class ElectraSelfAttention(nn.Module): method __init__ (line 207) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 233) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 238) | def forward( class ElectraSelfOutput (line 341) | class ElectraSelfOutput(nn.Module): method __init__ (line 342) | def __init__(self, config): method forward (line 348) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ElectraAttention (line 361) | class ElectraAttention(nn.Module): method __init__ (line 362) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 370) | def prune_heads(self, heads): method forward (line 388) | def forward( class ElectraIntermediate (line 413) | class ElectraIntermediate(nn.Module): method __init__ (line 414) | def __init__(self, config): method forward (line 422) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ElectraOutput (line 429) | class ElectraOutput(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 ElectraLayer (line 444) | class ElectraLayer(nn.Module): method __init__ (line 445) | def __init__(self, config): method forward (line 459) | def forward( method feed_forward_chunk (line 524) | def feed_forward_chunk(self, attention_output): class ElectraEncoder (line 531) | class ElectraEncoder(nn.Module): method __init__ (line 532) | def __init__(self, config): method forward (line 538) | def forward( class ElectraDiscriminatorPredictions (line 624) | class ElectraDiscriminatorPredictions(nn.Module): method __init__ (line 627) | def __init__(self, config): method forward (line 635) | def forward(self, discriminator_hidden_states): class ElectraGeneratorPredictions (line 643) | class ElectraGeneratorPredictions(nn.Module): method __init__ (line 646) | def __init__(self, config): method forward (line 653) | def forward(self, generator_hidden_states): class ElectraPreTrainedModel (line 661) | class ElectraPreTrainedModel(PreTrainedModel): method _init_weights (line 673) | def _init_weights(self, module): class ElectraForPreTrainingOutput (line 691) | class ElectraForPreTrainingOutput(ModelOutput): class ElectraModel (line 803) | class ElectraModel(ElectraPreTrainedModel): method __init__ (line 804) | def __init__(self, config): method get_input_embeddings (line 816) | def get_input_embeddings(self): method set_input_embeddings (line 819) | def set_input_embeddings(self, value): method _prune_heads (line 822) | def _prune_heads(self, heads_to_prune): method forward (line 836) | def forward( class ElectraClassificationHead (line 926) | class ElectraClassificationHead(nn.Module): method __init__ (line 929) | def __init__(self, config): method forward (line 939) | def forward(self, features, **kwargs): class ElectraForSequenceClassification (line 956) | class ElectraForSequenceClassification(ElectraPreTrainedModel): method __init__ (line 957) | def __init__(self, config): method forward (line 975) | def forward( class ElectraForPreTraining (line 1054) | class ElectraForPreTraining(ElectraPreTrainedModel): method __init__ (line 1055) | def __init__(self, config): method forward (line 1065) | def forward( class ElectraForMaskedLM (line 1160) | class ElectraForMaskedLM(ElectraPreTrainedModel): method __init__ (line 1163) | def __init__(self, config): method get_output_embeddings (line 1173) | def get_output_embeddings(self): method set_output_embeddings (line 1176) | def set_output_embeddings(self, word_embeddings): method forward (line 1188) | def forward( class ElectraForTokenClassification (line 1251) | class ElectraForTokenClassification(ElectraPreTrainedModel): method __init__ (line 1252) | def __init__(self, config): method forward (line 1273) | def forward( class ElectraForQuestionAnswering (line 1332) | class ElectraForQuestionAnswering(ElectraPreTrainedModel): method __init__ (line 1336) | def __init__(self, config): method forward (line 1356) | def forward( class ElectraForMultipleChoice (line 1440) | class ElectraForMultipleChoice(ElectraPreTrainedModel): method __init__ (line 1441) | def __init__(self, config): method forward (line 1457) | def forward( class ElectraForCausalLM (line 1527) | class ElectraForCausalLM(ElectraPreTrainedModel): method __init__ (line 1530) | def __init__(self, config): method get_output_embeddings (line 1542) | def get_output_embeddings(self): method set_output_embeddings (line 1545) | def set_output_embeddings(self, new_embeddings): method forward (line 1550) | def forward( method prepare_inputs_for_generation (line 1655) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1677) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/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 1203) | def setup(self): method __call__ (line 1227) | def __call__(self, hidden_states, cls_index=None, deterministic: bool ... class FlaxElectraForMultipleChoiceModule (line 1249) | class FlaxElectraForMultipleChoiceModule(nn.Module): method setup (line 1254) | def setup(self): method __call__ (line 1261) | def __call__( class FlaxElectraForMultipleChoice (line 1314) | class FlaxElectraForMultipleChoice(FlaxElectraPreTrainedModel): class FlaxElectraForQuestionAnsweringModule (line 1330) | class FlaxElectraForQuestionAnsweringModule(nn.Module): method setup (line 1335) | def setup(self): method __call__ (line 1341) | def __call__( class FlaxElectraForQuestionAnswering (line 1389) | class FlaxElectraForQuestionAnswering(FlaxElectraPreTrainedModel): class FlaxElectraClassificationHead (line 1401) | class FlaxElectraClassificationHead(nn.Module): method setup (line 1407) | def setup(self): method __call__ (line 1417) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxElectraForSequenceClassificationModule (line 1427) | class FlaxElectraForSequenceClassificationModule(nn.Module): method setup (line 1432) | def setup(self): method __call__ (line 1438) | def __call__( class FlaxElectraForSequenceClassification (line 1482) | class FlaxElectraForSequenceClassification(FlaxElectraPreTrainedModel): class FlaxElectraForCausalLMModule (line 1494) | class FlaxElectraForCausalLMModule(nn.Module): method setup (line 1499) | def setup(self): method __call__ (line 1509) | def __call__( class FlaxElectraForCausalLM (line 1566) | class FlaxElectraForCausalLM(FlaxElectraPreTrainedModel): method prepare_inputs_for_generation (line 1569) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1590) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/electra/modeling_tf_electra.py class TFElectraSelfAttention (line 69) | class TFElectraSelfAttention(keras.layers.Layer): method __init__ (line 70) | def __init__(self, config: ElectraConfig, **kwargs): method transpose_for_scores (line 98) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 105) | def call( method build (line 186) | def build(self, input_shape=None): class TFElectraSelfOutput (line 202) | class TFElectraSelfOutput(keras.layers.Layer): method __init__ (line 203) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 213) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 220) | def build(self, input_shape=None): class TFElectraAttention (line 233) | class TFElectraAttention(keras.layers.Layer): method __init__ (line 234) | def __init__(self, config: ElectraConfig, **kwargs): method prune_heads (line 240) | def prune_heads(self, heads): method call (line 243) | def call( method build (line 272) | def build(self, input_shape=None): class TFElectraIntermediate (line 285) | class TFElectraIntermediate(keras.layers.Layer): method __init__ (line 286) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 299) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 305) | def build(self, input_shape=None): class TFElectraOutput (line 315) | class TFElectraOutput(keras.layers.Layer): method __init__ (line 316) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 326) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 333) | def build(self, input_shape=None): class TFElectraLayer (line 346) | class TFElectraLayer(keras.layers.Layer): method __init__ (line 347) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 360) | def call( method build (line 431) | def build(self, input_shape=None): class TFElectraEncoder (line 450) | class TFElectraEncoder(keras.layers.Layer): method __init__ (line 451) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 456) | def call( method build (line 518) | def build(self, input_shape=None): class TFElectraPooler (line 529) | class TFElectraPooler(keras.layers.Layer): method __init__ (line 530) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 541) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 549) | def build(self, input_shape=None): class TFElectraEmbeddings (line 559) | class TFElectraEmbeddings(keras.layers.Layer): method __init__ (line 562) | def __init__(self, config: ElectraConfig, **kwargs): method build (line 572) | def build(self, input_shape=None): method call (line 602) | def call( class TFElectraDiscriminatorPredictions (line 643) | class TFElectraDiscriminatorPredictions(keras.layers.Layer): method __init__ (line 644) | def __init__(self, config, **kwargs): method call (line 651) | def call(self, discriminator_hidden_states, training=False): method build (line 658) | def build(self, input_shape=None): class TFElectraGeneratorPredictions (line 670) | class TFElectraGeneratorPredictions(keras.layers.Layer): method __init__ (line 671) | def __init__(self, config, **kwargs): method call (line 678) | def call(self, generator_hidden_states, training=False): method build (line 685) | def build(self, input_shape=None): class TFElectraPreTrainedModel (line 697) | class TFElectraPreTrainedModel(TFPreTrainedModel): class TFElectraMainLayer (line 711) | class TFElectraMainLayer(keras.layers.Layer): method __init__ (line 714) | def __init__(self, config, **kwargs): method get_input_embeddings (line 727) | def get_input_embeddings(self): method set_input_embeddings (line 730) | def set_input_embeddings(self, value): method _prune_heads (line 734) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 741) | def get_extended_attention_mask(self, attention_mask, input_shape, dty... method get_head_mask (line 790) | def get_head_mask(self, head_mask): method call (line 799) | def call( method build (line 896) | def build(self, input_shape=None): class TFElectraForPreTrainingOutput (line 912) | class TFElectraForPreTrainingOutput(ModelOutput): class TFElectraModel (line 1037) | class TFElectraModel(TFElectraPreTrainedModel): method __init__ (line 1038) | def __init__(self, config, *inputs, **kwargs): method call (line 1050) | def call( method build (line 1106) | def build(self, input_shape=None): class TFElectraForPreTraining (line 1124) | class TFElectraForPreTraining(TFElectraPreTrainedModel): method __init__ (line 1125) | def __init__(self, config, **kwargs): method call (line 1134) | def call( method build (line 1186) | def build(self, input_shape=None): class TFElectraMaskedLMHead (line 1198) | class TFElectraMaskedLMHead(keras.layers.Layer): method __init__ (line 1199) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1206) | def build(self, input_shape): method get_output_embeddings (line 1211) | def get_output_embeddings(self): method set_output_embeddings (line 1214) | def set_output_embeddings(self, value): method get_bias (line 1218) | def get_bias(self): method set_bias (line 1221) | def set_bias(self, value): method call (line 1225) | def call(self, hidden_states): class TFElectraForMaskedLM (line 1244) | class TFElectraForMaskedLM(TFElectraPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1245) | def __init__(self, config, **kwargs): method get_lm_head (line 1259) | def get_lm_head(self): method get_prefix_bias_name (line 1262) | def get_prefix_bias_name(self): method call (line 1276) | def call( method build (line 1325) | def build(self, input_shape=None): class TFElectraClassificationHead (line 1340) | class TFElectraClassificationHead(keras.layers.Layer): method __init__ (line 1343) | def __init__(self, config, **kwargs): method call (line 1360) | def call(self, inputs, **kwargs): method build (line 1370) | def build(self, input_shape=None): class TFElectraForSequenceClassification (line 1389) | class TFElectraForSequenceClassification(TFElectraPreTrainedModel, TFSeq... method __init__ (line 1390) | def __init__(self, config, *inputs, **kwargs): method call (line 1405) | def call( method build (line 1452) | def build(self, input_shape=None): class TFElectraForMultipleChoice (line 1471) | class TFElectraForMultipleChoice(TFElectraPreTrainedModel, TFMultipleCho... method __init__ (line 1472) | def __init__(self, config, *inputs, **kwargs): method call (line 1491) | def call( method build (line 1556) | def build(self, input_shape=None): class TFElectraForTokenClassification (line 1579) | class TFElectraForTokenClassification(TFElectraPreTrainedModel, TFTokenC... method __init__ (line 1580) | def __init__(self, config, **kwargs): method call (line 1602) | def call( method build (line 1649) | def build(self, input_shape=None): class TFElectraForQuestionAnswering (line 1668) | class TFElectraForQuestionAnswering(TFElectraPreTrainedModel, TFQuestion... method __init__ (line 1669) | def __init__(self, config, *inputs, **kwargs): method call (line 1690) | def call( method build (line 1755) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/electra/tokenization_electra.py function load_vocab (line 31) | def load_vocab(vocab_file): function whitespace_tokenize (line 43) | def whitespace_tokenize(text): class ElectraTokenizer (line 53) | class ElectraTokenizer(PreTrainedTokenizer): method __init__ (line 97) | def __init__( method do_lower_case (line 145) | def do_lower_case(self): method vocab_size (line 149) | def vocab_size(self): method get_vocab (line 152) | def get_vocab(self): method _tokenize (line 155) | def _tokenize(self, text, split_special_tokens=False): method _convert_token_to_id (line 170) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 174) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 178) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 183) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 208) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 236) | def create_token_type_ids_from_sequences( method save_vocabulary (line 265) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 287) | class BasicTokenizer: method __init__ (line 310) | def __init__( method tokenize (line 326) | 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: 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: mplsandbox_for_rl/transformers/src/transformers/models/electra/tokenization_electra_fast.py class ElectraTokenizerFast (line 29) | class ElectraTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 72) | def __init__( method build_inputs_with_special_tokens (line 114) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 138) | def create_token_type_ids_from_sequences( method save_vocabulary (line 167) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/encodec/configuration_encodec.py class EncodecConfig (line 29) | class EncodecConfig(PretrainedConfig): method __init__ (line 108) | def __init__( method chunk_length (line 168) | def chunk_length(self) -> Optional[int]: method chunk_stride (line 176) | def chunk_stride(self) -> Optional[int]: method frame_rate (line 183) | def frame_rate(self) -> int: method num_quantizers (line 188) | def num_quantizers(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/encodec/convert_encodec_checkpoint_to_pytorch.py function set_recursively (line 142) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function should_ignore (line 193) | def should_ignore(name, ignore_keys): function recursively_load_weights (line 207) | def recursively_load_weights(orig_dict, hf_model, model_name): function convert_checkpoint (line 279) | def convert_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/encodec/feature_extraction_encodec.py class EncodecFeatureExtractor (line 29) | class EncodecFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 55) | def __init__( method chunk_length (line 70) | def chunk_length(self) -> Optional[int]: method chunk_stride (line 78) | def chunk_stride(self) -> Optional[int]: method __call__ (line 84) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/encodec/modeling_encodec.py class EncodecOutput (line 44) | class EncodecOutput(ModelOutput): class EncodecEncoderOutput (line 58) | class EncodecEncoderOutput(ModelOutput): class EncodecDecoderOutput (line 72) | class EncodecDecoderOutput(ModelOutput): class EncodecConv1d (line 82) | class EncodecConv1d(nn.Module): method __init__ (line 85) | def __init__( method _get_extra_padding_for_conv1d (line 122) | def _get_extra_padding_for_conv1d( method _pad1d (line 135) | def _pad1d(hidden_states: torch.Tensor, paddings: Tuple[int, int], mod... method forward (line 153) | def forward(self, hidden_states): class EncodecConvTranspose1d (line 175) | class EncodecConvTranspose1d(nn.Module): method __init__ (line 178) | def __init__(self, config, in_channels: int, out_channels: int, kernel... method forward (line 197) | def forward(self, hidden_states): class EncodecLSTM (line 227) | class EncodecLSTM(nn.Module): method __init__ (line 232) | def __init__(self, config, dimension): method forward (line 236) | def forward(self, hidden_states): class EncodecResnetBlock (line 243) | class EncodecResnetBlock(nn.Module): method __init__ (line 248) | def __init__(self, config: EncodecConfig, dim: int, dilations: List[in... method forward (line 268) | def forward(self, hidden_states): class EncodecEncoder (line 276) | class EncodecEncoder(nn.Module): method __init__ (line 279) | def __init__(self, config: EncodecConfig): method forward (line 301) | def forward(self, hidden_states): class EncodecDecoder (line 307) | class EncodecDecoder(nn.Module): method __init__ (line 310) | def __init__(self, config: EncodecConfig): method forward (line 335) | def forward(self, hidden_states): class EncodecEuclideanCodebook (line 341) | class EncodecEuclideanCodebook(nn.Module): method __init__ (line 344) | def __init__(self, config: EncodecConfig): method quantize (line 355) | def quantize(self, hidden_states): method encode (line 362) | def encode(self, hidden_states): method decode (line 372) | def decode(self, embed_ind): class EncodecVectorQuantization (line 377) | class EncodecVectorQuantization(nn.Module): method __init__ (line 382) | def __init__(self, config: EncodecConfig): method encode (line 386) | def encode(self, hidden_states): method decode (line 391) | def decode(self, embed_ind): class EncodecResidualVectorQuantizer (line 397) | class EncodecResidualVectorQuantizer(nn.Module): method __init__ (line 400) | def __init__(self, config: EncodecConfig): method get_num_quantizers_for_bandwidth (line 407) | def get_num_quantizers_for_bandwidth(self, bandwidth: Optional[float] ... method encode (line 415) | def encode(self, embeddings: torch.Tensor, bandwidth: Optional[float] ... method decode (line 431) | def decode(self, codes: torch.Tensor) -> torch.Tensor: class EncodecPreTrainedModel (line 441) | class EncodecPreTrainedModel(PreTrainedModel): method _init_weights (line 451) | def _init_weights(self, module): class EncodecModel (line 531) | class EncodecModel(EncodecPreTrainedModel): method __init__ (line 532) | def __init__(self, config: EncodecConfig): method get_encoder (line 548) | def get_encoder(self): method get_decoder (line 551) | def get_decoder(self): method _encode_frame (line 554) | def _encode_frame( method encode (line 580) | def encode( method _linear_overlap_add (line 654) | def _linear_overlap_add(frames: List[torch.Tensor], stride: int): method _decode_frame (line 700) | def _decode_frame(self, codes: torch.Tensor, scale: Optional[torch.Ten... method decode (line 708) | def decode( method forward (line 758) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/encoder_decoder/configuration_encoder_decoder.py class EncoderDecoderConfig (line 25) | class EncoderDecoderConfig(PretrainedConfig): method __init__ (line 75) | def __init__(self, **kwargs): method from_encoder_decoder_configs (line 92) | def from_encoder_decoder_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/encoder_decoder/modeling_encoder_decoder.py function shift_tokens_right (line 150) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class EncoderDecoderModel (line 169) | class EncoderDecoderModel(PreTrainedModel): method __init__ (line 183) | def __init__( method tie_weights (line 260) | def tie_weights(self): method get_encoder (line 276) | def get_encoder(self): method get_decoder (line 279) | def get_decoder(self): method get_input_embeddings (line 282) | def get_input_embeddings(self): method get_output_embeddings (line 285) | def get_output_embeddings(self): method set_output_embeddings (line 288) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 292) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 393) | def from_encoder_decoder_pretrained( method forward (line 540) | def forward( method prepare_decoder_input_ids_from_labels (line 666) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method prepare_inputs_for_generation (line 669) | def prepare_inputs_for_generation( method resize_token_embeddings (line 684) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 691) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/encoder_decoder/modeling_flax_encoder_decoder.py class FlaxEncoderDecoderModule (line 206) | class FlaxEncoderDecoderModule(nn.Module): method setup (line 210) | def setup(self): method _get_encoder_module (line 236) | def _get_encoder_module(self): method _get_projection_module (line 239) | def _get_projection_module(self): method _get_decoder_module (line 242) | def _get_decoder_module(self): method __call__ (line 245) | def __call__( class FlaxEncoderDecoderModel (line 301) | 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: mplsandbox_for_rl/transformers/src/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 205) | def __init__( method get_encoder (line 279) | def get_encoder(self): method get_decoder (line 282) | def get_decoder(self): method get_input_embeddings (line 285) | def get_input_embeddings(self): method get_output_embeddings (line 288) | def get_output_embeddings(self): method set_output_embeddings (line 291) | def set_output_embeddings(self, new_embeddings): method tf_to_pt_weight_rename (line 294) | def tf_to_pt_weight_rename(self, tf_weight): method from_encoder_decoder_pretrained (line 312) | def from_encoder_decoder_pretrained( method call (line 457) | def call( method prepare_inputs_for_generation (line 616) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 636) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method resize_token_embeddings (line 639) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 646) | def _reorder_cache(self, past, beam_idx): method build (line 650) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/ernie/configuration_ernie.py class ErnieConfig (line 29) | class ErnieConfig(PretrainedConfig): method __init__ (line 103) | def __init__( class ErnieOnnxConfig (line 146) | class ErnieOnnxConfig(OnnxConfig): method inputs (line 148) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/ernie/modeling_ernie.py class ErnieEmbeddings (line 58) | class ErnieEmbeddings(nn.Module): method __init__ (line 61) | def __init__(self, config): method forward (line 83) | def forward( class ErnieSelfAttention (line 135) | class ErnieSelfAttention(nn.Module): method __init__ (line 136) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 162) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 167) | def forward( class ErnieSelfOutput (line 270) | class ErnieSelfOutput(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 ErnieAttention (line 290) | class ErnieAttention(nn.Module): method __init__ (line 291) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 299) | def prune_heads(self, heads): method forward (line 317) | def forward( class ErnieIntermediate (line 342) | class ErnieIntermediate(nn.Module): method __init__ (line 343) | def __init__(self, config): method forward (line 351) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErnieOutput (line 358) | class ErnieOutput(nn.Module): method __init__ (line 359) | def __init__(self, config): method forward (line 365) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ErnieLayer (line 373) | class ErnieLayer(nn.Module): method __init__ (line 374) | def __init__(self, config): method forward (line 388) | def forward( method feed_forward_chunk (line 453) | def feed_forward_chunk(self, attention_output): class ErnieEncoder (line 460) | class ErnieEncoder(nn.Module): method __init__ (line 461) | def __init__(self, config): method forward (line 467) | def forward( class ErniePooler (line 554) | class ErniePooler(nn.Module): method __init__ (line 555) | def __init__(self, config): method forward (line 560) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErniePredictionHeadTransform (line 570) | class ErniePredictionHeadTransform(nn.Module): method __init__ (line 571) | def __init__(self, config): method forward (line 580) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErnieLMPredictionHead (line 588) | class ErnieLMPredictionHead(nn.Module): method __init__ (line 589) | def __init__(self, config): method _tie_weights (line 602) | def _tie_weights(self): method forward (line 605) | def forward(self, hidden_states): class ErnieOnlyMLMHead (line 612) | class ErnieOnlyMLMHead(nn.Module): method __init__ (line 613) | def __init__(self, config): method forward (line 617) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class ErnieOnlyNSPHead (line 623) | class ErnieOnlyNSPHead(nn.Module): method __init__ (line 624) | def __init__(self, config): method forward (line 628) | def forward(self, pooled_output): class ErniePreTrainingHeads (line 634) | class ErniePreTrainingHeads(nn.Module): method __init__ (line 635) | def __init__(self, config): method forward (line 640) | def forward(self, sequence_output, pooled_output): class ErniePreTrainedModel (line 646) | class ErniePreTrainedModel(PreTrainedModel): method _init_weights (line 656) | def _init_weights(self, module): class ErnieForPreTrainingOutput (line 675) | class ErnieForPreTrainingOutput(ModelOutput): class ErnieModel (line 783) | class ErnieModel(ErniePreTrainedModel): method __init__ (line 797) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 810) | def get_input_embeddings(self): method set_input_embeddings (line 814) | def set_input_embeddings(self, value): method _prune_heads (line 818) | def _prune_heads(self, heads_to_prune): method forward (line 832) | def forward( class ErnieForPreTraining (line 972) | class ErnieForPreTraining(ErniePreTrainedModel): method __init__ (line 976) | def __init__(self, config): method get_output_embeddings (line 986) | def get_output_embeddings(self): method set_output_embeddings (line 990) | def set_output_embeddings(self, new_embeddings): method forward (line 996) | def forward( class ErnieForCausalLM (line 1084) | class ErnieForCausalLM(ErniePreTrainedModel): method __init__ (line 1088) | def __init__(self, config): method get_output_embeddings (line 1101) | def get_output_embeddings(self): method set_output_embeddings (line 1105) | def set_output_embeddings(self, new_embeddings): method forward (line 1115) | def forward( method prepare_inputs_for_generation (line 1203) | def prepare_inputs_for_generation( method _reorder_cache (line 1232) | def _reorder_cache(self, past_key_values, beam_idx): class ErnieForMaskedLM (line 1242) | class ErnieForMaskedLM(ErniePreTrainedModel): method __init__ (line 1246) | def __init__(self, config): method get_output_embeddings (line 1262) | def get_output_embeddings(self): method set_output_embeddings (line 1266) | def set_output_embeddings(self, new_embeddings): method forward (line 1278) | def forward( method prepare_inputs_for_generation (line 1338) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class ErnieForNextSentencePrediction (line 1359) | class ErnieForNextSentencePrediction(ErniePreTrainedModel): method __init__ (line 1361) | def __init__(self, config): method forward (line 1372) | def forward( class ErnieForSequenceClassification (line 1467) | class ErnieForSequenceClassification(ErniePreTrainedModel): method __init__ (line 1469) | def __init__(self, config): method forward (line 1485) | def forward( class ErnieForMultipleChoice (line 1566) | class ErnieForMultipleChoice(ErniePreTrainedModel): method __init__ (line 1568) | def __init__(self, config): method forward (line 1587) | def forward( class ErnieForTokenClassification (line 1663) | class ErnieForTokenClassification(ErniePreTrainedModel): method __init__ (line 1665) | def __init__(self, config): method forward (line 1680) | def forward( class ErnieForQuestionAnswering (line 1742) | class ErnieForQuestionAnswering(ErniePreTrainedModel): method __init__ (line 1744) | def __init__(self, config): method forward (line 1755) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/esm/configuration_esm.py class EsmConfig (line 29) | class EsmConfig(PretrainedConfig): method __init__ (line 99) | def __init__( method to_dict (line 157) | def to_dict(self): class EsmFoldConfig (line 171) | class EsmFoldConfig: method __post_init__ (line 185) | def __post_init__(self): method to_dict (line 191) | def to_dict(self): class TrunkConfig (line 204) | class TrunkConfig: method __post_init__ (line 218) | def __post_init__(self): method to_dict (line 256) | def to_dict(self): class StructureModuleConfig (line 269) | class StructureModuleConfig: method to_dict (line 320) | def to_dict(self): function get_default_vocab_list (line 324) | def get_default_vocab_list(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/esm/convert_esm.py function get_esmfold_tokenizer (line 77) | def get_esmfold_tokenizer(): function transfer_and_check_weights (line 87) | def transfer_and_check_weights(original_module, our_module): function convert_esm_checkpoint_to_pytorch (line 95) | def convert_esm_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/transformers/models/esm/modeling_esm.py function rotate_half (line 44) | def rotate_half(x): function apply_rotary_pos_emb (line 49) | def apply_rotary_pos_emb(x, cos, sin): function gelu (line 56) | def gelu(x): function symmetrize (line 63) | def symmetrize(x): function average_product_correct (line 68) | def average_product_correct(x): class RotaryEmbedding (line 80) | class RotaryEmbedding(torch.nn.Module): method __init__ (line 87) | def __init__(self, dim: int): method _update_cos_sin_tables (line 98) | def _update_cos_sin_tables(self, x, seq_dimension=2): method forward (line 114) | def forward(self, q: torch.Tensor, k: torch.Tensor) -> Tuple[torch.Ten... class EsmContactPredictionHead (line 123) | class EsmContactPredictionHead(nn.Module): method __init__ (line 126) | def __init__( method forward (line 138) | def forward(self, tokens, attentions): class EsmEmbeddings (line 158) | class EsmEmbeddings(nn.Module): method __init__ (line 163) | def __init__(self, config): method forward (line 185) | def forward( method create_position_ids_from_inputs_embeds (line 230) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class EsmSelfAttention (line 248) | class EsmSelfAttention(nn.Module): method __init__ (line 249) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 278) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 283) | def forward( class EsmSelfOutput (line 386) | class EsmSelfOutput(nn.Module): method __init__ (line 387) | def __init__(self, config): method forward (line 392) | def forward(self, hidden_states, input_tensor): class EsmAttention (line 399) | class EsmAttention(nn.Module): method __init__ (line 400) | def __init__(self, config): method prune_heads (line 407) | def prune_heads(self, heads): method forward (line 425) | def forward( class EsmIntermediate (line 450) | class EsmIntermediate(nn.Module): method __init__ (line 451) | def __init__(self, config): method forward (line 455) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EsmOutput (line 461) | class EsmOutput(nn.Module): method __init__ (line 462) | def __init__(self, config): method forward (line 467) | def forward(self, hidden_states, input_tensor): class EsmLayer (line 474) | class EsmLayer(nn.Module): method __init__ (line 475) | def __init__(self, config): method forward (line 490) | def forward( method feed_forward_chunk (line 553) | def feed_forward_chunk(self, attention_output): class EsmEncoder (line 560) | class EsmEncoder(nn.Module): method __init__ (line 561) | def __init__(self, config): method forward (line 568) | def forward( class EsmPooler (line 658) | class EsmPooler(nn.Module): method __init__ (line 659) | def __init__(self, config): method forward (line 664) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EsmPreTrainedModel (line 673) | class EsmPreTrainedModel(PreTrainedModel): method _init_weights (line 685) | def _init_weights(self, module): class EsmModel (line 764) | class EsmModel(EsmPreTrainedModel): method __init__ (line 777) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 793) | def get_input_embeddings(self): method set_input_embeddings (line 796) | def set_input_embeddings(self, value): method _prune_heads (line 799) | def _prune_heads(self, heads_to_prune): method forward (line 813) | def forward( method predict_contacts (line 934) | def predict_contacts(self, tokens, attention_mask): class EsmForMaskedLM (line 947) | class EsmForMaskedLM(EsmPreTrainedModel): method __init__ (line 950) | def __init__(self, config): method get_output_embeddings (line 964) | def get_output_embeddings(self): method set_output_embeddings (line 967) | def set_output_embeddings(self, new_embeddings): method forward (line 977) | def forward( method predict_contacts (line 1034) | def predict_contacts(self, tokens, attention_mask): class EsmLMHead (line 1038) | class EsmLMHead(nn.Module): method __init__ (line 1041) | def __init__(self, config): method forward (line 1049) | def forward(self, features, **kwargs): class EsmForSequenceClassification (line 1066) | class EsmForSequenceClassification(EsmPreTrainedModel): method __init__ (line 1067) | def __init__(self, config): method forward (line 1083) | def forward( class EsmForTokenClassification (line 1160) | class EsmForTokenClassification(EsmPreTrainedModel): method __init__ (line 1161) | def __init__(self, config): method forward (line 1177) | def forward( class EsmClassificationHead (line 1230) | class EsmClassificationHead(nn.Module): method __init__ (line 1233) | def __init__(self, config): method forward (line 1239) | def forward(self, features, **kwargs): function create_position_ids_from_input_ids (line 1249) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/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 2023) | def __init__(self, config): method _af2_to_esm_from_vocab_list (line 2079) | def _af2_to_esm_from_vocab_list(vocab_list: List[str]) -> torch.Tensor: method forward (line 2086) | def forward( method af2_idx_to_esm_idx (line 2210) | def af2_idx_to_esm_idx(self, aa, mask): method compute_language_model_representations (line 2217) | def compute_language_model_representations(self, esmaa: torch.Tensor) ... method bert_mask (line 2242) | def bert_mask(self, aa, esmaa, mask, pattern): method infer (line 2252) | def infer( method output_to_pdb (line 2292) | def output_to_pdb(output: Dict) -> List[str]: method infer_pdb (line 2313) | def infer_pdb(self, seqs, *args, **kwargs) -> str: method infer_pdbs (line 2319) | def infer_pdbs(self, seqs: List[str], *args, **kwargs) -> List[str]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/esm/modeling_tf_esm.py function rotate_half (line 55) | def rotate_half(x): function apply_rotary_pos_emb (line 60) | def apply_rotary_pos_emb(x, cos, sin): function symmetrize (line 67) | def symmetrize(x): function average_product_correct (line 72) | def average_product_correct(x): class TFRotaryEmbedding (line 84) | class TFRotaryEmbedding(keras.layers.Layer): method __init__ (line 91) | def __init__(self, dim: int, name=None): method build (line 101) | def build(self, input_shape): method _compute_cos_sin (line 110) | def _compute_cos_sin(self, x, seq_dimension=2): method call (line 119) | def call(self, q: tf.Tensor, k: tf.Tensor) -> Tuple[tf.Tensor, tf.Tens... class TFEsmContactPredictionHead (line 128) | class TFEsmContactPredictionHead(keras.layers.Layer): method __init__ (line 131) | def __init__( method build (line 143) | def build(self, input_shape=None): method call (line 151) | def call(self, tokens, attentions): class TFEsmEmbeddings (line 168) | class TFEsmEmbeddings(keras.layers.Layer): method __init__ (line 173) | def __init__(self, config, name=None): method call (line 203) | def call( method create_position_ids_from_inputs_embeds (line 248) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): method build (line 265) | def build(self, input_shape=None): class TFEsmSelfAttention (line 280) | class TFEsmSelfAttention(keras.layers.Layer): method __init__ (line 281) | def __init__(self, config, position_embedding_type=None, name=None): method transpose_for_scores (line 321) | def transpose_for_scores(self, x: tf.Tensor) -> tf.Tensor: method call (line 326) | def call( method build (line 429) | def build(self, input_shape=None): class TFEsmSelfOutput (line 447) | class TFEsmSelfOutput(keras.layers.Layer): method __init__ (line 448) | def __init__(self, config, name=None): method call (line 456) | def call(self, hidden_states, input_tensor, training=False): method build (line 462) | def build(self, input_shape=None): class TFEsmAttention (line 471) | class TFEsmAttention(keras.layers.Layer): method __init__ (line 472) | def __init__(self, config, name=None): method prune_heads (line 480) | def prune_heads(self, heads): method call (line 483) | def call( method build (line 509) | def build(self, input_shape=None): class TFEsmIntermediate (line 524) | class TFEsmIntermediate(keras.layers.Layer): method __init__ (line 525) | def __init__(self, config: EsmConfig, **kwargs): method call (line 535) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 540) | def build(self, input_shape=None): class TFEsmOutput (line 549) | class TFEsmOutput(keras.layers.Layer): method __init__ (line 550) | def __init__(self, config, name=None): method call (line 558) | def call(self, hidden_states, input_tensor, training=False): method build (line 564) | def build(self, input_shape=None): class TFEsmLayer (line 573) | class TFEsmLayer(keras.layers.Layer): method __init__ (line 574) | def __init__(self, config, name=None): method call (line 590) | def call( method build (line 660) | def build(self, input_shape=None): class TFEsmEncoder (line 678) | class TFEsmEncoder(keras.layers.Layer): method __init__ (line 679) | def __init__(self, config, name=None): method call (line 687) | def call( method build (line 758) | def build(self, input_shape=None): class TFEsmPooler (line 772) | class TFEsmPooler(keras.layers.Layer): method __init__ (line 773) | def __init__(self, config: EsmConfig, **kwargs): method call (line 784) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 792) | def build(self, input_shape=None): class TFEsmPreTrainedModel (line 801) | class TFEsmPreTrainedModel(TFPreTrainedModel): class TFEsmMainLayer (line 872) | class TFEsmMainLayer(keras.layers.Layer): method __init__ (line 887) | def __init__(self, config, add_pooling_layer=True, name=None, **kwargs): method build (line 901) | def build(self, input_shape=None): method get_input_embeddings (line 918) | def get_input_embeddings(self): method set_input_embeddings (line 921) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 925) | def _prune_heads(self, heads_to_prune): method call (line 928) | def call( method predict_contacts (line 1081) | def predict_contacts(self, tokens, attention_mask): class TFEsmModel (line 1098) | class TFEsmModel(TFEsmPreTrainedModel): method __init__ (line 1099) | def __init__(self, config: EsmConfig, add_pooling_layer=True, *inputs,... method call (line 1111) | def call( method predict_contacts (line 1164) | def predict_contacts(self, tokens, attention_mask): method build (line 1167) | def build(self, input_shape=None): class TFEsmForMaskedLM (line 1177) | class TFEsmForMaskedLM(TFEsmPreTrainedModel, TFMaskedLanguageModelingLoss): method __init__ (line 1181) | def __init__(self, config): method get_output_embeddings (line 1198) | def get_output_embeddings(self): method set_output_embeddings (line 1201) | def set_output_embeddings(self, new_embeddings): method get_lm_head (line 1204) | def get_lm_head(self): method call (line 1215) | def call( method predict_contacts (line 1271) | def predict_contacts(self, tokens, attention_mask): method build (line 1274) | def build(self, input_shape=None): class TFEsmLMHead (line 1286) | class TFEsmLMHead(keras.layers.Layer): method __init__ (line 1289) | def __init__(self, config, name=None): method build (line 1307) | def build(self, input_shape=None): method get_bias (line 1324) | def get_bias(self): method call (line 1327) | def call(self, features): class TFEsmForSequenceClassification (line 1347) | class TFEsmForSequenceClassification(TFEsmPreTrainedModel, TFSequenceCla... method __init__ (line 1350) | def __init__(self, config): method call (line 1365) | def call( method build (line 1413) | def build(self, input_shape=None): class TFEsmForTokenClassification (line 1432) | class TFEsmForTokenClassification(TFEsmPreTrainedModel, TFTokenClassific... method __init__ (line 1436) | def __init__(self, config): method call (line 1452) | def call( method build (line 1501) | def build(self, input_shape=None): class TFEsmClassificationHead (line 1513) | class TFEsmClassificationHead(keras.layers.Layer): method __init__ (line 1516) | def __init__(self, config, name=None): method call (line 1533) | def call(self, features, training=False): method build (line 1541) | def build(self, input_shape=None): function create_position_ids_from_input_ids (line 1553) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 32) | def pseudo_beta_fn( function pseudo_beta_fn (line 37) | def pseudo_beta_fn(aatype, all_atom_positions, all_atom_masks): function atom14_to_atom37 (line 58) | def atom14_to_atom37(atom14: torch.Tensor, batch: Dict[str, torch.Tensor... function build_template_angle_feat (line 71) | def build_template_angle_feat(template_feats: Dict[str, torch.Tensor]) -... function build_template_pair_feat (line 89) | def build_template_pair_feat( function build_extra_msa_feat (line 150) | def build_extra_msa_feat(batch: Dict[str, torch.Tensor]) -> torch.Tensor: function torsion_angles_to_frames (line 160) | def torsion_angles_to_frames( function frames_and_literature_positions_to_atom14_pos (line 222) | def frames_and_literature_positions_to_atom14_pos( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/esm/openfold_utils/protein.py class Protein (line 34) | class Protein: function from_proteinnet_string (line 71) | def from_proteinnet_string(proteinnet_str: str) -> Protein: function get_pdb_headers (line 121) | def get_pdb_headers(prot: Protein, chain_id: int = 0) -> List[str]: function add_pdb_headers (line 141) | def add_pdb_headers(prot: Protein, pdb_str: str) -> str: function to_pdb (line 191) | def to_pdb(prot: Protein) -> str: function ideal_atom_mask (line 284) | def ideal_atom_mask(prot: Protein) -> np.ndarray: function from_prediction (line 299) | def from_prediction( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 115) | def tree_map(fn: Callable[[T], Any], tree: dict, leaf_type: Type[T]) -> ... function tree_map (line 119) | def tree_map(fn: Callable[[T], Any], tree: list, leaf_type: Type[T]) -> ... function tree_map (line 123) | def tree_map(fn: Callable[[T], Any], tree: tuple, leaf_type: Type[T]) ->... function tree_map (line 126) | def tree_map(fn, tree, leaf_type): FILE: mplsandbox_for_rl/transformers/src/transformers/models/esm/tokenization_esm.py function load_vocab_file (line 29) | def load_vocab_file(vocab_file): class EsmTokenizer (line 35) | class EsmTokenizer(PreTrainedTokenizer): method __init__ (line 43) | def __init__( method _convert_id_to_token (line 71) | def _convert_id_to_token(self, index: int) -> str: method _convert_token_to_id (line 74) | def _convert_token_to_id(self, token: str) -> int: method _tokenize (line 77) | def _tokenize(self, text, **kwargs): method get_vocab (line 80) | def get_vocab(self): method token_to_id (line 85) | def token_to_id(self, token: str) -> int: method id_to_token (line 88) | def id_to_token(self, index: int) -> str: method build_inputs_with_special_tokens (line 91) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 105) | def get_special_tokens_mask( method save_vocabulary (line 136) | def save_vocabulary(self, save_directory, filename_prefix): method vocab_size (line 143) | def vocab_size(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/falcon/configuration_falcon.py class FalconConfig (line 24) | class FalconConfig(PretrainedConfig): method __init__ (line 115) | def __init__( method head_dim (line 175) | def head_dim(self): method rotary (line 179) | def rotary(self): method _rope_scaling_validation (line 182) | def _rope_scaling_validation(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/falcon/modeling_falcon.py function _prepare_4d_causal_attention_mask_with_cache_position (line 65) | def _prepare_4d_causal_attention_mask_with_cache_position( class FalconLinear (line 120) | class FalconLinear(nn.Linear): method forward (line 121) | def forward(self, input: torch.Tensor) -> torch.Tensor: function rotate_half (line 129) | def rotate_half(x): function apply_rotary_pos_emb (line 137) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class FalconRotaryEmbedding (line 166) | class FalconRotaryEmbedding(nn.Module): method __init__ (line 167) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 181) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 191) | def forward(self, x, seq_len=None): class FalconLinearScalingRotaryEmbedding (line 204) | class FalconLinearScalingRotaryEmbedding(FalconRotaryEmbedding): method __init__ (line 207) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 211) | def _set_cos_sin_cache(self, seq_len, device, dtype): class FalconDynamicNTKScalingRotaryEmbedding (line 225) | class FalconDynamicNTKScalingRotaryEmbedding(FalconRotaryEmbedding): method __init__ (line 228) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 232) | def _set_cos_sin_cache(self, seq_len, device, dtype): function build_alibi_tensor (line 251) | def build_alibi_tensor(attention_mask: torch.Tensor, num_heads: int, dty... function dropout_add (line 280) | def dropout_add(x: torch.Tensor, residual: torch.Tensor, prob: float, tr... class FalconAttention (line 299) | class FalconAttention(nn.Module): method __init__ (line 300) | def __init__(self, config: FalconConfig, layer_idx=None): method _init_rope (line 346) | def _init_rope(self): method _split_heads (line 373) | def _split_heads(self, fused_qkv: torch.Tensor) -> Tuple[torch.Tensor,... method _merge_heads (line 405) | def _merge_heads(self, x: torch.Tensor) -> torch.Tensor: method forward (line 430) | def forward( class FalconFlashAttention2 (line 573) | class FalconFlashAttention2(FalconAttention): method __init__ (line 581) | def __init__(self, *args, **kwargs): method forward (line 589) | def forward( class FalconMLP (line 686) | class FalconMLP(nn.Module): method __init__ (line 687) | def __init__(self, config: FalconConfig): method forward (line 696) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FalconDecoderLayer (line 709) | class FalconDecoderLayer(nn.Module): method __init__ (line 710) | def __init__(self, config: FalconConfig, layer_idx=None): method forward (line 735) | def forward( class FalconPreTrainedModel (line 893) | class FalconPreTrainedModel(PreTrainedModel): method __init__ (line 909) | def __init__(self, *inputs, **kwargs): method _init_weights (line 912) | def _init_weights(self, module: nn.Module): method _check_and_enable_sdpa (line 930) | def _check_and_enable_sdpa(cls, config, hard_check_only: bool = False)... class FalconModel (line 952) | class FalconModel(FalconPreTrainedModel): method __init__ (line 953) | def __init__(self, config: FalconConfig): method get_input_embeddings (line 976) | def get_input_embeddings(self): method set_input_embeddings (line 979) | def set_input_embeddings(self, new_embeddings: torch.Tensor): method forward (line 988) | def forward( method _update_causal_mask (line 1130) | def _update_causal_mask( class FalconForCausalLM (line 1223) | class FalconForCausalLM(FalconPreTrainedModel): method __init__ (line 1226) | def __init__(self, config: FalconConfig): method get_output_embeddings (line 1234) | def get_output_embeddings(self): method set_output_embeddings (line 1237) | def set_output_embeddings(self, new_embeddings: torch.Tensor): method prepare_inputs_for_generation (line 1240) | def prepare_inputs_for_generation( method forward (line 1317) | def forward( method _reorder_cache (line 1382) | def _reorder_cache( class FalconForSequenceClassification (line 1422) | class FalconForSequenceClassification(FalconPreTrainedModel): method __init__ (line 1423) | def __init__(self, config: FalconConfig): method forward (line 1438) | def forward( class FalconForTokenClassification (line 1541) | class FalconForTokenClassification(FalconPreTrainedModel): method __init__ (line 1542) | def __init__(self, config: FalconConfig): method forward (line 1565) | def forward( class FalconForQuestionAnswering (line 1630) | class FalconForQuestionAnswering(FalconPreTrainedModel): method __init__ (line 1631) | def __init__(self, config): method forward (line 1640) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/falcon_mamba/configuration_falcon_mamba.py class FalconMambaConfig (line 27) | class FalconMambaConfig(PretrainedConfig): method __init__ (line 104) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/falcon_mamba/modeling_falcon_mamba.py function rms_forward (line 66) | def rms_forward(hidden_states, variance_epsilon=1e-6): class FalconMambaMixer (line 85) | class FalconMambaMixer(nn.Module): method __init__ (line 93) | def __init__(self, config: FalconMambaConfig, layer_idx: int): method cuda_kernels_forward (line 153) | def cuda_kernels_forward( method slow_forward (line 264) | def slow_forward( method forward (line 367) | def forward( class FalconMambaRMSNorm (line 380) | class FalconMambaRMSNorm(nn.Module): method __init__ (line 381) | def __init__(self, hidden_size, eps=1e-6): method extra_repr (line 389) | def extra_repr(self): method forward (line 393) | def forward(self, hidden_states): class FalconMambaBlock (line 400) | class FalconMambaBlock(nn.Module): method __init__ (line 401) | def __init__(self, config, layer_idx): method forward (line 409) | def forward( class FalconMambaPreTrainedModel (line 429) | class FalconMambaPreTrainedModel(PreTrainedModel): method _init_weights (line 441) | def _init_weights(self, module): class FalconMambaOutput (line 491) | class FalconMambaOutput(ModelOutput): class FalconMambaCausalLMOutput (line 517) | class FalconMambaCausalLMOutput(ModelOutput): class FalconMambaModel (line 593) | class FalconMambaModel(FalconMambaPreTrainedModel): method __init__ (line 594) | def __init__(self, config): method get_input_embeddings (line 607) | def get_input_embeddings(self): method set_input_embeddings (line 610) | def set_input_embeddings(self, new_embeddings): method forward (line 619) | def forward( class FalconMambaForCausalLM (line 705) | class FalconMambaForCausalLM(FalconMambaPreTrainedModel): method __init__ (line 708) | def __init__(self, config): method get_output_embeddings (line 715) | def get_output_embeddings(self): method set_output_embeddings (line 718) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 721) | def get_input_embeddings(self): method set_input_embeddings (line 724) | def set_input_embeddings(self, new_embeddings): method _update_model_kwargs_for_generation (line 727) | def _update_model_kwargs_for_generation( method prepare_inputs_for_generation (line 746) | def prepare_inputs_for_generation( method forward (line 798) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fastspeech2_conformer/configuration_fastspeech2_conformer.py class FastSpeech2ConformerConfig (line 26) | class FastSpeech2ConformerConfig(PretrainedConfig): method __init__ (line 169) | def __init__( class FastSpeech2ConformerHifiGanConfig (line 327) | class FastSpeech2ConformerHifiGanConfig(PretrainedConfig): method __init__ (line 381) | def __init__( class FastSpeech2ConformerWithHifiGanConfig (line 406) | class FastSpeech2ConformerWithHifiGanConfig(PretrainedConfig): method __init__ (line 458) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fastspeech2_conformer/convert_fastspeech2_conformer_original_pytorch_checkpoint_to_pytorch.py function remap_model_yaml_config (line 88) | def remap_model_yaml_config(yaml_config_path): function convert_espnet_state_dict_to_hf (line 104) | def convert_espnet_state_dict_to_hf(state_dict): function convert_FastSpeech2ConformerModel_checkpoint (line 155) | def convert_FastSpeech2ConformerModel_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fastspeech2_conformer/convert_hifigan.py function load_weights (line 30) | def load_weights(checkpoint, hf_model, config): function remap_hifigan_yaml_config (line 62) | def remap_hifigan_yaml_config(yaml_config_path): function convert_hifigan_checkpoint (line 93) | def convert_hifigan_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fastspeech2_conformer/convert_model_with_hifigan.py function convert_FastSpeech2ConformerWithHifiGan_checkpoint (line 42) | def convert_FastSpeech2ConformerWithHifiGan_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py class FastSpeech2ConformerModelOutput (line 38) | class FastSpeech2ConformerModelOutput(ModelOutput): class FastSpeech2ConformerWithHifiGanOutput (line 93) | class FastSpeech2ConformerWithHifiGanOutput(FastSpeech2ConformerModelOut... function length_regulator (line 191) | def length_regulator(encoded_embeddings, duration_labels, speaking_speed... class FastSpeech2ConformerDurationPredictor (line 238) | class FastSpeech2ConformerDurationPredictor(nn.Module): method __init__ (line 252) | def __init__(self, config: FastSpeech2ConformerConfig): method forward (line 270) | def forward(self, encoder_hidden_states): class FastSpeech2ConformerBatchNormConvLayer (line 298) | class FastSpeech2ConformerBatchNormConvLayer(nn.Module): method __init__ (line 299) | def __init__(self, config, layer_id=0): method forward (line 329) | def forward(self, hidden_states): class FastSpeech2ConformerSpeechDecoderPostnet (line 338) | class FastSpeech2ConformerSpeechDecoderPostnet(nn.Module): method __init__ (line 339) | def __init__(self, config): method forward (line 347) | def forward(self, hidden_states: torch.Tensor): class FastSpeech2ConformerPredictorLayer (line 356) | class FastSpeech2ConformerPredictorLayer(nn.Module): method __init__ (line 357) | def __init__(self, input_channels, num_chans, kernel_size, dropout_rate): method forward (line 370) | def forward(self, hidden_states): class FastSpeech2ConformerVariancePredictor (line 384) | class FastSpeech2ConformerVariancePredictor(nn.Module): method __init__ (line 385) | def __init__( method forward (line 411) | def forward(self, encoder_hidden_states, padding_masks=None): class FastSpeech2ConformerVarianceEmbedding (line 437) | class FastSpeech2ConformerVarianceEmbedding(nn.Module): method __init__ (line 438) | def __init__( method forward (line 455) | def forward(self, hidden_states): class FastSpeech2ConformerAttention (line 463) | class FastSpeech2ConformerAttention(nn.Module): method __init__ (line 469) | def __init__(self, config: FastSpeech2ConformerConfig, module_config): method shift_relative_position_tensor (line 490) | def shift_relative_position_tensor(self, pos_tensor): method forward (line 504) | def forward( class FastSpeech2ConformerConvolutionModule (line 575) | class FastSpeech2ConformerConvolutionModule(nn.Module): method __init__ (line 576) | def __init__(self, config: FastSpeech2ConformerConfig, module_config): method forward (line 588) | def forward(self, hidden_states): class FastSpeech2ConformerEncoderLayer (line 618) | class FastSpeech2ConformerEncoderLayer(nn.Module): method __init__ (line 619) | def __init__(self, config: FastSpeech2ConformerConfig, module_config): method forward (line 654) | def forward( class FastSpeech2ConformerMultiLayeredConv1d (line 735) | class FastSpeech2ConformerMultiLayeredConv1d(nn.Module): method __init__ (line 744) | def __init__(self, config: FastSpeech2ConformerConfig, module_config): method forward (line 762) | def forward(self, hidden_states): class FastSpeech2ConformerRelPositionalEncoding (line 781) | class FastSpeech2ConformerRelPositionalEncoding(nn.Module): method __init__ (line 792) | def __init__(self, config: FastSpeech2ConformerConfig, module_config): method extend_pos_enc (line 804) | def extend_pos_enc(self, x): method forward (line 835) | def forward(self, feature_representation): class FastSpeech2ConformerEncoder (line 851) | class FastSpeech2ConformerEncoder(nn.Module): method __init__ (line 864) | def __init__( method forward (line 884) | def forward( class FastSpeech2ConformerLoss (line 951) | class FastSpeech2ConformerLoss(nn.Module): method __init__ (line 952) | def __init__(self, config: FastSpeech2ConformerConfig): method forward (line 971) | def forward( class FastSpeech2ConformerPreTrainedModel (line 1061) | class FastSpeech2ConformerPreTrainedModel(PreTrainedModel): method _init_weights (line 1072) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1090) | def _set_gradient_checkpointing(self, module, value=False): class FastSpeech2ConformerModel (line 1099) | class FastSpeech2ConformerModel(FastSpeech2ConformerPreTrainedModel): method __init__ (line 1109) | def __init__(self, config: FastSpeech2ConformerConfig): method forward (line 1177) | def forward( class HifiGanResidualBlock (line 1383) | class HifiGanResidualBlock(nn.Module): method __init__ (line 1384) | def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5), leaky_... method get_padding (line 1415) | def get_padding(self, kernel_size, dilation=1): method apply_weight_norm (line 1418) | def apply_weight_norm(self): method remove_weight_norm (line 1424) | def remove_weight_norm(self): method forward (line 1430) | def forward(self, hidden_states): class FastSpeech2ConformerHifiGan (line 1446) | class FastSpeech2ConformerHifiGan(PreTrainedModel): method __init__ (line 1450) | def __init__(self, config: FastSpeech2ConformerHifiGanConfig): method _init_weights (line 1488) | def _init_weights(self, module): method apply_weight_norm (line 1495) | def apply_weight_norm(self): method remove_weight_norm (line 1503) | def remove_weight_norm(self): method forward (line 1511) | def forward(self, spectrogram: torch.FloatTensor) -> torch.FloatTensor: class FastSpeech2ConformerWithHifiGan (line 1563) | class FastSpeech2ConformerWithHifiGan(PreTrainedModel): method __init__ (line 1566) | def __init__(self, config: FastSpeech2ConformerWithHifiGanConfig): method forward (line 1577) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fastspeech2_conformer/tokenization_fastspeech2_conformer.py class FastSpeech2ConformerTokenizer (line 32) | class FastSpeech2ConformerTokenizer(PreTrainedTokenizer): method __init__ (line 55) | def __init__( method vocab_size (line 88) | def vocab_size(self): method get_vocab (line 91) | def get_vocab(self): method prepare_for_tokenization (line 95) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _tokenize (line 112) | def _tokenize(self, text): method _convert_token_to_id (line 124) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 128) | def _convert_id_to_token(self, index): method decode (line 133) | def decode(self, token_ids, **kwargs): method convert_tokens_to_string (line 140) | def convert_tokens_to_string(self, tokens, **kwargs): method save_vocabulary (line 146) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 169) | def __getstate__(self): method __setstate__ (line 174) | def __setstate__(self, d): FILE: mplsandbox_for_rl/transformers/src/transformers/models/flaubert/configuration_flaubert.py class FlaubertConfig (line 28) | class FlaubertConfig(PretrainedConfig): method __init__ (line 140) | def __init__( class FlaubertOnnxConfig (line 220) | class FlaubertOnnxConfig(OnnxConfig): method inputs (line 222) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/flaubert/modeling_flaubert.py function create_sinusoidal_embeddings (line 56) | def create_sinusoidal_embeddings(n_pos, dim, out): function get_masks (line 65) | def get_masks(slen, lengths, causal, padding_mask=None): class MultiHeadAttention (line 91) | class MultiHeadAttention(nn.Module): method __init__ (line 94) | def __init__(self, n_heads, dim, config): method prune_heads (line 108) | def prune_heads(self, heads): method forward (line 123) | def forward(self, input, mask, kv=None, cache=None, head_mask=None, ou... class TransformerFFN (line 188) | class TransformerFFN(nn.Module): method __init__ (line 189) | def __init__(self, in_dim, dim_hidden, out_dim, config): method forward (line 198) | def forward(self, input): method ff_chunk (line 201) | def ff_chunk(self, input): class FlaubertPredLayer (line 289) | class FlaubertPredLayer(nn.Module): method __init__ (line 294) | def __init__(self, config): method forward (line 312) | def forward(self, x, y=None): class FlaubertPreTrainedModel (line 332) | class FlaubertPreTrainedModel(PreTrainedModel): method __init__ (line 342) | def __init__(self, *inputs, **kwargs): method dummy_inputs (line 346) | def dummy_inputs(self): method _init_weights (line 355) | def _init_weights(self, module): class FlaubertModel (line 376) | class FlaubertModel(FlaubertPreTrainedModel): method __init__ (line 377) | def __init__(self, config): # , dico, is_encoder, with_output): method get_input_embeddings (line 451) | def get_input_embeddings(self): method set_input_embeddings (line 455) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 459) | def _prune_heads(self, heads_to_prune): method forward (line 473) | def forward( class FlaubertWithLMHeadModel (line 647) | class FlaubertWithLMHeadModel(FlaubertPreTrainedModel): method __init__ (line 650) | def __init__(self, config): method get_output_embeddings (line 658) | def get_output_embeddings(self): method set_output_embeddings (line 661) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 664) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method forward (line 684) | def forward( class FlaubertForSequenceClassification (line 745) | class FlaubertForSequenceClassification(FlaubertPreTrainedModel): method __init__ (line 746) | def __init__(self, config): method forward (line 763) | def forward( class FlaubertForTokenClassification (line 848) | class FlaubertForTokenClassification(FlaubertPreTrainedModel): method __init__ (line 849) | def __init__(self, config): method forward (line 866) | def forward( class FlaubertForQuestionAnsweringSimple (line 933) | class FlaubertForQuestionAnsweringSimple(FlaubertPreTrainedModel): method __init__ (line 934) | def __init__(self, config): method forward (line 949) | def forward( class FlaubertForQuestionAnsweringOutput (line 1039) | class FlaubertForQuestionAnsweringOutput(ModelOutput): class FlaubertForQuestionAnswering (line 1082) | class FlaubertForQuestionAnswering(FlaubertPreTrainedModel): method __init__ (line 1083) | def __init__(self, config): method forward (line 1094) | def forward( class FlaubertForMultipleChoice (line 1204) | class FlaubertForMultipleChoice(FlaubertPreTrainedModel): method __init__ (line 1205) | def __init__(self, config, *inputs, **kwargs): method forward (line 1223) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/flaubert/modeling_tf_flaubert.py function get_masks (line 187) | def get_masks(slen, lengths, causal, padding_mask=None): class TFFlaubertPreTrainedModel (line 216) | class TFFlaubertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 226) | def dummy_inputs(self): class TFFlaubertModel (line 244) | class TFFlaubertModel(TFFlaubertPreTrainedModel): method __init__ (line 245) | def __init__(self, config, *inputs, **kwargs): method call (line 256) | def call( method build (line 290) | def build(self, input_shape=None): class TFFlaubertMultiHeadAttention (line 300) | class TFFlaubertMultiHeadAttention(keras.layers.Layer): method __init__ (line 303) | def __init__(self, n_heads, dim, config, **kwargs): method prune_heads (line 319) | def prune_heads(self, heads): method call (line 322) | def call(self, input, mask, kv, cache, head_mask, output_attentions, t... method build (line 392) | def build(self, input_shape=None): class TFFlaubertTransformerFFN (line 411) | class TFFlaubertTransformerFFN(keras.layers.Layer): method __init__ (line 412) | def __init__(self, in_dim, dim_hidden, out_dim, config, **kwargs): method call (line 422) | def call(self, input, training=False): method build (line 430) | def build(self, input_shape=None): class TFFlaubertMainLayer (line 443) | class TFFlaubertMainLayer(keras.layers.Layer): method __init__ (line 446) | def __init__(self, config, **kwargs): method build (line 493) | def build(self, input_shape=None): method get_input_embeddings (line 531) | def get_input_embeddings(self): method set_input_embeddings (line 534) | def set_input_embeddings(self, value): method call (line 539) | def call( class TFFlaubertPredLayer (line 739) | class TFFlaubertPredLayer(keras.layers.Layer): method __init__ (line 744) | def __init__(self, config, input_embeddings, **kwargs): method build (line 763) | def build(self, input_shape): method get_output_embeddings (line 769) | def get_output_embeddings(self): method set_output_embeddings (line 772) | def set_output_embeddings(self, value): method get_bias (line 776) | def get_bias(self): method set_bias (line 779) | def set_bias(self, value): method call (line 783) | def call(self, hidden_states): class TFFlaubertWithLMHeadModelOutput (line 791) | class TFFlaubertWithLMHeadModelOutput(ModelOutput): class TFFlaubertWithLMHeadModel (line 823) | class TFFlaubertWithLMHeadModel(TFFlaubertPreTrainedModel): method __init__ (line 824) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 831) | def get_lm_head(self): method get_prefix_bias_name (line 834) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 838) | def prepare_inputs_for_generation(self, inputs, **kwargs): method call (line 859) | def call( method build (line 900) | def build(self, input_shape=None): class TFFlaubertForSequenceClassification (line 920) | class TFFlaubertForSequenceClassification(TFFlaubertPreTrainedModel, TFS... method __init__ (line 921) | def __init__(self, config, *inputs, **kwargs): method call (line 935) | def call( method build (line 990) | def build(self, input_shape=None): class TFFlaubertForQuestionAnsweringSimple (line 1010) | class TFFlaubertForQuestionAnsweringSimple(TFFlaubertPreTrainedModel, TF... method __init__ (line 1011) | def __init__(self, config, *inputs, **kwargs): method call (line 1026) | def call( method build (line 1094) | def build(self, input_shape=None): class TFFlaubertForTokenClassification (line 1114) | class TFFlaubertForTokenClassification(TFFlaubertPreTrainedModel, TFToke... method __init__ (line 1115) | def __init__(self, config, *inputs, **kwargs): method call (line 1133) | def call( method build (line 1187) | def build(self, input_shape=None): class TFFlaubertForMultipleChoice (line 1207) | class TFFlaubertForMultipleChoice(TFFlaubertPreTrainedModel, TFMultipleC... method __init__ (line 1208) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1219) | def dummy_inputs(self): method call (line 1246) | def call( method build (line 1321) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/flaubert/tokenization_flaubert.py function convert_to_unicode (line 35) | def convert_to_unicode(text): function get_pairs (line 52) | def get_pairs(word): function replace_unicode_punct (line 66) | def replace_unicode_punct(text): function remove_non_printing_char (line 110) | def remove_non_printing_char(text): class FlaubertTokenizer (line 123) | class FlaubertTokenizer(PreTrainedTokenizer): method __init__ (line 178) | def __init__( method do_lower_case (line 264) | def do_lower_case(self): method moses_punct_norm (line 268) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 277) | def moses_tokenize(self, text, lang): method moses_pipeline (line 286) | def moses_pipeline(self, text, lang): method ja_tokenize (line 293) | def ja_tokenize(self, text): method vocab_size (line 316) | def vocab_size(self): method get_vocab (line 320) | def get_vocab(self): method bpe (line 324) | def bpe(self, token): method preprocess_text (line 368) | def preprocess_text(self, text): method _tokenize (line 378) | def _tokenize(self, text, bypass_tokenizer=False): method _convert_token_to_id (line 416) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 421) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 426) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 432) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 460) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 489) | def create_token_type_ids_from_sequences( method save_vocabulary (line 519) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 548) | def __getstate__(self): method __setstate__ (line 554) | def __setstate__(self, d): FILE: mplsandbox_for_rl/transformers/src/transformers/models/flava/configuration_flava.py class FlavaImageConfig (line 27) | class FlavaImageConfig(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 FlavaTextConfig (line 146) | class FlavaTextConfig(PretrainedConfig): method __init__ (line 220) | def __init__( method from_pretrained (line 258) | 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 379) | class FlavaImageCodebookConfig(PretrainedConfig): method __init__ (line 425) | def __init__( method from_pretrained (line 446) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class FlavaConfig (line 464) | class FlavaConfig(PretrainedConfig): method __init__ (line 536) | def __init__( method from_configs (line 739) | def from_configs( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/flava/image_processing_flava.py class FlavaMaskingGenerator (line 58) | class FlavaMaskingGenerator: method __init__ (line 59) | def __init__( method __repr__ (line 81) | def __repr__(self): method get_shape (line 93) | def get_shape(self): method _mask (line 96) | def _mask(self, mask, max_mask_patches): method __call__ (line 120) | def __call__(self): class FlavaImageProcessor (line 136) | class FlavaImageProcessor(BaseImageProcessor): method __init__ (line 226) | def __init__( method from_dict (line 306) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method masking_generator (line 319) | def masking_generator( method resize (line 338) | def resize( method map_pixels (line 386) | def map_pixels(self, image: np.ndarray) -> np.ndarray: method _preprocess_image (line 389) | def _preprocess_image( method preprocess (line 454) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/flava/modeling_flava.py class FlavaModelOutput (line 66) | class FlavaModelOutput(ModelOutput): method to_tuple (line 96) | def to_tuple(self) -> Tuple[Any]: class FlavaLosses (line 104) | class FlavaLosses(ModelOutput): method all_none (line 131) | def all_none(self) -> bool: class FlavaForPreTrainingOutput (line 141) | class FlavaForPreTrainingOutput(ModelOutput): method to_tuple (line 228) | def to_tuple(self) -> Tuple[Any]: class FlavaImageEmbeddings (line 242) | class FlavaImageEmbeddings(nn.Module): method __init__ (line 247) | def __init__(self, config: FlavaImageConfig, use_mask_token: bool = Fa... method interpolate_pos_encoding (line 264) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 299) | def forward( class PatchEmbeddings (line 335) | class PatchEmbeddings(nn.Module): method __init__ (line 340) | def __init__( method forward (line 359) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class FlavaTextEmbeddings (line 371) | class FlavaTextEmbeddings(nn.Module): method __init__ (line 374) | def __init__(self, config): method forward (line 393) | def forward( class FlavaSelfAttention (line 428) | class FlavaSelfAttention(nn.Module): method __init__ (line 429) | def __init__(self, config: FlavaPossibleConfigs) -> None: method transpose_for_scores (line 447) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 452) | def forward( class FlavaSelfOutput (line 495) | class FlavaSelfOutput(nn.Module): method __init__ (line 501) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 506) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class FlavaAttention (line 513) | class FlavaAttention(nn.Module): method __init__ (line 514) | def __init__(self, config: FlavaPossibleConfigs) -> None: method prune_heads (line 520) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 538) | def forward( class FlavaIntermediate (line 555) | class FlavaIntermediate(nn.Module): method __init__ (line 556) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 565) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FlavaOutput (line 572) | class FlavaOutput(nn.Module): method __init__ (line 573) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 579) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class FlavaLayer (line 588) | class FlavaLayer(nn.Module): method __init__ (line 591) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 603) | def forward( class FlavaEncoder (line 634) | class FlavaEncoder(nn.Module): method __init__ (line 635) | def __init__(self, config: FlavaConfig) -> None: method forward (line 641) | def forward( class FlavaPooler (line 685) | class FlavaPooler(nn.Module): method __init__ (line 686) | def __init__(self, config: FlavaPossibleConfigs): method forward (line 691) | def forward(self, hidden_states: torch.Tensor): class FlavaPreTrainedModel (line 844) | class FlavaPreTrainedModel(PreTrainedModel): method _init_weights (line 854) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class FlavaImageModel (line 875) | class FlavaImageModel(FlavaPreTrainedModel): method __init__ (line 881) | def __init__(self, config: FlavaImageConfig, add_pooling_layer: bool =... method get_input_embeddings (line 894) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 897) | def set_input_embeddings(self, value: nn.Module): method _prune_heads (line 900) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 916) | def forward( class FlavaTextModel (line 974) | class FlavaTextModel(FlavaPreTrainedModel): method __init__ (line 979) | def __init__(self, config: FlavaTextConfig, add_pooling_layer: bool = ... method get_input_embeddings (line 991) | def get_input_embeddings(self) -> PatchEmbeddings: method set_input_embeddings (line 994) | def set_input_embeddings(self, value: nn.Module): method _prune_heads (line 997) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 1011) | def forward( class FlavaMultimodalModel (line 1079) | class FlavaMultimodalModel(FlavaPreTrainedModel): method __init__ (line 1085) | def __init__(self, config: FlavaMultimodalConfig, add_pooling_layer=Tr... method _prune_heads (line 1099) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 1115) | def forward( class FlavaModel (line 1177) | class FlavaModel(FlavaPreTrainedModel): method __init__ (line 1180) | def __init__(self, config: FlavaConfig): method get_text_features (line 1224) | def get_text_features( method get_image_features (line 1268) | def get_image_features( method forward (line 1321) | def forward( class FlavaImageCodebookResPath (line 1446) | class FlavaImageCodebookResPath(nn.Module): method __init__ (line 1447) | def __init__(self, in_size: int, out_size: int, **kwargs): method forward (line 1463) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FlavaImageCodebookBlock (line 1467) | class FlavaImageCodebookBlock(nn.Module): method __init__ (line 1468) | def __init__(self, in_size: int, out_size: int, num_layers: int, **kwa... method forward (line 1480) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FlavaImageCodebookLayerGroup (line 1484) | class FlavaImageCodebookLayerGroup(nn.Module): method __init__ (line 1485) | def __init__(self, num_blocks: int, num_layers: int, in_size: int, out... method forward (line 1499) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FlavaImageCodebook (line 1512) | class FlavaImageCodebook(FlavaPreTrainedModel): method __init__ (line 1518) | def __init__( method get_codebook_indices (line 1562) | def get_codebook_indices(self, pixel_values: torch.Tensor) -> torch.Te... method get_codebook_probs (line 1590) | def get_codebook_probs(self, pixel_values: torch.Tensor) -> torch.Tensor: method forward (line 1594) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class FlavaPredictionHeadTransform (line 1629) | class FlavaPredictionHeadTransform(nn.Module): method __init__ (line 1630) | def __init__(self, config): method forward (line 1639) | def forward(self, hidden_states): class FlavaMaskedPredictionHead (line 1646) | class FlavaMaskedPredictionHead(nn.Module): method __init__ (line 1647) | def __init__(self, config, weight=None): method _tie_weights (line 1659) | def _tie_weights(self): method forward (line 1662) | def forward(self, x): class FlavaITMHead (line 1668) | class FlavaITMHead(nn.Module): method __init__ (line 1669) | def __init__(self, config): method forward (line 1675) | def forward(self, x): class FlavaGlobalContrastiveHead (line 1681) | class FlavaGlobalContrastiveHead(nn.Module): method __init__ (line 1682) | def __init__(self, config): method forward (line 1687) | def forward(self, image_embeddings, text_embeddings, logit_scale): class FlavaForPreTraining (line 1727) | class FlavaForPreTraining(FlavaPreTrainedModel): method __init__ (line 1736) | def __init__(self, config: FlavaConfig, image_codebook: Optional[nn.Mo... method _resize_to_2d (line 1766) | def _resize_to_2d(self, x: torch.Tensor): method forward (line 1775) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/flava/processing_flava.py class FlavaProcessor (line 28) | class FlavaProcessor(ProcessorMixin): method __init__ (line 44) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 63) | def __call__( method batch_decode (line 131) | def batch_decode(self, *args, **kwargs): method decode (line 138) | def decode(self, *args, **kwargs): method model_input_names (line 146) | def model_input_names(self): method feature_extractor_class (line 152) | def feature_extractor_class(self): method feature_extractor (line 160) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/fnet/configuration_fnet.py class FNetConfig (line 24) | class FNetConfig(PretrainedConfig): method __init__ (line 84) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fnet/convert_fnet_original_flax_checkpoint_to_pytorch.py function convert_flax_checkpoint_to_pytorch (line 29) | def convert_flax_checkpoint_to_pytorch(flax_checkpoint_path, fnet_config... FILE: mplsandbox_for_rl/transformers/src/transformers/models/fnet/modeling_fnet.py function _two_dim_matmul (line 64) | def _two_dim_matmul(x, matrix_dim_one, matrix_dim_two): function two_dim_matmul (line 73) | def two_dim_matmul(x, matrix_dim_one, matrix_dim_two): function fftn (line 78) | def fftn(x): class FNetEmbeddings (line 94) | class FNetEmbeddings(nn.Module): method __init__ (line 97) | def __init__(self, config): method forward (line 119) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class FNetBasicFourierTransform (line 155) | class FNetBasicFourierTransform(nn.Module): method __init__ (line 156) | def __init__(self, config): method _init_fourier_transform (line 160) | def _init_fourier_transform(self, config): method forward (line 183) | def forward(self, hidden_states): class FNetBasicOutput (line 193) | class FNetBasicOutput(nn.Module): method __init__ (line 194) | def __init__(self, config): method forward (line 198) | def forward(self, hidden_states, input_tensor): class FNetFourierTransform (line 203) | class FNetFourierTransform(nn.Module): method __init__ (line 204) | def __init__(self, config): method forward (line 209) | def forward(self, hidden_states): class FNetIntermediate (line 217) | class FNetIntermediate(nn.Module): method __init__ (line 218) | def __init__(self, config): method forward (line 226) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FNetOutput (line 233) | class FNetOutput(nn.Module): method __init__ (line 234) | def __init__(self, config): method forward (line 240) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class FNetLayer (line 247) | class FNetLayer(nn.Module): method __init__ (line 248) | def __init__(self, config): method forward (line 256) | def forward(self, hidden_states): method feed_forward_chunk (line 268) | def feed_forward_chunk(self, fourier_output): class FNetEncoder (line 274) | class FNetEncoder(nn.Module): method __init__ (line 275) | def __init__(self, config): method forward (line 281) | def forward(self, hidden_states, output_hidden_states=False, return_di... class FNetPooler (line 305) | class FNetPooler(nn.Module): method __init__ (line 306) | def __init__(self, config): method forward (line 311) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FNetPredictionHeadTransform (line 321) | class FNetPredictionHeadTransform(nn.Module): method __init__ (line 322) | def __init__(self, config): method forward (line 331) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FNetLMPredictionHead (line 338) | class FNetLMPredictionHead(nn.Module): method __init__ (line 339) | def __init__(self, config): method forward (line 350) | def forward(self, hidden_states): method _tie_weights (line 355) | def _tie_weights(self) -> None: class FNetOnlyMLMHead (line 364) | class FNetOnlyMLMHead(nn.Module): method __init__ (line 365) | def __init__(self, config): method forward (line 369) | def forward(self, sequence_output): class FNetOnlyNSPHead (line 375) | class FNetOnlyNSPHead(nn.Module): method __init__ (line 376) | def __init__(self, config): method forward (line 380) | def forward(self, pooled_output): class FNetPreTrainingHeads (line 386) | class FNetPreTrainingHeads(nn.Module): method __init__ (line 387) | def __init__(self, config): method forward (line 392) | def forward(self, sequence_output, pooled_output): class FNetPreTrainedModel (line 398) | class FNetPreTrainedModel(PreTrainedModel): method _init_weights (line 408) | def _init_weights(self, module): class FNetForPreTrainingOutput (line 427) | class FNetForPreTrainingOutput(ModelOutput): class FNetModel (line 502) | class FNetModel(FNetPreTrainedModel): method __init__ (line 510) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 522) | def get_input_embeddings(self): method set_input_embeddings (line 525) | def set_input_embeddings(self, value): method forward (line 534) | def forward( class FNetForPreTraining (line 611) | class FNetForPreTraining(FNetPreTrainedModel): method __init__ (line 614) | def __init__(self, config): method get_output_embeddings (line 623) | def get_output_embeddings(self): method set_output_embeddings (line 626) | def set_output_embeddings(self, new_embeddings): method forward (line 632) | def forward( class FNetForMaskedLM (line 706) | class FNetForMaskedLM(FNetPreTrainedModel): method __init__ (line 709) | def __init__(self, config): method get_output_embeddings (line 718) | def get_output_embeddings(self): method set_output_embeddings (line 721) | def set_output_embeddings(self, new_embeddings): method forward (line 731) | def forward( class FNetForNextSentencePrediction (line 777) | class FNetForNextSentencePrediction(FNetPreTrainedModel): method __init__ (line 778) | def __init__(self, config): method forward (line 789) | def forward( class FNetForSequenceClassification (line 872) | class FNetForSequenceClassification(FNetPreTrainedModel): method __init__ (line 873) | def __init__(self, config): method forward (line 890) | def forward( class FNetForMultipleChoice (line 957) | class FNetForMultipleChoice(FNetPreTrainedModel): method __init__ (line 958) | def __init__(self, config): method forward (line 974) | def forward( class FNetForTokenClassification (line 1036) | class FNetForTokenClassification(FNetPreTrainedModel): method __init__ (line 1037) | def __init__(self, config): method forward (line 1055) | def forward( class FNetForQuestionAnswering (line 1105) | class FNetForQuestionAnswering(FNetPreTrainedModel): method __init__ (line 1106) | def __init__(self, config): method forward (line 1123) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fnet/tokenization_fnet.py class FNetTokenizer (line 35) | class FNetTokenizer(PreTrainedTokenizer): method __init__ (line 90) | def __init__( method vocab_size (line 134) | def vocab_size(self): method get_vocab (line 137) | def get_vocab(self): method __getstate__ (line 142) | def __getstate__(self): method __setstate__ (line 147) | def __setstate__(self, d): method preprocess_text (line 157) | def preprocess_text(self, inputs): method _tokenize (line 172) | def _tokenize(self, text: str) -> List[str]: 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 201) | def convert_tokens_to_string(self, tokens): method _decode (line 220) | def _decode( method build_inputs_with_special_tokens (line 241) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 266) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 294) | def create_token_type_ids_from_sequences( method save_vocabulary (line 323) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/fnet/tokenization_fnet_fast.py class FNetTokenizerFast (line 38) | class FNetTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 77) | def __init__( method can_save_slow_tokenizer (line 117) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 120) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 145) | def create_token_type_ids_from_sequences( method save_vocabulary (line 175) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/focalnet/configuration_focalnet.py class FocalNetConfig (line 25) | class FocalNetConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 108) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/focalnet/modeling_focalnet.py class FocalNetEncoderOutput (line 57) | class FocalNetEncoderOutput(ModelOutput): class FocalNetModelOutput (line 84) | class FocalNetModelOutput(ModelOutput): class FocalNetMaskedImageModelingOutput (line 113) | class FocalNetMaskedImageModelingOutput(ModelOutput): class FocalNetImageClassifierOutput (line 142) | class FocalNetImageClassifierOutput(ModelOutput): class FocalNetEmbeddings (line 170) | class FocalNetEmbeddings(nn.Module): method __init__ (line 175) | def __init__(self, config, use_mask_token=False): method forward (line 193) | def forward( class FocalNetPatchEmbeddings (line 210) | class FocalNetPatchEmbeddings(nn.Module): method __init__ (line 211) | def __init__( method maybe_pad (line 253) | def maybe_pad(self, pixel_values, height, width): method forward (line 262) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... function drop_path (line 282) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class FocalNetDropPath (line 303) | class FocalNetDropPath(nn.Module): method __init__ (line 306) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 310) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 313) | def extra_repr(self) -> str: class FocalNetModulation (line 317) | class FocalNetModulation(nn.Module): method __init__ (line 318) | def __init__(self, config, index, dim, focal_factor=2, bias=True, proj... method forward (line 351) | def forward(self, hidden_state): class FocalNetMlp (line 388) | class FocalNetMlp(nn.Module): method __init__ (line 389) | def __init__(self, config, in_features, hidden_features=None, out_feat... method forward (line 398) | def forward(self, hidden_state): class FocalNetLayer (line 407) | class FocalNetLayer(nn.Module): method __init__ (line 423) | def __init__(self, config, index, dim, input_resolution, drop_path=0.0): method forward (line 455) | def forward(self, hidden_state, input_dimensions): class FocalNetStage (line 476) | class FocalNetStage(nn.Module): method __init__ (line 477) | def __init__(self, config, index, input_resolution): method forward (line 521) | def forward(self, hidden_states: torch.Tensor, input_dimensions: Tuple... class FocalNetEncoder (line 542) | class FocalNetEncoder(nn.Module): method __init__ (line 543) | def __init__(self, config, grid_size): method forward (line 561) | def forward( class FocalNetPreTrainedModel (line 625) | class FocalNetPreTrainedModel(PreTrainedModel): method _init_weights (line 637) | def _init_weights(self, module): class FocalNetModel (line 679) | class FocalNetModel(FocalNetPreTrainedModel): method __init__ (line 680) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 695) | def get_input_embeddings(self): method forward (line 706) | def forward( class FocalNetForMaskedImageModeling (line 769) | class FocalNetForMaskedImageModeling(FocalNetPreTrainedModel): method __init__ (line 770) | def __init__(self, config): method forward (line 789) | def forward( class FocalNetForImageClassification (line 877) | class FocalNetForImageClassification(FocalNetPreTrainedModel): method __init__ (line 879) | def __init__(self, config): method forward (line 900) | def forward( class FocalNetBackbone (line 966) | class FocalNetBackbone(FocalNetPreTrainedModel, BackboneMixin): method __init__ (line 967) | def __init__(self, config: FocalNetConfig): method forward (line 979) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fsmt/configuration_fsmt.py class DecoderConfig (line 24) | class DecoderConfig(PretrainedConfig): method __init__ (line 31) | def __init__(self, vocab_size=0, bos_token_id=0): class FSMTConfig (line 37) | class FSMTConfig(PretrainedConfig): method __init__ (line 138) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/fsmt/modeling_fsmt.py function invert_mask (line 299) | def invert_mask(attention_mask): function triu_onnx (line 305) | def triu_onnx(x, diagonal=0): function _prepare_fsmt_decoder_inputs (line 316) | def _prepare_fsmt_decoder_inputs( class PretrainedFSMTModel (line 342) | class PretrainedFSMTModel(PreTrainedModel): method _init_weights (line 346) | def _init_weights(self, module): method dummy_inputs (line 360) | def dummy_inputs(self): function _make_linear_from_emb (line 370) | def _make_linear_from_emb(emb): function _check_shapes (line 378) | def _check_shapes(shape_1, shape2): function shift_tokens_right (line 383) | def shift_tokens_right(input_ids, pad_token_id): function make_padding_mask (line 396) | def make_padding_mask(input_ids, padding_idx=1): class EncoderLayer (line 407) | class EncoderLayer(nn.Module): method __init__ (line 408) | def __init__(self, config: FSMTConfig): method forward (line 420) | def forward(self, x, encoder_padding_mask, layer_head_mask, output_att... class FSMTEncoder (line 456) | class FSMTEncoder(nn.Module): method __init__ (line 464) | def __init__(self, config: FSMTConfig, embed_tokens): method forward (line 477) | def forward( class DecoderLayer (line 575) | class DecoderLayer(nn.Module): method __init__ (line 576) | def __init__(self, config: FSMTConfig): method forward (line 601) | def forward( class FSMTDecoder (line 663) | class FSMTDecoder(nn.Module): method __init__ (line 672) | def __init__(self, config: FSMTConfig, embed_tokens: nn.Embedding): method _tie_weights (line 695) | def _tie_weights(self): method forward (line 698) | def forward( function _reorder_buffer (line 848) | def _reorder_buffer(attn_cache, new_order): class Attention (line 855) | class Attention(nn.Module): method __init__ (line 858) | def __init__( method _shape (line 881) | def _shape(self, tensor, seq_len, bsz): method forward (line 884) | def forward( method _use_saved_state (line 989) | def _use_saved_state(self, k, v, saved_state, key_padding_mask, static... function fill_with_neg_inf (line 1021) | def fill_with_neg_inf(t): function _get_shape (line 1027) | def _get_shape(t): class FSMTModel (line 1035) | class FSMTModel(PretrainedFSMTModel): method __init__ (line 1038) | def __init__(self, config: FSMTConfig): method get_encoder (line 1051) | def get_encoder(self): method get_decoder (line 1054) | def get_decoder(self): method _tie_weights (line 1057) | def _tie_weights(self): method forward (line 1068) | def forward( method get_input_embeddings (line 1160) | def get_input_embeddings(self): method set_input_embeddings (line 1163) | def set_input_embeddings(self, value): method get_output_embeddings (line 1166) | def get_output_embeddings(self): method set_output_embeddings (line 1169) | def set_output_embeddings(self, value): class FSMTForConditionalGeneration (line 1176) | class FSMTForConditionalGeneration(PretrainedFSMTModel): method __init__ (line 1180) | def __init__(self, config: FSMTConfig): method forward (line 1191) | def forward( method prepare_inputs_for_generation (line 1265) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1289) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1293) | def _reorder_cache(past_key_values, beam_idx): method get_encoder (line 1303) | def get_encoder(self): method get_decoder (line 1306) | def get_decoder(self): method get_output_embeddings (line 1309) | def get_output_embeddings(self): method set_output_embeddings (line 1312) | def set_output_embeddings(self, value): class SinusoidalPositionalEmbedding (line 1316) | class SinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 1327) | def __init__(self, num_positions, embedding_dim, padding_idx): method make_weight (line 1330) | def make_weight(self, num_positions, embedding_dim, padding_idx): method get_embedding (line 1343) | def get_embedding(num_embeddings, embedding_dim, padding_idx): method make_positions (line 1363) | def make_positions(tensor, padding_idx: int): method forward (line 1376) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fsmt/tokenization_fsmt.py function get_pairs (line 36) | def get_pairs(word): function replace_unicode_punct (line 49) | def replace_unicode_punct(text): function remove_non_printing_char (line 92) | def remove_non_printing_char(text): class FSMTTokenizer (line 114) | class FSMTTokenizer(PreTrainedTokenizer): method __init__ (line 163) | def __init__( method get_vocab (line 230) | def get_vocab(self) -> Dict[str, int]: method vocab_size (line 235) | def vocab_size(self) -> int: method moses_punct_norm (line 238) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 244) | def moses_tokenize(self, text, lang): method moses_detokenize (line 252) | def moses_detokenize(self, tokens, lang): method moses_pipeline (line 258) | def moses_pipeline(self, text, lang): method src_vocab_size (line 265) | def src_vocab_size(self): method tgt_vocab_size (line 269) | def tgt_vocab_size(self): method get_src_vocab (line 272) | def get_src_vocab(self): method get_tgt_vocab (line 275) | def get_tgt_vocab(self): method bpe (line 278) | def bpe(self, token): method _tokenize (line 322) | def _tokenize(self, text, lang="en", bypass_tokenizer=False): method _convert_token_to_id (line 361) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 365) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 369) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 379) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 405) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 433) | def create_token_type_ids_from_sequences( method save_vocabulary (line 466) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 502) | def __getstate__(self): method __setstate__ (line 507) | def __setstate__(self, d): FILE: mplsandbox_for_rl/transformers/src/transformers/models/funnel/configuration_funnel.py class FunnelConfig (line 24) | class FunnelConfig(PretrainedConfig): method __init__ (line 89) | def __init__( method num_hidden_layers (line 148) | def num_hidden_layers(self): method num_hidden_layers (line 152) | def num_hidden_layers(self, value): method num_blocks (line 158) | def num_blocks(self): method num_blocks (line 162) | def num_blocks(self, value): FILE: mplsandbox_for_rl/transformers/src/transformers/models/funnel/convert_funnel_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 28) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: mplsandbox_for_rl/transformers/src/transformers/models/funnel/modeling_funnel.py function load_tf_weights_in_funnel (line 56) | def load_tf_weights_in_funnel(model, config, tf_checkpoint_path): class FunnelEmbeddings (line 146) | class FunnelEmbeddings(nn.Module): method __init__ (line 147) | def __init__(self, config: FunnelConfig) -> None: method forward (line 153) | def forward( class FunnelAttentionStructure (line 163) | class FunnelAttentionStructure(nn.Module): method __init__ (line 170) | def __init__(self, config: FunnelConfig) -> None: method init_attention_inputs (line 179) | def init_attention_inputs( method token_type_ids_to_mat (line 199) | def token_type_ids_to_mat(self, token_type_ids: torch.Tensor) -> torch... method get_position_embeds (line 207) | def get_position_embeds( method stride_pool_pos (line 287) | def stride_pool_pos(self, pos_id: torch.Tensor, block_index: int): method relative_pos (line 302) | def relative_pos(self, pos: torch.Tensor, stride: int, pooled_pos=None... method stride_pool (line 316) | def stride_pool( method pool_tensor (line 349) | def pool_tensor( method pre_attention_pooling (line 387) | def pre_attention_pooling( method post_attention_pooling (line 409) | def post_attention_pooling(self, attention_inputs: Tuple[torch.Tensor]... function _relative_shift_gather (line 423) | def _relative_shift_gather(positional_attn: torch.Tensor, context_len: i... class FunnelRelMultiheadAttention (line 439) | class FunnelRelMultiheadAttention(nn.Module): method __init__ (line 440) | def __init__(self, config: FunnelConfig, block_index: int) -> None: method relative_positional_attention (line 463) | def relative_positional_attention(self, position_embeds, q_head, conte... method relative_token_type_attention (line 505) | def relative_token_type_attention(self, token_type_mat, q_head, cls_ma... method forward (line 529) | def forward( class FunnelPositionwiseFFN (line 583) | class FunnelPositionwiseFFN(nn.Module): method __init__ (line 584) | def __init__(self, config: FunnelConfig) -> None: method forward (line 593) | def forward(self, hidden: torch.Tensor) -> torch.Tensor: class FunnelLayer (line 602) | class FunnelLayer(nn.Module): method __init__ (line 603) | def __init__(self, config: FunnelConfig, block_index: int) -> None: method forward (line 608) | def forward( class FunnelEncoder (line 621) | class FunnelEncoder(nn.Module): method __init__ (line 622) | def __init__(self, config: FunnelConfig) -> None: method forward (line 633) | def forward( function upsample (line 684) | def upsample( class FunnelDecoder (line 706) | class FunnelDecoder(nn.Module): method __init__ (line 707) | def __init__(self, config: FunnelConfig) -> None: method forward (line 713) | def forward( class FunnelDiscriminatorPredictions (line 755) | class FunnelDiscriminatorPredictions(nn.Module): method __init__ (line 758) | def __init__(self, config: FunnelConfig) -> None: method forward (line 764) | def forward(self, discriminator_hidden_states: torch.Tensor) -> torch.... class FunnelPreTrainedModel (line 771) | class FunnelPreTrainedModel(PreTrainedModel): method _init_weights (line 781) | def _init_weights(self, module): class FunnelClassificationHead (line 806) | class FunnelClassificationHead(nn.Module): method __init__ (line 807) | def __init__(self, config: FunnelConfig, n_labels: int) -> None: method forward (line 813) | def forward(self, hidden: torch.Tensor) -> torch.Tensor: class FunnelForPreTrainingOutput (line 821) | class FunnelForPreTrainingOutput(ModelOutput): class FunnelBaseModel (line 914) | class FunnelBaseModel(FunnelPreTrainedModel): method __init__ (line 915) | def __init__(self, config: FunnelConfig) -> None: method get_input_embeddings (line 924) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 927) | def set_input_embeddings(self, new_embeddings: nn.Embedding) -> None: method forward (line 936) | def forward( class FunnelModel (line 990) | class FunnelModel(FunnelPreTrainedModel): method __init__ (line 991) | def __init__(self, config: FunnelConfig) -> None: method get_input_embeddings (line 1001) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 1004) | def set_input_embeddings(self, new_embeddings: nn.Embedding) -> None: method forward (line 1013) | def forward( class FunnelForPreTraining (line 1097) | class FunnelForPreTraining(FunnelPreTrainedModel): method __init__ (line 1098) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1108) | def forward( class FunnelForMaskedLM (line 1180) | class FunnelForMaskedLM(FunnelPreTrainedModel): method __init__ (line 1183) | def __init__(self, config: FunnelConfig) -> None: method get_output_embeddings (line 1192) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 1195) | def set_output_embeddings(self, new_embeddings: nn.Embedding) -> None: method forward (line 1205) | def forward( class FunnelForSequenceClassification (line 1261) | class FunnelForSequenceClassification(FunnelPreTrainedModel): method __init__ (line 1262) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1278) | def forward( class FunnelForMultipleChoice (line 1353) | class FunnelForMultipleChoice(FunnelPreTrainedModel): method __init__ (line 1354) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1368) | def forward( class FunnelForTokenClassification (line 1436) | class FunnelForTokenClassification(FunnelPreTrainedModel): method __init__ (line 1437) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1454) | def forward( class FunnelForQuestionAnswering (line 1509) | class FunnelForQuestionAnswering(FunnelPreTrainedModel): method __init__ (line 1510) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1526) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/funnel/modeling_tf_funnel.py class TFFunnelEmbeddings (line 68) | class TFFunnelEmbeddings(keras.layers.Layer): method __init__ (line 71) | def __init__(self, config, **kwargs): method build (line 81) | def build(self, input_shape=None): method call (line 96) | def call(self, input_ids=None, inputs_embeds=None, training=False): class TFFunnelAttentionStructure (line 116) | class TFFunnelAttentionStructure: method __init__ (line 123) | def __init__(self, config): method init_attention_inputs (line 138) | def init_attention_inputs(self, inputs_embeds, attention_mask=None, to... method token_type_ids_to_mat (line 153) | def token_type_ids_to_mat(self, token_type_ids): method get_position_embeds (line 161) | def get_position_embeds(self, seq_len, training=False): method stride_pool_pos (line 244) | def stride_pool_pos(self, pos_id, block_index): method relative_pos (line 259) | def relative_pos(self, pos, stride, pooled_pos=None, shift=1): method stride_pool (line 273) | def stride_pool(self, tensor, axis): method pool_tensor (line 300) | def pool_tensor(self, tensor, mode="mean", stride=2): method pre_attention_pooling (line 328) | def pre_attention_pooling(self, output, attention_inputs): method post_attention_pooling (line 348) | def post_attention_pooling(self, attention_inputs): function _relative_shift_gather (line 362) | def _relative_shift_gather(positional_attn, context_len, shift): class TFFunnelRelMultiheadAttention (line 378) | class TFFunnelRelMultiheadAttention(keras.layers.Layer): method __init__ (line 379) | def __init__(self, config, block_index, **kwargs): method build (line 403) | def build(self, input_shape=None): method relative_positional_attention (line 442) | def relative_positional_attention(self, position_embeds, q_head, conte... method relative_token_type_attention (line 488) | def relative_token_type_attention(self, token_type_mat, q_head, cls_ma... method call (line 515) | def call(self, query, key, value, attention_inputs, output_attentions=... class TFFunnelPositionwiseFFN (line 561) | class TFFunnelPositionwiseFFN(keras.layers.Layer): method __init__ (line 562) | def __init__(self, config, **kwargs): method call (line 573) | def call(self, hidden, training=False): method build (line 581) | def build(self, input_shape=None): class TFFunnelLayer (line 596) | class TFFunnelLayer(keras.layers.Layer): method __init__ (line 597) | def __init__(self, config, block_index, **kwargs): method call (line 602) | def call(self, query, key, value, attention_inputs, output_attentions=... method build (line 609) | def build(self, input_shape=None): class TFFunnelEncoder (line 621) | class TFFunnelEncoder(keras.layers.Layer): method __init__ (line 622) | def __init__(self, config, **kwargs): method call (line 633) | def call( method build (line 690) | def build(self, input_shape=None): function upsample (line 700) | def upsample(x, stride, target_len, separate_cls=True, truncate_seq=False): class TFFunnelDecoder (line 720) | class TFFunnelDecoder(keras.layers.Layer): method __init__ (line 721) | def __init__(self, config, **kwargs): method call (line 729) | def call( method build (line 774) | def build(self, input_shape=None): class TFFunnelBaseLayer (line 785) | class TFFunnelBaseLayer(keras.layers.Layer): method __init__ (line 790) | def __init__(self, config, **kwargs): method get_input_embeddings (line 801) | def get_input_embeddings(self): method set_input_embeddings (line 804) | def set_input_embeddings(self, value): method _prune_heads (line 808) | def _prune_heads(self, heads_to_prune): method call (line 812) | def call( method build (line 853) | def build(self, input_shape=None): class TFFunnelMainLayer (line 866) | class TFFunnelMainLayer(keras.layers.Layer): method __init__ (line 871) | def __init__(self, config, **kwargs): method get_input_embeddings (line 884) | def get_input_embeddings(self): method set_input_embeddings (line 887) | def set_input_embeddings(self, value): method _prune_heads (line 891) | def _prune_heads(self, heads_to_prune): method call (line 895) | def call( method build (line 964) | def build(self, input_shape=None): class TFFunnelDiscriminatorPredictions (line 979) | class TFFunnelDiscriminatorPredictions(keras.layers.Layer): method __init__ (line 982) | def __init__(self, config, **kwargs): method call (line 990) | def call(self, discriminator_hidden_states): method build (line 996) | def build(self, input_shape=None): class TFFunnelMaskedLMHead (line 1008) | class TFFunnelMaskedLMHead(keras.layers.Layer): method __init__ (line 1009) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1015) | def build(self, input_shape): method get_output_embeddings (line 1020) | def get_output_embeddings(self): method set_output_embeddings (line 1023) | def set_output_embeddings(self, value): method get_bias (line 1027) | def get_bias(self): method set_bias (line 1030) | def set_bias(self, value): method call (line 1034) | def call(self, hidden_states, training=False): class TFFunnelClassificationHead (line 1044) | class TFFunnelClassificationHead(keras.layers.Layer): method __init__ (line 1045) | def __init__(self, config, n_labels, **kwargs): method call (line 1053) | def call(self, hidden, training=False): method build (line 1059) | def build(self, input_shape=None): class TFFunnelPreTrainedModel (line 1071) | class TFFunnelPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 1081) | def dummy_inputs(self): class TFFunnelForPreTrainingOutput (line 1087) | class TFFunnelForPreTrainingOutput(ModelOutput): class TFFunnelBaseModel (line 1209) | class TFFunnelBaseModel(TFFunnelPreTrainedModel): method __init__ (line 1210) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1221) | def call( method serving_output (line 1243) | def serving_output(self, output): method build (line 1252) | def build(self, input_shape=None): class TFFunnelModel (line 1265) | class TFFunnelModel(TFFunnelPreTrainedModel): method __init__ (line 1266) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1277) | def call( method serving_output (line 1299) | def serving_output(self, output): method build (line 1308) | def build(self, input_shape=None): class TFFunnelForPreTraining (line 1323) | class TFFunnelForPreTraining(TFFunnelPreTrainedModel): method __init__ (line 1324) | def __init__(self, config: FunnelConfig, **kwargs) -> None: method call (line 1333) | def call( method serving_output (line 1382) | def serving_output(self, output): method build (line 1389) | def build(self, input_shape=None): class TFFunnelForMaskedLM (line 1402) | class TFFunnelForMaskedLM(TFFunnelPreTrainedModel, TFMaskedLanguageModel... method __init__ (line 1403) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method get_lm_head (line 1409) | def get_lm_head(self) -> TFFunnelMaskedLMHead: method get_prefix_bias_name (line 1412) | def get_prefix_bias_name(self) -> str: method call (line 1423) | def call( method serving_output (line 1467) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: method build (line 1472) | def build(self, input_shape=None): class TFFunnelForSequenceClassification (line 1491) | class TFFunnelForSequenceClassification(TFFunnelPreTrainedModel, TFSeque... method __init__ (line 1492) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1506) | def call( method serving_output (line 1551) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... method build (line 1558) | def build(self, input_shape=None): class TFFunnelForMultipleChoice (line 1577) | class TFFunnelForMultipleChoice(TFFunnelPreTrainedModel, TFMultipleChoic... method __init__ (line 1578) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method dummy_inputs (line 1585) | def dummy_inputs(self): method call (line 1595) | def call( method serving_output (line 1657) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... method build (line 1664) | def build(self, input_shape=None): class TFFunnelForTokenClassification (line 1683) | class TFFunnelForTokenClassification(TFFunnelPreTrainedModel, TFTokenCla... method __init__ (line 1684) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1702) | def call( method serving_output (line 1746) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... method build (line 1753) | def build(self, input_shape=None): class TFFunnelForQuestionAnswering (line 1772) | class TFFunnelForQuestionAnswering(TFFunnelPreTrainedModel, TFQuestionAn... method __init__ (line 1773) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1790) | def call( method serving_output (line 1848) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... method build (line 1858) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/funnel/tokenization_funnel.py function load_vocab (line 45) | def load_vocab(vocab_file): function whitespace_tokenize (line 57) | def whitespace_tokenize(text): class FunnelTokenizer (line 66) | class FunnelTokenizer(PreTrainedTokenizer): method __init__ (line 115) | def __init__( method do_lower_case (line 167) | def do_lower_case(self): method vocab_size (line 172) | def vocab_size(self): method get_vocab (line 176) | def get_vocab(self): method _tokenize (line 180) | def _tokenize(self, text, split_special_tokens=False): method _convert_token_to_id (line 196) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 201) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 206) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 212) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 238) | 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: method __init__ (line 341) | def __init__( method tokenize (line 357) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 395) | def _run_strip_accents(self, text): method _run_split_on_punc (line 406) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 428) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 441) | def _is_chinese_char(self, cp): method _clean_text (line 465) | def _clean_text(self, text): class WordpieceTokenizer (line 480) | class WordpieceTokenizer: method __init__ (line 483) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 488) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/funnel/tokenization_funnel_fast.py class FunnelTokenizerFast (line 45) | class FunnelTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 93) | def __init__( method build_inputs_with_special_tokens (line 144) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 168) | def create_token_type_ids_from_sequences( method save_vocabulary (line 198) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/fuyu/configuration_fuyu.py class FuyuConfig (line 27) | class FuyuConfig(PretrainedConfig): method __init__ (line 107) | def __init__( method _rope_scaling_validation (line 191) | def _rope_scaling_validation(self): method vocab_size (line 212) | def vocab_size(self): method vocab_size (line 220) | def vocab_size(self, value): method to_dict (line 223) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/fuyu/convert_fuyu_model_weights_to_hf.py function rename_state_dict (line 75) | def rename_state_dict(state_dict): function convert_fuyu_checkpoint (line 88) | def convert_fuyu_checkpoint(pytorch_dump_folder_path, ada_lib_path, pt_m... function main (line 101) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/fuyu/image_processing_fuyu.py function make_list_of_list_of_images (line 58) | def make_list_of_list_of_images( class FuyuBatchFeature (line 73) | class FuyuBatchFeature(BatchFeature): method convert_to_tensors (line 80) | def convert_to_tensors(self, tensor_type: Optional[Union[str, TensorTy... method to (line 123) | def to(self, *args, **kwargs) -> "BatchFeature": class FuyuImageProcessor (line 182) | class FuyuImageProcessor(BaseImageProcessor): method __init__ (line 236) | def __init__( method resize (line 266) | def resize( method pad_image (line 324) | def pad_image( method preprocess (line 363) | def preprocess( method get_num_patches (line 539) | def get_num_patches(self, image_height: int, image_width: int, patch_s... method patchify_image (line 564) | def patchify_image(self, image: "torch.Tensor", patch_size: Optional[D... method preprocess_with_tokenizer_info (line 590) | def preprocess_with_tokenizer_info( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fuyu/modeling_fuyu.py class FuyuPreTrainedModel (line 56) | class FuyuPreTrainedModel(PreTrainedModel): method _init_weights (line 63) | def _init_weights(self, module): class FuyuForCausalLM (line 148) | class FuyuForCausalLM(FuyuPreTrainedModel): method __init__ (line 149) | def __init__(self, config: FuyuConfig): method get_input_embeddings (line 165) | def get_input_embeddings(self): method set_input_embeddings (line 168) | def set_input_embeddings(self, value): method get_output_embeddings (line 171) | def get_output_embeddings(self): method set_output_embeddings (line 174) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 177) | def set_decoder(self, decoder): method get_decoder (line 180) | def get_decoder(self): method tie_weights (line 183) | def tie_weights(self): method resize_token_embeddings (line 186) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method gather_continuous_embeddings (line 195) | def gather_continuous_embeddings( method forward (line 239) | def forward( method prepare_inputs_for_generation (line 345) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/fuyu/processing_fuyu.py function full_unpacked_stream_to_tensor (line 52) | def full_unpacked_stream_to_tensor( function construct_full_unpacked_stream (line 83) | def construct_full_unpacked_stream( function _replace_string_repr_with_token_tags (line 111) | def _replace_string_repr_with_token_tags(prompt: str) -> str: function _segment_prompt_into_text_token_conversions (line 119) | def _segment_prompt_into_text_token_conversions(prompt: str) -> List: function _transform_coordinates_and_tokenize (line 144) | def _transform_coordinates_and_tokenize(prompt: str, scale_factor: float... function _transform_within_tags (line 176) | def _transform_within_tags(text: str, scale_factor: float, tokenizer) ->... function _tokenize_prompts_with_image_and_batch (line 211) | def _tokenize_prompts_with_image_and_batch( function original_to_transformed_h_coords (line 285) | def original_to_transformed_h_coords(original_coords, scale_h): function original_to_transformed_w_coords (line 290) | def original_to_transformed_w_coords(original_coords, scale_w): function scale_point_to_transformed_image (line 294) | def scale_point_to_transformed_image(x: float, y: float, scale_factor: f... function scale_bbox_to_transformed_image (line 300) | def scale_bbox_to_transformed_image( class FuyuProcessor (line 310) | class FuyuProcessor(ProcessorMixin): method __init__ (line 329) | def __init__(self, image_processor, tokenizer, **kwargs): method _left_pad_inputs_with_attention_mask (line 338) | def _left_pad_inputs_with_attention_mask(self, model_inputs: List[Dict... method get_sample_encoding (line 387) | def get_sample_encoding( method __call__ (line 453) | def __call__( method post_process_box_coordinates (line 575) | def post_process_box_coordinates(self, outputs, target_sizes=None): method batch_decode (line 684) | def batch_decode(self, *args, **kwargs): method decode (line 691) | def decode(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma/configuration_gemma.py class GemmaConfig (line 27) | class GemmaConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma/convert_gemma_weights_to_hf.py function write_model (line 68) | def write_model(save_path, input_base_path, config, safe_serialization=T... function write_tokenizer (line 128) | def write_tokenizer(input_tokenizer_path, save_path, push_to_hub=False): function main (line 139) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma/diff_gemma.py class GemmaConfig (line 46) | class GemmaConfig(PretrainedConfig): method __init__ (line 117) | def __init__( class GemmaRMSNorm (line 167) | class GemmaRMSNorm(nn.Module): method __init__ (line 168) | def __init__(self, dim: int, eps: float = 1e-6): method _norm (line 173) | def _norm(self, x): method forward (line 176) | def forward(self, x): method extra_repr (line 183) | def extra_repr(self): class GemmaRotaryEmbedding (line 190) | class GemmaRotaryEmbedding(nn.Module): method __init__ (line 191) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 201) | def forward(self, x, position_ids, seq_len=None): class GemmaMLP (line 218) | class GemmaMLP(nn.Module): method __init__ (line 219) | def __init__(self, config): method forward (line 238) | def forward(self, x): class GemmaAttention (line 242) | class GemmaAttention(nn.Module): method __init__ (line 245) | def __init__(self, config: GemmaConfig, layer_idx: Optional[int] = None): method forward (line 283) | def forward( class GemmaFlashAttention2 (line 343) | class GemmaFlashAttention2(LlamaFlashAttention2): method forward (line 350) | def forward( class GemmaModel (line 444) | class GemmaModel(LlamaModel): method forward (line 445) | def forward( class GemmaForCausalLM (line 523) | class GemmaForCausalLM(LlamaForCausalLM): method forward (line 524) | def forward( class GemmaForSequenceClassification (line 612) | class GemmaForSequenceClassification(LlamaForSequenceClassification): class GemmaForTokenClassification (line 616) | class GemmaForTokenClassification(LlamaForTokenClassification): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma/modeling_flax_gemma.py function create_sinusoidal_positions (line 125) | def create_sinusoidal_positions(num_pos, dim): function rotate_half (line 135) | def rotate_half(tensor): function apply_rotary_pos_emb (line 144) | def apply_rotary_pos_emb(tensor, sin_pos, cos_pos): class FlaxGemmaRMSNorm (line 148) | class FlaxGemmaRMSNorm(nn.Module): method setup (line 152) | def setup(self): method __call__ (line 156) | def __call__(self, hidden_states): class FlaxGemmaRotaryEmbedding (line 167) | class FlaxGemmaRotaryEmbedding(nn.Module): method setup (line 172) | def setup(self): method __call__ (line 176) | def __call__(self, key, query, position_ids): class FlaxGemmaAttention (line 189) | class FlaxGemmaAttention(nn.Module): method setup (line 195) | def setup(self): method _split_heads (line 226) | def _split_heads(self, hidden_states, num_heads): method _merge_heads (line 229) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 234) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 265) | def __call__( class FlaxGemmaMLP (line 343) | class FlaxGemmaMLP(nn.Module): method setup (line 347) | def setup(self): method __call__ (line 369) | def __call__(self, hidden_states): class FlaxGemmaDecoderLayer (line 378) | class FlaxGemmaDecoderLayer(nn.Module): method setup (line 382) | def setup(self): method __call__ (line 388) | def __call__( class FlaxGemmaPreTrainedModel (line 421) | class FlaxGemmaPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 431) | def __init__( method init_weights (line 443) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 463) | def init_cache(self, batch_size, max_length): method __call__ (line 483) | def __call__( class FlaxGemmaLayerCollection (line 554) | class FlaxGemmaLayerCollection(nn.Module): method setup (line 558) | def setup(self): method __call__ (line 564) | def __call__( class FlaxGemmaModule (line 601) | class FlaxGemmaModule(nn.Module): method setup (line 605) | def setup(self): method __call__ (line 618) | def __call__( class FlaxGemmaModel (line 668) | class FlaxGemmaModel(FlaxGemmaPreTrainedModel): class FlaxGemmaForCausalLMModule (line 682) | class FlaxGemmaForCausalLMModule(nn.Module): method setup (line 686) | def setup(self): method __call__ (line 696) | def __call__( class FlaxGemmaForCausalLM (line 738) | class FlaxGemmaForCausalLM(FlaxGemmaPreTrainedModel): method prepare_inputs_for_generation (line 741) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 762) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma/modeling_gemma.py function _prepare_4d_causal_attention_mask_with_cache_position (line 56) | def _prepare_4d_causal_attention_mask_with_cache_position( class GemmaRMSNorm (line 109) | class GemmaRMSNorm(nn.Module): method __init__ (line 110) | def __init__(self, dim: int, eps: float = 1e-6): method _norm (line 115) | def _norm(self, x): method forward (line 118) | def forward(self, x): method extra_repr (line 125) | def extra_repr(self): class GemmaRotaryEmbedding (line 132) | class GemmaRotaryEmbedding(nn.Module): method __init__ (line 133) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 143) | def forward(self, x, position_ids, seq_len=None): class GemmaMLP (line 160) | class GemmaMLP(nn.Module): method __init__ (line 161) | def __init__(self, config): method forward (line 180) | def forward(self, x): class GemmaLinearScalingRotaryEmbedding (line 184) | class GemmaLinearScalingRotaryEmbedding(GemmaRotaryEmbedding): method forward (line 187) | def forward(self, x, position_ids): class GemmaDynamicNTKScalingRotaryEmbedding (line 194) | class GemmaDynamicNTKScalingRotaryEmbedding(GemmaRotaryEmbedding): method forward (line 197) | def forward(self, x, position_ids): function rotate_half (line 213) | def rotate_half(x): function apply_rotary_pos_emb (line 220) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... function repeat_kv (line 247) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class GemmaAttention (line 259) | class GemmaAttention(nn.Module): method __init__ (line 262) | def __init__(self, config: GemmaConfig, layer_idx: Optional[int] = None): method forward (line 300) | def forward( class GemmaFlashAttention2 (line 359) | class GemmaFlashAttention2(GemmaAttention): method __init__ (line 366) | def __init__(self, *args, **kwargs): method forward (line 374) | def forward( class GemmaSdpaAttention (line 469) | class GemmaSdpaAttention(GemmaAttention): method forward (line 477) | def forward( class GemmaDecoderLayer (line 564) | class GemmaDecoderLayer(nn.Module): method __init__ (line 565) | def __init__(self, config: GemmaConfig, layer_idx: int): method forward (line 575) | def forward( class GemmaPreTrainedModel (line 660) | class GemmaPreTrainedModel(PreTrainedModel): method _init_weights (line 672) | def _init_weights(self, module): class GemmaModel (line 765) | class GemmaModel(GemmaPreTrainedModel): method __init__ (line 773) | def __init__(self, config: GemmaConfig): method get_input_embeddings (line 788) | def get_input_embeddings(self): method set_input_embeddings (line 791) | def set_input_embeddings(self, value): method forward (line 795) | def forward( method _update_causal_mask (line 925) | def _update_causal_mask( class GemmaForCausalLM (line 996) | class GemmaForCausalLM(GemmaPreTrainedModel): method __init__ (line 999) | def __init__(self, config): method get_input_embeddings (line 1008) | def get_input_embeddings(self): method set_input_embeddings (line 1011) | def set_input_embeddings(self, value): method get_output_embeddings (line 1014) | def get_output_embeddings(self): method set_output_embeddings (line 1017) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1020) | def set_decoder(self, decoder): method get_decoder (line 1023) | def get_decoder(self): method forward (line 1028) | def forward( method prepare_inputs_for_generation (line 1115) | def prepare_inputs_for_generation( class GemmaForSequenceClassification (line 1200) | class GemmaForSequenceClassification(GemmaPreTrainedModel): method __init__ (line 1201) | def __init__(self, config): method get_input_embeddings (line 1210) | def get_input_embeddings(self): method set_input_embeddings (line 1213) | def set_input_embeddings(self, value): method forward (line 1217) | def forward( class GemmaForTokenClassification (line 1315) | class GemmaForTokenClassification(GemmaPreTrainedModel): method __init__ (line 1316) | def __init__(self, config): method get_input_embeddings (line 1332) | def get_input_embeddings(self): method set_input_embeddings (line 1335) | def set_input_embeddings(self, value): method forward (line 1339) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma/tokenization_gemma.py class GemmaTokenizer (line 38) | class GemmaTokenizer(PreTrainedTokenizer): method __init__ (line 88) | def __init__( method __getstate__ (line 132) | def __getstate__(self): method __setstate__ (line 139) | def __setstate__(self, d): method vocab_size (line 146) | def vocab_size(self): method get_vocab (line 151) | def get_vocab(self): method _tokenize (line 157) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 164) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 169) | def _convert_id_to_token(self, index): method _decode (line 174) | def _decode( method convert_tokens_to_string (line 203) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 218) | def save_vocabulary(self, save_directory, filename_prefix: Optional[st... method build_inputs_with_special_tokens (line 246) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 258) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 296) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma/tokenization_gemma_fast.py class GemmaTokenizerFast (line 37) | class GemmaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 90) | def __init__( method can_save_slow_tokenizer (line 121) | def can_save_slow_tokenizer(self) -> bool: method update_post_processor (line 125) | def update_post_processor(self): method add_eos_token (line 152) | def add_eos_token(self): method add_bos_token (line 156) | def add_bos_token(self): method add_eos_token (line 160) | def add_eos_token(self, value): method add_bos_token (line 165) | def add_bos_token(self, value): 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(self, token_ids_0, token_ids_1=No... FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma2/configuration_gemma2.py class Gemma2Config (line 25) | class Gemma2Config(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma2/convert_gemma2_weights_to_hf.py function write_model (line 84) | def write_model(save_path, input_base_path, config, safe_serialization=T... function write_tokenizer (line 161) | def write_tokenizer(input_tokenizer_path, save_path, push_to_hub=False): function main (line 172) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma2/diff_gemma2.py class Gemma2Config (line 47) | class Gemma2Config(GemmaConfig): method __init__ (line 50) | def __init__( class Gemma2RMSNorm (line 64) | class Gemma2RMSNorm(GemmaRMSNorm): class Gemma2Attention (line 68) | class Gemma2Attention(GemmaAttention): method __init__ (line 71) | def __init__(self, config: Gemma2Config, layer_idx: Optional[int] = No... class Gemma2FlashAttention2 (line 76) | class Gemma2FlashAttention2(Gemma2Attention): method __init__ (line 83) | def __init__(self, *args, **kwargs): method forward (line 91) | def forward( class Gemma2SdpaAttention (line 180) | class Gemma2SdpaAttention(Gemma2Attention): method forward (line 188) | def forward( class Gemma2DecoderLayer (line 268) | class Gemma2DecoderLayer(GemmaDecoderLayer): method __init__ (line 269) | def __init__(self, config: Gemma2Config, layer_idx: int): method forward (line 277) | def forward( class Gemma2Model (line 328) | class Gemma2Model(GemmaModel): method forward (line 329) | def forward( method _update_causal_mask (line 434) | def _update_causal_mask( class Gemma2ForCausalLM (line 479) | class Gemma2ForCausalLM(GemmaForCausalLM): method forward (line 480) | def forward( class Gemma2ForSequenceClassification (line 573) | class Gemma2ForSequenceClassification(GemmaForSequenceClassification): class Gemma2ForTokenClassification (line 577) | class Gemma2ForTokenClassification(GemmaForTokenClassification): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gemma2/modeling_gemma2.py function _prepare_4d_causal_attention_mask_with_cache_position (line 58) | def _prepare_4d_causal_attention_mask_with_cache_position( class Gemma2RMSNorm (line 110) | class Gemma2RMSNorm(nn.Module): method __init__ (line 111) | def __init__(self, dim: int, eps: float = 1e-6): method _norm (line 116) | def _norm(self, x): method forward (line 119) | def forward(self, x): method extra_repr (line 126) | def extra_repr(self): class Gemma2RotaryEmbedding (line 130) | class Gemma2RotaryEmbedding(nn.Module): method __init__ (line 131) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 141) | def forward(self, x, position_ids, seq_len=None): function rotate_half (line 158) | def rotate_half(x): function apply_rotary_pos_emb (line 165) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... class Gemma2MLP (line 192) | class Gemma2MLP(nn.Module): method __init__ (line 193) | def __init__(self, config): method forward (line 203) | def forward(self, x): function repeat_kv (line 207) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class Gemma2Attention (line 219) | class Gemma2Attention(nn.Module): method __init__ (line 222) | def __init__(self, config: Gemma2Config, layer_idx: Optional[int] = No... method forward (line 261) | def forward( class Gemma2FlashAttention2 (line 329) | class Gemma2FlashAttention2(Gemma2Attention): method __init__ (line 336) | def __init__(self, *args, **kwargs): method forward (line 344) | def forward( class Gemma2SdpaAttention (line 444) | class Gemma2SdpaAttention(Gemma2Attention): method forward (line 452) | def forward( class Gemma2DecoderLayer (line 541) | class Gemma2DecoderLayer(nn.Module): method __init__ (line 542) | def __init__(self, config: Gemma2Config, layer_idx: int): method forward (line 558) | def forward( class Gemma2PreTrainedModel (line 636) | class Gemma2PreTrainedModel(PreTrainedModel): method _init_weights (line 648) | def _init_weights(self, module): class Gemma2Model (line 741) | class Gemma2Model(Gemma2PreTrainedModel): method __init__ (line 749) | def __init__(self, config: Gemma2Config): method get_input_embeddings (line 764) | def get_input_embeddings(self): method set_input_embeddings (line 767) | def set_input_embeddings(self, value): method forward (line 771) | def forward( method _update_causal_mask (line 894) | def _update_causal_mask( class Gemma2ForCausalLM (line 931) | class Gemma2ForCausalLM(Gemma2PreTrainedModel): method __init__ (line 934) | def __init__(self, config): method get_input_embeddings (line 943) | def get_input_embeddings(self): method set_input_embeddings (line 946) | def set_input_embeddings(self, value): method get_output_embeddings (line 949) | def get_output_embeddings(self): method set_output_embeddings (line 952) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 955) | def set_decoder(self, decoder): method get_decoder (line 958) | def get_decoder(self): method forward (line 963) | def forward( method prepare_inputs_for_generation (line 1059) | def prepare_inputs_for_generation( class Gemma2ForSequenceClassification (line 1148) | class Gemma2ForSequenceClassification(Gemma2PreTrainedModel): method __init__ (line 1149) | def __init__(self, config): method get_input_embeddings (line 1158) | def get_input_embeddings(self): method set_input_embeddings (line 1161) | def set_input_embeddings(self, value): method forward (line 1165) | def forward( class Gemma2ForTokenClassification (line 1263) | class Gemma2ForTokenClassification(Gemma2PreTrainedModel): method __init__ (line 1264) | def __init__(self, config): method get_input_embeddings (line 1280) | def get_input_embeddings(self): method set_input_embeddings (line 1283) | def set_input_embeddings(self, value): method forward (line 1287) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/git/configuration_git.py class GitVisionConfig (line 26) | class GitVisionConfig(PretrainedConfig): method __init__ (line 76) | def __init__( method from_pretrained (line 106) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class GitConfig (line 124) | class GitConfig(PretrainedConfig): method __init__ (line 190) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/git/convert_git_to_pytorch.py function get_git_config (line 45) | def get_git_config(model_name): function create_rename_keys (line 70) | def create_rename_keys(config, prefix=""): function rename_key (line 154) | def rename_key(dct, old, new): function read_in_q_k_v (line 160) | def read_in_q_k_v(state_dict, config, prefix=""): function prepare_img (line 184) | def prepare_img(model_name): function prepare_video (line 195) | def prepare_video(): function convert_git_checkpoint (line 233) | def convert_git_checkpoint(model_name, pytorch_dump_folder_path, push_to... FILE: mplsandbox_for_rl/transformers/src/transformers/models/git/modeling_git.py class GitVisionModelOutput (line 51) | class GitVisionModelOutput(ModelOutput): class GitEmbeddings (line 79) | class GitEmbeddings(nn.Module): method __init__ (line 82) | def __init__(self, config): method forward (line 97) | def forward( class GitSelfAttention (line 127) | class GitSelfAttention(nn.Module): method __init__ (line 128) | def __init__(self, config, position_embedding_type=None, layer_idx=None): method transpose_for_scores (line 162) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 167) | def forward( class GitSelfOutput (line 245) | class GitSelfOutput(nn.Module): method __init__ (line 246) | def __init__(self, config): method forward (line 252) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class GitAttention (line 264) | class GitAttention(nn.Module): method __init__ (line 265) | def __init__(self, config, position_embedding_type=None, layer_idx=None): method prune_heads (line 274) | def prune_heads(self, heads): method forward (line 292) | def forward( class GitIntermediate (line 315) | class GitIntermediate(nn.Module): method __init__ (line 316) | def __init__(self, config): method forward (line 324) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class GitOutput (line 331) | class GitOutput(nn.Module): method __init__ (line 332) | def __init__(self, config): method forward (line 338) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class GitLayer (line 345) | class GitLayer(nn.Module): method __init__ (line 346) | def __init__(self, config, layer_idx=None): method forward (line 354) | def forward( method feed_forward_chunk (line 388) | def feed_forward_chunk(self, attention_output): class GitEncoder (line 394) | class GitEncoder(nn.Module): method __init__ (line 395) | def __init__(self, config): method forward (line 401) | def forward( class GitPreTrainedModel (line 489) | class GitPreTrainedModel(PreTrainedModel): method _init_weights (line 501) | def _init_weights(self, module): class GitVisionEmbeddings (line 604) | class GitVisionEmbeddings(nn.Module): method __init__ (line 605) | def __init__(self, config: GitVisionConfig): method forward (line 627) | 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 925) | class GitVisionTransformer(nn.Module): method __init__ (line 927) | def __init__(self, config: GitVisionConfig): method forward (line 939) | def forward( class GitVisionModel (line 987) | class GitVisionModel(GitPreTrainedModel): method __init__ (line 992) | def __init__(self, config: GitVisionConfig): method get_input_embeddings (line 998) | def get_input_embeddings(self) -> nn.Module: method forward (line 1003) | def forward( class GitProjection (line 1041) | class GitProjection(nn.Module): method __init__ (line 1042) | def __init__(self, config: GitConfig): method forward (line 1050) | def forward(self, embeddings: torch.Tensor) -> torch.Tensor: class GitModel (line 1059) | class GitModel(GitPreTrainedModel): method __init__ (line 1060) | def __init__(self, config): method get_input_embeddings (line 1079) | def get_input_embeddings(self): method set_input_embeddings (line 1082) | def set_input_embeddings(self, value): method _prune_heads (line 1085) | def _prune_heads(self, heads_to_prune): method _generate_future_mask (line 1093) | def _generate_future_mask(self, size: int, dtype: torch.dtype, device:... method create_attention_mask (line 1099) | def create_attention_mask(self, tgt, memory, tgt_mask, past_key_values... method forward (line 1151) | def forward( class GitForCausalLM (line 1321) | class GitForCausalLM(GitPreTrainedModel): method __init__ (line 1324) | def __init__(self, config): method get_output_embeddings (line 1333) | def get_output_embeddings(self): method set_output_embeddings (line 1336) | def set_output_embeddings(self, new_embeddings): method forward (line 1341) | def forward( method prepare_inputs_for_generation (line 1534) | def prepare_inputs_for_generation( method _reorder_cache (line 1563) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/git/processing_git.py class GitProcessor (line 23) | class GitProcessor(ProcessorMixin): method __init__ (line 41) | def __init__(self, image_processor, tokenizer): method __call__ (line 45) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 103) | def batch_decode(self, *args, **kwargs): method decode (line 110) | def decode(self, *args, **kwargs): method model_input_names (line 118) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/glpn/configuration_glpn.py class GLPNConfig (line 24) | class GLPNConfig(PretrainedConfig): method __init__ (line 91) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/glpn/convert_glpn_to_pytorch.py function rename_keys (line 33) | def rename_keys(state_dict): function read_in_k_v (line 98) | def read_in_k_v(state_dict, config): function prepare_img (line 117) | def prepare_img(): function convert_glpn_checkpoint (line 125) | def convert_glpn_checkpoint(checkpoint_path, pytorch_dump_folder_path, p... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/glpn/image_processing_glpn.py class GLPNImageProcessor (line 41) | class GLPNImageProcessor(BaseImageProcessor): method __init__ (line 61) | def __init__( method resize (line 75) | def resize( method preprocess (line 126) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/glpn/modeling_glpn.py function drop_path (line 50) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class GLPNDropPath (line 71) | class GLPNDropPath(nn.Module): method __init__ (line 74) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 78) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 81) | def extra_repr(self) -> str: class GLPNOverlapPatchEmbeddings (line 86) | class GLPNOverlapPatchEmbeddings(nn.Module): method __init__ (line 89) | def __init__(self, patch_size, stride, num_channels, hidden_size): method forward (line 101) | def forward(self, pixel_values): class GLPNEfficientSelfAttention (line 112) | class GLPNEfficientSelfAttention(nn.Module): method __init__ (line 116) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method transpose_for_scores (line 143) | def transpose_for_scores(self, hidden_states): method forward (line 148) | def forward( class GLPNSelfOutput (line 194) | class GLPNSelfOutput(nn.Module): method __init__ (line 195) | def __init__(self, config, hidden_size): method forward (line 200) | def forward(self, hidden_states, input_tensor): class GLPNAttention (line 207) | class GLPNAttention(nn.Module): method __init__ (line 208) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method prune_heads (line 219) | def prune_heads(self, heads): method forward (line 237) | def forward(self, hidden_states, height, width, output_attentions=False): class GLPNDWConv (line 246) | class GLPNDWConv(nn.Module): method __init__ (line 247) | def __init__(self, dim=768): method forward (line 251) | def forward(self, hidden_states, height, width): class GLPNMixFFN (line 261) | class GLPNMixFFN(nn.Module): method __init__ (line 262) | def __init__(self, config, in_features, hidden_features=None, out_feat... method forward (line 274) | def forward(self, hidden_states, height, width): class GLPNLayer (line 285) | class GLPNLayer(nn.Module): method __init__ (line 288) | def __init__(self, config, hidden_size, num_attention_heads, drop_path... method forward (line 302) | def forward(self, hidden_states, height, width, output_attentions=False): class GLPNEncoder (line 328) | class GLPNEncoder(nn.Module): method __init__ (line 329) | def __init__(self, config): method forward (line 377) | def forward( class GLPNPreTrainedModel (line 416) | class GLPNPreTrainedModel(PreTrainedModel): method _init_weights (line 428) | def _init_weights(self, module): class GLPNModel (line 478) | class GLPNModel(GLPNPreTrainedModel): method __init__ (line 480) | def __init__(self, config): method _prune_heads (line 490) | def _prune_heads(self, heads_to_prune): method forward (line 507) | def forward( class GLPNSelectiveFeatureFusion (line 538) | class GLPNSelectiveFeatureFusion(nn.Module): method __init__ (line 544) | def __init__(self, in_channel=64): method forward (line 565) | def forward(self, local_features, global_features): class GLPNDecoderStage (line 582) | class GLPNDecoderStage(nn.Module): method __init__ (line 583) | def __init__(self, in_channels, out_channels): method forward (line 590) | def forward(self, hidden_state, residual=None): class GLPNDecoder (line 602) | class GLPNDecoder(nn.Module): method __init__ (line 603) | def __init__(self, config): method forward (line 617) | def forward(self, hidden_states: List[torch.Tensor]) -> List[torch.Ten... class SiLogLoss (line 629) | class SiLogLoss(nn.Module): method __init__ (line 638) | def __init__(self, lambd=0.5): method forward (line 642) | def forward(self, pred, target): class GLPNDepthEstimationHead (line 650) | class GLPNDepthEstimationHead(nn.Module): method __init__ (line 651) | def __init__(self, config): method forward (line 663) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: class GLPNForDepthEstimation (line 679) | class GLPNForDepthEstimation(GLPNPreTrainedModel): method __init__ (line 680) | def __init__(self, config): method forward (line 692) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt2/configuration_gpt2.py class GPT2Config (line 30) | class GPT2Config(PretrainedConfig): method __init__ (line 137) | def __init__( class GPT2OnnxConfig (line 192) | class GPT2OnnxConfig(OnnxConfigWithPast): method __init__ (line 193) | def __init__( method inputs (line 206) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 217) | def num_layers(self) -> int: method num_attention_heads (line 221) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 224) | def generate_dummy_inputs( method default_onnx_opset (line 269) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt2/convert_gpt2_original_tf_checkpoint_to_pytorch.py function convert_gpt2_checkpoint_to_pytorch (line 28) | def convert_gpt2_checkpoint_to_pytorch(gpt2_checkpoint_path, gpt2_config... FILE: mplsandbox_for_rl/transformers/src/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 768) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt2/modeling_gpt2.py function load_tf_weights_in_gpt2 (line 66) | def load_tf_weights_in_gpt2(model, config, gpt2_checkpoint_path): class GPT2Attention (line 122) | class GPT2Attention(nn.Module): method __init__ (line 123) | def __init__(self, config, is_cross_attention=False, layer_idx=None): method prune_heads (line 167) | def prune_heads(self, heads): method _attn (line 182) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method _upcast_and_reordered_attn (line 222) | def _upcast_and_reordered_attn(self, query, key, value, attention_mask... method _split_heads (line 274) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 282) | def _merge_heads(self, tensor, num_heads, attn_head_size): method forward (line 290) | def forward( class GPT2FlashAttention2 (line 344) | class GPT2FlashAttention2(GPT2Attention): method __init__ (line 352) | def __init__(self, *args, **kwargs): method forward (line 360) | def forward( class GPT2SdpaAttention (line 457) | class GPT2SdpaAttention(GPT2Attention): method __init__ (line 464) | def __init__(self, *args, **kwargs): method forward (line 473) | def forward( class GPT2MLP (line 564) | class GPT2MLP(nn.Module): method __init__ (line 565) | def __init__(self, intermediate_size, config): method forward (line 573) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... class GPT2Block (line 584) | class GPT2Block(nn.Module): method __init__ (line 585) | def __init__(self, config, layer_idx=None): method forward (line 601) | def forward( class GPT2PreTrainedModel (line 663) | class GPT2PreTrainedModel(PreTrainedModel): method __init__ (line 679) | def __init__(self, *inputs, **kwargs): method _init_weights (line 682) | def _init_weights(self, module): class GPT2DoubleHeadsModelOutput (line 711) | class GPT2DoubleHeadsModelOutput(ModelOutput): class GPT2Model (line 891) | class GPT2Model(GPT2PreTrainedModel): method __init__ (line 892) | def __init__(self, config): method parallelize (line 914) | def parallelize(self, device_map=None): method deparallelize (line 941) | def deparallelize(self): method get_input_embeddings (line 957) | def get_input_embeddings(self): method set_input_embeddings (line 960) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 963) | def _prune_heads(self, heads_to_prune): method forward (line 976) | def forward( class GPT2LMHeadModel (line 1185) | class GPT2LMHeadModel(GPT2PreTrainedModel): method __init__ (line 1188) | def __init__(self, config): method parallelize (line 1201) | def parallelize(self, device_map=None): method deparallelize (line 1220) | def deparallelize(self): method get_output_embeddings (line 1231) | def get_output_embeddings(self): method set_output_embeddings (line 1234) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 1237) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 1290) | def forward( method _reorder_cache (line 1364) | def _reorder_cache( class GPT2DoubleHeadsModel (line 1387) | class GPT2DoubleHeadsModel(GPT2PreTrainedModel): method __init__ (line 1390) | def __init__(self, config): method parallelize (line 1405) | def parallelize(self, device_map=None): method deparallelize (line 1425) | def deparallelize(self): method get_output_embeddings (line 1437) | def get_output_embeddings(self): method set_output_embeddings (line 1440) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 1443) | def prepare_inputs_for_generation(self, input_ids, inputs_embeds=None,... method forward (line 1491) | def forward( method _reorder_cache (line 1603) | def _reorder_cache( class GPT2ForSequenceClassification (line 1632) | class GPT2ForSequenceClassification(GPT2PreTrainedModel): method __init__ (line 1633) | def __init__(self, config): method forward (line 1652) | def forward( class GPT2ForTokenClassification (line 1758) | class GPT2ForTokenClassification(GPT2PreTrainedModel): method __init__ (line 1759) | def __init__(self, config): method forward (line 1803) | def forward( class GPT2ForQuestionAnswering (line 1869) | class GPT2ForQuestionAnswering(GPT2PreTrainedModel): method __init__ (line 1870) | def __init__(self, config): method forward (line 1890) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt2/modeling_tf_gpt2.py class TFAttention (line 62) | class TFAttention(keras.layers.Layer): method __init__ (line 63) | def __init__(self, nx, config, scale=False, is_cross_attention=False, ... method prune_heads (line 88) | def prune_heads(self, heads): method causal_attention_mask (line 92) | def causal_attention_mask(nd, ns, dtype): method _attn (line 102) | def _attn(self, q, k, v, attention_mask, head_mask, output_attentions,... method merge_heads (line 135) | def merge_heads(self, x): method split_heads (line 141) | def split_heads(self, x): method call (line 147) | def call( method build (line 198) | def build(self, input_shape=None): class TFMLP (line 217) | class TFMLP(keras.layers.Layer): method __init__ (line 218) | def __init__(self, n_state, config, **kwargs): method call (line 228) | def call(self, x, training=False): method build (line 234) | def build(self, input_shape=None): class TFBlock (line 246) | class TFBlock(keras.layers.Layer): method __init__ (line 247) | def __init__(self, config, scale=False, **kwargs): method call (line 264) | def call( method build (line 324) | def build(self, input_shape=None): class TFGPT2MainLayer (line 349) | class TFGPT2MainLayer(keras.layers.Layer): method __init__ (line 352) | def __init__(self, config, *inputs, **kwargs): method get_input_embeddings (line 383) | def get_input_embeddings(self): method set_input_embeddings (line 386) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 389) | def _prune_heads(self, heads_to_prune): method call (line 396) | def call( method build (line 561) | def build(self, input_shape=None): class TFGPT2PreTrainedModel (line 580) | class TFGPT2PreTrainedModel(TFPreTrainedModel): method input_signature (line 592) | def input_signature(self): class TFGPT2DoubleHeadsModelOutput (line 603) | class TFGPT2DoubleHeadsModelOutput(ModelOutput): class TFGPT2Model (line 752) | class TFGPT2Model(TFGPT2PreTrainedModel): method __init__ (line 753) | def __init__(self, config, *inputs, **kwargs): method call (line 764) | def call( method build (line 821) | def build(self, input_shape=None): class TFGPT2LMHeadModel (line 837) | class TFGPT2LMHeadModel(TFGPT2PreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 838) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 842) | def get_output_embeddings(self): method set_output_embeddings (line 845) | def set_output_embeddings(self, value): method prepare_inputs_for_generation (line 848) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 880) | def call( method build (line 961) | def build(self, input_shape=None): class TFGPT2DoubleHeadsModel (line 979) | class TFGPT2DoubleHeadsModel(TFGPT2PreTrainedModel): method __init__ (line 980) | def __init__(self, config, *inputs, **kwargs): method call (line 991) | def call( method input_signature (line 1091) | def input_signature(self): method build (line 1098) | def build(self, input_shape=None): class TFGPT2ForSequenceClassification (line 1125) | class TFGPT2ForSequenceClassification(TFGPT2PreTrainedModel, TFSequenceC... method __init__ (line 1126) | def __init__(self, config, *inputs, **kwargs): method call (line 1145) | def call( method build (line 1226) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt2/tokenization_gpt2.py function bytes_to_unicode (line 37) | def bytes_to_unicode(): function get_pairs (line 61) | def get_pairs(word): class GPT2Tokenizer (line 75) | class GPT2Tokenizer(PreTrainedTokenizer): method __init__ (line 133) | def __init__( method vocab_size (line 181) | def vocab_size(self): method get_vocab (line 184) | def get_vocab(self): method bpe (line 187) | def bpe(self, token): method build_inputs_with_special_tokens (line 229) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 242) | def get_special_tokens_mask( 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 prepare_for_tokenization (line 327) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt2/tokenization_gpt2_fast.py class GPT2TokenizerFast (line 33) | class GPT2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 88) | def __init__( method _batch_encode_plus (line 120) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 129) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 139) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt2/tokenization_gpt2_tf.py class TFGPT2Tokenizer (line 12) | class TFGPT2Tokenizer(keras.layers.Layer): method __init__ (line 28) | def __init__(self, vocab: Dict[str, int], merges: List[str], max_lengt... method from_tokenizer (line 37) | def from_tokenizer(cls, tokenizer: GPT2Tokenizer, *args, **kwargs): method from_pretrained (line 57) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method from_config (line 75) | def from_config(cls, config): method get_config (line 83) | def get_config(self): method call (line 91) | def call(self, x, max_length: int = None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_bigcode/configuration_gpt_bigcode.py class GPTBigCodeConfig (line 24) | class GPTBigCodeConfig(PretrainedConfig): method __init__ (line 97) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py function upcast_masked_softmax (line 60) | def upcast_masked_softmax( function upcast_softmax (line 71) | def upcast_softmax(x: torch.Tensor, scale: float, softmax_dtype: torch.d... function masked_softmax (line 79) | def masked_softmax(x: torch.Tensor, mask: torch.Tensor, mask_value: torc... class GPTBigCodeAttention (line 85) | class GPTBigCodeAttention(nn.Module): method __init__ (line 86) | def __init__(self, config, is_cross_attention=False, layer_idx=None): method _get_mask_value (line 130) | def _get_mask_value(self, device, dtype): method _attn (line 136) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method forward (line 213) | def forward( class GPTBigCodeFlashAttention2 (line 273) | class GPTBigCodeFlashAttention2(GPTBigCodeAttention): method __init__ (line 281) | def __init__(self, *args, **kwargs): method forward (line 289) | def forward( class GPTBigCodeSdpaAttention (line 399) | class GPTBigCodeSdpaAttention(GPTBigCodeAttention): method _attn (line 400) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method forward (line 473) | def forward( class GPTBigCodeMLP (line 543) | class GPTBigCodeMLP(nn.Module): method __init__ (line 544) | def __init__(self, intermediate_size, config): method forward (line 553) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... class GPTBigCodeBlock (line 568) | class GPTBigCodeBlock(nn.Module): method __init__ (line 569) | def __init__(self, config, layer_idx=None): method forward (line 592) | def forward( class GPTBigCodePreTrainedModel (line 657) | class GPTBigCodePreTrainedModel(PreTrainedModel): method __init__ (line 671) | def __init__(self, *inputs, **kwargs): method _init_weights (line 674) | def _init_weights(self, module): class GPTBigCodeModel (line 791) | class GPTBigCodeModel(GPTBigCodePreTrainedModel): method __init__ (line 792) | def __init__(self, config): method get_input_embeddings (line 817) | def get_input_embeddings(self): method set_input_embeddings (line 820) | def set_input_embeddings(self, new_embeddings): method forward (line 829) | def forward( class GPTBigCodeForCausalLM (line 1043) | class GPTBigCodeForCausalLM(GPTBigCodePreTrainedModel): method __init__ (line 1046) | 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_embeddings): method prepare_inputs_for_generation (line 1060) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _get_initial_cache_position (line 1109) | def _get_initial_cache_position(self, input_ids, model_kwargs): method forward (line 1133) | def forward( method _reorder_cache (line 1200) | def _reorder_cache( class GPTBigCodeForSequenceClassification (line 1226) | class GPTBigCodeForSequenceClassification(GPTBigCodePreTrainedModel): method __init__ (line 1227) | def __init__(self, config): method forward (line 1237) | def forward( class GPTBigCodeForTokenClassification (line 1345) | class GPTBigCodeForTokenClassification(GPTBigCodePreTrainedModel): method __init__ (line 1346) | def __init__(self, config): method forward (line 1364) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_neo/configuration_gpt_neo.py class GPTNeoConfig (line 29) | class GPTNeoConfig(PretrainedConfig): method __init__ (line 105) | def __init__( method expand_attention_types_params (line 162) | def expand_attention_types_params(attention_types): function custom_unfold (line 170) | def custom_unfold(input, dimension, size, step): function custom_get_block_length_and_num_blocks (line 192) | def custom_get_block_length_and_num_blocks(seq_length, window_size): class GPTNeoOnnxConfig (line 207) | class GPTNeoOnnxConfig(OnnxConfigWithPast): method inputs (line 209) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_attention_heads (line 220) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 223) | def generate_dummy_inputs( method default_onnx_opset (line 268) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_neo/convert_gpt_neo_mesh_tf_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 27) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/gpt_neo/modeling_gpt_neo.py function _prepare_4d_causal_attention_mask_with_cache_position (line 73) | def _prepare_4d_causal_attention_mask_with_cache_position( function load_tf_weights_in_gpt_neo (line 126) | def load_tf_weights_in_gpt_neo(model, config, gpt_neo_checkpoint_path): class GPTNeoSelfAttention (line 206) | class GPTNeoSelfAttention(nn.Module): method __init__ (line 207) | def __init__(self, config, attention_type, layer_id=None): method _split_heads (line 244) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 252) | def _merge_heads(self, tensor, num_heads, attn_head_size): method _attn (line 260) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method forward (line 292) | def forward( class GPTNeoFlashAttention2 (line 327) | class GPTNeoFlashAttention2(GPTNeoSelfAttention): method __init__ (line 335) | def __init__(self, *args, **kwargs): method forward (line 343) | def forward( class GPTNeoAttention (line 435) | class GPTNeoAttention(nn.Module): method __init__ (line 436) | def __init__(self, config, layer_id=0): method forward (line 452) | def forward( class GPTNeoMLP (line 473) | class GPTNeoMLP(nn.Module): method __init__ (line 474) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 482) | def forward(self, hidden_states): class GPTNeoBlock (line 490) | class GPTNeoBlock(nn.Module): method __init__ (line 491) | def __init__(self, config, layer_id=None): method forward (line 500) | def forward( class GPTNeoPreTrainedModel (line 540) | class GPTNeoPreTrainedModel(PreTrainedModel): method __init__ (line 557) | def __init__(self, *inputs, **kwargs): method _init_weights (line 560) | def _init_weights(self, module): class GPTNeoModel (line 679) | class GPTNeoModel(GPTNeoPreTrainedModel): method __init__ (line 680) | def __init__(self, config): method get_input_embeddings (line 694) | def get_input_embeddings(self): method set_input_embeddings (line 697) | def set_input_embeddings(self, new_embeddings): method forward (line 706) | def forward( method _update_causal_mask (line 841) | def _update_causal_mask( class GPTNeoForCausalLM (line 920) | class GPTNeoForCausalLM(GPTNeoPreTrainedModel): method __init__ (line 923) | def __init__(self, config): method get_output_embeddings (line 931) | def get_output_embeddings(self): method set_output_embeddings (line 934) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 937) | def prepare_inputs_for_generation( method forward (line 1018) | def forward( method _reorder_cache (line 1091) | def _reorder_cache( class GPTNeoForSequenceClassification (line 1120) | class GPTNeoForSequenceClassification(GPTNeoPreTrainedModel): method __init__ (line 1121) | def __init__(self, config): method forward (line 1136) | def forward( class GPTNeoForTokenClassification (line 1241) | class GPTNeoForTokenClassification(GPTNeoPreTrainedModel): method __init__ (line 1242) | def __init__(self, config): method forward (line 1260) | def forward( class GPTNeoForQuestionAnswering (line 1326) | class GPTNeoForQuestionAnswering(GPTNeoPreTrainedModel): method __init__ (line 1327) | def __init__(self, config): method forward (line 1343) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_neox/configuration_gpt_neox.py class GPTNeoXConfig (line 24) | class GPTNeoXConfig(PretrainedConfig): method __init__ (line 105) | def __init__( method _rope_scaling_validation (line 157) | def _rope_scaling_validation(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_neox/modeling_gpt_neox.py function _prepare_4d_causal_attention_mask_with_cache_position (line 57) | def _prepare_4d_causal_attention_mask_with_cache_position( class GPTNeoXPreTrainedModel (line 110) | class GPTNeoXPreTrainedModel(PreTrainedModel): method _init_weights (line 127) | def _init_weights(self, module): class GPTNeoXAttention (line 142) | class GPTNeoXAttention(nn.Module): method __init__ (line 143) | def __init__(self, config, layer_idx=None): method _init_bias (line 172) | def _init_bias(self, max_positions, device=None): method _init_rope (line 183) | def _init_rope(self): method forward (line 208) | def forward( method _split_heads (line 239) | def _split_heads(cls, tensor, num_attention_heads, attn_head_size): method _merge_heads (line 252) | def _merge_heads(cls, tensor, num_attention_heads, attn_head_size): method _attn_projections_and_rope (line 263) | def _attn_projections_and_rope( method _attn (line 320) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): class GPTNeoXFlashAttention2 (line 372) | class GPTNeoXFlashAttention2(GPTNeoXAttention): method __init__ (line 380) | def __init__(self, *args, **kwargs): method forward (line 388) | def forward( class GPTNeoXSdpaAttention (line 474) | class GPTNeoXSdpaAttention(GPTNeoXAttention): method __init__ (line 481) | def __init__(self, config, layer_idx=None): method forward (line 489) | def forward( function attention_mask_func (line 568) | def attention_mask_func(attention_scores, ltor_mask): class GPTNeoXRotaryEmbedding (line 573) | class GPTNeoXRotaryEmbedding(nn.Module): method __init__ (line 575) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 589) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 599) | def forward(self, x, seq_len=None): class GPTNeoXLinearScalingRotaryEmbedding (line 612) | class GPTNeoXLinearScalingRotaryEmbedding(GPTNeoXRotaryEmbedding): method __init__ (line 615) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 619) | def _set_cos_sin_cache(self, seq_len, device, dtype): class GPTNeoXDynamicNTKScalingRotaryEmbedding (line 631) | class GPTNeoXDynamicNTKScalingRotaryEmbedding(GPTNeoXRotaryEmbedding): method __init__ (line 636) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 640) | def _set_cos_sin_cache(self, seq_len, device, dtype): function rotate_half (line 659) | def rotate_half(x): function apply_rotary_pos_emb (line 667) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class GPTNeoXMLP (line 695) | class GPTNeoXMLP(nn.Module): method __init__ (line 696) | def __init__(self, config): method forward (line 702) | def forward(self, hidden_states): class GPTNeoXLayer (line 716) | class GPTNeoXLayer(nn.Module): method __init__ (line 717) | def __init__(self, config, layer_idx): method forward (line 727) | def forward( class GPTNeoXModel (line 853) | class GPTNeoXModel(GPTNeoXPreTrainedModel): method __init__ (line 854) | def __init__(self, config): method get_input_embeddings (line 870) | def get_input_embeddings(self): method set_input_embeddings (line 873) | def set_input_embeddings(self, value): method forward (line 883) | def forward( method _update_causal_mask (line 1012) | def _update_causal_mask( class GPTNeoXForCausalLM (line 1087) | class GPTNeoXForCausalLM(GPTNeoXPreTrainedModel): method __init__ (line 1090) | def __init__(self, config): method get_output_embeddings (line 1099) | def get_output_embeddings(self): method set_output_embeddings (line 1102) | def set_output_embeddings(self, new_embeddings): method forward (line 1107) | def forward( method prepare_inputs_for_generation (line 1191) | def prepare_inputs_for_generation( method _reorder_cache (line 1261) | def _reorder_cache(self, past_key_values, beam_idx): class GPTNeoXForSequenceClassification (line 1286) | class GPTNeoXForSequenceClassification(GPTNeoXPreTrainedModel): method __init__ (line 1287) | def __init__(self, config): method forward (line 1302) | def forward( class GPTNeoXForTokenClassification (line 1399) | class GPTNeoXForTokenClassification(GPTNeoXPreTrainedModel): method __init__ (line 1400) | def __init__(self, config): method forward (line 1418) | def forward( class GPTNeoXForQuestionAnswering (line 1483) | class GPTNeoXForQuestionAnswering(GPTNeoXPreTrainedModel): method __init__ (line 1484) | def __init__(self, config): method forward (line 1500) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_neox/tokenization_gpt_neox_fast.py class GPTNeoXTokenizerFast (line 31) | class GPTNeoXTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 93) | def __init__( method add_eos_token (line 134) | def add_eos_token(self): method add_bos_token (line 138) | def add_bos_token(self): method add_eos_token (line 142) | def add_eos_token(self, value): method add_bos_token (line 147) | def add_bos_token(self, value): method update_post_processor (line 152) | def update_post_processor(self): method get_special_tokens_mask (line 179) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 217) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method save_vocabulary (line 228) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_neox_japanese/configuration_gpt_neox_japanese.py class GPTNeoXJapaneseConfig (line 24) | class GPTNeoXJapaneseConfig(PretrainedConfig): method __init__ (line 83) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_neox_japanese/modeling_gpt_neox_japanese.py class GPTNeoXJapanesePreTrainedModel (line 38) | class GPTNeoXJapanesePreTrainedModel(PreTrainedModel): method _init_weights (line 49) | def _init_weights(self, module): class GPTNeoXJapaneseAttention (line 64) | class GPTNeoXJapaneseAttention(nn.Module): method __init__ (line 65) | def __init__(self, config, use_bias=False): method forward (line 85) | def forward( method _split_heads (line 150) | def _split_heads(cls, tensor, num_attention_heads, attn_head_size): method _merge_heads (line 163) | def _merge_heads(cls, tensor, num_attention_heads, attn_head_size): method _create_causal_mask (line 174) | def _create_causal_mask(self, key_length, query_length): method _attn (line 182) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): class RotaryEmbedding (line 232) | class RotaryEmbedding(nn.Module): method __init__ (line 234) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 248) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 258) | def forward(self, x, seq_len=None): function rotate_half (line 269) | def rotate_half(x): function apply_rotary_pos_emb (line 276) | def apply_rotary_pos_emb(q, k, cos, sin, offset: int = 0): function bias_dropout_add (line 284) | def bias_dropout_add(x: Tensor, bias: Tensor, residual: Optional[Tensor]... class GPTNeoXJapaneseMLP (line 305) | class GPTNeoXJapaneseMLP(nn.Module): method __init__ (line 306) | def __init__(self, config): method forward (line 314) | def forward(self, hidden_states): class GPTNeoXJapaneseLayer (line 321) | class GPTNeoXJapaneseLayer(nn.Module): method __init__ (line 322) | def __init__(self, config, layer_number): method forward (line 332) | def forward( class GPTNeoXJapaneseModel (line 437) | class GPTNeoXJapaneseModel(GPTNeoXJapanesePreTrainedModel): method __init__ (line 438) | def __init__(self, config): method get_input_embeddings (line 451) | def get_input_embeddings(self): method set_input_embeddings (line 454) | def set_input_embeddings(self, value): method forward (line 459) | def forward( class GPTNeoXJapaneseForCausalLM (line 592) | class GPTNeoXJapaneseForCausalLM(GPTNeoXJapanesePreTrainedModel): method __init__ (line 595) | def __init__(self, config): method get_output_embeddings (line 605) | def get_output_embeddings(self): method set_output_embeddings (line 608) | def set_output_embeddings(self, new_embeddings): method forward (line 613) | def forward( method prepare_inputs_for_generation (line 706) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 719) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gpt_neox_japanese/tokenization_gpt_neox_japanese.py function load_vocab_and_emoji (line 34) | def load_vocab_and_emoji(vocab_file, emoji_file): class GPTNeoXJapaneseTokenizer (line 54) | class GPTNeoXJapaneseTokenizer(PreTrainedTokenizer): method __init__ (line 105) | def __init__( method vocab_size (line 141) | def vocab_size(self): method get_vocab (line 145) | def get_vocab(self): method _tokenize (line 148) | def _tokenize(self, text): method _convert_token_to_id (line 151) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 155) | 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 164) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class SubWordJapaneseTokenizer (line 195) | class SubWordJapaneseTokenizer: method __init__ (line 219) | def __init__(self, vocab, ids_to_tokens, emoji): method __len__ (line 240) | def __len__(self): method clean_text (line 243) | def clean_text(self, content): method tokenize (line 255) | def tokenize(self, text, clean=False): method convert_id_to_token (line 322) | def convert_id_to_token(self, index, breakline="\n"): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/gpt_sw3/tokenization_gpt_sw3.py class GPTSw3Tokenizer (line 23) | class GPTSw3Tokenizer(PreTrainedTokenizer): method __init__ (line 88) | def __init__( method __getstate__ (line 152) | def __getstate__(self): method __setstate__ (line 158) | def __setstate__(self, d): method vocab_size (line 170) | def vocab_size(self) -> int: method preprocess_text (line 173) | def preprocess_text(self, text: str) -> str: method _tokenize (line 188) | def _tokenize(self, text: str, **kwargs) -> List[str]: method _convert_token_to_id (line 192) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 196) | def _convert_id_to_token(self, index: int) -> str: method clean_up_tokenization (line 201) | def clean_up_tokenization(out_string: str) -> str: method convert_tokens_to_string (line 205) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method get_vocab (line 228) | def get_vocab(self) -> Dict[str, int]: method save_vocabulary (line 234) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method encode_fast (line 251) | def encode_fast( method decode_fast (line 284) | def decode_fast(self, token_ids: Union[int, List[int]]) -> str: FILE: mplsandbox_for_rl/transformers/src/transformers/models/gptj/configuration_gptj.py class GPTJConfig (line 29) | class GPTJConfig(PretrainedConfig): method __init__ (line 93) | def __init__( class GPTJOnnxConfig (line 138) | class GPTJOnnxConfig(OnnxConfigWithPast): method __init__ (line 139) | def __init__( method inputs (line 152) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 163) | def num_layers(self) -> int: method num_attention_heads (line 167) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 170) | def generate_dummy_inputs( method default_onnx_opset (line 215) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/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 206) | def __call__( class FlaxGPTJMLP (line 295) | class FlaxGPTJMLP(nn.Module): method setup (line 300) | def setup(self): method __call__ (line 310) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxGPTJBlock (line 318) | class FlaxGPTJBlock(nn.Module): method setup (line 322) | def setup(self): method __call__ (line 331) | def __call__( class FlaxGPTJPreTrainedModel (line 359) | class FlaxGPTJPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 369) | def __init__( method init_weights (line 381) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 416) | def init_cache(self, batch_size, max_length): method __call__ (line 436) | def __call__( class FlaxGPTJBlockCollection (line 506) | class FlaxGPTJBlockCollection(nn.Module): method setup (line 510) | def setup(self): method __call__ (line 515) | def __call__( class FlaxGPTJModule (line 552) | class FlaxGPTJModule(nn.Module): method setup (line 556) | def setup(self): method __call__ (line 568) | def __call__( class FlaxGPTJModel (line 617) | class FlaxGPTJModel(FlaxGPTJPreTrainedModel): class FlaxGPTJForCausalLMModule (line 629) | class FlaxGPTJForCausalLMModule(nn.Module): method setup (line 633) | def setup(self): method __call__ (line 641) | def __call__( class FlaxGPTJForCausalLM (line 683) | class FlaxGPTJForCausalLM(FlaxGPTJPreTrainedModel): method prepare_inputs_for_generation (line 686) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 707) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/gptj/modeling_gptj.py function _prepare_4d_causal_attention_mask_with_cache_position (line 61) | def _prepare_4d_causal_attention_mask_with_cache_position( function create_sinusoidal_positions (line 114) | def create_sinusoidal_positions(num_pos: int, dim: int) -> torch.Tensor: function get_embed_positions (line 121) | def get_embed_positions(embed_positions, position_ids): function rotate_every_two (line 125) | def rotate_every_two(x: torch.Tensor) -> torch.Tensor: function apply_rotary_pos_emb (line 132) | def apply_rotary_pos_emb(tensor: torch.Tensor, sin: torch.Tensor, cos: t... class GPTJAttention (line 138) | class GPTJAttention(nn.Module): method __init__ (line 139) | def __init__(self, config, layer_idx=None): method _split_heads (line 174) | def _split_heads(self, tensor, num_attention_heads, attn_head_size, ro... method _merge_heads (line 189) | def _merge_heads(self, tensor, num_attention_heads, attn_head_size): method _attn (line 202) | def _attn( method _get_embed_positions (line 233) | def _get_embed_positions(self, position_ids): method forward (line 240) | def forward( class GPTJFlashAttention2 (line 315) | class GPTJFlashAttention2(GPTJAttention): method __init__ (line 323) | def __init__(self, *args, **kwargs): method forward (line 331) | def forward( class GPTJMLP (line 466) | class GPTJMLP(nn.Module): method __init__ (line 467) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 477) | def forward(self, hidden_states: Optional[torch.FloatTensor]) -> torch... class GPTJBlock (line 485) | class GPTJBlock(nn.Module): method __init__ (line 486) | def __init__(self, config, layer_idx=None): method forward (line 493) | def forward( class GPTJPreTrainedModel (line 530) | class GPTJPreTrainedModel(PreTrainedModel): method __init__ (line 548) | def __init__(self, *inputs, **kwargs): method _init_weights (line 551) | def _init_weights(self, module): class GPTJModel (line 702) | class GPTJModel(GPTJPreTrainedModel): method __init__ (line 703) | def __init__(self, config): method parallelize (line 724) | def parallelize(self, device_map=None): method deparallelize (line 750) | def deparallelize(self): method get_input_embeddings (line 765) | def get_input_embeddings(self): method set_input_embeddings (line 768) | def set_input_embeddings(self, new_embeddings): method forward (line 778) | def forward( method _update_causal_mask (line 936) | def _update_causal_mask( class GPTJForCausalLM (line 1014) | class GPTJForCausalLM(GPTJPreTrainedModel): method __init__ (line 1017) | def __init__(self, config): method parallelize (line 1030) | def parallelize(self, device_map=None): method deparallelize (line 1049) | def deparallelize(self): 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 prepare_inputs_for_generation (line 1067) | def prepare_inputs_for_generation( method forward (line 1149) | def forward( method _reorder_cache (line 1225) | def _reorder_cache( class GPTJForSequenceClassification (line 1254) | class GPTJForSequenceClassification(GPTJPreTrainedModel): method __init__ (line 1255) | def __init__(self, config): method forward (line 1275) | def forward( class GPTJForQuestionAnswering (line 1381) | class GPTJForQuestionAnswering(GPTJPreTrainedModel): method __init__ (line 1382) | def __init__(self, config): method forward (line 1402) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/gptj/modeling_tf_gptj.py function create_sinusoidal_positions (line 59) | def create_sinusoidal_positions(num_pos: int, dim: int) -> tf.Tensor: function rotate_every_two (line 67) | def rotate_every_two(x: tf.Tensor) -> tf.Tensor: function apply_rotary_pos_emb (line 74) | def apply_rotary_pos_emb(tensor: tf.Tensor, sincos: tf.Tensor) -> tf.Ten... class TFGPTJAttention (line 81) | class TFGPTJAttention(keras.layers.Layer): method __init__ (line 82) | def __init__(self, config: GPTJConfig, **kwargs): method get_causal_mask (line 132) | def get_causal_mask(self, key_length, query_length) -> tf.Tensor: method get_masked_bias (line 136) | def get_masked_bias(dtype: tf.DType) -> tf.Tensor: method _split_heads (line 139) | def _split_heads(self, hidden_states: tf.Tensor, rotary: bool) -> tf.T... method _merge_heads (line 153) | def _merge_heads(self, hidden_states: tf.Tensor) -> tf.Tensor: method _attn (line 166) | def _attn( method call (line 203) | def call( method build (line 266) | def build(self, input_shape=None): class TFGPTJMLP (line 284) | class TFGPTJMLP(keras.layers.Layer): method __init__ (line 285) | def __init__(self, intermediate_size: int, config: GPTJConfig, **kwargs): method call (line 301) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 308) | def build(self, input_shape=None): class TFGPTJBlock (line 320) | class TFGPTJBlock(keras.layers.Layer): method __init__ (line 321) | def __init__(self, config: GPTJConfig, **kwargs): method call (line 329) | def call( method build (line 362) | def build(self, input_shape=None): class TFGPTJMainLayer (line 378) | class TFGPTJMainLayer(keras.layers.Layer): method __init__ (line 381) | def __init__(self, config: GPTJConfig, *inputs, **kwargs): method get_input_embeddings (line 403) | def get_input_embeddings(self): method set_input_embeddings (line 406) | def set_input_embeddings(self, value: tf.Tensor): method _prune_heads (line 410) | def _prune_heads(self, heads_to_prune): method call (line 417) | def call( method build (line 545) | def build(self, input_shape=None): class TFGPTJPreTrainedModel (line 561) | class TFGPTJPreTrainedModel(TFPreTrainedModel): class TFGPTJModel (line 682) | class TFGPTJModel(TFGPTJPreTrainedModel): method __init__ (line 683) | def __init__(self, config, *inputs, **kwargs): method call (line 694) | def call( method build (line 732) | def build(self, input_shape=None): class TFGPTJForCausalLM (line 747) | class TFGPTJForCausalLM(TFGPTJPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 748) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 756) | def get_output_embeddings(self): method set_output_embeddings (line 759) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 762) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 794) | def call( method build (line 853) | def build(self, input_shape=None): class TFGPTJForSequenceClassification (line 880) | class TFGPTJForSequenceClassification(TFGPTJPreTrainedModel, TFSequenceC... method __init__ (line 883) | def __init__(self, config, *inputs, **kwargs): method call (line 902) | def call( method build (line 986) | def build(self, input_shape=None): class TFGPTJForQuestionAnswering (line 1005) | class TFGPTJForQuestionAnswering(TFGPTJPreTrainedModel, TFQuestionAnswer... method __init__ (line 1008) | def __init__(self, config, *inputs, **kwargs): method call (line 1024) | def call( method build (line 1089) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/grounding_dino/configuration_grounding_dino.py class GroundingDinoConfig (line 26) | class GroundingDinoConfig(PretrainedConfig): method __init__ (line 154) | def __init__( method num_attention_heads (line 290) | def num_attention_heads(self) -> int: method hidden_size (line 294) | def hidden_size(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/grounding_dino/convert_grounding_dino_to_hf.py function get_grounding_dino_config (line 40) | def get_grounding_dino_config(model_name): function create_rename_keys (line 70) | def create_rename_keys(state_dict, config): function rename_key (line 277) | def rename_key(dct, old, new): function read_in_q_k_v_encoder (line 283) | def read_in_q_k_v_encoder(state_dict, config): function read_in_q_k_v_text_enhancer (line 316) | def read_in_q_k_v_text_enhancer(state_dict, config): function read_in_q_k_v_decoder (line 343) | def read_in_q_k_v_decoder(state_dict, config): function prepare_img (line 381) | def prepare_img(): function preprocess_caption (line 387) | def preprocess_caption(caption: str) -> str: function convert_grounding_dino_checkpoint (line 395) | def convert_grounding_dino_checkpoint(args): FILE: mplsandbox_for_rl/transformers/src/transformers/models/grounding_dino/image_processing_grounding_dino.py class AnnotationFormat (line 86) | class AnnotationFormat(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 135) | def get_resize_output_image_size( function get_image_size_for_max_height_width (line 164) | def get_image_size_for_max_height_width( function get_numpy_to_framework_fn (line 200) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 225) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 239) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 254) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 262) | def get_max_height_width( function make_pixel_mask (line 281) | def make_pixel_mask( function convert_coco_poly_to_mask (line 300) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 335) | def prepare_coco_detection_annotation( function masks_to_boxes (line 396) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 431) | def prepare_coco_panoptic_annotation( function get_segmentation_image (line 473) | def get_segmentation_image( function get_mask_area (line 499) | def get_mask_area(seg_img: np.ndarray, target_size: Tuple[int, int], n_c... function score_labels_from_class_probabilities (line 509) | def score_labels_from_class_probabilities(logits: np.ndarray) -> Tuple[n... function post_process_panoptic_sample (line 518) | def post_process_panoptic_sample( function resize_annotation (line 604) | def resize_annotation( function binary_mask_to_rle (line 656) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 679) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 701) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 730) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 749) | def compute_segments( class GroundingDinoImageProcessor (line 809) | class GroundingDinoImageProcessor(BaseImageProcessor): method __init__ (line 866) | def __init__( method from_dict (line 938) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method prepare_annotation (line 952) | def prepare_annotation( method resize (line 985) | def resize( method resize_annotation (line 1054) | def resize_annotation( method rescale (line 1068) | def rescale( method normalize_annotation (line 1097) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method _update_annotation_for_padded_image (line 1105) | def _update_annotation_for_padded_image( method _pad_image (line 1149) | def _pad_image( method pad (line 1183) | def pad( method preprocess (line 1269) | def preprocess( method post_process_object_detection (line 1535) | def post_process_object_detection( FILE: mplsandbox_for_rl/transformers/src/transformers/models/grounding_dino/modeling_grounding_dino.py function load_cuda_kernels (line 71) | def load_cuda_kernels(): class MultiScaleDeformableAttentionFunction (line 102) | class MultiScaleDeformableAttentionFunction(Function): method forward (line 104) | def forward( method backward (line 129) | def backward(context, grad_output): class GroundingDinoDecoderOutput (line 157) | class GroundingDinoDecoderOutput(ModelOutput): class GroundingDinoEncoderOutput (line 189) | class GroundingDinoEncoderOutput(ModelOutput): class GroundingDinoModelOutput (line 223) | class GroundingDinoModelOutput(ModelOutput): class GroundingDinoObjectDetectionOutput (line 286) | class GroundingDinoObjectDetectionOutput(ModelOutput): class GroundingDinoFrozenBatchNorm2d (line 370) | class GroundingDinoFrozenBatchNorm2d(nn.Module): method __init__ (line 378) | def __init__(self, n): method _load_from_state_dict (line 385) | def _load_from_state_dict( method forward (line 396) | def forward(self, x): function replace_batch_norm (line 410) | def replace_batch_norm(model): class GroundingDinoConvEncoder (line 434) | class GroundingDinoConvEncoder(nn.Module): method __init__ (line 442) | def __init__(self, config): method forward (line 484) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class GroundingDinoConvModel (line 497) | class GroundingDinoConvModel(nn.Module): method __init__ (line 502) | def __init__(self, conv_encoder, position_embedding): method forward (line 507) | def forward(self, pixel_values, pixel_mask): class GroundingDinoSinePositionEmbedding (line 518) | class GroundingDinoSinePositionEmbedding(nn.Module): method __init__ (line 524) | def __init__(self, config): method forward (line 530) | def forward(self, pixel_values, pixel_mask): class GroundingDinoLearnedPositionEmbedding (line 548) | class GroundingDinoLearnedPositionEmbedding(nn.Module): method __init__ (line 553) | def __init__(self, config): method forward (line 560) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 573) | def build_position_encoding(config): function multi_scale_deformable_attention (line 585) | def multi_scale_deformable_attention( class GroundingDinoMultiscaleDeformableAttention (line 625) | class GroundingDinoMultiscaleDeformableAttention(nn.Module): method __init__ (line 630) | def __init__(self, config: GroundingDinoConfig, num_heads: int, n_poin... method _reset_parameters (line 669) | def _reset_parameters(self): method with_pos_embed (line 690) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 693) | def forward( class GroundingDinoTextEnhancerLayer (line 768) | class GroundingDinoTextEnhancerLayer(nn.Module): method __init__ (line 771) | def __init__(self, config): method with_pos_embed (line 788) | def with_pos_embed(self, hidden_state: Tensor, position_embeddings: Op... method forward (line 791) | def forward( class GroundingDinoBiMultiHeadAttention (line 850) | class GroundingDinoBiMultiHeadAttention(nn.Module): method __init__ (line 851) | def __init__(self, config): method _reshape (line 880) | def _reshape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method forward (line 883) | def forward( function drop_path (line 1002) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class GroundingDinoDropPath (line 1023) | class GroundingDinoDropPath(nn.Module): method __init__ (line 1026) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 1030) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 1033) | def extra_repr(self) -> str: class GroundingDinoFusionLayer (line 1037) | class GroundingDinoFusionLayer(nn.Module): method __init__ (line 1038) | def __init__(self, config): method forward (line 1053) | def forward( class GroundingDinoDeformableLayer (line 1100) | class GroundingDinoDeformableLayer(nn.Module): method __init__ (line 1101) | def __init__(self, config: GroundingDinoConfig): method forward (line 1115) | def forward( function get_sine_pos_embed (line 1181) | def get_sine_pos_embed( class GroundingDinoEncoderLayer (line 1217) | class GroundingDinoEncoderLayer(nn.Module): method __init__ (line 1218) | def __init__(self, config) -> None: method get_text_position_embeddings (line 1227) | def get_text_position_embeddings( method forward (line 1249) | def forward( class GroundingDinoMultiheadAttention (line 1295) | class GroundingDinoMultiheadAttention(nn.Module): method __init__ (line 1298) | def __init__(self, config, num_attention_heads=None): method transpose_for_scores (line 1318) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 1323) | def forward( class GroundingDinoDecoderLayer (line 1363) | class GroundingDinoDecoderLayer(nn.Module): method __init__ (line 1364) | def __init__(self, config: GroundingDinoConfig): method with_pos_embed (line 1393) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 1396) | def forward( class GroundingDinoContrastiveEmbedding (line 1479) | class GroundingDinoContrastiveEmbedding(nn.Module): method __init__ (line 1480) | def __init__(self, config): method forward (line 1484) | def forward( class GroundingDinoPreTrainedModel (line 1500) | class GroundingDinoPreTrainedModel(PreTrainedModel): method _init_weights (line 1505) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1550) | def _set_gradient_checkpointing(self, module, value=False): class GroundingDinoEncoder (line 1624) | class GroundingDinoEncoder(GroundingDinoPreTrainedModel): method __init__ (line 1635) | def __init__(self, config: GroundingDinoConfig): method get_reference_points (line 1645) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1675) | def forward( class GroundingDinoDecoder (line 1792) | class GroundingDinoDecoder(GroundingDinoPreTrainedModel): method __init__ (line 1807) | def __init__(self, config: GroundingDinoConfig): method forward (line 1826) | def forward( function generate_masks_with_special_tokens_and_transfer_map (line 2031) | def generate_masks_with_special_tokens_and_transfer_map(input_ids: torch... class GroundingDinoModel (line 2077) | class GroundingDinoModel(GroundingDinoPreTrainedModel): method __init__ (line 2078) | def __init__(self, config: GroundingDinoConfig): method get_encoder (line 2151) | def get_encoder(self): method get_decoder (line 2154) | def get_decoder(self): method freeze_backbone (line 2157) | def freeze_backbone(self): method unfreeze_backbone (line 2161) | def unfreeze_backbone(self): method get_valid_ratio (line 2165) | def get_valid_ratio(self, mask): method generate_encoder_output_proposals (line 2176) | def generate_encoder_output_proposals(self, enc_output, padding_mask, ... method forward (line 2229) | def forward( class GroundingDinoMLPPredictionHead (line 2468) | class GroundingDinoMLPPredictionHead(nn.Module): method __init__ (line 2477) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2483) | def forward(self, x): function _upcast (line 2490) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2499) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2516) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2533) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 2558) | def _max_by_axis(the_list): function dice_loss (line 2568) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 2588) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class NestedTensor (line 2620) | class NestedTensor: method __init__ (line 2621) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2625) | def to(self, device): method decompose (line 2634) | def decompose(self): method __repr__ (line 2637) | def __repr__(self): function nested_tensor_from_tensor_list (line 2642) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): class GroundingDinoHungarianMatcher (line 2660) | class GroundingDinoHungarianMatcher(nn.Module): method __init__ (line 2677) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2688) | def forward(self, outputs, targets): class GroundingDinoLoss (line 2741) | class GroundingDinoLoss(nn.Module): method __init__ (line 2758) | def __init__(self, matcher, num_classes, focal_alpha, losses): method loss_labels (line 2766) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 2801) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2817) | def loss_boxes(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2842) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2849) | def _get_target_permutation_idx(self, indices): method get_loss (line 2855) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2865) | def forward(self, outputs, targets): class GroundingDinoForObjectDetection (line 2926) | class GroundingDinoForObjectDetection(GroundingDinoPreTrainedModel): method __init__ (line 2931) | def __init__(self, config: GroundingDinoConfig): method _set_aux_loss (line 2959) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 2967) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/grounding_dino/processing_grounding_dino.py function get_phrases_from_posmap (line 45) | def get_phrases_from_posmap(posmaps, input_ids): class GroundingDinoImagesKwargs (line 71) | class GroundingDinoImagesKwargs(ImagesKwargs, total=False): class GroundingDinoProcessorKwargs (line 79) | class GroundingDinoProcessorKwargs(ProcessingKwargs, total=False): class GroundingDinoProcessor (line 96) | class GroundingDinoProcessor(ProcessorMixin): method __init__ (line 116) | def __init__(self, image_processor, tokenizer): method __call__ (line 119) | def __call__( method batch_decode (line 161) | def batch_decode(self, *args, **kwargs): method decode (line 169) | def decode(self, *args, **kwargs): method model_input_names (line 178) | def model_input_names(self): method post_process_grounded_object_detection (line 183) | def post_process_grounded_object_detection( FILE: mplsandbox_for_rl/transformers/src/transformers/models/groupvit/configuration_groupvit.py class GroupViTTextConfig (line 34) | class GroupViTTextConfig(PretrainedConfig): method __init__ (line 90) | def __init__( method from_pretrained (line 125) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class GroupViTVisionConfig (line 143) | class GroupViTVisionConfig(PretrainedConfig): method __init__ (line 201) | def __init__( method from_pretrained (line 250) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class GroupViTConfig (line 268) | class GroupViTConfig(PretrainedConfig): method __init__ (line 296) | def __init__( method from_text_vision_configs (line 394) | def from_text_vision_configs(cls, text_config: GroupViTTextConfig, vis... class GroupViTOnnxConfig (line 406) | class GroupViTOnnxConfig(OnnxConfig): method inputs (line 408) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 418) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 429) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 432) | def generate_dummy_inputs( method default_onnx_opset (line 448) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/groupvit/modeling_groupvit.py function contrastive_loss (line 48) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function groupvit_loss (line 53) | def groupvit_loss(similarity: torch.Tensor) -> torch.Tensor: function hard_softmax (line 59) | def hard_softmax(logits: torch.Tensor, dim: int): function gumbel_softmax (line 69) | def gumbel_softmax(logits: torch.Tensor, tau: float = 1, hard: bool = Fa... function resize_attention_map (line 91) | def resize_attention_map(attentions, height, width, align_corners=False): function get_grouping_from_attentions (line 121) | def get_grouping_from_attentions(attentions, hw_shape): class GroupViTCrossAttentionLayer (line 150) | class GroupViTCrossAttentionLayer(nn.Module): method __init__ (line 151) | def __init__(self, config: GroupViTVisionConfig): method forward (line 158) | def forward(self, query, key): class GroupViTAssignAttention (line 166) | class GroupViTAssignAttention(nn.Module): method __init__ (line 167) | def __init__(self, config: GroupViTVisionConfig): method get_attn (line 177) | def get_attn(self, attn, gumbel=True, hard=True): method forward (line 188) | def forward(self, query, key): class GroupViTTokenAssign (line 214) | class GroupViTTokenAssign(nn.Module): method __init__ (line 215) | def __init__(self, config: GroupViTVisionConfig, num_group_token, num_... method project_group_token (line 236) | def project_group_token(self, group_tokens): method forward (line 249) | def forward(self, image_tokens, group_tokens): class GroupViTModelOutput (line 270) | class GroupViTModelOutput(ModelOutput): method to_tuple (line 313) | def to_tuple(self) -> Tuple[Any]: class GroupViTPatchEmbeddings (line 320) | class GroupViTPatchEmbeddings(nn.Module): method __init__ (line 325) | def __init__( method forward (line 342) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class GroupViTVisionEmbeddings (line 354) | class GroupViTVisionEmbeddings(nn.Module): method __init__ (line 355) | def __init__(self, config: GroupViTVisionConfig): method interpolate_pos_encoding (line 370) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 404) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class GroupViTTextEmbeddings (line 424) | class GroupViTTextEmbeddings(nn.Module): method __init__ (line 425) | def __init__(self, config: GroupViTTextConfig): method forward (line 437) | def forward( class GroupViTStage (line 457) | class GroupViTStage(nn.Module): method __init__ (line 460) | def __init__( method with_group_token (line 495) | def with_group_token(self): method split_x (line 498) | def split_x(self, x): method concat_x (line 504) | def concat_x(self, x: torch.Tensor, group_token: Optional[torch.Tensor... method forward (line 509) | def forward( class GroupViTMLP (line 551) | class GroupViTMLP(nn.Module): method __init__ (line 552) | def __init__( method forward (line 568) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class GroupViTMixerMLP (line 575) | class GroupViTMixerMLP(GroupViTMLP): method forward (line 576) | def forward(self, x): class GroupViTAttention (line 581) | class GroupViTAttention(nn.Module): method __init__ (line 584) | def __init__(self, config): method _shape (line 603) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 606) | def forward( class GroupViTEncoderLayer (line 692) | class GroupViTEncoderLayer(nn.Module): method __init__ (line 693) | def __init__(self, config: GroupViTConfig): method forward (line 701) | def forward( class GroupViTPreTrainedModel (line 742) | class GroupViTPreTrainedModel(PreTrainedModel): method _init_weights (line 752) | def _init_weights(self, module): class GroupViTVisionEncoder (line 882) | class GroupViTVisionEncoder(nn.Module): method __init__ (line 883) | def __init__(self, config: GroupViTVisionConfig) -> None: method forward (line 900) | def forward( class GroupViTTextEncoder (line 940) | class GroupViTTextEncoder(nn.Module): method __init__ (line 949) | def __init__(self, config: GroupViTTextConfig): method forward (line 955) | def forward( class GroupViTTextTransformer (line 1037) | class GroupViTTextTransformer(nn.Module): method __init__ (line 1038) | def __init__(self, config: GroupViTTextConfig): method forward (line 1051) | def forward( class GroupViTTextModel (line 1134) | class GroupViTTextModel(GroupViTPreTrainedModel): method __init__ (line 1137) | def __init__(self, config: GroupViTTextConfig): method get_input_embeddings (line 1143) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1146) | def set_input_embeddings(self, value): method forward (line 1151) | def forward( class GroupViTVisionTransformer (line 1187) | class GroupViTVisionTransformer(nn.Module): method __init__ (line 1188) | def __init__(self, config: GroupViTVisionConfig): method forward (line 1199) | def forward( class GroupViTVisionModel (line 1245) | class GroupViTVisionModel(GroupViTPreTrainedModel): method __init__ (line 1249) | def __init__(self, config: GroupViTVisionConfig): method get_input_embeddings (line 1255) | def get_input_embeddings(self) -> GroupViTPatchEmbeddings: method forward (line 1260) | def forward( class GroupViTModel (line 1298) | class GroupViTModel(GroupViTPreTrainedModel): method __init__ (line 1301) | def __init__(self, config: GroupViTConfig): method get_text_features (line 1345) | def get_text_features( method get_image_features (line 1392) | def get_image_features( method forward (line 1442) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/groupvit/modeling_tf_groupvit.py function _expand_mask (line 82) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): function contrastive_loss (line 97) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function groupvit_loss (line 106) | def groupvit_loss(similarity: tf.Tensor) -> tf.Tensor: function hard_softmax (line 112) | def hard_softmax(logits: tf.Tensor, dim: int) -> tf.Tensor: function gumbel_softmax (line 129) | def gumbel_softmax(logits: tf.Tensor, tau: float = 1, hard: bool = False... function resize_attention_map (line 154) | def resize_attention_map(attentions: tf.Tensor, height: int, width: int,... function get_grouping_from_attentions (line 192) | def get_grouping_from_attentions(attentions: Tuple[tf.Tensor], hw_shape:... class TFGroupViTModelOutput (line 221) | class TFGroupViTModelOutput(ModelOutput): method to_tuple (line 264) | def to_tuple(self) -> Tuple[Any]: class TFGroupViTCrossAttentionLayer (line 271) | class TFGroupViTCrossAttentionLayer(keras.layers.Layer): method __init__ (line 272) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method call (line 280) | def call(self, query: tf.Tensor, key: tf.Tensor, training: bool = Fals... method build (line 287) | def build(self, input_shape=None): class TFGroupViTAssignAttention (line 305) | class TFGroupViTAssignAttention(keras.layers.Layer): method __init__ (line 306) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method get_attn (line 317) | def get_attn(self, attn: tf.Tensor, gumbel: bool = True, hard: bool = ... method call (line 328) | def call(self, query: tf.Tensor, key: tf.Tensor, training: bool = False): method build (line 353) | def build(self, input_shape=None): class TFGroupViTTokenAssign (line 371) | class TFGroupViTTokenAssign(keras.layers.Layer): method __init__ (line 372) | def __init__(self, config: GroupViTVisionConfig, num_group_token: int,... method project_group_token (line 396) | def project_group_token(self, group_tokens: tf.Tensor) -> tf.Tensor: method call (line 409) | def call(self, image_tokens: tf.Tensor, group_tokens: tf.Tensor, train... method build (line 428) | def build(self, input_shape=None): class TFGroupViTPatchEmbeddings (line 459) | class TFGroupViTPatchEmbeddings(keras.layers.Layer): method __init__ (line 466) | def __init__(self, config: GroupViTConfig, **kwargs): method call (line 494) | def call( method build (line 528) | def build(self, input_shape=None): class TFGroupViTVisionEmbeddings (line 538) | class TFGroupViTVisionEmbeddings(keras.layers.Layer): method __init__ (line 544) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method build (line 552) | def build(self, input_shape=None): method interpolate_pos_encoding (line 574) | def interpolate_pos_encoding(self, embeddings, height, width) -> tf.Te... method call (line 601) | def call( class TFGroupViTTextEmbeddings (line 620) | class TFGroupViTTextEmbeddings(keras.layers.Layer): method __init__ (line 621) | def __init__(self, config: GroupViTTextConfig, **kwargs): method build (line 628) | def build(self, input_shape: tf.TensorShape = None): method call (line 647) | def call( class TFGroupViTStage (line 678) | class TFGroupViTStage(keras.layers.Layer): method __init__ (line 681) | def __init__( method build (line 716) | def build(self, input_shape=None): method with_group_token (line 744) | def with_group_token(self): method split_x (line 747) | def split_x(self, x: tf.Tensor) -> tf.Tensor: method concat_x (line 753) | def concat_x(self, x: tf.Tensor, group_token: tf.Tensor | None = None)... method call (line 758) | def call( class TFGroupViTMLP (line 808) | class TFGroupViTMLP(keras.layers.Layer): method __init__ (line 809) | def __init__( method call (line 828) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 834) | def build(self, input_shape=None): class TFGroupViTMixerMLP (line 846) | class TFGroupViTMixerMLP(TFGroupViTMLP): method call (line 847) | def call(self, x, training: bool = False): class TFGroupViTAttention (line 853) | class TFGroupViTAttention(keras.layers.Layer): method __init__ (line 856) | def __init__(self, config: GroupViTConfig, **kwargs): method transpose_for_scores (line 891) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 898) | def call( method build (line 959) | def build(self, input_shape=None): class TFGroupViTEncoderLayer (line 978) | class TFGroupViTEncoderLayer(keras.layers.Layer): method __init__ (line 979) | def __init__(self, config: GroupViTConfig, **kwargs): method call (line 988) | def call( method build (line 1029) | def build(self, input_shape=None): class TFGroupViTTextEncoder (line 1048) | class TFGroupViTTextEncoder(keras.layers.Layer): method __init__ (line 1049) | def __init__(self, config: GroupViTTextConfig, **kwargs): method call (line 1054) | def call( method build (line 1091) | def build(self, input_shape=None): class TFGroupViTVisionEncoder (line 1101) | class TFGroupViTVisionEncoder(keras.layers.Layer): method __init__ (line 1102) | def __init__(self, config: GroupViTVisionConfig, **kwargs) -> None: method call (line 1117) | def call( method build (line 1151) | def build(self, input_shape=None): class TFGroupViTTextTransformer (line 1162) | class TFGroupViTTextTransformer(keras.layers.Layer): method __init__ (line 1163) | def __init__(self, config: GroupViTTextConfig, **kwargs): method call (line 1174) | def call( method _build_causal_attention_mask (line 1245) | def _build_causal_attention_mask(self, batch_size, seq_length, dtype=t... method build (line 1263) | def build(self, input_shape=None): class TFGroupViTVisionTransformer (line 1279) | class TFGroupViTVisionTransformer(keras.layers.Layer): method __init__ (line 1280) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method call (line 1288) | def call( method build (line 1321) | def build(self, input_shape=None): class TFGroupViTTextMainLayer (line 1338) | class TFGroupViTTextMainLayer(keras.layers.Layer): method __init__ (line 1341) | def __init__(self, config: GroupViTTextConfig, **kwargs): method get_input_embeddings (line 1346) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 1349) | def set_input_embeddings(self, value: tf.Variable): method call (line 1354) | def call( method build (line 1384) | def build(self, input_shape=None): class TFGroupViTVisionMainLayer (line 1395) | class TFGroupViTVisionMainLayer(keras.layers.Layer): method __init__ (line 1398) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method get_input_embeddings (line 1403) | def get_input_embeddings(self) -> keras.layers.Layer: method call (line 1407) | def call( method build (line 1428) | def build(self, input_shape=None): class TFGroupViTMainLayer (line 1439) | class TFGroupViTMainLayer(keras.layers.Layer): method __init__ (line 1442) | def __init__(self, config: GroupViTConfig, **kwargs): method build (line 1483) | def build(self, input_shape=None): method get_text_features (line 1516) | def get_text_features( method get_image_features (line 1552) | def get_image_features( method call (line 1579) | def call( class TFGroupViTPreTrainedModel (line 1706) | class TFGroupViTPreTrainedModel(TFPreTrainedModel): class TFGroupViTTextModel (line 1853) | class TFGroupViTTextModel(TFGroupViTPreTrainedModel): method __init__ (line 1857) | def __init__(self, config: GroupViTTextConfig, *inputs, **kwargs): method call (line 1865) | def call( method build (line 1905) | def build(self, input_shape=None): class TFGroupViTVisionModel (line 1914) | class TFGroupViTVisionModel(TFGroupViTPreTrainedModel): method __init__ (line 1918) | def __init__(self, config: GroupViTVisionConfig, *inputs, **kwargs): method call (line 1926) | def call( method build (line 1967) | def build(self, input_shape=None): class TFGroupViTModel (line 1977) | class TFGroupViTModel(TFGroupViTPreTrainedModel): method __init__ (line 1980) | def __init__(self, config: GroupViTConfig, *inputs, **kwargs): method get_text_features (line 1987) | def get_text_features( method get_image_features (line 2028) | def get_image_features( method call (line 2072) | def call( method serving_output (line 2126) | def serving_output(self, output: TFGroupViTModelOutput) -> TFGroupViTM... method build (line 2132) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/herbert/tokenization_herbert.py function get_pairs (line 34) | def get_pairs(word): function replace_unicode_punct (line 48) | def replace_unicode_punct(text): function remove_non_printing_char (line 92) | def remove_non_printing_char(text): function whitespace_tokenize (line 106) | def whitespace_tokenize(text): class BasicTokenizer (line 116) | class BasicTokenizer: method __init__ (line 139) | def __init__( method tokenize (line 155) | 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 294) | def __init__( method do_lower_case (line 380) | def do_lower_case(self): method moses_punct_norm (line 384) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 393) | def moses_tokenize(self, text, lang): method moses_pipeline (line 402) | def moses_pipeline(self, text, lang): method ja_tokenize (line 409) | def ja_tokenize(self, text): method vocab_size (line 432) | def vocab_size(self): method get_vocab (line 436) | def get_vocab(self): method bpe (line 440) | def bpe(self, token): method _tokenize (line 484) | def _tokenize(self, text): method _convert_token_to_id (line 495) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 500) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 505) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 511) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 539) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 568) | def create_token_type_ids_from_sequences( method save_vocabulary (line 598) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 627) | def __getstate__(self): method __setstate__ (line 633) | def __setstate__(self, d): FILE: mplsandbox_for_rl/transformers/src/transformers/models/herbert/tokenization_herbert_fast.py class HerbertTokenizerFast (line 28) | class HerbertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 50) | def __init__( method build_inputs_with_special_tokens (line 74) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 101) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 128) | def create_token_type_ids_from_sequences( method save_vocabulary (line 156) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/hiera/configuration_hiera.py class HieraConfig (line 25) | class HieraConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 118) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/hiera/convert_hiera_to_hf.py function create_rename_keys (line 41) | def create_rename_keys(config: HieraConfig, base_model: bool, mae_model:... function remove_classification_head_ (line 141) | def remove_classification_head_(state_dict): function rename_key (line 147) | def rename_key(dct, old, new): function prepare_img (line 153) | def prepare_img(): function get_labels_for_classifier (line 159) | def get_labels_for_classifier(model_name: str) -> Tuple[Dict[int, str], ... function get_hiera_config (line 172) | def get_hiera_config(model_name: str, base_model: bool, mae_model: bool)... function convert_hiera_checkpoint (line 207) | def convert_hiera_checkpoint(args): FILE: mplsandbox_for_rl/transformers/src/transformers/models/hiera/modeling_hiera.py class HieraEncoderOutput (line 61) | class HieraEncoderOutput(ModelOutput): class HieraModelOutput (line 94) | class HieraModelOutput(ModelOutput): class HieraForImageClassificationOutput (line 136) | class HieraForImageClassificationOutput(ImageClassifierOutput): class HieraForPreTrainingOutput (line 172) | class HieraForPreTrainingOutput(ModelOutput): class HieraPatchEmbeddings (line 208) | class HieraPatchEmbeddings(nn.Module): method __init__ (line 215) | def __init__(self, config, is_mae: bool = False): method masked_conv (line 236) | def masked_conv( method random_masking (line 253) | def random_masking( method forward (line 287) | def forward( class HieraEmbeddings (line 302) | class HieraEmbeddings(nn.Module): method __init__ (line 307) | def __init__(self, config: HieraConfig, is_mae: bool = False) -> None: method interpolate_pos_encoding (line 319) | def interpolate_pos_encoding( method get_position_embedding (line 353) | def get_position_embedding( method forward (line 364) | def forward( class HieraMaskUnitAttention (line 376) | class HieraMaskUnitAttention(nn.Module): method __init__ (line 383) | def __init__( method forward (line 406) | def forward( function drop_path (line 445) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class HieraDropPath (line 466) | class HieraDropPath(nn.Module): method __init__ (line 469) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 473) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 476) | def extra_repr(self) -> str: class HieraMlp (line 480) | class HieraMlp(nn.Module): method __init__ (line 481) | def __init__(self, config, dim: int) -> None: method forward (line 487) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class HieraLayer (line 494) | class HieraLayer(nn.Module): method __init__ (line 495) | def __init__( method forward (line 529) | def forward( class HieraStage (line 558) | class HieraStage(nn.Module): method __init__ (line 559) | def __init__( method forward (line 596) | def forward( function undo_windowing (line 608) | def undo_windowing(hidden_states: torch.Tensor, shape: List[int], mask_u... class HieraEncoder (line 634) | class HieraEncoder(nn.Module): method __init__ (line 635) | def __init__(self, config: HieraConfig) -> None: method reroll (line 685) | def reroll( method forward (line 731) | def forward( function unroll (line 783) | def unroll( class HieraPreTrainedModel (line 837) | class HieraPreTrainedModel(PreTrainedModel): method _init_weights (line 848) | def _init_weights(self, module) -> None: class HieraPooler (line 905) | class HieraPooler(nn.Module): method __init__ (line 906) | def __init__(self, config: HieraConfig): method forward (line 912) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class HieraModel (line 930) | class HieraModel(HieraPreTrainedModel): method __init__ (line 931) | def __init__(self, config: HieraConfig, add_pooling_layer: bool = True... method get_input_embeddings (line 945) | def get_input_embeddings(self) -> HieraPatchEmbeddings: method _prune_heads (line 948) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 964) | def forward( class HieraDecoder (line 1046) | class HieraDecoder(nn.Module): method __init__ (line 1047) | def __init__(self, config: HieraConfig): method forward (line 1086) | def forward( class HieraMultiScaleHead (line 1151) | class HieraMultiScaleHead(nn.Module): method __init__ (line 1152) | def __init__(self, config: HieraConfig): method apply_fusion_head (line 1176) | def apply_fusion_head(self, head: nn.Module, hidden_states: torch.Tens... method forward (line 1199) | def forward(self, feature_maps: List[torch.Tensor]) -> torch.Tensor: class HieraForPreTraining (line 1220) | class HieraForPreTraining(HieraPreTrainedModel): method __init__ (line 1221) | def __init__(self, config: HieraConfig) -> None: method get_pixel_label_2d (line 1235) | def get_pixel_label_2d(self, pixel_values: torch.Tensor, bool_masked_p... method forward_loss (line 1250) | def forward_loss(self, pixel_values: torch.Tensor, logits: torch.Tenso... method forward (line 1263) | def forward( class HieraForImageClassification (line 1371) | class HieraForImageClassification(HieraPreTrainedModel): method __init__ (line 1372) | def __init__(self, config: HieraConfig) -> None: method forward (line 1393) | def forward( class HieraBackbone (line 1472) | class HieraBackbone(HieraPreTrainedModel, BackboneMixin): method __init__ (line 1473) | def __init__(self, config: HieraConfig): method get_input_embeddings (line 1492) | def get_input_embeddings(self): method forward (line 1495) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/hubert/configuration_hubert.py class HubertConfig (line 27) | class HubertConfig(PretrainedConfig): method __init__ (line 160) | def __init__( method inputs_to_logits_ratio (line 257) | def inputs_to_logits_ratio(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/hubert/convert_distilhubert_original_s3prl_checkpoint_to_pytorch.py function set_recursively (line 44) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 72) | def recursively_load_weights(fairseq_model, hf_model): function load_conv_layer (line 116) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_config (line 156) | def convert_config(model): function convert_hubert_checkpoint (line 190) | def convert_hubert_checkpoint(pytorch_dump_folder_path, config_path=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/hubert/convert_hubert_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 57) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 85) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 129) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_hubert_checkpoint (line 170) | def convert_hubert_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/hubert/convert_hubert_original_s3prl_checkpoint_to_pytorch.py function convert_s3prl_checkpoint (line 31) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: mplsandbox_for_rl/transformers/src/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 297) | def forward(self, hidden_states): class HubertSamePadLayer (line 309) | class HubertSamePadLayer(nn.Module): method __init__ (line 310) | def __init__(self, num_conv_pos_embeddings): method forward (line 314) | def forward(self, hidden_states): class HubertFeatureEncoder (line 321) | class HubertFeatureEncoder(nn.Module): method __init__ (line 324) | def __init__(self, config): method _freeze_parameters (line 341) | def _freeze_parameters(self): method forward (line 346) | def forward(self, input_values): class HubertFeatureExtractor (line 365) | class HubertFeatureExtractor(HubertFeatureEncoder): method __init__ (line 366) | def __init__(self, config): class HubertFeatureProjection (line 376) | class HubertFeatureProjection(nn.Module): method __init__ (line 377) | def __init__(self, config): method forward (line 385) | def forward(self, hidden_states): class HubertAttention (line 395) | class HubertAttention(nn.Module): method __init__ (line 398) | def __init__( method _shape (line 429) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 432) | def forward( class HubertFlashAttention2 (line 554) | class HubertFlashAttention2(HubertAttention): method __init__ (line 562) | def __init__(self, *args, **kwargs): method _reshape (line 570) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 573) | def forward( class HubertSdpaAttention (line 681) | class HubertSdpaAttention(HubertAttention): method forward (line 683) | def forward( class HubertFeedForward (line 796) | class HubertFeedForward(nn.Module): method __init__ (line 797) | def __init__(self, config): method forward (line 810) | def forward(self, hidden_states): class HubertEncoderLayer (line 821) | class HubertEncoderLayer(nn.Module): method __init__ (line 822) | def __init__(self, config): method forward (line 836) | def forward(self, hidden_states, attention_mask=None, output_attention... class HubertAttnAdapterLayer (line 857) | class HubertAttnAdapterLayer(nn.Module): method __init__ (line 858) | def __init__(self, config): method forward (line 872) | def forward(self, hidden_states: torch.FloatTensor): class HubertEncoderLayerStableLayerNorm (line 883) | class HubertEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 884) | def __init__(self, config): method forward (line 902) | def forward( class HubertEncoder (line 929) | class HubertEncoder(nn.Module): method __init__ (line 930) | def __init__(self, config): method forward (line 940) | def forward( class HubertEncoderStableLayerNorm (line 1015) | class HubertEncoderStableLayerNorm(nn.Module): method __init__ (line 1016) | def __init__(self, config): method forward (line 1028) | def forward( class HubertPreTrainedModel (line 1104) | class HubertPreTrainedModel(PreTrainedModel): method _init_weights (line 1117) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1142) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1157) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... class HubertModel (line 1231) | class HubertModel(HubertPreTrainedModel): method __init__ (line 1232) | def __init__(self, config: HubertConfig): method _mask_hidden_states (line 1250) | def _mask_hidden_states( method forward (line 1298) | def forward( class HubertForCTC (line 1375) | class HubertForCTC(HubertPreTrainedModel): method __init__ (line 1376) | def __init__(self, config, target_lang: Optional[str] = None): method tie_weights (line 1399) | def tie_weights(self): method freeze_feature_extractor (line 1420) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1432) | def freeze_feature_encoder(self): method freeze_base_model (line 1439) | def freeze_base_model(self): method forward (line 1455) | def forward( class HubertForSequenceClassification (line 1534) | class HubertForSequenceClassification(HubertPreTrainedModel): method __init__ (line 1535) | def __init__(self, config): method freeze_feature_extractor (line 1552) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1564) | def freeze_feature_encoder(self): method freeze_base_model (line 1571) | def freeze_base_model(self): method forward (line 1588) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/hubert/modeling_tf_hubert.py function _sample_without_replacement (line 53) | def _sample_without_replacement(distribution, num_samples): function _scatter_values_on_batch_indices (line 64) | def _scatter_values_on_batch_indices(values, batch_indices, output_shape): function _compute_mask_indices (line 80) | def _compute_mask_indices( function _expand_mask (line 155) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFHubertGroupNorm (line 169) | class TFHubertGroupNorm(keras.layers.Layer): method __init__ (line 174) | def __init__( method build (line 204) | def build(self, input_shape): method call (line 215) | def call(self, inputs): method get_config (line 231) | def get_config(self): method compute_output_shape (line 248) | def compute_output_shape(self, input_shape): method _reshape_into_groups (line 251) | def _reshape_into_groups(self, inputs, input_shape, tensor_input_shape): method _apply_normalization (line 263) | def _apply_normalization(self, reshaped_inputs, input_shape): method _get_reshaped_weights (line 286) | def _get_reshaped_weights(self, input_shape): method _check_if_input_shape_is_none (line 297) | def _check_if_input_shape_is_none(self, input_shape): method _set_number_of_groups_for_instance_norm (line 308) | def _set_number_of_groups_for_instance_norm(self, input_shape): method _check_size_of_dimensions (line 314) | def _check_size_of_dimensions(self, input_shape): method _check_axis (line 334) | def _check_axis(self): method _create_input_spec (line 340) | def _create_input_spec(self, input_shape): method _add_gamma_weight (line 344) | def _add_gamma_weight(self, input_shape): method _add_beta_weight (line 359) | def _add_beta_weight(self, input_shape): method _create_broadcast_shape (line 374) | def _create_broadcast_shape(self, input_shape): class TFHubertWeightNormConv1D (line 386) | class TFHubertWeightNormConv1D(keras.layers.Conv1D): method __init__ (line 389) | def __init__(self, filters, kernel_size, groups, explicit_padding, **k... method _init_norm (line 403) | def _init_norm(self): method _normalize_kernel (line 408) | def _normalize_kernel(self): method build (line 413) | def build(self, input_shape): method call (line 430) | def call(self, inputs): class TFHubertNoLayerNormConvLayer (line 443) | class TFHubertNoLayerNormConvLayer(keras.layers.Layer): method __init__ (line 444) | def __init__(self, config: HubertConfig, layer_id: int = 0, **kwargs: ... method call (line 458) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 463) | def build(self, input_shape=None): class TFHubertLayerNormConvLayer (line 473) | class TFHubertLayerNormConvLayer(keras.layers.Layer): method __init__ (line 474) | def __init__(self, config: HubertConfig, layer_id: int = 0, **kwargs: ... method call (line 489) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 495) | def build(self, input_shape=None): class TFHubertGroupNormConvLayer (line 508) | class TFHubertGroupNormConvLayer(keras.layers.Layer): method __init__ (line 509) | def __init__(self, config: HubertConfig, layer_id: int = 0, **kwargs: ... method call (line 524) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 530) | def build(self, input_shape=None): class TFHubertPositionalConvEmbedding (line 543) | class TFHubertPositionalConvEmbedding(keras.layers.Layer): method __init__ (line 544) | def __init__(self, config: HubertConfig, **kwargs: Any) -> None: method call (line 557) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 563) | def build(self, input_shape=None): class TFHubertSamePadLayer (line 573) | class TFHubertSamePadLayer(keras.layers.Layer): method __init__ (line 574) | def __init__(self, num_conv_pos_embeddings, **kwargs): method call (line 578) | def call(self, hidden_states): class TFHubertFeatureEncoder (line 584) | class TFHubertFeatureEncoder(keras.layers.Layer): method __init__ (line 585) | def __init__(self, config: HubertConfig, **kwargs: Any) -> None: method call (line 604) | def call(self, input_values): method build (line 610) | def build(self, input_shape=None): class TFHubertFeatureExtractor (line 619) | class TFHubertFeatureExtractor(TFHubertFeatureEncoder): method __init__ (line 620) | def __init__(self, config, **kwargs): class TFHubertFeatureProjection (line 630) | class TFHubertFeatureProjection(keras.layers.Layer): method __init__ (line 631) | def __init__(self, config: HubertConfig, **kwargs): method call (line 644) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 650) | def build(self, input_shape=None): class TFHubertAttention (line 663) | class TFHubertAttention(keras.layers.Layer): method __init__ (line 666) | def __init__( method _shape (line 694) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 697) | def call( method build (line 815) | def build(self, input_shape=None): class TFHubertFeedForward (line 834) | class TFHubertFeedForward(keras.layers.Layer): method __init__ (line 835) | def __init__(self, config: HubertConfig, **kwargs): method call (line 857) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 866) | def build(self, input_shape=None): class TFHubertEncoderLayer (line 879) | class TFHubertEncoderLayer(keras.layers.Layer): method __init__ (line 880) | def __init__(self, config: HubertConfig, **kwargs): method call (line 895) | def call( method build (line 920) | def build(self, input_shape=None): class TFHubertEncoderLayerStableLayerNorm (line 939) | class TFHubertEncoderLayerStableLayerNorm(keras.layers.Layer): method __init__ (line 940) | def __init__(self, config: HubertConfig, **kwargs): method call (line 955) | def call( method build (line 978) | def build(self, input_shape=None): class TFHubertEncoder (line 997) | class TFHubertEncoder(keras.layers.Layer): method __init__ (line 998) | def __init__(self, config: HubertConfig, **kwargs): method call (line 1006) | def call( method build (line 1061) | def build(self, input_shape=None): class TFHubertEncoderStableLayerNorm (line 1078) | class TFHubertEncoderStableLayerNorm(keras.layers.Layer): method __init__ (line 1079) | def __init__(self, config: HubertConfig, **kwargs): method call (line 1089) | def call( method build (line 1144) | def build(self, input_shape=None): class TFHubertMainLayer (line 1161) | class TFHubertMainLayer(keras.layers.Layer): method __init__ (line 1164) | def __init__(self, config: HubertConfig, **kwargs): method build (line 1175) | def build(self, input_shape=None): method _get_feat_extract_output_lengths (line 1193) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method _mask_hidden_states (line 1208) | def _mask_hidden_states(self, hidden_states: tf.Tensor, mask_time_indi... method call (line 1253) | def call( class TFHubertPreTrainedModel (line 1303) | class TFHubertPreTrainedModel(TFPreTrainedModel): method input_signature (line 1314) | def input_signature(self): method __init__ (line 1321) | def __init__(self, config, *inputs, **kwargs): class TFHubertModel (line 1431) | class TFHubertModel(TFHubertPreTrainedModel): method __init__ (line 1432) | def __init__(self, config: HubertConfig, *inputs, **kwargs): method call (line 1440) | def call( method build (line 1500) | def build(self, input_shape=None): class TFHubertForCTC (line 1513) | class TFHubertForCTC(TFHubertPreTrainedModel): method __init__ (line 1514) | def __init__(self, config: HubertConfig, *inputs, **kwargs): method freeze_feature_extractor (line 1524) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1536) | def freeze_feature_encoder(self): method call (line 1546) | def call( method build (line 1663) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/ibert/configuration_ibert.py class IBertConfig (line 30) | class IBertConfig(PretrainedConfig): method __init__ (line 86) | def __init__( class IBertOnnxConfig (line 127) | class IBertOnnxConfig(OnnxConfig): method inputs (line 129) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/ibert/modeling_ibert.py class IBertEmbeddings (line 51) | class IBertEmbeddings(nn.Module): method __init__ (line 56) | def __init__(self, config): method forward (line 108) | def forward( method create_position_ids_from_inputs_embeds (line 155) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class IBertSelfAttention (line 173) | class IBertSelfAttention(nn.Module): method __init__ (line 174) | def __init__(self, config): method transpose_for_scores (line 232) | def transpose_for_scores(self, x): method forward (line 237) | def forward( class IBertSelfOutput (line 315) | class IBertSelfOutput(nn.Module): method __init__ (line 316) | def __init__(self, config): method forward (line 345) | def forward(self, hidden_states, hidden_states_scaling_factor, input_t... class IBertAttention (line 362) | class IBertAttention(nn.Module): method __init__ (line 363) | def __init__(self, config): method prune_heads (line 370) | def prune_heads(self, heads): method forward (line 388) | def forward( class IBertIntermediate (line 411) | class IBertIntermediate(nn.Module): method __init__ (line 412) | def __init__(self, config): method forward (line 432) | def forward(self, hidden_states, hidden_states_scaling_factor): class IBertOutput (line 445) | class IBertOutput(nn.Module): method __init__ (line 446) | def __init__(self, config): method forward (line 475) | def forward(self, hidden_states, hidden_states_scaling_factor, input_t... class IBertLayer (line 492) | class IBertLayer(nn.Module): method __init__ (line 493) | def __init__(self, config): method forward (line 506) | def forward( method feed_forward_chunk (line 533) | def feed_forward_chunk(self, attention_output, attention_output_scalin... class IBertEncoder (line 550) | class IBertEncoder(nn.Module): method __init__ (line 551) | def __init__(self, config): method forward (line 557) | def forward( class IBertPooler (line 614) | class IBertPooler(nn.Module): method __init__ (line 615) | def __init__(self, config): method forward (line 621) | def forward(self, hidden_states): class IBertPreTrainedModel (line 630) | class IBertPreTrainedModel(PreTrainedModel): method _init_weights (line 639) | def _init_weights(self, module): method resize_token_embeddings (line 655) | def resize_token_embeddings(self, new_num_tokens=None): class IBertModel (line 729) | class IBertModel(IBertPreTrainedModel): method __init__ (line 739) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 752) | def get_input_embeddings(self): method set_input_embeddings (line 755) | def set_input_embeddings(self, value): method _prune_heads (line 758) | def _prune_heads(self, heads_to_prune): method forward (line 772) | def forward( class IBertForMaskedLM (line 851) | class IBertForMaskedLM(IBertPreTrainedModel): method __init__ (line 854) | def __init__(self, config): method get_output_embeddings (line 863) | def get_output_embeddings(self): method set_output_embeddings (line 866) | def set_output_embeddings(self, new_embeddings): method forward (line 877) | def forward( class IBertLMHead (line 931) | class IBertLMHead(nn.Module): method __init__ (line 934) | def __init__(self, config): method forward (line 943) | def forward(self, features, **kwargs): method _tie_weights (line 953) | def _tie_weights(self) -> None: class IBertForSequenceClassification (line 969) | class IBertForSequenceClassification(IBertPreTrainedModel): method __init__ (line 970) | def __init__(self, config): method forward (line 986) | def forward( class IBertForMultipleChoice (line 1062) | class IBertForMultipleChoice(IBertPreTrainedModel): method __init__ (line 1063) | def __init__(self, config): method forward (line 1079) | def forward( class IBertForTokenClassification (line 1152) | class IBertForTokenClassification(IBertPreTrainedModel): method __init__ (line 1153) | def __init__(self, config): method forward (line 1170) | def forward( class IBertClassificationHead (line 1223) | class IBertClassificationHead(nn.Module): method __init__ (line 1226) | def __init__(self, config): method forward (line 1232) | def forward(self, features, **kwargs): class IBertForQuestionAnswering (line 1249) | class IBertForQuestionAnswering(IBertPreTrainedModel): method __init__ (line 1250) | def __init__(self, config): method forward (line 1266) | def forward( function create_position_ids_from_input_ids (line 1341) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/idefics/configuration_idefics.py class IdeficsVisionConfig (line 29) | class IdeficsVisionConfig(PretrainedConfig): method __init__ (line 76) | def __init__( class IdeficsPerceiverConfig (line 108) | class IdeficsPerceiverConfig(PretrainedConfig): method __init__ (line 136) | def __init__( class IdeficsConfig (line 156) | class IdeficsConfig(PretrainedConfig): method __init__ (line 240) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics/image_processing_idefics.py function convert_to_rgb (line 38) | def convert_to_rgb(image): class IdeficsImageProcessor (line 51) | class IdeficsImageProcessor(BaseImageProcessor): method __init__ (line 72) | def __init__( method preprocess (line 87) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics/modeling_idefics.py function _prepare_4d_causal_attention_mask_with_cache_position (line 55) | def _prepare_4d_causal_attention_mask_with_cache_position( class IdeficsBaseModelOutputWithPast (line 109) | class IdeficsBaseModelOutputWithPast(ModelOutput): class IdeficsCausalLMOutputWithPast (line 154) | class IdeficsCausalLMOutputWithPast(ModelOutput): function expand_inputs_for_generation (line 195) | def expand_inputs_for_generation( function prepare_inputs_for_generation (line 240) | def prepare_inputs_for_generation(input_ids, past_key_values=None, **kwa... function freeze_model (line 285) | def freeze_model(model, module_exceptions=[]): class IdeficsDecoupledEmbedding (line 300) | class IdeficsDecoupledEmbedding(nn.Embedding): method __init__ (line 309) | def __init__( method forward (line 362) | def forward(self, input_ids): method extra_repr (line 401) | def extra_repr(self) -> str: class IdeficsDecoupledLinear (line 410) | class IdeficsDecoupledLinear(nn.Linear): method __init__ (line 419) | def __init__( method forward (line 455) | def forward(self, input: torch.Tensor) -> torch.Tensor: method extra_repr (line 464) | def extra_repr(self) -> str: class IdeficsRMSNorm (line 476) | class IdeficsRMSNorm(nn.Module): method __init__ (line 477) | def __init__(self, hidden_size, eps=1e-6): method forward (line 485) | def forward(self, hidden_states): method extra_repr (line 495) | def extra_repr(self): class IdeficsEmbedding (line 503) | class IdeficsEmbedding(torch.nn.Module): method __init__ (line 504) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 518) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 528) | def forward(self, x, seq_len=None): function rotate_half (line 539) | def rotate_half(x): function apply_rotary_pos_emb (line 547) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class IdeficsMLP (line 576) | class IdeficsMLP(nn.Module): method __init__ (line 577) | def __init__( method forward (line 589) | def forward(self, x): class IdeficsAttention (line 594) | class IdeficsAttention(nn.Module): method __init__ (line 597) | def __init__( method _shape (line 676) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 679) | def forward( class IdeficsDecoderLayer (line 772) | class IdeficsDecoderLayer(nn.Module): method __init__ (line 773) | def __init__(self, config: IdeficsConfig, layer_idx: int = None): method forward (line 792) | def forward( class IdeficsGatedCrossAttentionLayer (line 851) | class IdeficsGatedCrossAttentionLayer(nn.Module): method __init__ (line 852) | def __init__(self, config: IdeficsConfig): method forward (line 917) | def forward( class IdeficsPreTrainedModel (line 1014) | class IdeficsPreTrainedModel(PreTrainedModel): method _init_weights (line 1022) | def _init_weights(self, module): method _check_and_enable_sdpa (line 1038) | def _check_and_enable_sdpa(cls, config, hard_check_only: bool = False)... class IdeficsModel (line 1119) | class IdeficsModel(IdeficsPreTrainedModel): method __init__ (line 1127) | def __init__(self, config: IdeficsConfig): method freeze_relevant_params (line 1175) | def freeze_relevant_params(self, config=None): method freeze_text_layers (line 1185) | def freeze_text_layers(self, module_exceptions=[]): method freeze_vision_layers (line 1189) | def freeze_vision_layers(self, module_exceptions=[]): method get_input_embeddings (line 1192) | def get_input_embeddings(self): method set_input_embeddings (line 1195) | def set_input_embeddings(self, value): method forward (line 1199) | def forward( method _update_causal_mask (line 1469) | def _update_causal_mask( class IdeficsForVisionText2Text (line 1541) | class IdeficsForVisionText2Text(IdeficsPreTrainedModel): method __init__ (line 1545) | def __init__(self, config, vision_model=None): method get_input_embeddings (line 1560) | def get_input_embeddings(self): method set_input_embeddings (line 1563) | def set_input_embeddings(self, value): method get_output_embeddings (line 1566) | def get_output_embeddings(self): method set_output_embeddings (line 1569) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1572) | def set_decoder(self, decoder): method get_decoder (line 1575) | def get_decoder(self): method tie_weights (line 1578) | def tie_weights(self): method forward (line 1601) | def forward( method prepare_inputs_for_generation (line 1711) | def prepare_inputs_for_generation(self, input_ids, past=None, **kwargs): method _expand_inputs_for_generation (line 1726) | def _expand_inputs_for_generation( method _update_model_kwargs_for_generation (line 1732) | def _update_model_kwargs_for_generation( method _reorder_cache (line 1756) | def _reorder_cache(past, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics/modeling_tf_idefics.py class TFIdeficsBaseModelOutputWithPast (line 57) | class TFIdeficsBaseModelOutputWithPast(ModelOutput): class TFIdeficsCausalLMOutputWithPast (line 102) | class TFIdeficsCausalLMOutputWithPast(ModelOutput): function expand_inputs_for_generation (line 143) | def expand_inputs_for_generation( function update_model_kwargs_for_generation (line 182) | def update_model_kwargs_for_generation(outputs, model_kwargs): function prepare_inputs_for_generation (line 211) | def prepare_inputs_for_generation(input_ids, past_key_values=None, **kwa... function freeze_model (line 250) | def freeze_model(model, module_exceptions=[]): class TFIdeficsDecoupledEmbedding (line 268) | class TFIdeficsDecoupledEmbedding(tf.keras.layers.Embedding): method __init__ (line 276) | def __init__( method call (line 320) | def call(self, input_ids): method extra_repr (line 364) | def extra_repr(self) -> str: class TFIdeficsDecoupledLinear (line 373) | class TFIdeficsDecoupledLinear(tf.keras.layers.Layer): method __init__ (line 381) | def __init__( method call (line 408) | def call(self, inputs: tf.Tensor) -> tf.Tensor: method get_config (line 419) | def get_config(self): method extra_repr (line 432) | def extra_repr(self) -> str: method from_config (line 443) | def from_config(cls, config): method build (line 446) | def build(self, input_shape=None): function _make_causal_mask (line 462) | def _make_causal_mask(input_ids_shape, dtype, past_key_values_length=0): function _expand_mask (line 489) | def _expand_mask(mask, dtype, tgt_len=None): class TFIdeficsRMSNorm (line 506) | class TFIdeficsRMSNorm(tf.keras.layers.Layer): method __init__ (line 507) | def __init__(self, hidden_size, eps=1e-6, **kwargs): method build (line 515) | def build(self, input_shape): method call (line 523) | def call(self, hidden_states): class TFIdeficsEmbedding (line 534) | class TFIdeficsEmbedding(tf.keras.layers.Layer): method __init__ (line 535) | def __init__(self, dim, max_position_embeddings=2048, base=10000, **kw... method _compute_cos_sin (line 545) | def _compute_cos_sin(self, seq_len): method call (line 552) | def call(self, x, seq_len=None): function rotate_half (line 559) | def rotate_half(x): function apply_rotary_pos_emb (line 566) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): class TFIdeficsMLP (line 576) | class TFIdeficsMLP(tf.keras.layers.Layer): method __init__ (line 577) | def __init__( method call (line 592) | def call(self, x): method build (line 595) | def build(self, input_shape=None): class TFIdeficsAttention (line 610) | class TFIdeficsAttention(tf.keras.layers.Layer): method __init__ (line 613) | def __init__( method _shape (line 666) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 669) | def call( method build (line 750) | def build(self, input_shape=None): class TFIdeficsDecoderLayer (line 779) | class TFIdeficsDecoderLayer(tf.keras.layers.Layer): method __init__ (line 780) | def __init__(self, config: IdeficsConfig, **kwargs): method call (line 802) | def call( method build (line 859) | def build(self, input_shape=None): class TFIdeficsGatedCrossAttentionLayer (line 877) | class TFIdeficsGatedCrossAttentionLayer(tf.keras.layers.Layer): method __init__ (line 878) | def __init__(self, config: IdeficsConfig, **kwargs): method build (line 909) | def build(self, input_shape): method call (line 990) | def call( class TFIdeficsPreTrainedModel (line 1089) | class TFIdeficsPreTrainedModel(TFPreTrainedModel): class TFIdeficsMainLayer (line 1163) | class TFIdeficsMainLayer(tf.keras.layers.Layer): method __init__ (line 1173) | def __init__(self, config: IdeficsConfig, add_pooling_year: bool = Tru... method freeze_relevant_params (line 1221) | def freeze_relevant_params(self, config=None): method freeze_text_layers (line 1231) | def freeze_text_layers(self, module_exceptions=[]): method freeze_vision_layers (line 1235) | def freeze_vision_layers(self, module_exceptions=[]): method get_input_embeddings (line 1238) | def get_input_embeddings(self): method set_input_embeddings (line 1241) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 1244) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method call (line 1266) | def call( method build (line 1533) | def build(self, input_shape=None): class TFIdeficsModel (line 1559) | class TFIdeficsModel(TFIdeficsPreTrainedModel): method __init__ (line 1560) | def __init__(self, config: IdeficsConfig, *inputs, **kwargs): method call (line 1565) | def call( method build (line 1602) | def build(self, input_shape=None): class TFIdeficsForVisionText2Text (line 1611) | class TFIdeficsForVisionText2Text(TFPreTrainedModel, TFCausalLanguageMod... method __init__ (line 1616) | def __init__(self, config, vision_model=None, **kwargs): method get_input_embeddings (line 1628) | def get_input_embeddings(self): method set_input_embeddings (line 1631) | def set_input_embeddings(self, value): method get_output_embeddings (line 1634) | def get_output_embeddings(self): method set_output_embeddings (line 1637) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1640) | def set_decoder(self, decoder): method get_decoder (line 1643) | def get_decoder(self): method tie_weights (line 1646) | def tie_weights(self): method call (line 1670) | def call( method prepare_inputs_for_generation (line 1771) | def prepare_inputs_for_generation(self, input_ids, past=None, **kwargs): method _expand_inputs_for_generation (line 1786) | def _expand_inputs_for_generation( method _update_model_kwargs_for_generation (line 1793) | def _update_model_kwargs_for_generation(outputs, model_kwargs, is_enco... method _reorder_cache (line 1797) | def _reorder_cache(past, beam_idx): method build (line 1803) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics/perceiver.py class IdeficsPerceiverResampler (line 48) | class IdeficsPerceiverResampler(nn.Module): method __init__ (line 49) | def __init__( method forward (line 95) | def forward(self, context: torch.Tensor) -> torch.Tensor: class IdeficsPerceiverAttention (line 108) | class IdeficsPerceiverAttention(nn.Module): method __init__ (line 109) | def __init__(self, embed_dim: int, n_heads: int, head_dim: int, qk_lay... method forward (line 130) | def forward(self, context: torch.Tensor, latents: torch.Tensor) -> tor... class IdeficsMLP (line 173) | class IdeficsMLP(nn.Module): method __init__ (line 174) | def __init__(self, intermediate_size, config: IdeficsConfig): method forward (line 183) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics/perceiver_tf.py class TFIdeficsPerceiverResampler (line 48) | class TFIdeficsPerceiverResampler(tf.keras.layers.Layer): method __init__ (line 49) | def __init__( method build (line 92) | def build(self, input_shape): method call (line 99) | def call(self, context: tf.Tensor) -> tf.Tensor: class TFIdeficsPerceiverAttention (line 111) | class TFIdeficsPerceiverAttention(tf.keras.layers.Layer): method __init__ (line 112) | def __init__(self, embed_dim: int, n_heads: int, head_dim: int, qk_lay... method call (line 133) | def call(self, context: tf.Tensor, latents: tf.Tensor) -> tf.Tensor: class TFIdeficsMLP (line 179) | class TFIdeficsMLP(tf.keras.layers.Layer): method __init__ (line 180) | def __init__(self, intermediate_size, config: IdeficsConfig, **kwargs): method call (line 189) | def call(self, hidden_states: Optional[Tuple[tf.Tensor]]) -> tf.Tensor: FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics/processing_idefics.py function incremental_to_binary_attention_mask (line 38) | def incremental_to_binary_attention_mask(incremental_mask, return_tensor... function image_attention_mask_for_packed_input_ids (line 64) | def image_attention_mask_for_packed_input_ids(input_ids, tokenizer, retu... function image_attention_mask_for_packed_input_ids_pt (line 71) | def image_attention_mask_for_packed_input_ids_pt(input_ids, tokenizer): function image_attention_mask_for_packed_input_ids_tf (line 118) | def image_attention_mask_for_packed_input_ids_tf(input_ids, tokenizer): function is_url (line 151) | def is_url(string): class IdeficsProcessor (line 160) | class IdeficsProcessor(ProcessorMixin): method __init__ (line 180) | def __init__(self, image_processor, tokenizer=None, image_size=224, ad... method __call__ (line 202) | def __call__( method batch_decode (line 475) | def batch_decode(self, *args, **kwargs): method decode (line 482) | def decode(self, *args, **kwargs): method model_input_names (line 490) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics/vision.py class IdeficsVisionModelOutput (line 35) | class IdeficsVisionModelOutput(ModelOutput): class IdeficsVisionEmbeddings (line 64) | class IdeficsVisionEmbeddings(nn.Module): method __init__ (line 65) | def __init__(self, config: IdeficsVisionConfig): method interpolate_pos_encoding (line 88) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 137) | def forward(self, pixel_values: torch.FloatTensor, interpolate_pos_enc... class IdeficsVisionAttention (line 164) | class IdeficsVisionAttention(nn.Module): method __init__ (line 167) | def __init__(self, config): method _shape (line 186) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 189) | def forward( class IdeficsVisionMLP (line 269) | class IdeficsVisionMLP(nn.Module): method __init__ (line 270) | def __init__(self, config): method forward (line 277) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class IdeficsVisionEncoderLayer (line 285) | class IdeficsVisionEncoderLayer(nn.Module): method __init__ (line 286) | def __init__(self, config: IdeficsVisionConfig): method forward (line 294) | def forward( class IdeficsVisionEncoder (line 336) | class IdeficsVisionEncoder(nn.Module): method __init__ (line 345) | def __init__(self, config: IdeficsVisionConfig): method forward (line 351) | def forward( class IdeficsVisionTransformer (line 434) | class IdeficsVisionTransformer(nn.Module): method __init__ (line 435) | def __init__(self, config: IdeficsVisionConfig): method forward (line 446) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics/vision_tf.py class TFIdeficsVisionModelOutput (line 35) | class TFIdeficsVisionModelOutput(ModelOutput): class TFIdeficsVisionEmbeddings (line 63) | class TFIdeficsVisionEmbeddings(tf.keras.layers.Layer): method __init__ (line 64) | def __init__(self, config: IdeficsVisionConfig, **kwargs): method interpolate_pos_encoding (line 88) | def interpolate_pos_encoding(self, embeddings: tf.Tensor, height: int,... method call (line 127) | def call(self, pixel_values: tf.Tensor, interpolate_pos_encoding: bool... method build (line 162) | def build(self, input_shape=None): class TFIdeficsVisionAttention (line 176) | class TFIdeficsVisionAttention(tf.keras.layers.Layer): method __init__ (line 179) | def __init__(self, config, **kwargs): method _shape (line 198) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 201) | def call( method build (line 279) | def build(self, input_shape=None): class TFIdeficsVisionMLP (line 297) | class TFIdeficsVisionMLP(tf.keras.layers.Layer): method __init__ (line 298) | def __init__(self, config, **kwargs): method call (line 305) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 311) | def build(self, input_shape=None): class TFIdeficsVisionEncoderLayer (line 323) | class TFIdeficsVisionEncoderLayer(tf.keras.layers.Layer): method __init__ (line 324) | def __init__(self, config: IdeficsVisionConfig, **kwargs): method call (line 332) | def call( method build (line 372) | def build(self, input_shape=None): class TFIdeficsVisionEncoder (line 384) | class TFIdeficsVisionEncoder(tf.keras.layers.Layer): method __init__ (line 393) | def __init__(self, config: IdeficsVisionConfig, **kwargs): method call (line 401) | def call( method build (line 489) | def build(self, input_shape=None): class TFIdeficsVisionTransformer (line 499) | class TFIdeficsVisionTransformer(TFPreTrainedModel): method __init__ (line 500) | def __init__(self, config: IdeficsVisionConfig, **kwargs): method call (line 511) | def call( method build (line 557) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics2/configuration_idefics2.py class Idefics2VisionConfig (line 27) | class Idefics2VisionConfig(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 Idefics2PerceiverConfig (line 129) | class Idefics2PerceiverConfig(PretrainedConfig): method __init__ (line 153) | def __init__( class Idefics2Config (line 179) | class Idefics2Config(PretrainedConfig): method __init__ (line 217) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics2/convert_idefics2_weights_to_hf.py function convert_state_dict_to_hf (line 57) | def convert_state_dict_to_hf(state_dict): function merge_weights (line 70) | def merge_weights(state_dict): function get_config (line 92) | def get_config(checkpoint): function convert_idefics2_hub_to_hf (line 129) | def convert_idefics2_hub_to_hf(original_model_id, output_hub_path, push_... function main (line 162) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics2/image_processing_idefics2.py function get_resize_output_image_size (line 48) | def get_resize_output_image_size(image, size, input_data_format) -> Tupl... function make_list_of_images (line 80) | def make_list_of_images(images: ImageInput) -> List[List[np.ndarray]]: function max_across_indices (line 113) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 120) | def get_max_height_width( function make_pixel_mask (line 139) | def make_pixel_mask( function convert_to_rgb (line 158) | def convert_to_rgb(image: ImageInput) -> ImageInput: class Idefics2ImageProcessor (line 181) | class Idefics2ImageProcessor(BaseImageProcessor): method __init__ (line 221) | def __init__( method resize (line 249) | def resize( method _pad_image (line 287) | def _pad_image( method pad (line 314) | def pad( method _crop (line 383) | def _crop( method split_image (line 397) | def split_image( method preprocess (line 425) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics2/modeling_idefics2.py class Idefics2BaseModelOutputWithPast (line 53) | class Idefics2BaseModelOutputWithPast(ModelOutput): class Idefics2CausalLMOutputWithPast (line 93) | class Idefics2CausalLMOutputWithPast(ModelOutput): class Idefics2VisionEmbeddings (line 129) | class Idefics2VisionEmbeddings(nn.Module): method __init__ (line 140) | def __init__(self, config: Idefics2VisionConfig): method forward (line 159) | def forward(self, pixel_values: torch.FloatTensor, patch_attention_mas... class Idefics2VisionAttention (line 188) | class Idefics2VisionAttention(nn.Module): method __init__ (line 192) | def __init__(self, config): method forward (line 214) | def forward( class Idefics2VisionFlashAttention2 (line 267) | class Idefics2VisionFlashAttention2(Idefics2VisionAttention): method __init__ (line 275) | def __init__(self, *args, **kwargs): method forward (line 283) | def forward( class Idefics2VisionMLP (line 372) | class Idefics2VisionMLP(nn.Module): method __init__ (line 373) | def __init__(self, config): method forward (line 380) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Idefics2MLP (line 387) | class Idefics2MLP(nn.Module): method __init__ (line 388) | def __init__( method forward (line 401) | def forward(self, x): class Idefics2MultiheadAttentionPoolingHead (line 406) | class Idefics2MultiheadAttentionPoolingHead(nn.Module): method __init__ (line 409) | def __init__(self, config: Idefics2VisionConfig): method forward (line 423) | def forward(self, hidden_state): class Idefics2EncoderLayer (line 436) | class Idefics2EncoderLayer(nn.Module): method __init__ (line 437) | def __init__(self, config: Idefics2Config): method forward (line 446) | def forward( class Idefics2Encoder (line 486) | class Idefics2Encoder(nn.Module): method __init__ (line 495) | def __init__(self, config: Idefics2Config): method forward (line 502) | def forward( class Idefics2VisionTransformer (line 574) | class Idefics2VisionTransformer(nn.Module): method __init__ (line 575) | def __init__(self, config: Idefics2VisionConfig): method get_input_embeddings (line 585) | def get_input_embeddings(self): method set_input_embeddings (line 588) | def set_input_embeddings(self, value): method forward (line 591) | def forward( function repeat_kv (line 650) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class Idefics2RMSNorm (line 663) | class Idefics2RMSNorm(nn.Module): method __init__ (line 664) | def __init__(self, hidden_size, eps=1e-6): method forward (line 672) | def forward(self, hidden_states): method extra_repr (line 679) | def extra_repr(self): class Idefics2PerceiverAttention (line 683) | class Idefics2PerceiverAttention(nn.Module): method __init__ (line 684) | def __init__(self, config, layer_idx: Optional[int] = None) -> None: method forward (line 703) | def forward( class Idefics2PerceiverFlashAttention2 (line 785) | class Idefics2PerceiverFlashAttention2(Idefics2PerceiverAttention): method __init__ (line 793) | def __init__(self, *args, **kwargs): method forward (line 802) | def forward( class Idefics2PerceiverLayer (line 917) | class Idefics2PerceiverLayer(nn.Module): method __init__ (line 918) | def __init__(self, config, layer_idx: int): method forward (line 936) | def forward( class Idefics2PerceiverResampler (line 989) | class Idefics2PerceiverResampler(nn.Module): method __init__ (line 990) | def __init__(self, config) -> None: method forward (line 1013) | def forward( class Idefics2Connector (line 1050) | class Idefics2Connector(nn.Module): method __init__ (line 1051) | def __init__(self, config): method forward (line 1061) | def forward(self, image_hidden_states, attention_mask): class Idefics2PreTrainedModel (line 1088) | class Idefics2PreTrainedModel(PreTrainedModel): method _init_weights (line 1097) | def _init_weights(self, module): method _autoset_attn_implementation (line 1117) | def _autoset_attn_implementation( class Idefics2Model (line 1215) | class Idefics2Model(Idefics2PreTrainedModel): method __init__ (line 1216) | def __init__(self, config: Idefics2Config): method enable_input_require_grads (line 1232) | def enable_input_require_grads(self): method get_input_embeddings (line 1258) | def get_input_embeddings(self): method set_input_embeddings (line 1261) | def set_input_embeddings(self, value): method resize_token_embeddings (line 1264) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method inputs_merger (line 1271) | def inputs_merger( method forward (line 1306) | def forward( class Idefics2ForConditionalGeneration (line 1440) | class Idefics2ForConditionalGeneration(Idefics2PreTrainedModel): method __init__ (line 1443) | def __init__(self, config): method enable_input_require_grads (line 1454) | def enable_input_require_grads(self): method get_input_embeddings (line 1468) | def get_input_embeddings(self): method set_input_embeddings (line 1471) | def set_input_embeddings(self, value): method get_output_embeddings (line 1474) | def get_output_embeddings(self): method set_output_embeddings (line 1477) | def set_output_embeddings(self, new_embeddings): method resize_token_embeddings (line 1480) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method tie_weights (line 1496) | def tie_weights(self): method forward (line 1508) | def forward( method prepare_inputs_for_generation (line 1625) | def prepare_inputs_for_generation( method _update_model_kwargs_for_generation (line 1689) | def _update_model_kwargs_for_generation(self, outputs, model_kwargs, i... method _reorder_cache (line 1702) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/idefics2/processing_idefics2.py function is_url (line 35) | def is_url(val) -> bool: function is_image_or_image_url (line 39) | def is_image_or_image_url(elem): class Idefics2Processor (line 43) | class Idefics2Processor(ProcessorMixin): method __init__ (line 68) | def __init__(self, image_processor, tokenizer=None, image_seq_len: int... method _extract_images_from_prompts (line 86) | def _extract_images_from_prompts(self, prompts): method __call__ (line 98) | def __call__( method batch_decode (line 235) | def batch_decode(self, *args, **kwargs): method decode (line 242) | def decode(self, *args, **kwargs): method model_input_names (line 250) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/imagegpt/configuration_imagegpt.py class ImageGPTConfig (line 31) | class ImageGPTConfig(PretrainedConfig): method __init__ (line 104) | def __init__( class ImageGPTOnnxConfig (line 146) | class ImageGPTOnnxConfig(OnnxConfig): method inputs (line 148) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 155) | def generate_dummy_inputs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/imagegpt/convert_imagegpt_original_tf2_to_pytorch.py function convert_imagegpt_checkpoint_to_pytorch (line 28) | def convert_imagegpt_checkpoint_to_pytorch(imagegpt_checkpoint_path, mod... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/imagegpt/image_processing_imagegpt.py function squared_euclidean_distance (line 44) | def squared_euclidean_distance(a, b): function color_quantize (line 53) | def color_quantize(x, clusters): class ImageGPTImageProcessor (line 59) | class ImageGPTImageProcessor(BaseImageProcessor): method __init__ (line 85) | def __init__( method resize (line 107) | def resize( method normalize (line 155) | def normalize( method preprocess (line 177) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/imagegpt/modeling_imagegpt.py function load_tf_weights_in_imagegpt (line 52) | def load_tf_weights_in_imagegpt(model, config, imagegpt_checkpoint_path): class ImageGPTLayerNorm (line 160) | class ImageGPTLayerNorm(nn.Module): method __init__ (line 161) | def __init__(self, hidden_size: Tuple[int], eps: float = 1e-5): method forward (line 166) | def forward(self, tensor: torch.Tensor) -> tuple: class ImageGPTAttention (line 175) | class ImageGPTAttention(nn.Module): method __init__ (line 176) | 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 499) | def __init__(self, *inputs, **kwargs): method _init_weights (line 502) | def _init_weights(self, module): class ImageGPTModel (line 612) | class ImageGPTModel(ImageGPTPreTrainedModel): method __init__ (line 613) | def __init__(self, config: ImageGPTConfig): method get_input_embeddings (line 632) | def get_input_embeddings(self): method set_input_embeddings (line 635) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 638) | def _prune_heads(self, heads_to_prune): method forward (line 647) | def forward( class ImageGPTForCausalImageModeling (line 883) | class ImageGPTForCausalImageModeling(ImageGPTPreTrainedModel): method __init__ (line 886) | def __init__(self, config: ImageGPTConfig): method get_output_embeddings (line 897) | def get_output_embeddings(self): method set_output_embeddings (line 900) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 903) | def prepare_inputs_for_generation(self, input_ids: torch.Tensor, past_... method forward (line 942) | def forward( method _reorder_cache (line 1062) | def _reorder_cache( class ImageGPTForImageClassification (line 1083) | class ImageGPTForImageClassification(ImageGPTPreTrainedModel): method __init__ (line 1084) | def __init__(self, config: ImageGPTConfig): method forward (line 1095) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/informer/configuration_informer.py class InformerConfig (line 26) | class InformerConfig(PretrainedConfig): method __init__ (line 137) | def __init__( method _number_of_features (line 239) | def _number_of_features(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/informer/modeling_informer.py class InformerFeatureEmbedder (line 44) | class InformerFeatureEmbedder(nn.Module): method __init__ (line 55) | def __init__(self, cardinalities: List[int], embedding_dims: List[int]... method forward (line 61) | def forward(self, features: torch.Tensor) -> torch.Tensor: class InformerStdScaler (line 79) | class InformerStdScaler(nn.Module): method __init__ (line 85) | def __init__(self, config: InformerConfig): method forward (line 91) | def forward( class InformerMeanScaler (line 115) | class InformerMeanScaler(nn.Module): method __init__ (line 121) | def __init__(self, config: InformerConfig): method forward (line 128) | def forward( class InformerNOPScaler (line 170) | class InformerNOPScaler(nn.Module): method __init__ (line 175) | def __init__(self, config: InformerConfig): method forward (line 180) | def forward( function weighted_average (line 198) | def weighted_average(input_tensor: torch.Tensor, weights: Optional[torch... function nll (line 223) | def nll(input: torch.distributions.Distribution, target: torch.Tensor) -... class InformerSinusoidalPositionalEmbedding (line 231) | class InformerSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 234) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 239) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 256) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class InformerValueEmbedding (line 266) | class InformerValueEmbedding(nn.Module): method __init__ (line 267) | def __init__(self, feature_size, d_model): method forward (line 271) | def forward(self, x): class InformerAttention (line 276) | class InformerAttention(nn.Module): method __init__ (line 279) | def __init__( method _shape (line 310) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 313) | def forward( class InformerProbSparseAttention (line 434) | class InformerProbSparseAttention(nn.Module): method __init__ (line 439) | def __init__( method _shape (line 468) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 471) | def forward( class InformerConvLayer (line 653) | class InformerConvLayer(nn.Module): method __init__ (line 654) | def __init__(self, c_in): method forward (line 667) | def forward(self, x): class InformerEncoderLayer (line 676) | class InformerEncoderLayer(nn.Module): method __init__ (line 677) | def __init__(self, config: InformerConfig): method forward (line 701) | def forward( class InformerDecoderLayer (line 752) | class InformerDecoderLayer(nn.Module): method __init__ (line 753) | def __init__(self, config: InformerConfig): method forward (line 788) | def forward( class InformerPreTrainedModel (line 878) | class InformerPreTrainedModel(PreTrainedModel): method _init_weights (line 884) | def _init_weights(self, module): class InformerEncoder (line 1067) | class InformerEncoder(InformerPreTrainedModel): method __init__ (line 1076) | def __init__(self, config: InformerConfig): method forward (line 1103) | def forward( class InformerDecoder (line 1219) | class InformerDecoder(InformerPreTrainedModel): method __init__ (line 1228) | def __init__(self, config: InformerConfig): method forward (line 1246) | def forward( class InformerModel (line 1441) | class InformerModel(InformerPreTrainedModel): method __init__ (line 1442) | def __init__(self, config: InformerConfig): method _past_length (line 1466) | def _past_length(self) -> int: method get_lagged_subsequences (line 1469) | def get_lagged_subsequences( method create_network_inputs (line 1501) | def create_network_inputs( method get_encoder (line 1573) | def get_encoder(self): method get_decoder (line 1576) | def get_decoder(self): method forward (line 1581) | def forward( class InformerForPrediction (line 1703) | class InformerForPrediction(InformerPreTrainedModel): method __init__ (line 1704) | def __init__(self, config: InformerConfig): method output_params (line 1727) | def output_params(self, dec_output): method get_encoder (line 1730) | def get_encoder(self): method get_decoder (line 1733) | def get_decoder(self): method output_distribution (line 1737) | def output_distribution(self, params, loc=None, scale=None, trailing_n... method forward (line 1745) | def forward( method generate (line 1878) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblip/configuration_instructblip.py class InstructBlipVisionConfig (line 29) | class InstructBlipVisionConfig(PretrainedConfig): method __init__ (line 82) | def __init__( method from_pretrained (line 112) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class InstructBlipQFormerConfig (line 130) | class InstructBlipQFormerConfig(PretrainedConfig): method __init__ (line 196) | def __init__( method from_pretrained (line 233) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class InstructBlipConfig (line 251) | class InstructBlipConfig(PretrainedConfig): method __init__ (line 309) | def __init__( method from_vision_qformer_text_configs (line 348) | def from_vision_qformer_text_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblip/convert_instructblip_original_to_pytorch.py function load_demo_image (line 49) | def load_demo_image(): function create_rename_keys (line 57) | def create_rename_keys(config): function rename_key (line 90) | def rename_key(dct, old, new): function read_in_q_v_bias (line 95) | def read_in_q_v_bias(state_dict, config): function get_blip2_config (line 106) | def get_blip2_config(model_name): function convert_blip2_checkpoint (line 131) | def convert_blip2_checkpoint(model_name, pytorch_dump_folder_path=None, ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblip/modeling_instructblip.py class InstructBlipForConditionalGenerationModelOutput (line 53) | class InstructBlipForConditionalGenerationModelOutput(ModelOutput): method to_tuple (line 76) | def to_tuple(self) -> Tuple[Any]: class InstructBlipVisionEmbeddings (line 86) | class InstructBlipVisionEmbeddings(nn.Module): method __init__ (line 87) | def __init__(self, config: InstructBlipVisionConfig): method interpolate_pos_encoding (line 105) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 138) | def forward(self, pixel_values: torch.FloatTensor, interpolate_pos_enc... class InstructBlipAttention (line 154) | class InstructBlipAttention(nn.Module): method __init__ (line 157) | def __init__(self, config): method _shape (line 187) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 190) | def forward( class InstructBlipMLP (line 236) | class InstructBlipMLP(nn.Module): method __init__ (line 237) | def __init__(self, config): method forward (line 244) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class InstructBlipEncoderLayer (line 252) | class InstructBlipEncoderLayer(nn.Module): method __init__ (line 253) | def __init__(self, config: InstructBlipConfig): method forward (line 261) | def forward( class InstructBlipPreTrainedModel (line 300) | class InstructBlipPreTrainedModel(PreTrainedModel): method _init_weights (line 318) | def _init_weights(self, module): class InstructBlipEncoder (line 438) | class InstructBlipEncoder(nn.Module): method __init__ (line 448) | def __init__(self, config: InstructBlipConfig): method forward (line 454) | def forward( class InstructBlipVisionModel (line 525) | class InstructBlipVisionModel(InstructBlipPreTrainedModel): method __init__ (line 529) | def __init__(self, config: InstructBlipVisionConfig): method forward (line 542) | def forward( method get_input_embeddings (line 588) | def get_input_embeddings(self): class InstructBlipQFormerMultiHeadAttention (line 592) | class InstructBlipQFormerMultiHeadAttention(nn.Module): method __init__ (line 593) | def __init__(self, config, is_cross_attention=False): method save_attn_gradients (line 621) | def save_attn_gradients(self, attn_gradients): method get_attn_gradients (line 624) | def get_attn_gradients(self): method save_attention_map (line 627) | def save_attention_map(self, attention_map): method get_attention_map (line 630) | def get_attention_map(self): method transpose_for_scores (line 633) | def transpose_for_scores(self, x): method forward (line 638) | def forward( class InstructBlipQFormerSelfOutput (line 726) | class InstructBlipQFormerSelfOutput(nn.Module): method __init__ (line 727) | def __init__(self, config): method forward (line 733) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class InstructBlipQFormerAttention (line 741) | class InstructBlipQFormerAttention(nn.Module): method __init__ (line 742) | def __init__(self, config, is_cross_attention=False): method prune_heads (line 748) | def prune_heads(self, heads): method forward (line 766) | def forward( class InstructBlipQFormerIntermediate (line 791) | class InstructBlipQFormerIntermediate(nn.Module): method __init__ (line 792) | def __init__(self, config): method forward (line 800) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class InstructBlipQFormerOutput (line 807) | class InstructBlipQFormerOutput(nn.Module): method __init__ (line 808) | def __init__(self, config): method forward (line 814) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class InstructBlipQFormerLayer (line 821) | class InstructBlipQFormerLayer(nn.Module): method __init__ (line 822) | def __init__(self, config, layer_idx): method forward (line 842) | def forward( method feed_forward_chunk (line 913) | def feed_forward_chunk(self, attention_output): method feed_forward_chunk_query (line 918) | def feed_forward_chunk_query(self, attention_output): class InstructBlipQFormerEncoder (line 925) | class InstructBlipQFormerEncoder(nn.Module): method __init__ (line 926) | def __init__(self, config): method forward (line 934) | def forward( class InstructBlipQFormerEmbeddings (line 1020) | class InstructBlipQFormerEmbeddings(nn.Module): method __init__ (line 1023) | def __init__(self, config): method forward (line 1039) | def forward( class InstructBlipQFormerModel (line 1071) | class InstructBlipQFormerModel(InstructBlipPreTrainedModel): method __init__ (line 1077) | def __init__(self, config: InstructBlipQFormerConfig): method get_input_embeddings (line 1087) | def get_input_embeddings(self): method set_input_embeddings (line 1090) | def set_input_embeddings(self, value): method _prune_heads (line 1093) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 1101) | def get_extended_attention_mask( method forward (line 1144) | def forward( class InstructBlipForConditionalGeneration (line 1277) | class InstructBlipForConditionalGeneration(InstructBlipPreTrainedModel): method __init__ (line 1281) | def __init__(self, config: InstructBlipConfig): method get_input_embeddings (line 1311) | def get_input_embeddings(self): method set_input_embeddings (line 1314) | def set_input_embeddings(self, value): method set_output_embeddings (line 1317) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1320) | def get_output_embeddings(self) -> nn.Module: method get_encoder (line 1323) | def get_encoder(self): method get_decoder (line 1326) | def get_decoder(self): method _tie_weights (line 1329) | def _tie_weights(self): method _preprocess_accelerate (line 1334) | def _preprocess_accelerate(self): method forward (line 1358) | def forward( method generate (line 1524) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblip/processing_instructblip.py class InstructBlipProcessor (line 40) | class InstructBlipProcessor(ProcessorMixin): method __init__ (line 64) | def __init__(self, image_processor, tokenizer, qformer_tokenizer=None,... method __call__ (line 72) | def __call__( method batch_decode (line 179) | def batch_decode(self, *args, **kwargs): method decode (line 187) | def decode(self, *args, **kwargs): method model_input_names (line 196) | def model_input_names(self): method save_pretrained (line 202) | def save_pretrained(self, save_directory, **kwargs): method from_pretrained (line 212) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblipvideo/configuration_instructblipvideo.py class InstructBlipVideoVisionConfig (line 36) | class InstructBlipVideoVisionConfig(PretrainedConfig): method __init__ (line 89) | def __init__( method from_pretrained (line 119) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class InstructBlipVideoQFormerConfig (line 137) | class InstructBlipVideoQFormerConfig(PretrainedConfig): method __init__ (line 203) | def __init__( method from_pretrained (line 240) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class InstructBlipVideoConfig (line 258) | class InstructBlipVideoConfig(PretrainedConfig): method __init__ (line 316) | def __init__( method from_vision_qformer_text_configs (line 355) | def from_vision_qformer_text_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblipvideo/convert_instructblipvideo_original_to_pytorch.py function load_demo_image (line 49) | def load_demo_image(): function create_rename_keys (line 57) | def create_rename_keys(config): function rename_key (line 90) | def rename_key(dct, old, new): function read_in_q_v_bias (line 95) | def read_in_q_v_bias(state_dict, config): function get_blip2_config (line 106) | def get_blip2_config(model_name): function convert_blip2_checkpoint (line 133) | def convert_blip2_checkpoint(model_name, pytorch_dump_folder_path=None, ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblipvideo/diff_instructblipvideo.py class InstructBlipVideoVisionConfig (line 54) | class InstructBlipVideoVisionConfig(InstructBlipVisionConfig): class InstructBlipVideoQFormerConfig (line 58) | class InstructBlipVideoQFormerConfig(InstructBlipQFormerConfig): class InstructBlipVideoConfig (line 62) | class InstructBlipVideoConfig(InstructBlipConfig): class InstructBlipVideoForConditionalGenerationModelOutput (line 67) | class InstructBlipVideoForConditionalGenerationModelOutput(InstructBlipF... class InstructBlipVideoVisionEmbeddings (line 71) | class InstructBlipVideoVisionEmbeddings(InstructBlipVisionEmbeddings): class InstructBlipVideoAttention (line 75) | class InstructBlipVideoAttention(InstructBlipAttention): class InstructBlipVideoMLP (line 79) | class InstructBlipVideoMLP(InstructBlipMLP): class InstructBlipVideoEncoderLayer (line 83) | class InstructBlipVideoEncoderLayer(InstructBlipEncoderLayer): class InstructBlipVideoPreTrainedModel (line 87) | class InstructBlipVideoPreTrainedModel(InstructBlipPreTrainedModel): class InstructBlipVideoEncoder (line 91) | class InstructBlipVideoEncoder(InstructBlipEncoder): class InstructBlipVideoVisionModel (line 95) | class InstructBlipVideoVisionModel(InstructBlipVisionModel): class InstructBlipVideoQFormerSelfOutput (line 99) | class InstructBlipVideoQFormerSelfOutput(InstructBlipQFormerSelfOutput): class InstructBlipVideoQFormerAttention (line 103) | class InstructBlipVideoQFormerAttention(InstructBlipQFormerAttention): class InstructBlipVideoQFormerIntermediate (line 107) | class InstructBlipVideoQFormerIntermediate(InstructBlipQFormerIntermedia... class InstructBlipVideoQFormerOutput (line 111) | class InstructBlipVideoQFormerOutput(InstructBlipQFormerOutput): class InstructBlipVideoQFormerLayer (line 115) | class InstructBlipVideoQFormerLayer(InstructBlipQFormerLayer): class InstructBlipVideoQFormerEncoder (line 119) | class InstructBlipVideoQFormerEncoder(InstructBlipQFormerEncoder): class InstructBlipVideoQFormerEmbeddings (line 123) | class InstructBlipVideoQFormerEmbeddings(InstructBlipQFormerEmbeddings): class InstructBlipVideoQFormerModel (line 127) | class InstructBlipVideoQFormerModel(InstructBlipQFormerModel): class InstructBlipVideoForConditionalGeneration (line 131) | class InstructBlipVideoForConditionalGeneration(InstructBlipForCondition... method forward (line 132) | def forward( method generate (line 331) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblipvideo/image_processing_instructblipvideo.py function make_batched_videos (line 50) | def make_batched_videos(videos) -> List[VideoInput]: class InstructBlipVideoImageProcessor (line 67) | class InstructBlipVideoImageProcessor(BaseImageProcessor): method __init__ (line 104) | def __init__( method resize (line 132) | def resize( method preprocess (line 183) | def preprocess( method _preprocess_image (line 302) | def _preprocess_image( FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py class InstructBlipVideoForConditionalGenerationModelOutput (line 61) | class InstructBlipVideoForConditionalGenerationModelOutput(ModelOutput): method to_tuple (line 84) | def to_tuple(self) -> Tuple[Any]: class InstructBlipVideoVisionEmbeddings (line 94) | class InstructBlipVideoVisionEmbeddings(nn.Module): method __init__ (line 95) | def __init__(self, config: InstructBlipVideoVisionConfig): method interpolate_pos_encoding (line 113) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 146) | def forward(self, pixel_values: torch.FloatTensor, interpolate_pos_enc... class InstructBlipVideoAttention (line 162) | class InstructBlipVideoAttention(nn.Module): method __init__ (line 165) | def __init__(self, config): method _shape (line 195) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 198) | def forward( class InstructBlipVideoMLP (line 244) | class InstructBlipVideoMLP(nn.Module): method __init__ (line 245) | def __init__(self, config): method forward (line 252) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class InstructBlipVideoEncoderLayer (line 260) | class InstructBlipVideoEncoderLayer(nn.Module): method __init__ (line 261) | def __init__(self, config: InstructBlipVideoConfig): method forward (line 269) | def forward( class InstructBlipVideoPreTrainedModel (line 308) | class InstructBlipVideoPreTrainedModel(PreTrainedModel): method _init_weights (line 326) | def _init_weights(self, module): class InstructBlipVideoEncoder (line 366) | class InstructBlipVideoEncoder(nn.Module): method __init__ (line 376) | def __init__(self, config: InstructBlipVideoConfig): method forward (line 382) | def forward( class InstructBlipVideoVisionModel (line 534) | class InstructBlipVideoVisionModel(InstructBlipVideoPreTrainedModel): method __init__ (line 538) | def __init__(self, config: InstructBlipVideoVisionConfig): method forward (line 551) | def forward( method get_input_embeddings (line 597) | def get_input_embeddings(self): class InstructBlipVideoQFormerMultiHeadAttention (line 601) | class InstructBlipVideoQFormerMultiHeadAttention(nn.Module): method __init__ (line 602) | def __init__(self, config, is_cross_attention=False): method save_attn_gradients (line 630) | def save_attn_gradients(self, attn_gradients): method get_attn_gradients (line 633) | def get_attn_gradients(self): method save_attention_map (line 636) | def save_attention_map(self, attention_map): method get_attention_map (line 639) | def get_attention_map(self): method transpose_for_scores (line 642) | def transpose_for_scores(self, x): method forward (line 647) | def forward( class InstructBlipVideoQFormerSelfOutput (line 735) | class InstructBlipVideoQFormerSelfOutput(nn.Module): method __init__ (line 736) | def __init__(self, config): method forward (line 742) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class InstructBlipVideoQFormerAttention (line 750) | class InstructBlipVideoQFormerAttention(nn.Module): method __init__ (line 751) | def __init__(self, config, is_cross_attention=False): method prune_heads (line 757) | def prune_heads(self, heads): method forward (line 775) | def forward( class InstructBlipVideoQFormerIntermediate (line 800) | class InstructBlipVideoQFormerIntermediate(nn.Module): method __init__ (line 801) | def __init__(self, config): method forward (line 809) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class InstructBlipVideoQFormerOutput (line 816) | class InstructBlipVideoQFormerOutput(nn.Module): method __init__ (line 817) | def __init__(self, config): method forward (line 823) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class InstructBlipVideoQFormerLayer (line 830) | class InstructBlipVideoQFormerLayer(nn.Module): method __init__ (line 831) | def __init__(self, config, layer_idx): method forward (line 851) | def forward( method feed_forward_chunk (line 922) | def feed_forward_chunk(self, attention_output): method feed_forward_chunk_query (line 927) | def feed_forward_chunk_query(self, attention_output): class InstructBlipVideoQFormerEncoder (line 934) | class InstructBlipVideoQFormerEncoder(nn.Module): method __init__ (line 935) | def __init__(self, config): method forward (line 943) | def forward( class InstructBlipVideoQFormerEmbeddings (line 1029) | class InstructBlipVideoQFormerEmbeddings(nn.Module): method __init__ (line 1032) | def __init__(self, config): method forward (line 1048) | def forward( class InstructBlipVideoQFormerModel (line 1080) | class InstructBlipVideoQFormerModel(InstructBlipVideoPreTrainedModel): method __init__ (line 1086) | def __init__(self, config: InstructBlipVideoQFormerConfig): method get_input_embeddings (line 1096) | def get_input_embeddings(self): method set_input_embeddings (line 1099) | def set_input_embeddings(self, value): method _prune_heads (line 1102) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 1110) | def get_extended_attention_mask( method forward (line 1153) | def forward( class InstructBlipVideoForConditionalGeneration (line 1286) | class InstructBlipVideoForConditionalGeneration(InstructBlipVideoPreTrai... method __init__ (line 1290) | def __init__(self, config: InstructBlipVideoConfig): method get_input_embeddings (line 1320) | def get_input_embeddings(self): method set_input_embeddings (line 1323) | def set_input_embeddings(self, value): method set_output_embeddings (line 1326) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1329) | def get_output_embeddings(self) -> nn.Module: method get_encoder (line 1332) | def get_encoder(self): method get_decoder (line 1335) | def get_decoder(self): method _tie_weights (line 1338) | def _tie_weights(self): method _preprocess_accelerate (line 1343) | def _preprocess_accelerate(self): method forward (line 1367) | def forward( method generate (line 1567) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/instructblipvideo/processing_instructblipvideo.py class InstructBlipVideoProcessor (line 40) | class InstructBlipVideoProcessor(ProcessorMixin): method __init__ (line 64) | def __init__(self, image_processor, tokenizer, qformer_tokenizer=None,... method __call__ (line 72) | def __call__( method batch_decode (line 178) | def batch_decode(self, *args, **kwargs): method decode (line 186) | def decode(self, *args, **kwargs): method model_input_names (line 195) | def model_input_names(self): method save_pretrained (line 201) | def save_pretrained(self, save_directory, **kwargs): method from_pretrained (line 211) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/jamba/configuration_jamba.py class JambaConfig (line 26) | class JambaConfig(PretrainedConfig): method __init__ (line 128) | def __init__( method layers_block_type (line 213) | def layers_block_type(self): method layers_num_experts (line 220) | def layers_num_experts(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/jamba/modeling_jamba.py function load_balancing_loss_func (line 83) | def load_balancing_loss_func( class JambaRMSNorm (line 165) | class JambaRMSNorm(nn.Module): method __init__ (line 166) | def __init__(self, hidden_size, eps=1e-6): method forward (line 174) | def forward(self, hidden_states): method extra_repr (line 181) | def extra_repr(self): function repeat_kv (line 186) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class HybridMambaAttentionDynamicCache (line 198) | class HybridMambaAttentionDynamicCache(DynamicCache): method __init__ (line 212) | def __init__(self, config, batch_size, dtype=torch.float16, device=None): method update (line 239) | def update( method reorder_cache (line 256) | def reorder_cache(self, beam_idx: torch.LongTensor): method get_seq_length (line 269) | def get_seq_length(self, layer_idx: Optional[int] = 0) -> int: method to_legacy_cache (line 277) | def to_legacy_cache(self) -> Tuple[Tuple[torch.Tensor], Tuple[torch.Te... method from_legacy_cache (line 281) | def from_legacy_cache(cls, past_key_values: Optional[Tuple[Tuple[torch... class JambaAttention (line 286) | class JambaAttention(nn.Module): method __init__ (line 292) | def __init__(self, config: JambaConfig, layer_idx: Optional[int] = None): method forward (line 321) | def forward( class JambaFlashAttention2 (line 377) | class JambaFlashAttention2(JambaAttention): method __init__ (line 385) | def __init__(self, *args, **kwargs): method forward (line 393) | def forward( class JambaSdpaAttention (line 501) | class JambaSdpaAttention(JambaAttention): method forward (line 509) | def forward( class JambaMambaMixer (line 591) | class JambaMambaMixer(nn.Module): method __init__ (line 599) | def __init__(self, config: JambaConfig, layer_idx): method cuda_kernels_forward (line 651) | def cuda_kernels_forward(self, hidden_states: torch.Tensor, cache_para... method slow_forward (line 744) | def slow_forward(self, input_states, cache_params: HybridMambaAttentio... method forward (line 823) | def forward(self, hidden_states, cache_params: HybridMambaAttentionDyn... class JambaMLP (line 834) | class JambaMLP(nn.Module): method __init__ (line 835) | def __init__(self, config): method forward (line 844) | def forward(self, hidden_state): class JambaSparseMoeBlock (line 849) | class JambaSparseMoeBlock(nn.Module): method __init__ (line 861) | def __init__(self, config: JambaConfig): method forward (line 871) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor, ... class JambaAttentionDecoderLayer (line 912) | class JambaAttentionDecoderLayer(nn.Module): method __init__ (line 913) | def __init__(self, config: JambaConfig, layer_idx: int): method forward (line 923) | def forward( class JambaMambaDecoderLayer (line 994) | class JambaMambaDecoderLayer(nn.Module): method __init__ (line 995) | def __init__(self, config: JambaConfig, layer_idx: int): method forward (line 1005) | def forward( class JambaPreTrainedModel (line 1093) | class JambaPreTrainedModel(PreTrainedModel): method _init_weights (line 1104) | def _init_weights(self, module): class JambaModel (line 1195) | class JambaModel(JambaPreTrainedModel): method __init__ (line 1203) | def __init__(self, config: JambaConfig): method get_input_embeddings (line 1222) | def get_input_embeddings(self): method set_input_embeddings (line 1225) | def set_input_embeddings(self, value): method forward (line 1229) | def forward( method _update_causal_mask (line 1351) | def _update_causal_mask(self, attention_mask, input_tensor, cache_posi... class JambaForCausalLM (line 1388) | class JambaForCausalLM(JambaPreTrainedModel): method __init__ (line 1391) | def __init__(self, config: JambaConfig): method get_input_embeddings (line 1402) | def get_input_embeddings(self): method set_input_embeddings (line 1405) | def set_input_embeddings(self, value): method get_output_embeddings (line 1408) | def get_output_embeddings(self): method set_output_embeddings (line 1411) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1414) | def set_decoder(self, decoder): method get_decoder (line 1417) | def get_decoder(self): method forward (line 1423) | def forward( method prepare_inputs_for_generation (line 1542) | def prepare_inputs_for_generation( class JambaForSequenceClassification (line 1612) | class JambaForSequenceClassification(JambaPreTrainedModel): method __init__ (line 1613) | def __init__(self, config): method get_input_embeddings (line 1622) | def get_input_embeddings(self): method set_input_embeddings (line 1625) | def set_input_embeddings(self, value): method forward (line 1629) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/jetmoe/configuration_jetmoe.py class JetMoeConfig (line 24) | class JetMoeConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/jetmoe/modeling_jetmoe.py function _prepare_4d_causal_attention_mask_with_cache_position (line 56) | def _prepare_4d_causal_attention_mask_with_cache_position( function load_balancing_loss_func (line 110) | def load_balancing_loss_func( class JetMoeParallelExperts (line 186) | class JetMoeParallelExperts(nn.Module): method __init__ (line 187) | def __init__(self, num_experts: int, input_size: int, output_size: int... method forward (line 210) | def forward(self, inputs, expert_size): class JetMoeTopKGating (line 231) | class JetMoeTopKGating(nn.Module): method __init__ (line 232) | def __init__(self, input_size: int, num_experts: int, top_k: int): method forward (line 252) | def forward(self, hidden_states): class JetMoeMoE (line 278) | class JetMoeMoE(nn.Module): method __init__ (line 287) | def __init__(self, config: JetMoeConfig): method forward (line 303) | def forward(self, layer_input): class JetMoeMoA (line 336) | class JetMoeMoA(nn.Module): method __init__ (line 345) | def __init__(self, config: JetMoeConfig): method map (line 363) | def map(self, layer_input): method reduce (line 386) | def reduce(self, layer_input, topo_info): method forward (line 408) | def forward(self, layer_input): class JetMoeRMSNorm (line 413) | class JetMoeRMSNorm(nn.Module): method __init__ (line 414) | def __init__(self, hidden_size, eps=1e-6): method forward (line 422) | def forward(self, hidden_states): method extra_repr (line 429) | def extra_repr(self): class JetMoeRotaryEmbedding (line 434) | class JetMoeRotaryEmbedding(nn.Module): method __init__ (line 435) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 446) | def forward(self, x, position_ids, seq_len=None): function rotate_half (line 464) | def rotate_half(x): function apply_rotary_pos_emb (line 472) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... class JetMoeAttention (line 499) | class JetMoeAttention(nn.Module): method __init__ (line 504) | def __init__(self, config: JetMoeConfig, layer_idx: Optional[int] = No... method forward (line 542) | def forward( class JetMoeSdpaAttention (line 602) | class JetMoeSdpaAttention(JetMoeAttention): method forward (line 610) | def forward( class JetMoeFlashAttention2 (line 690) | class JetMoeFlashAttention2(JetMoeAttention): method __init__ (line 692) | def __init__(self, *args, **kwargs): method forward (line 700) | def forward( class JetMoeBlock (line 813) | class JetMoeBlock(nn.Module): method __init__ (line 814) | def __init__(self, config: JetMoeConfig, layer_idx: Optional[int] = No... method forward (line 829) | def forward( class JetMoePreTrainedModel (line 869) | class JetMoePreTrainedModel(PreTrainedModel): method _init_weights (line 884) | def _init_weights(self, module): class JetMoeModel (line 965) | class JetMoeModel(JetMoePreTrainedModel): method __init__ (line 974) | def __init__(self, config: JetMoeConfig): method get_input_embeddings (line 989) | def get_input_embeddings(self): method set_input_embeddings (line 993) | def set_input_embeddings(self, value): method forward (line 997) | def forward( method _update_causal_mask (line 1130) | def _update_causal_mask( class JetMoeForCausalLM (line 1202) | class JetMoeForCausalLM(JetMoePreTrainedModel): method __init__ (line 1205) | def __init__(self, config): method get_input_embeddings (line 1217) | def get_input_embeddings(self): method set_input_embeddings (line 1221) | def set_input_embeddings(self, value): method get_output_embeddings (line 1225) | def get_output_embeddings(self): method set_output_embeddings (line 1229) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1233) | def set_decoder(self, decoder): method get_decoder (line 1237) | def get_decoder(self): method forward (line 1242) | def forward( method prepare_inputs_for_generation (line 1332) | def prepare_inputs_for_generation( class JetMoeForSequenceClassification (line 1395) | class JetMoeForSequenceClassification(JetMoePreTrainedModel): method __init__ (line 1396) | def __init__(self, config): method get_input_embeddings (line 1405) | def get_input_embeddings(self): method set_input_embeddings (line 1408) | def set_input_embeddings(self, value): method forward (line 1412) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/kosmos2/configuration_kosmos2.py class Kosmos2TextConfig (line 27) | class Kosmos2TextConfig(PretrainedConfig): method __init__ (line 82) | def __init__( method from_pretrained (line 128) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class Kosmos2VisionConfig (line 146) | class Kosmos2VisionConfig(PretrainedConfig): method __init__ (line 187) | def __init__( method from_pretrained (line 219) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class Kosmos2Config (line 237) | class Kosmos2Config(PretrainedConfig): method __init__ (line 272) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/kosmos2/convert_kosmos2_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 35) | def rename_key(key): function convert_kosmos2_checkpoint_to_pytorch (line 43) | def convert_kosmos2_checkpoint_to_pytorch(checkpoint_path, pytorch_dump_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/kosmos2/modeling_kosmos2.py function _expand_mask (line 49) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function _make_causal_mask (line 63) | def _make_causal_mask( function create_position_ids_from_input_ids (line 81) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class Kosmos2ModelOutput (line 267) | class Kosmos2ModelOutput(ModelOutput): method to_tuple (line 314) | def to_tuple(self) -> Tuple[Any]: class Kosmos2ForConditionalGenerationModelOutput (line 322) | class Kosmos2ForConditionalGenerationModelOutput(ModelOutput): method to_tuple (line 372) | def to_tuple(self) -> Tuple[Any]: class Kosmos2VisionEmbeddings (line 380) | class Kosmos2VisionEmbeddings(nn.Module): method __init__ (line 381) | def __init__(self, config: Kosmos2VisionConfig): method forward (line 403) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class Kosmos2VisionAttention (line 416) | class Kosmos2VisionAttention(nn.Module): method __init__ (line 419) | def __init__(self, config): method _shape (line 438) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 441) | def forward( class Kosmos2VisionMLP (line 521) | class Kosmos2VisionMLP(nn.Module): method __init__ (line 522) | def __init__(self, config): method forward (line 529) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Kosmos2VisionEncoderLayer (line 537) | class Kosmos2VisionEncoderLayer(nn.Module): method __init__ (line 538) | def __init__(self, config: Kosmos2VisionConfig): method forward (line 546) | def forward( class Kosmos2VisionEncoder (line 588) | class Kosmos2VisionEncoder(nn.Module): method __init__ (line 597) | def __init__(self, config: Kosmos2VisionConfig): method forward (line 603) | def forward( class Kosmos2VisionTransformer (line 686) | class Kosmos2VisionTransformer(nn.Module): method __init__ (line 688) | def __init__(self, config: Kosmos2VisionConfig): method forward (line 698) | def forward( class Kosmos2TextSinusoidalPositionalEmbedding (line 740) | class Kosmos2TextSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 744) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 752) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 762) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 783) | def forward( method create_position_ids_from_inputs_embeds (line 810) | def create_position_ids_from_inputs_embeds(self, inputs_embeds, past_k... class KosmosTextAttention (line 828) | class KosmosTextAttention(nn.Module): method __init__ (line 832) | def __init__( method _shape (line 866) | def _shape(self, projection: torch.Tensor) -> torch.Tensor: method forward (line 872) | def forward( class Kosmos2TextFFN (line 947) | class Kosmos2TextFFN(nn.Module): method __init__ (line 948) | def __init__(self, config: Kosmos2TextConfig): method forward (line 960) | def forward(self, hidden_states): class Kosmos2TextBlock (line 970) | class Kosmos2TextBlock(nn.Module): method __init__ (line 971) | def __init__(self, config: Kosmos2TextConfig): method forward (line 1000) | def forward( class Kosmos2TextTransformer (line 1081) | class Kosmos2TextTransformer(nn.Module): method __init__ (line 1089) | def __init__(self, config: Kosmos2TextConfig): method _prepare_decoder_attention_mask (line 1109) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward_embedding (line 1132) | def forward_embedding( method forward (line 1167) | def forward( class Kosmos2PreTrainedModel (line 1329) | class Kosmos2PreTrainedModel(PreTrainedModel): method _init_weights (line 1339) | def _init_weights(self, module): class Kosmos2VisionModel (line 1423) | class Kosmos2VisionModel(Kosmos2PreTrainedModel): method __init__ (line 1428) | def __init__(self, config: Kosmos2VisionConfig): method get_input_embeddings (line 1435) | def get_input_embeddings(self) -> nn.Module: method forward (line 1440) | def forward( class Kosmos2TextModel (line 1459) | class Kosmos2TextModel(Kosmos2PreTrainedModel): method __init__ (line 1462) | def __init__(self, config: Kosmos2TextConfig): method get_input_embeddings (line 1468) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1471) | def set_input_embeddings(self, value): method forward (line 1476) | def forward( class Kosmos2TextForCausalLM (line 1524) | class Kosmos2TextForCausalLM(Kosmos2PreTrainedModel): method __init__ (line 1528) | def __init__(self, config: Kosmos2TextConfig): method get_input_embeddings (line 1537) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1540) | def set_input_embeddings(self, value): method get_output_embeddings (line 1543) | def get_output_embeddings(self) -> nn.Module: method set_output_embeddings (line 1546) | def set_output_embeddings(self, new_embeddings): method forward (line 1551) | def forward( method prepare_inputs_for_generation (line 1632) | def prepare_inputs_for_generation( method _reorder_cache (line 1685) | def _reorder_cache(past_key_values, beam_idx): class Kosmos2ImageToTextProjection (line 1694) | class Kosmos2ImageToTextProjection(nn.Module): method __init__ (line 1697) | def __init__(self, config: Kosmos2Config): method forward (line 1711) | def forward(self, features): class Kosmos2Model (line 1735) | class Kosmos2Model(Kosmos2PreTrainedModel): method __init__ (line 1739) | def __init__(self, config: Kosmos2Config): method get_input_embeddings (line 1749) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1752) | def set_input_embeddings(self, value): method forward (line 1757) | def forward( class Kosmos2ForConditionalGeneration (line 1867) | class Kosmos2ForConditionalGeneration(Kosmos2PreTrainedModel): method __init__ (line 1872) | def __init__(self, config: Kosmos2Config): method get_input_embeddings (line 1883) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1886) | def set_input_embeddings(self, value): method get_output_embeddings (line 1889) | def get_output_embeddings(self) -> nn.Module: method set_output_embeddings (line 1892) | def set_output_embeddings(self, new_embeddings): method forward (line 1897) | def forward( method generate (line 2015) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/kosmos2/processing_kosmos2.py class Kosmos2Processor (line 38) | class Kosmos2Processor(ProcessorMixin): method __init__ (line 61) | def __init__(self, image_processor, tokenizer, num_patch_index_tokens=... method __call__ (line 106) | def __call__( method _check_bboxes_for_single_text (line 273) | def _check_bboxes_for_single_text(self, bboxes): method _preprocess_single_example (line 308) | def _preprocess_single_example(self, text, image, bboxes, img_info_tok... method preprocess_examples (line 318) | def preprocess_examples( method batch_decode (line 385) | def batch_decode(self, *args, **kwargs): method decode (line 393) | def decode(self, *args, **kwargs): method post_process_generation (line 400) | def post_process_generation(self, text, cleanup_and_extract=True): method model_input_names (line 408) | def model_input_names(self): method _insert_patch_index_tokens (line 413) | def _insert_patch_index_tokens(self, text: str, bboxes: Union[List[Tup... method _convert_bbox_to_patch_index_tokens (line 458) | def _convert_bbox_to_patch_index_tokens( function coordinate_to_patch_index (line 476) | def coordinate_to_patch_index(bbox: Tuple[float, float, float, float], n... function patch_index_to_coordinate (line 507) | def patch_index_to_coordinate(ul_idx: int, lr_idx: int, num_patches_per_... function extract_entities_with_patch_indices (line 552) | def extract_entities_with_patch_indices(text): function adjust_entity_positions (line 610) | def adjust_entity_positions(entity, text): function _cleanup_spaces (line 620) | def _cleanup_spaces(text, entities): function clean_text_and_extract_entities_with_bboxes (line 641) | def clean_text_and_extract_entities_with_bboxes(text, num_patches_per_si... FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlm/configuration_layoutlm.py class LayoutLMConfig (line 28) | class LayoutLMConfig(PretrainedConfig): method __init__ (line 99) | def __init__( class LayoutLMOnnxConfig (line 137) | class LayoutLMOnnxConfig(OnnxConfig): method __init__ (line 138) | def __init__( method inputs (line 148) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 158) | def generate_dummy_inputs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlm/modeling_layoutlm.py class LayoutLMEmbeddings (line 49) | class LayoutLMEmbeddings(nn.Module): method __init__ (line 52) | def __init__(self, config): method forward (line 69) | def forward( class LayoutLMSelfAttention (line 126) | class LayoutLMSelfAttention(nn.Module): method __init__ (line 127) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 153) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 158) | def forward( class LayoutLMSelfOutput (line 261) | class LayoutLMSelfOutput(nn.Module): method __init__ (line 262) | def __init__(self, config): method forward (line 268) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMAttention (line 281) | class LayoutLMAttention(nn.Module): method __init__ (line 282) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 290) | def prune_heads(self, heads): method forward (line 308) | def forward( class LayoutLMIntermediate (line 333) | class LayoutLMIntermediate(nn.Module): method __init__ (line 334) | def __init__(self, config): method forward (line 342) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMOutput (line 349) | class LayoutLMOutput(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 LayoutLMLayer (line 364) | class LayoutLMLayer(nn.Module): method __init__ (line 365) | def __init__(self, config): method forward (line 379) | def forward( method feed_forward_chunk (line 444) | def feed_forward_chunk(self, attention_output): class LayoutLMEncoder (line 451) | class LayoutLMEncoder(nn.Module): method __init__ (line 452) | def __init__(self, config): method forward (line 458) | def forward( class LayoutLMPooler (line 545) | class LayoutLMPooler(nn.Module): method __init__ (line 546) | def __init__(self, config): method forward (line 551) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMPredictionHeadTransform (line 561) | class LayoutLMPredictionHeadTransform(nn.Module): method __init__ (line 562) | def __init__(self, config): method forward (line 571) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMLMPredictionHead (line 579) | class LayoutLMLMPredictionHead(nn.Module): method __init__ (line 580) | def __init__(self, config): method _tie_weights (line 593) | def _tie_weights(self): method forward (line 596) | def forward(self, hidden_states): class LayoutLMOnlyMLMHead (line 603) | class LayoutLMOnlyMLMHead(nn.Module): method __init__ (line 604) | def __init__(self, config): method forward (line 608) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class LayoutLMPreTrainedModel (line 613) | class LayoutLMPreTrainedModel(PreTrainedModel): method _init_weights (line 623) | def _init_weights(self, module): class LayoutLMModel (line 706) | class LayoutLMModel(LayoutLMPreTrainedModel): method __init__ (line 707) | def __init__(self, config): method get_input_embeddings (line 718) | def get_input_embeddings(self): method set_input_embeddings (line 721) | def set_input_embeddings(self, value): method _prune_heads (line 724) | def _prune_heads(self, heads_to_prune): method forward (line 734) | def forward( class LayoutLMForMaskedLM (line 855) | class LayoutLMForMaskedLM(LayoutLMPreTrainedModel): method __init__ (line 858) | def __init__(self, config): method get_input_embeddings (line 867) | def get_input_embeddings(self): method get_output_embeddings (line 870) | def get_output_embeddings(self): method set_output_embeddings (line 873) | def set_output_embeddings(self, new_embeddings): method forward (line 879) | def forward( class LayoutLMForSequenceClassification (line 987) | class LayoutLMForSequenceClassification(LayoutLMPreTrainedModel): method __init__ (line 988) | def __init__(self, config): method get_input_embeddings (line 998) | def get_input_embeddings(self): method forward (line 1003) | def forward( class LayoutLMForTokenClassification (line 1124) | class LayoutLMForTokenClassification(LayoutLMPreTrainedModel): method __init__ (line 1125) | def __init__(self, config): method get_input_embeddings (line 1135) | def get_input_embeddings(self): method forward (line 1140) | def forward( class LayoutLMForQuestionAnswering (line 1242) | class LayoutLMForQuestionAnswering(LayoutLMPreTrainedModel): method __init__ (line 1243) | def __init__(self, config, has_visual_segment_embedding=True): method get_input_embeddings (line 1253) | def get_input_embeddings(self): method forward (line 1257) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlm/modeling_tf_layoutlm.py class TFLayoutLMEmbeddings (line 57) | class TFLayoutLMEmbeddings(keras.layers.Layer): method __init__ (line 60) | def __init__(self, config: LayoutLMConfig, **kwargs): method build (line 71) | def build(self, input_shape=None): method call (line 128) | def call( class TFLayoutLMSelfAttention (line 192) | class TFLayoutLMSelfAttention(keras.layers.Layer): method __init__ (line 193) | def __init__(self, config: LayoutLMConfig, **kwargs): method transpose_for_scores (line 221) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 228) | def call( method build (line 309) | def build(self, input_shape=None): class TFLayoutLMSelfOutput (line 325) | class TFLayoutLMSelfOutput(keras.layers.Layer): method __init__ (line 326) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 336) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 343) | def build(self, input_shape=None): class TFLayoutLMAttention (line 356) | class TFLayoutLMAttention(keras.layers.Layer): method __init__ (line 357) | def __init__(self, config: LayoutLMConfig, **kwargs): method prune_heads (line 363) | def prune_heads(self, heads): method call (line 366) | def call( method build (line 395) | def build(self, input_shape=None): class TFLayoutLMIntermediate (line 408) | class TFLayoutLMIntermediate(keras.layers.Layer): method __init__ (line 409) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 422) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 428) | def build(self, input_shape=None): class TFLayoutLMOutput (line 438) | class TFLayoutLMOutput(keras.layers.Layer): method __init__ (line 439) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 449) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 456) | def build(self, input_shape=None): class TFLayoutLMLayer (line 469) | class TFLayoutLMLayer(keras.layers.Layer): method __init__ (line 470) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 483) | def call( method build (line 554) | def build(self, input_shape=None): class TFLayoutLMEncoder (line 573) | class TFLayoutLMEncoder(keras.layers.Layer): method __init__ (line 574) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 579) | def call( method build (line 641) | def build(self, input_shape=None): class TFLayoutLMPooler (line 652) | class TFLayoutLMPooler(keras.layers.Layer): method __init__ (line 653) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 664) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 672) | def build(self, input_shape=None): class TFLayoutLMPredictionHeadTransform (line 682) | class TFLayoutLMPredictionHeadTransform(keras.layers.Layer): method __init__ (line 683) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 700) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 707) | def build(self, input_shape=None): class TFLayoutLMLMPredictionHead (line 720) | class TFLayoutLMLMPredictionHead(keras.layers.Layer): method __init__ (line 721) | def __init__(self, config: LayoutLMConfig, input_embeddings: keras.lay... method build (line 733) | def build(self, input_shape=None): method get_output_embeddings (line 743) | def get_output_embeddings(self) -> keras.layers.Layer: method set_output_embeddings (line 746) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 750) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 753) | def set_bias(self, value: tf.Variable): method call (line 757) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMMLMHead (line 769) | class TFLayoutLMMLMHead(keras.layers.Layer): method __init__ (line 770) | def __init__(self, config: LayoutLMConfig, input_embeddings: keras.lay... method call (line 775) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: method build (line 780) | def build(self, input_shape=None): class TFLayoutLMMainLayer (line 790) | class TFLayoutLMMainLayer(keras.layers.Layer): method __init__ (line 793) | def __init__(self, config: LayoutLMConfig, add_pooling_layer: bool = T... method get_input_embeddings (line 802) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 805) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 809) | def _prune_heads(self, heads_to_prune): method call (line 817) | def call( method build (line 918) | def build(self, input_shape=None): class TFLayoutLMPreTrainedModel (line 933) | class TFLayoutLMPreTrainedModel(TFPreTrainedModel): method input_signature (line 943) | def input_signature(self): class TFLayoutLMModel (line 1051) | class TFLayoutLMModel(TFLayoutLMPreTrainedModel): method __init__ (line 1052) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1062) | def call( method build (line 1128) | def build(self, input_shape=None): class TFLayoutLMForMaskedLM (line 1138) | class TFLayoutLMForMaskedLM(TFLayoutLMPreTrainedModel, TFMaskedLanguageM... method __init__ (line 1147) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method get_lm_head (line 1159) | def get_lm_head(self) -> keras.layers.Layer: method get_prefix_bias_name (line 1162) | def get_prefix_bias_name(self) -> str: method call (line 1169) | def call( method build (line 1257) | def build(self, input_shape=None): class TFLayoutLMForSequenceClassification (line 1276) | class TFLayoutLMForSequenceClassification(TFLayoutLMPreTrainedModel, TFS... method __init__ (line 1281) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1298) | def call( method build (line 1387) | def build(self, input_shape=None): class TFLayoutLMForTokenClassification (line 1406) | class TFLayoutLMForTokenClassification(TFLayoutLMPreTrainedModel, TFToke... method __init__ (line 1417) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1434) | def call( method build (line 1521) | def build(self, input_shape=None): class TFLayoutLMForQuestionAnswering (line 1541) | class TFLayoutLMForQuestionAnswering(TFLayoutLMPreTrainedModel, TFQuesti... method __init__ (line 1551) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1566) | def call( method build (line 1672) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlm/tokenization_layoutlm.py function load_vocab (line 32) | def load_vocab(vocab_file): function whitespace_tokenize (line 44) | def whitespace_tokenize(text): class LayoutLMTokenizer (line 54) | class LayoutLMTokenizer(PreTrainedTokenizer): method __init__ (line 98) | def __init__( method do_lower_case (line 146) | def do_lower_case(self): method vocab_size (line 150) | def vocab_size(self): method get_vocab (line 153) | def get_vocab(self): method _tokenize (line 156) | def _tokenize(self, text, split_special_tokens=False): method _convert_token_to_id (line 171) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 175) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 179) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 184) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 209) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 237) | def create_token_type_ids_from_sequences( method save_vocabulary (line 266) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 288) | class BasicTokenizer: method __init__ (line 311) | def __init__( method tokenize (line 327) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 365) | def _run_strip_accents(self, text): method _run_split_on_punc (line 376) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 398) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 411) | def _is_chinese_char(self, cp): method _clean_text (line 435) | def _clean_text(self, text): class WordpieceTokenizer (line 450) | class WordpieceTokenizer: method __init__ (line 453) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 458) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlm/tokenization_layoutlm_fast.py class LayoutLMTokenizerFast (line 33) | class LayoutLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 76) | def __init__( method build_inputs_with_special_tokens (line 118) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 142) | def create_token_type_ids_from_sequences( method save_vocabulary (line 171) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv2/configuration_layoutlmv2.py class LayoutLMv2Config (line 29) | class LayoutLMv2Config(PretrainedConfig): method __init__ (line 115) | def __init__( method get_default_detectron2_config (line 180) | def get_default_detectron2_config(cls): method get_detectron2_config (line 210) | def get_detectron2_config(self): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv2/image_processing_layoutlmv2.py function normalize_box (line 53) | def normalize_box(box, width, height): function apply_tesseract (line 62) | def apply_tesseract( class LayoutLMv2ImageProcessor (line 101) | class LayoutLMv2ImageProcessor(BaseImageProcessor): method __init__ (line 127) | def __init__( method resize (line 149) | def resize( method preprocess (line 198) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv2/modeling_layoutlmv2.py class LayoutLMv2Embeddings (line 57) | class LayoutLMv2Embeddings(nn.Module): method __init__ (line 60) | def __init__(self, config): method _calc_spatial_position_embeddings (line 78) | def _calc_spatial_position_embeddings(self, bbox): class LayoutLMv2SelfAttention (line 104) | class LayoutLMv2SelfAttention(nn.Module): method __init__ (line 105) | def __init__(self, config): method transpose_for_scores (line 131) | def transpose_for_scores(self, x): method compute_qkv (line 136) | def compute_qkv(self, hidden_states): method forward (line 153) | def forward( class LayoutLMv2Attention (line 197) | class LayoutLMv2Attention(nn.Module): method __init__ (line 198) | def __init__(self, config): method forward (line 203) | def forward( class LayoutLMv2SelfOutput (line 225) | class LayoutLMv2SelfOutput(nn.Module): method __init__ (line 226) | def __init__(self, config): method forward (line 232) | def forward(self, hidden_states, input_tensor): class LayoutLMv2Intermediate (line 240) | class LayoutLMv2Intermediate(nn.Module): method __init__ (line 241) | def __init__(self, config): method forward (line 249) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMv2Output (line 256) | class LayoutLMv2Output(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 LayoutLMv2Layer (line 270) | class LayoutLMv2Layer(nn.Module): method __init__ (line 271) | def __init__(self, config): method forward (line 279) | def forward( method feed_forward_chunk (line 307) | def feed_forward_chunk(self, attention_output): function relative_position_bucket (line 313) | def relative_position_bucket(relative_position, bidirectional=True, num_... class LayoutLMv2Encoder (line 357) | class LayoutLMv2Encoder(nn.Module): method __init__ (line 358) | def __init__(self, config): method _calculate_1d_position_embeddings (line 379) | def _calculate_1d_position_embeddings(self, position_ids): method _calculate_2d_position_embeddings (line 395) | def _calculate_2d_position_embeddings(self, bbox): method forward (line 422) | def forward( class LayoutLMv2PreTrainedModel (line 489) | class LayoutLMv2PreTrainedModel(PreTrainedModel): method _init_weights (line 498) | def _init_weights(self, module): function my_convert_sync_batchnorm (line 518) | def my_convert_sync_batchnorm(module, process_group=None): class LayoutLMv2VisualBackbone (line 542) | class LayoutLMv2VisualBackbone(nn.Module): method __init__ (line 543) | def __init__(self, config): method forward (line 578) | def forward(self, images): method synchronize_batch_norm (line 585) | def synchronize_batch_norm(self): class LayoutLMv2Pooler (line 679) | class LayoutLMv2Pooler(nn.Module): method __init__ (line 680) | def __init__(self, config): method forward (line 685) | def forward(self, hidden_states): class LayoutLMv2Model (line 698) | class LayoutLMv2Model(LayoutLMv2PreTrainedModel): method __init__ (line 699) | def __init__(self, config): method get_input_embeddings (line 719) | def get_input_embeddings(self): method set_input_embeddings (line 722) | def set_input_embeddings(self, value): method _calc_text_embeddings (line 725) | def _calc_text_embeddings(self, input_ids, bbox, position_ids, token_t... method _calc_img_embeddings (line 750) | def _calc_img_embeddings(self, image, bbox, position_ids): method _calc_visual_bbox (line 761) | def _calc_visual_bbox(self, image_feature_pool_shape, bbox, device, fi... method _get_input_shape (line 798) | def _get_input_shape(self, input_ids=None, inputs_embeds=None): method forward (line 810) | def forward( class LayoutLMv2ForSequenceClassification (line 959) | class LayoutLMv2ForSequenceClassification(LayoutLMv2PreTrainedModel): method __init__ (line 960) | def __init__(self, config): method get_input_embeddings (line 970) | def get_input_embeddings(self): method forward (line 975) | def forward( class LayoutLMv2ForTokenClassification (line 1141) | class LayoutLMv2ForTokenClassification(LayoutLMv2PreTrainedModel): method __init__ (line 1142) | def __init__(self, config): method get_input_embeddings (line 1152) | def get_input_embeddings(self): method forward (line 1157) | def forward( class LayoutLMv2ForQuestionAnswering (line 1272) | class LayoutLMv2ForQuestionAnswering(LayoutLMv2PreTrainedModel): method __init__ (line 1273) | def __init__(self, config, has_visual_segment_embedding=True): method get_input_embeddings (line 1283) | def get_input_embeddings(self): method forward (line 1288) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv2/processing_layoutlmv2.py class LayoutLMv2Processor (line 27) | class LayoutLMv2Processor(ProcessorMixin): method __init__ (line 51) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 69) | def __call__( method get_overflowing_images (line 155) | def get_overflowing_images(self, images, overflow_to_sample_mapping): method batch_decode (line 169) | def batch_decode(self, *args, **kwargs): method decode (line 176) | def decode(self, *args, **kwargs): method model_input_names (line 184) | def model_input_names(self): method feature_extractor_class (line 188) | def feature_extractor_class(self): method feature_extractor (line 196) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv2/tokenization_layoutlmv2.py function load_vocab (line 147) | def load_vocab(vocab_file): function whitespace_tokenize (line 158) | def whitespace_tokenize(text): function subfinder (line 170) | def subfinder(mylist, pattern): class LayoutLMv2Tokenizer (line 183) | class LayoutLMv2Tokenizer(PreTrainedTokenizer): method __init__ (line 199) | def __init__( method do_lower_case (line 272) | def do_lower_case(self): method vocab_size (line 276) | def vocab_size(self): method get_vocab (line 279) | def get_vocab(self): method _tokenize (line 282) | def _tokenize(self, text): method _convert_token_to_id (line 295) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 299) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 303) | 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 333) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 361) | def create_token_type_ids_from_sequences( method save_vocabulary (line 384) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 405) | def __call__( method batch_encode_plus (line 554) | def batch_encode_plus( method _batch_encode_plus (line 612) | def _batch_encode_plus( method _batch_prepare_for_model (line 668) | def _batch_prepare_for_model( method encode (line 739) | def encode( method encode_plus (line 786) | def encode_plus( method _encode_plus (line 852) | def _encode_plus( method prepare_for_model (line 905) | def prepare_for_model( method truncate_sequences (line 1115) | def truncate_sequences( method _pad (line 1240) | def _pad( class BasicTokenizer (line 1326) | class BasicTokenizer: method __init__ (line 1349) | def __init__( method tokenize (line 1365) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 1403) | def _run_strip_accents(self, text): method _run_split_on_punc (line 1414) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 1436) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 1449) | def _is_chinese_char(self, cp): method _clean_text (line 1473) | def _clean_text(self, text): class WordpieceTokenizer (line 1488) | class WordpieceTokenizer: method __init__ (line 1491) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 1496) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv2/tokenization_layoutlmv2_fast.py class LayoutLMv2TokenizerFast (line 49) | class LayoutLMv2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 98) | def __init__( method __call__ (line 156) | def __call__( method batch_encode_plus (line 305) | def batch_encode_plus( method tokenize (line 363) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode_plus (line 372) | def encode_plus( method _batch_encode_plus (line 438) | def _batch_encode_plus( method _encode_plus (line 594) | def _encode_plus( method _pad (line 660) | def _pad( method build_inputs_with_special_tokens (line 744) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 768) | def create_token_type_ids_from_sequences( method save_vocabulary (line 791) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv3/configuration_layoutlmv3.py class LayoutLMv3Config (line 36) | class LayoutLMv3Config(PretrainedConfig): method __init__ (line 121) | def __init__( class LayoutLMv3OnnxConfig (line 190) | class LayoutLMv3OnnxConfig(OnnxConfig): method inputs (line 194) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 216) | def atol_for_validation(self) -> float: method default_onnx_opset (line 220) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 223) | def generate_dummy_inputs( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv3/image_processing_layoutlmv3.py function normalize_box (line 56) | def normalize_box(box, width, height): function apply_tesseract (line 65) | def apply_tesseract( class LayoutLMv3ImageProcessor (line 103) | class LayoutLMv3ImageProcessor(BaseImageProcessor): method __init__ (line 144) | def __init__( method resize (line 176) | def resize( method preprocess (line 225) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py class LayoutLMv3PatchEmbeddings (line 200) | class LayoutLMv3PatchEmbeddings(nn.Module): method __init__ (line 204) | def __init__(self, config): method forward (line 220) | def forward(self, pixel_values, position_embedding=None): class LayoutLMv3TextEmbeddings (line 235) | class LayoutLMv3TextEmbeddings(nn.Module): method __init__ (line 240) | def __init__(self, config): method calculate_spatial_position_embeddings (line 263) | def calculate_spatial_position_embeddings(self, bbox): method create_position_ids_from_input_ids (line 289) | def create_position_ids_from_input_ids(self, input_ids, padding_idx): method create_position_ids_from_inputs_embeds (line 299) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): method forward (line 311) | def forward( class LayoutLMv3PreTrainedModel (line 353) | class LayoutLMv3PreTrainedModel(PreTrainedModel): method _init_weights (line 362) | def _init_weights(self, module): class LayoutLMv3SelfAttention (line 379) | class LayoutLMv3SelfAttention(nn.Module): method __init__ (line 380) | def __init__(self, config): method transpose_for_scores (line 400) | def transpose_for_scores(self, x): method cogview_attention (line 405) | def cogview_attention(self, attention_scores, alpha=32): method forward (line 417) | def forward( class LayoutLMv3SelfOutput (line 470) | class LayoutLMv3SelfOutput(nn.Module): method __init__ (line 471) | def __init__(self, config): method forward (line 477) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMv3Attention (line 485) | class LayoutLMv3Attention(nn.Module): method __init__ (line 486) | def __init__(self, config): method forward (line 491) | def forward( class LayoutLMv3Layer (line 514) | class LayoutLMv3Layer(nn.Module): method __init__ (line 515) | def __init__(self, config): method forward (line 523) | def forward( method feed_forward_chunk (line 551) | def feed_forward_chunk(self, attention_output): class LayoutLMv3Encoder (line 557) | class LayoutLMv3Encoder(nn.Module): method __init__ (line 558) | def __init__(self, config): method relative_position_bucket (line 578) | def relative_position_bucket(self, relative_position, bidirectional=Tr... method _cal_1d_pos_emb (line 601) | def _cal_1d_pos_emb(self, position_ids): method _cal_2d_pos_emb (line 618) | def _cal_2d_pos_emb(self, bbox): method forward (line 645) | def forward( class LayoutLMv3Intermediate (line 715) | class LayoutLMv3Intermediate(nn.Module): method __init__ (line 716) | def __init__(self, config): method forward (line 724) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMv3Output (line 731) | class LayoutLMv3Output(nn.Module): method __init__ (line 732) | def __init__(self, config): method forward (line 738) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMv3Model (line 749) | class LayoutLMv3Model(LayoutLMv3PreTrainedModel): method __init__ (line 750) | def __init__(self, config): method get_input_embeddings (line 779) | def get_input_embeddings(self): method set_input_embeddings (line 782) | def set_input_embeddings(self, value): method _prune_heads (line 785) | def _prune_heads(self, heads_to_prune): method init_visual_bbox (line 793) | def init_visual_bbox(self, image_size=(14, 14), max_len=1000): method calculate_visual_bbox (line 816) | def calculate_visual_bbox(self, device, dtype, batch_size): method forward_image (line 821) | def forward_image(self, pixel_values): method forward (line 842) | def forward( class LayoutLMv3ClassificationHead (line 1000) | class LayoutLMv3ClassificationHead(nn.Module): method __init__ (line 1005) | def __init__(self, config, pool_feature=False): method forward (line 1018) | def forward(self, x): class LayoutLMv3ForTokenClassification (line 1036) | class LayoutLMv3ForTokenClassification(LayoutLMv3PreTrainedModel): method __init__ (line 1037) | def __init__(self, config): method forward (line 1054) | def forward( class LayoutLMv3ForQuestionAnswering (line 1148) | class LayoutLMv3ForQuestionAnswering(LayoutLMv3PreTrainedModel): method __init__ (line 1149) | def __init__(self, config): method forward (line 1162) | def forward( class LayoutLMv3ForSequenceClassification (line 1278) | class LayoutLMv3ForSequenceClassification(LayoutLMv3PreTrainedModel): method __init__ (line 1279) | def __init__(self, config): method forward (line 1292) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py class TFLayoutLMv3PatchEmbeddings (line 63) | class TFLayoutLMv3PatchEmbeddings(keras.layers.Layer): method __init__ (line 66) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 87) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: method build (line 96) | def build(self, input_shape=None): class TFLayoutLMv3TextEmbeddings (line 105) | class TFLayoutLMv3TextEmbeddings(keras.layers.Layer): method __init__ (line 110) | def __init__(self, config: LayoutLMv3Config, **kwargs): method calculate_spatial_position_embeddings (line 160) | def calculate_spatial_position_embeddings(self, bbox: tf.Tensor) -> tf... method create_position_ids_from_inputs_embeds (line 201) | def create_position_ids_from_inputs_embeds(self, inputs_embds: tf.Tens... method create_position_ids_from_input_ids (line 216) | def create_position_ids_from_input_ids(self, input_ids: tf.Tensor) -> ... method create_position_ids (line 225) | def create_position_ids(self, input_ids: tf.Tensor, inputs_embeds: tf.... method call (line 231) | def call( method build (line 268) | def build(self, input_shape=None): class TFLayoutLMv3SelfAttention (line 298) | class TFLayoutLMv3SelfAttention(keras.layers.Layer): method __init__ (line 299) | def __init__(self, config: LayoutLMv3Config, **kwargs): method transpose_for_scores (line 333) | def transpose_for_scores(self, x: tf.Tensor): method cogview_attention (line 344) | def cogview_attention(self, attention_scores: tf.Tensor, alpha: Union[... method call (line 357) | def call( method build (line 410) | def build(self, input_shape=None): class TFLayoutLMv3SelfOutput (line 426) | class TFLayoutLMv3SelfOutput(keras.layers.Layer): method __init__ (line 427) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 437) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 444) | def build(self, input_shape=None): class TFLayoutLMv3Attention (line 456) | class TFLayoutLMv3Attention(keras.layers.Layer): method __init__ (line 457) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 462) | def call( method build (line 485) | def build(self, input_shape=None): class TFLayoutLMv3Intermediate (line 498) | class TFLayoutLMv3Intermediate(keras.layers.Layer): method __init__ (line 499) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 512) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 518) | def build(self, input_shape=None): class TFLayoutLMv3Output (line 528) | class TFLayoutLMv3Output(keras.layers.Layer): method __init__ (line 529) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 539) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 546) | def build(self, input_shape=None): class TFLayoutLMv3Layer (line 558) | class TFLayoutLMv3Layer(keras.layers.Layer): method __init__ (line 559) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 565) | def call( method build (line 591) | def build(self, input_shape=None): class TFLayoutLMv3Encoder (line 606) | class TFLayoutLMv3Encoder(keras.layers.Layer): method __init__ (line 607) | def __init__(self, config: LayoutLMv3Config, **kwargs): method relative_position_bucket (line 641) | def relative_position_bucket(self, relative_positions: tf.Tensor, num_... method _cal_pos_emb (line 666) | def _cal_pos_emb( method _cal_1d_pos_emb (line 682) | def _cal_1d_pos_emb(self, position_ids: tf.Tensor): method _cal_2d_pos_emb (line 685) | def _cal_2d_pos_emb(self, bbox: tf.Tensor): method call (line 703) | def call( method build (line 760) | def build(self, input_shape=None): class TFLayoutLMv3MainLayer (line 780) | class TFLayoutLMv3MainLayer(keras.layers.Layer): method __init__ (line 783) | def __init__(self, config: LayoutLMv3Config, **kwargs): method build (line 804) | def build(self, input_shape=None): method get_input_embeddings (line 844) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 847) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 851) | def _prune_heads(self, heads_to_prune): method init_visual_bbox (line 858) | def init_visual_bbox(self, image_size: Tuple[int, int], max_len: int =... method calculate_visual_bbox (line 881) | def calculate_visual_bbox(self, batch_size: int, dtype: tf.DType): method embed_image (line 887) | def embed_image(self, pixel_values: tf.Tensor) -> tf.Tensor: method get_extended_attention_mask (line 902) | def get_extended_attention_mask(self, attention_mask: tf.Tensor) -> tf... method get_head_mask (line 929) | def get_head_mask(self, head_mask: tf.Tensor | None) -> Union[tf.Tenso... method call (line 955) | def call( class TFLayoutLMv3PreTrainedModel (line 1118) | class TFLayoutLMv3PreTrainedModel(TFPreTrainedModel): method input_signature (line 1128) | def input_signature(self): class TFLayoutLMv3Model (line 1256) | class TFLayoutLMv3Model(TFLayoutLMv3PreTrainedModel): method __init__ (line 1260) | def __init__(self, config, *inputs, **kwargs): method call (line 1267) | def call( method build (line 1328) | def build(self, input_shape=None): class TFLayoutLMv3ClassificationHead (line 1337) | class TFLayoutLMv3ClassificationHead(keras.layers.Layer): method __init__ (line 1342) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1364) | def call(self, inputs: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 1371) | def build(self, input_shape=None): class TFLayoutLMv3ForSequenceClassification (line 1394) | class TFLayoutLMv3ForSequenceClassification(TFLayoutLMv3PreTrainedModel,... method __init__ (line 1398) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1407) | def call( method build (line 1488) | def build(self, input_shape=None): class TFLayoutLMv3ForTokenClassification (line 1509) | class TFLayoutLMv3ForTokenClassification(TFLayoutLMv3PreTrainedModel, TF... method __init__ (line 1513) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1532) | def call( method build (line 1623) | def build(self, input_shape=None): class TFLayoutLMv3ForQuestionAnswering (line 1646) | class TFLayoutLMv3ForQuestionAnswering(TFLayoutLMv3PreTrainedModel, TFQu... method __init__ (line 1650) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1661) | def call( method build (line 1765) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv3/processing_layoutlmv3.py class LayoutLMv3Processor (line 27) | class LayoutLMv3Processor(ProcessorMixin): method __init__ (line 51) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 69) | 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: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv3/tokenization_layoutlmv3.py function bytes_to_unicode (line 145) | def bytes_to_unicode(): function get_pairs (line 170) | def get_pairs(word): class LayoutLMv3Tokenizer (line 184) | class LayoutLMv3Tokenizer(PreTrainedTokenizer): method __init__ (line 259) | def __init__( method vocab_size (line 332) | def vocab_size(self): method get_vocab (line 336) | def get_vocab(self): method bpe (line 342) | def bpe(self, token): method _tokenize (line 385) | def _tokenize(self, text): method _convert_token_to_id (line 396) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 401) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 406) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 413) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 443) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 469) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 497) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 520) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method __call__ (line 534) | def __call__( method batch_encode_plus (line 684) | def batch_encode_plus( method _batch_encode_plus (line 743) | def _batch_encode_plus( method _batch_prepare_for_model (line 800) | def _batch_prepare_for_model( method encode (line 872) | def encode( method encode_plus (line 920) | def encode_plus( method _encode_plus (line 987) | def _encode_plus( method prepare_for_model (line 1040) | def prepare_for_model( method truncate_sequences (line 1253) | def truncate_sequences( method _pad (line 1379) | def _pad( FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutlmv3/tokenization_layoutlmv3_fast.py class LayoutLMv3TokenizerFast (line 49) | class LayoutLMv3TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 121) | def __init__( method __call__ (line 208) | def __call__( method batch_encode_plus (line 358) | def batch_encode_plus( method tokenize (line 417) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode_plus (line 427) | def encode_plus( method _batch_encode_plus (line 493) | def _batch_encode_plus( method _encode_plus (line 655) | def _encode_plus( method _pad (line 722) | def _pad( method save_vocabulary (line 807) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 811) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 818) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutxlm/processing_layoutxlm.py class LayoutXLMProcessor (line 27) | class LayoutXLMProcessor(ProcessorMixin): method __init__ (line 51) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 68) | def __call__( method get_overflowing_images (line 155) | def get_overflowing_images(self, images, overflow_to_sample_mapping): method batch_decode (line 169) | def batch_decode(self, *args, **kwargs): method decode (line 176) | def decode(self, *args, **kwargs): method model_input_names (line 184) | def model_input_names(self): method feature_extractor_class (line 188) | def feature_extractor_class(self): method feature_extractor (line 196) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutxlm/tokenization_layoutxlm.py class LayoutXLMTokenizer (line 146) | class LayoutXLMTokenizer(PreTrainedTokenizer): method __init__ (line 227) | def __init__( method __getstate__ (line 293) | def __getstate__(self): method __setstate__ (line 299) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 309) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 335) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 363) | def create_token_type_ids_from_sequences( method vocab_size (line 389) | def vocab_size(self): method get_vocab (line 392) | def get_vocab(self): method _tokenize (line 397) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 400) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 409) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 415) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 420) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 438) | def __call__( method _batch_encode_plus (line 586) | def _batch_encode_plus( method _batch_prepare_for_model (line 642) | def _batch_prepare_for_model( method _encode_plus (line 712) | def _encode_plus( method prepare_for_model (line 765) | def prepare_for_model( method truncate_sequences (line 962) | def truncate_sequences( method _pad (line 1087) | def _pad( FILE: mplsandbox_for_rl/transformers/src/transformers/models/layoutxlm/tokenization_layoutxlm_fast.py class LayoutXLMTokenizerFast (line 149) | class LayoutXLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 215) | def __init__( method can_save_slow_tokenizer (line 264) | def can_save_slow_tokenizer(self) -> bool: method __call__ (line 268) | def __call__( method tokenize (line 416) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method _batch_encode_plus (line 429) | def _batch_encode_plus( method _encode_plus (line 586) | def _encode_plus( method _pad (line 652) | def _pad( method build_inputs_with_special_tokens (line 736) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 762) | def create_token_type_ids_from_sequences( method save_vocabulary (line 787) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/led/configuration_led.py class LEDConfig (line 26) | class LEDConfig(PretrainedConfig): method __init__ (line 104) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/led/modeling_led.py function shift_tokens_right (line 55) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _prepare_4d_attention_mask_inverted (line 71) | def _prepare_4d_attention_mask_inverted(mask: torch.Tensor, dtype: torch... class LEDLearnedPositionalEmbedding (line 89) | class LEDLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 94) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 97) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class LEDEncoderSelfAttention (line 107) | class LEDEncoderSelfAttention(nn.Module): method __init__ (line 108) | def __init__(self, config, layer_id): method forward (line 143) | def forward( method _pad_and_transpose_last_two_dims (line 312) | def _pad_and_transpose_last_two_dims(hidden_states_padded, padding): method _pad_and_diagonalize (line 323) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 372) | def _chunk(hidden_states, window_overlap, onnx_export: bool = False): method _mask_invalid_locations (line 413) | def _mask_invalid_locations(input_tensor, affected_seq_len) -> torch.T... method _sliding_chunks_query_key_matmul (line 428) | def _sliding_chunks_query_key_matmul(self, query: torch.Tensor, key: t... method _sliding_chunks_matmul_attn_probs_value (line 494) | def _sliding_chunks_matmul_attn_probs_value( method _get_global_attn_indices (line 539) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 567) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 597) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 633) | def _compute_global_attn_output_from_hidden( class LEDEncoderAttention (line 742) | class LEDEncoderAttention(nn.Module): method __init__ (line 743) | def __init__(self, config, layer_id): method forward (line 748) | def forward( class LEDDecoderAttention (line 776) | class LEDDecoderAttention(nn.Module): method __init__ (line 779) | def __init__( method _shape (line 805) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 808) | def forward( class LEDEncoderLayer (line 919) | class LEDEncoderLayer(nn.Module): method __init__ (line 920) | def __init__(self, config: LEDConfig, layer_id: int): method forward (line 932) | def forward( class LEDDecoderLayer (line 981) | class LEDDecoderLayer(nn.Module): method __init__ (line 982) | def __init__(self, config: LEDConfig): method forward (line 1008) | def forward( class LEDClassificationHead (line 1097) | class LEDClassificationHead(nn.Module): method __init__ (line 1100) | def __init__( method forward (line 1112) | def forward(self, hidden_states: torch.Tensor): class LEDPreTrainedModel (line 1121) | class LEDPreTrainedModel(PreTrainedModel): method _init_weights (line 1126) | def _init_weights(self, module): method dummy_inputs (line 1138) | def dummy_inputs(self): class LEDEncoderBaseModelOutput (line 1150) | class LEDEncoderBaseModelOutput(ModelOutput): class LEDSeq2SeqModelOutput (line 1193) | class LEDSeq2SeqModelOutput(ModelOutput): class LEDSeq2SeqLMOutput (line 1261) | class LEDSeq2SeqLMOutput(ModelOutput): class LEDSeq2SeqSequenceClassifierOutput (line 1328) | class LEDSeq2SeqSequenceClassifierOutput(ModelOutput): class LEDSeq2SeqQuestionAnsweringModelOutput (line 1395) | class LEDSeq2SeqQuestionAnsweringModelOutput(ModelOutput): class LEDEncoder (line 1619) | class LEDEncoder(LEDPreTrainedModel): method __init__ (line 1629) | def __init__(self, config: LEDConfig, embed_tokens: Optional[nn.Embedd... method _merge_to_attention_mask (line 1668) | def _merge_to_attention_mask(self, attention_mask: torch.Tensor, globa... method _pad_to_window_size (line 1680) | def _pad_to_window_size( method forward (line 1723) | def forward( class LEDDecoder (line 1909) | class LEDDecoder(LEDPreTrainedModel): method __init__ (line 1918) | def __init__(self, config: LEDConfig, embed_tokens: Optional[nn.Embedd... method forward (line 1941) | def forward( class LEDModel (line 2177) | class LEDModel(LEDPreTrainedModel): method __init__ (line 2180) | def __init__(self, config: LEDConfig): method get_input_embeddings (line 2192) | def get_input_embeddings(self): method set_input_embeddings (line 2195) | def set_input_embeddings(self, value): method get_encoder (line 2200) | def get_encoder(self): method get_decoder (line 2203) | def get_decoder(self): method forward (line 2212) | def forward( class LEDForConditionalGeneration (line 2301) | class LEDForConditionalGeneration(LEDPreTrainedModel): method __init__ (line 2306) | def __init__(self, config: LEDConfig): method get_encoder (line 2315) | def get_encoder(self): method get_decoder (line 2318) | def get_decoder(self): method resize_token_embeddings (line 2321) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 2326) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 2335) | def get_output_embeddings(self): method set_output_embeddings (line 2338) | def set_output_embeddings(self, new_embeddings): method forward (line 2344) | def forward( method prepare_inputs_for_generation (line 2439) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2469) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2473) | def _reorder_cache(past_key_values, beam_idx): class LEDForSequenceClassification (line 2491) | class LEDForSequenceClassification(LEDPreTrainedModel): method __init__ (line 2494) | def __init__(self, config: LEDConfig, **kwargs): method forward (line 2519) | def forward( class LEDForQuestionAnswering (line 2627) | class LEDForQuestionAnswering(LEDPreTrainedModel): method __init__ (line 2630) | def __init__(self, config): method forward (line 2648) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/led/modeling_tf_led.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 TFLEDLearnedPositionalEmbedding (line 116) | class TFLEDLearnedPositionalEmbedding(keras.layers.Embedding): method __init__ (line 121) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 124) | def call(self, input_shape: tf.TensorShape, past_key_values_length: in... class TFLEDEncoderSelfAttention (line 134) | class TFLEDEncoderSelfAttention(keras.layers.Layer): method __init__ (line 135) | def __init__(self, config, layer_id, **kwargs): method build (line 194) | def build(self, input_shape=None): method call (line 225) | def call( method _sliding_chunks_query_key_matmul (line 416) | def _sliding_chunks_query_key_matmul(self, query, key, window_overlap): method _mask_invalid_locations (line 533) | def _mask_invalid_locations(input_tensor, window_overlap): method _sliding_chunks_matmul_attn_probs_value (line 562) | def _sliding_chunks_matmul_attn_probs_value(self, attn_probs, value, w... method _pad_and_transpose_last_two_dims (line 636) | def _pad_and_transpose_last_two_dims(hidden_states_padded, paddings): method _pad_and_diagonalize (line 647) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 699) | def _chunk(hidden_states, window_overlap): method _get_global_attn_indices (line 729) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 759) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 813) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 854) | def _compute_global_attn_output_from_hidden( method reshape_and_transpose (line 991) | def reshape_and_transpose(self, vector, batch_size): class TFLEDEncoderAttention (line 1001) | class TFLEDEncoderAttention(keras.layers.Layer): method __init__ (line 1002) | def __init__(self, config, layer_id, **kwargs): method call (line 1008) | def call(self, inputs, training=False): method build (line 1028) | def build(self, input_shape=None): class TFLEDDecoderAttention (line 1040) | class TFLEDDecoderAttention(keras.layers.Layer): method __init__ (line 1043) | def __init__( method _shape (line 1067) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 1070) | def call( method build (line 1190) | def build(self, input_shape=None): class TFLEDEncoderLayer (line 1208) | class TFLEDEncoderLayer(keras.layers.Layer): method __init__ (line 1209) | def __init__(self, config: LEDConfig, layer_id: int, **kwargs): method call (line 1222) | def call( method build (line 1267) | def build(self, input_shape=None): class TFLEDDecoderLayer (line 1288) | class TFLEDDecoderLayer(keras.layers.Layer): method __init__ (line 1289) | def __init__(self, config: LEDConfig, **kwargs): method call (line 1317) | def call( method build (line 1397) | def build(self, input_shape=None): class TFLEDPreTrainedModel (line 1424) | class TFLEDPreTrainedModel(TFPreTrainedModel): method input_signature (line 1429) | def input_signature(self): class TFLEDEncoderBaseModelOutput (line 1437) | class TFLEDEncoderBaseModelOutput(ModelOutput): class TFLEDSeq2SeqModelOutput (line 1480) | class TFLEDSeq2SeqModelOutput(ModelOutput): class TFLEDSeq2SeqLMOutput (line 1548) | class TFLEDSeq2SeqLMOutput(ModelOutput): class TFLEDEncoder (line 1724) | class TFLEDEncoder(keras.layers.Layer): method __init__ (line 1734) | def __init__(self, config: LEDConfig, embed_tokens: Optional[keras.lay... method get_embed_tokens (line 1764) | def get_embed_tokens(self): method set_embed_tokens (line 1767) | def set_embed_tokens(self, embed_tokens): method call (line 1771) | def call( method compute_hidden_states (line 1929) | def compute_hidden_states(self, hidden_states, padding_len): method _pad_to_window_size (line 1932) | def _pad_to_window_size( method build (line 1977) | def build(self, input_shape=None): class TFLEDDecoder (line 1994) | class TFLEDDecoder(keras.layers.Layer): method __init__ (line 2004) | def __init__(self, config: LEDConfig, embed_tokens: Optional[keras.lay... method set_embed_tokens (line 2022) | def set_embed_tokens(self, embed_tokens): method call (line 2026) | def call( method build (line 2204) | def build(self, input_shape=None): class TFLEDMainLayer (line 2221) | class TFLEDMainLayer(keras.layers.Layer): method __init__ (line 2224) | def __init__(self, config: LEDConfig, **kwargs): method get_input_embeddings (line 2239) | def get_input_embeddings(self): method set_input_embeddings (line 2242) | def set_input_embeddings(self, new_embeddings): method call (line 2248) | def call( method build (line 2325) | def build(self, input_shape=None): class TFLEDModel (line 2346) | class TFLEDModel(TFLEDPreTrainedModel): method __init__ (line 2347) | def __init__(self, config, *inputs, **kwargs): method get_encoder (line 2352) | def get_encoder(self): method get_decoder (line 2355) | def get_decoder(self): method call (line 2365) | def call( method serving_output (line 2406) | def serving_output(self, output): method build (line 2427) | def build(self, input_shape=None): class BiasLayer (line 2437) | class BiasLayer(keras.layers.Layer): method __init__ (line 2443) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 2450) | def call(self, x): class TFLEDForConditionalGeneration (line 2458) | class TFLEDForConditionalGeneration(TFLEDPreTrainedModel): method __init__ (line 2464) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 2476) | def get_decoder(self): method get_encoder (line 2479) | def get_encoder(self): method get_bias (line 2482) | def get_bias(self): method set_bias (line 2485) | def set_bias(self, value): method get_output_embeddings (line 2493) | def get_output_embeddings(self): method set_output_embeddings (line 2496) | def set_output_embeddings(self, value): method call (line 2502) | def call( method serving_output (line 2586) | def serving_output(self, output): method prepare_inputs_for_generation (line 2607) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2633) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method hf_compute_loss (line 2636) | def hf_compute_loss(self, labels, logits): method build (line 2654) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/led/tokenization_led.py function bytes_to_unicode (line 39) | def bytes_to_unicode(): function get_pairs (line 64) | def get_pairs(word): class LEDTokenizer (line 78) | class LEDTokenizer(PreTrainedTokenizer): method __init__ (line 160) | def __init__( method vocab_size (line 216) | def vocab_size(self): method get_vocab (line 220) | def get_vocab(self): method bpe (line 224) | def bpe(self, token): method _tokenize (line 267) | def _tokenize(self, text): method _convert_token_to_id (line 278) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 283) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 288) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 295) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 325) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 351) | 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 403) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _pad (line 409) | def _pad( FILE: mplsandbox_for_rl/transformers/src/transformers/models/led/tokenization_led_fast.py class LEDTokenizerFast (line 34) | class LEDTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 120) | def __init__( method mask_token (line 197) | def mask_token(self) -> str: method mask_token (line 212) | def mask_token(self, value): method _batch_encode_plus (line 224) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 236) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 248) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 253) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 261) | def create_token_type_ids_from_sequences( method _pad (line 285) | def _pad( FILE: mplsandbox_for_rl/transformers/src/transformers/models/levit/configuration_levit.py class LevitConfig (line 30) | class LevitConfig(PretrainedConfig): method __init__ (line 88) | def __init__( class LevitOnnxConfig (line 128) | class LevitOnnxConfig(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: mplsandbox_for_rl/transformers/src/transformers/models/levit/convert_levit_timm_to_pytorch.py function convert_weight_and_push (line 35) | def convert_weight_and_push( function convert_weights_and_push (line 82) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 preprocess (line 175) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/levit/modeling_levit.py class LevitForImageClassificationWithTeacherOutput (line 52) | class LevitForImageClassificationWithTeacherOutput(ModelOutput): class LevitConvEmbeddings (line 77) | class LevitConvEmbeddings(nn.Module): method __init__ (line 82) | def __init__( method forward (line 91) | def forward(self, embeddings): class LevitPatchEmbeddings (line 97) | class LevitPatchEmbeddings(nn.Module): method __init__ (line 103) | def __init__(self, config): method forward (line 125) | def forward(self, pixel_values): class MLPLayerWithBN (line 141) | class MLPLayerWithBN(nn.Module): method __init__ (line 142) | def __init__(self, input_dim, output_dim, bn_weight_init=1): method forward (line 147) | def forward(self, hidden_state): class LevitSubsample (line 153) | class LevitSubsample(nn.Module): method __init__ (line 154) | def __init__(self, stride, resolution): method forward (line 159) | def forward(self, hidden_state): class LevitAttention (line 167) | class LevitAttention(nn.Module): method __init__ (line 168) | def __init__(self, hidden_sizes, key_dim, num_attention_heads, attenti... method train (line 198) | def train(self, mode=True): method get_attention_biases (line 203) | def get_attention_biases(self, device): method forward (line 212) | def forward(self, hidden_state): class LevitAttentionSubsample (line 229) | class LevitAttentionSubsample(nn.Module): method __init__ (line 230) | def __init__( method train (line 276) | def train(self, mode=True): method get_attention_biases (line 281) | def get_attention_biases(self, device): method forward (line 290) | def forward(self, hidden_state): class LevitMLPLayer (line 312) | class LevitMLPLayer(nn.Module): method __init__ (line 317) | def __init__(self, input_dim, hidden_dim): method forward (line 323) | def forward(self, hidden_state): class LevitResidualLayer (line 330) | class LevitResidualLayer(nn.Module): method __init__ (line 335) | def __init__(self, module, drop_rate): method forward (line 340) | def forward(self, hidden_state): class LevitStage (line 351) | class LevitStage(nn.Module): method __init__ (line 356) | def __init__( method get_resolution (line 411) | def get_resolution(self): method forward (line 414) | def forward(self, hidden_state): class LevitEncoder (line 420) | class LevitEncoder(nn.Module): method __init__ (line 425) | def __init__(self, config): method forward (line 450) | def forward(self, hidden_state, output_hidden_states=False, return_dic... class LevitClassificationLayer (line 466) | class LevitClassificationLayer(nn.Module): method __init__ (line 471) | def __init__(self, input_dim, output_dim): method forward (line 476) | def forward(self, hidden_state): class LevitPreTrainedModel (line 482) | class LevitPreTrainedModel(PreTrainedModel): method _init_weights (line 493) | def _init_weights(self, module): class LevitModel (line 535) | class LevitModel(LevitPreTrainedModel): method __init__ (line 536) | def __init__(self, config): method forward (line 552) | def forward( class LevitForImageClassification (line 595) | class LevitForImageClassification(LevitPreTrainedModel): method __init__ (line 596) | def __init__(self, config): method forward (line 619) | def forward( class LevitForImageClassificationWithTeacher (line 682) | class LevitForImageClassificationWithTeacher(LevitPreTrainedModel): method __init__ (line 683) | def __init__(self, config): method forward (line 711) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/lilt/configuration_lilt.py class LiltConfig (line 24) | class LiltConfig(PretrainedConfig): method __init__ (line 90) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/lilt/modeling_lilt.py class LiltTextEmbeddings (line 44) | class LiltTextEmbeddings(nn.Module): method __init__ (line 45) | def __init__(self, config): method forward (line 68) | def forward( method create_position_ids_from_input_ids (line 104) | def create_position_ids_from_input_ids(self, input_ids, padding_idx): method create_position_ids_from_inputs_embeds (line 117) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class LiltLayoutEmbeddings (line 133) | class LiltLayoutEmbeddings(nn.Module): method __init__ (line 134) | def __init__(self, config): method forward (line 155) | def forward(self, bbox=None, position_ids=None): class LiltSelfAttention (line 189) | class LiltSelfAttention(nn.Module): method __init__ (line 190) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 226) | def transpose_for_scores(self, x, r=1): method forward (line 231) | def forward( class LiltSelfOutput (line 327) | class LiltSelfOutput(nn.Module): method __init__ (line 328) | def __init__(self, config): method forward (line 334) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LiltAttention (line 341) | class LiltAttention(nn.Module): method __init__ (line 342) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 354) | def prune_heads(self, heads): method forward (line 372) | def forward( class LiltIntermediate (line 394) | class LiltIntermediate(nn.Module): method __init__ (line 395) | def __init__(self, config): method forward (line 403) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LiltOutput (line 410) | class LiltOutput(nn.Module): method __init__ (line 411) | def __init__(self, config): method forward (line 417) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LiltLayer (line 424) | class LiltLayer(nn.Module): method __init__ (line 425) | def __init__(self, config): method forward (line 442) | def forward( method feed_forward_chunk (line 473) | def feed_forward_chunk(self, attention_output): method layout_feed_forward_chunk (line 478) | def layout_feed_forward_chunk(self, attention_output): class LiltEncoder (line 484) | class LiltEncoder(nn.Module): method __init__ (line 486) | def __init__(self, config): method forward (line 492) | def forward( class LiltPooler (line 556) | class LiltPooler(nn.Module): method __init__ (line 557) | def __init__(self, config): method forward (line 562) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LiltPreTrainedModel (line 571) | class LiltPreTrainedModel(PreTrainedModel): method _init_weights (line 583) | def _init_weights(self, module): class LiltModel (line 676) | class LiltModel(LiltPreTrainedModel): method __init__ (line 677) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 690) | def get_input_embeddings(self): method set_input_embeddings (line 693) | def set_input_embeddings(self, value): method _prune_heads (line 696) | def _prune_heads(self, heads_to_prune): method forward (line 706) | def forward( class LiltForSequenceClassification (line 825) | class LiltForSequenceClassification(LiltPreTrainedModel): method __init__ (line 827) | def __init__(self, config): method forward (line 840) | def forward( class LiltForTokenClassification (line 943) | class LiltForTokenClassification(LiltPreTrainedModel): method __init__ (line 945) | def __init__(self, config): method forward (line 961) | def forward( class LiltClassificationHead (line 1040) | class LiltClassificationHead(nn.Module): method __init__ (line 1043) | def __init__(self, config): method forward (line 1052) | def forward(self, features, **kwargs): class LiltForQuestionAnswering (line 1069) | class LiltForQuestionAnswering(LiltPreTrainedModel): method __init__ (line 1071) | def __init__(self, config): method forward (line 1083) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llama/configuration_llama.py class LlamaConfig (line 26) | class LlamaConfig(PretrainedConfig): method __init__ (line 145) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py function compute_intermediate_size (line 96) | def compute_intermediate_size(n, ffn_dim_multiplier=1, multiple_of=256): function read_json (line 100) | def read_json(path): function write_json (line 105) | def write_json(text, path): function write_model (line 110) | def write_model( class Llama3Converter (line 333) | class Llama3Converter(TikTokenConverter): method __init__ (line 334) | def __init__(self, vocab_file, special_tokens=None, instruct=False, mo... function write_tokenizer (line 360) | def write_tokenizer(tokenizer_path, input_tokenizer_path, llama_version=... function main (line 404) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/llama/modeling_flax_llama.py function create_sinusoidal_positions (line 131) | def create_sinusoidal_positions(num_pos, dim): function rotate_half (line 140) | def rotate_half(tensor): function apply_rotary_pos_emb (line 148) | def apply_rotary_pos_emb(tensor, sin_pos, cos_pos): class FlaxLlamaRMSNorm (line 152) | class FlaxLlamaRMSNorm(nn.Module): method setup (line 156) | def setup(self): method __call__ (line 160) | def __call__(self, hidden_states): class FlaxLlamaRotaryEmbedding (line 170) | class FlaxLlamaRotaryEmbedding(nn.Module): method setup (line 174) | def setup(self): method __call__ (line 178) | def __call__(self, key, query, position_ids): class FlaxLlamaAttention (line 191) | class FlaxLlamaAttention(nn.Module): method setup (line 197) | def setup(self): method _split_heads (line 220) | def _split_heads(self, hidden_states, num_heads): method _merge_heads (line 223) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 228) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 259) | def __call__( class FlaxLlamaMLP (line 337) | class FlaxLlamaMLP(nn.Module): method setup (line 341) | def setup(self): method __call__ (line 352) | def __call__(self, hidden_states): class FlaxLlamaDecoderLayer (line 360) | class FlaxLlamaDecoderLayer(nn.Module): method setup (line 364) | def setup(self): method __call__ (line 370) | def __call__( class FlaxLlamaPreTrainedModel (line 403) | class FlaxLlamaPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 413) | def __init__( method init_weights (line 425) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 445) | def init_cache(self, batch_size, max_length): method __call__ (line 465) | def __call__( class FlaxLlamaLayerCollection (line 535) | class FlaxLlamaLayerCollection(nn.Module): method setup (line 539) | def setup(self): method __call__ (line 545) | def __call__( class FlaxLlamaModule (line 581) | class FlaxLlamaModule(nn.Module): method setup (line 585) | def setup(self): method __call__ (line 597) | def __call__( class FlaxLlamaModel (line 644) | class FlaxLlamaModel(FlaxLlamaPreTrainedModel): class FlaxLlamaForCausalLMModule (line 657) | class FlaxLlamaForCausalLMModule(nn.Module): method setup (line 661) | def setup(self): method __call__ (line 670) | def __call__( class FlaxLlamaForCausalLM (line 708) | class FlaxLlamaForCausalLM(FlaxLlamaPreTrainedModel): method prepare_inputs_for_generation (line 711) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 732) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/llama/modeling_llama.py function _prepare_4d_causal_attention_mask_with_cache_position (line 58) | def _prepare_4d_causal_attention_mask_with_cache_position( class LlamaRMSNorm (line 111) | class LlamaRMSNorm(nn.Module): method __init__ (line 112) | def __init__(self, hidden_size, eps=1e-6): method forward (line 120) | def forward(self, hidden_states): method extra_repr (line 127) | def extra_repr(self): class LlamaRotaryEmbedding (line 134) | class LlamaRotaryEmbedding(nn.Module): method __init__ (line 135) | def __init__( method _dynamic_frequency_update (line 179) | def _dynamic_frequency_update(self, position_ids, device): method forward (line 198) | def forward(self, x, position_ids): class LlamaLinearScalingRotaryEmbedding (line 221) | class LlamaLinearScalingRotaryEmbedding(LlamaRotaryEmbedding): method __init__ (line 224) | def __init__(self, *args, **kwargs): class LlamaDynamicNTKScalingRotaryEmbedding (line 233) | class LlamaDynamicNTKScalingRotaryEmbedding(LlamaRotaryEmbedding): method __init__ (line 236) | def __init__(self, *args, **kwargs): function rotate_half (line 246) | def rotate_half(x): function apply_rotary_pos_emb (line 253) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... class LlamaMLP (line 280) | class LlamaMLP(nn.Module): method __init__ (line 281) | def __init__(self, config): method forward (line 291) | def forward(self, x): function repeat_kv (line 314) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class LlamaAttention (line 326) | class LlamaAttention(nn.Module): method __init__ (line 329) | def __init__(self, config: LlamaConfig, layer_idx: Optional[int] = None): method forward (line 358) | def forward( class LlamaFlashAttention2 (line 451) | class LlamaFlashAttention2(LlamaAttention): method __init__ (line 458) | def __init__(self, *args, **kwargs): method forward (line 466) | def forward( class LlamaSdpaAttention (line 571) | class LlamaSdpaAttention(LlamaAttention): method forward (line 579) | def forward( class LlamaDecoderLayer (line 677) | class LlamaDecoderLayer(nn.Module): method __init__ (line 678) | def __init__(self, config: LlamaConfig, layer_idx: int): method forward (line 688) | def forward( class LlamaPreTrainedModel (line 778) | class LlamaPreTrainedModel(PreTrainedModel): method _init_weights (line 790) | def _init_weights(self, module): class LlamaModel (line 880) | class LlamaModel(LlamaPreTrainedModel): method __init__ (line 888) | def __init__(self, config: LlamaConfig): method get_input_embeddings (line 904) | def get_input_embeddings(self): method set_input_embeddings (line 907) | def set_input_embeddings(self, value): method forward (line 911) | def forward( method _update_causal_mask (line 1032) | def _update_causal_mask( class LlamaForCausalLM (line 1104) | class LlamaForCausalLM(LlamaPreTrainedModel): method __init__ (line 1107) | def __init__(self, config): method get_input_embeddings (line 1116) | def get_input_embeddings(self): method set_input_embeddings (line 1119) | def set_input_embeddings(self, value): method get_output_embeddings (line 1122) | def get_output_embeddings(self): method set_output_embeddings (line 1125) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1128) | def set_decoder(self, decoder): method get_decoder (line 1131) | def get_decoder(self): method forward (line 1136) | def forward( method prepare_inputs_for_generation (line 1229) | def prepare_inputs_for_generation( class LlamaForSequenceClassification (line 1315) | class LlamaForSequenceClassification(LlamaPreTrainedModel): method __init__ (line 1316) | def __init__(self, config): method get_input_embeddings (line 1325) | def get_input_embeddings(self): method set_input_embeddings (line 1328) | def set_input_embeddings(self, value): method forward (line 1332) | def forward( class LlamaForQuestionAnswering (line 1430) | class LlamaForQuestionAnswering(LlamaPreTrainedModel): method __init__ (line 1434) | def __init__(self, config): method get_input_embeddings (line 1442) | def get_input_embeddings(self): method set_input_embeddings (line 1445) | def set_input_embeddings(self, value): method forward (line 1449) | def forward( class LlamaForTokenClassification (line 1529) | class LlamaForTokenClassification(LlamaPreTrainedModel): method __init__ (line 1530) | def __init__(self, config): method get_input_embeddings (line 1546) | def get_input_embeddings(self): method set_input_embeddings (line 1549) | def set_input_embeddings(self, value): method forward (line 1553) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llama/tokenization_llama.py class LlamaTokenizer (line 56) | class LlamaTokenizer(PreTrainedTokenizer): method __init__ (line 132) | def __init__( method unk_token_length (line 191) | def unk_token_length(self): method get_spm_processor (line 195) | def get_spm_processor(self, from_slow=False): method __getstate__ (line 212) | def __getstate__(self): method __setstate__ (line 218) | def __setstate__(self, d): method vocab_size (line 224) | def vocab_size(self): method get_vocab (line 228) | def get_vocab(self): method tokenize (line 235) | def tokenize(self, text: "TextInput", **kwargs) -> List[str]: method _tokenize (line 254) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 272) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 276) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 281) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 306) | def save_vocabulary(self, save_directory, filename_prefix: Optional[st... method build_inputs_with_special_tokens (line 333) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 344) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 381) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llama/tokenization_llama_fast.py class LlamaTokenizerFast (line 49) | class LlamaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 127) | def __init__( method can_save_slow_tokenizer (line 178) | def can_save_slow_tokenizer(self) -> bool: method update_post_processor (line 181) | def update_post_processor(self): method add_eos_token (line 208) | def add_eos_token(self): method add_bos_token (line 212) | def add_bos_token(self): method add_eos_token (line 216) | def add_eos_token(self, value): method add_bos_token (line 221) | def add_bos_token(self, value): method save_vocabulary (line 225) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 246) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava/configuration_llava.py class LlavaConfig (line 24) | class LlavaConfig(PretrainedConfig): method __init__ (line 78) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava/convert_llava_weights_to_hf.py function load_original_state_dict (line 65) | def load_original_state_dict(model_id): function convert_state_dict_to_hf (line 85) | def convert_state_dict_to_hf(state_dict): function convert_llava_llama_to_hf (line 98) | def convert_llava_llama_to_hf(text_model_id, vision_model_id, output_hub... function main (line 174) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava/modeling_llava.py class LlavaCausalLMOutputWithPast (line 47) | class LlavaCausalLMOutputWithPast(ModelOutput): class LlavaMultiModalProjector (line 88) | class LlavaMultiModalProjector(nn.Module): method __init__ (line 89) | def __init__(self, config: LlavaConfig): method forward (line 96) | def forward(self, image_features): class LlavaPreTrainedModel (line 124) | class LlavaPreTrainedModel(PreTrainedModel): method _init_weights (line 133) | def _init_weights(self, module): method _supports_sdpa (line 156) | def _supports_sdpa(self): class LlavaForConditionalGeneration (line 243) | class LlavaForConditionalGeneration(LlavaPreTrainedModel): method __init__ (line 244) | def __init__(self, config: LlavaConfig): method get_input_embeddings (line 256) | def get_input_embeddings(self): method set_input_embeddings (line 259) | def set_input_embeddings(self, value): method get_output_embeddings (line 262) | def get_output_embeddings(self): method set_output_embeddings (line 265) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 268) | def set_decoder(self, decoder): method get_decoder (line 271) | def get_decoder(self): method tie_weights (line 274) | def tie_weights(self): method resize_token_embeddings (line 277) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _merge_input_ids_with_image_features (line 284) | def _merge_input_ids_with_image_features(self, image_features, inputs_... method forward (line 364) | def forward( method prepare_inputs_for_generation (line 553) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava/processing_llava.py class LlavaProcessor (line 31) | class LlavaProcessor(ProcessorMixin): method __init__ (line 59) | def __init__( method __call__ (line 74) | def __call__( method batch_decode (line 171) | def batch_decode(self, *args, **kwargs): method decode (line 179) | def decode(self, *args, **kwargs): method model_input_names (line 188) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next/configuration_llava_next.py class LlavaNextConfig (line 24) | class LlavaNextConfig(PretrainedConfig): method __init__ (line 83) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next/convert_llava_next_weights_to_hf.py function load_original_state_dict (line 63) | def load_original_state_dict(model_id): function convert_state_dict_to_hf (line 76) | def convert_state_dict_to_hf(state_dict): function load_image (line 89) | def load_image(): function convert_llava_to_hf (line 95) | def convert_llava_to_hf(model_id, pytorch_dump_folder_path, push_to_hub=... FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next/image_processing_llava_next.py function make_batched_images (line 56) | def make_batched_images(images) -> List[List[ImageInput]]: function divide_to_patches (line 79) | def divide_to_patches(image: np.array, patch_size: int, input_data_forma... function expand_to_square (line 107) | def expand_to_square(image: np.array, background_color, input_data_forma... function _get_patch_output_size (line 125) | def _get_patch_output_size(image, target_resolution, input_data_format): class LlavaNextImageProcessor (line 142) | class LlavaNextImageProcessor(BaseImageProcessor): method __init__ (line 191) | def __init__( method resize (line 234) | def resize( method pad (line 284) | def pad( method _preprocess (line 352) | def _preprocess( method _resize_for_patching (line 441) | def _resize_for_patching( method _pad_for_patching (line 467) | def _pad_for_patching( method get_image_patches (line 483) | def get_image_patches( method _pad_for_batching (line 547) | def _pad_for_batching( method preprocess (line 586) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next/modeling_llava_next.py function get_anyres_image_grid_shape (line 45) | def get_anyres_image_grid_shape(image_size, grid_pinpoints, patch_size): function image_size_to_num_patches (line 76) | def image_size_to_num_patches(image_size, grid_pinpoints, patch_size: int): function unpad_image (line 113) | def unpad_image(tensor, original_size): class LlavaNextCausalLMOutputWithPast (line 148) | class LlavaNextCausalLMOutputWithPast(ModelOutput): class LlavaNextMultiModalProjector (line 190) | class LlavaNextMultiModalProjector(nn.Module): method __init__ (line 191) | def __init__(self, config: LlavaNextConfig): method forward (line 198) | def forward(self, image_features): class LlavaNextPreTrainedModel (line 227) | class LlavaNextPreTrainedModel(PreTrainedModel): method _init_weights (line 236) | def _init_weights(self, module): method _supports_sdpa (line 259) | def _supports_sdpa(self): class LlavaNextForConditionalGeneration (line 349) | class LlavaNextForConditionalGeneration(LlavaNextPreTrainedModel): method __init__ (line 350) | def __init__(self, config: LlavaNextConfig): method padding_side (line 367) | def padding_side(self): method padding_side (line 371) | def padding_side(self, padding_side: str): method get_input_embeddings (line 377) | def get_input_embeddings(self): method set_input_embeddings (line 381) | def set_input_embeddings(self, value): method get_output_embeddings (line 385) | def get_output_embeddings(self): method set_output_embeddings (line 389) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 393) | def set_decoder(self, decoder): method get_decoder (line 397) | def get_decoder(self): method tie_weights (line 401) | def tie_weights(self): method resize_token_embeddings (line 405) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _merge_input_ids_with_image_features (line 412) | def _merge_input_ids_with_image_features( method pack_image_features (line 651) | def pack_image_features(self, image_features, image_sizes, image_newli... method forward (line 707) | def forward( method prepare_inputs_for_generation (line 925) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next/processing_llava_next.py class LlavaNextProcessor (line 32) | class LlavaNextProcessor(ProcessorMixin): method __init__ (line 60) | def __init__( method __call__ (line 75) | def __call__( method _get_number_of_features (line 178) | def _get_number_of_features(self, orig_height: int, orig_width: int, h... method _get_unpadded_features (line 196) | def _get_unpadded_features(self, height, width, patches_height, patche... method batch_decode (line 221) | def batch_decode(self, *args, **kwargs): method decode (line 229) | def decode(self, *args, **kwargs): method model_input_names (line 238) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next_video/configuration_llava_next_video.py class LlavaNextVideoConfig (line 34) | class LlavaNextVideoConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next_video/convert_llava_next_video_weights_to_hf.py function load_original_state_dict (line 127) | def load_original_state_dict(model_id): function convert_state_dict_to_hf (line 140) | def convert_state_dict_to_hf(state_dict): function convert_llava_to_hf (line 153) | def convert_llava_to_hf(model_id, pytorch_dump_folder_path, push_to_hub=... FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next_video/diff_llava_next_video.py class LlavaNextVideoConfig (line 43) | class LlavaNextVideoConfig(PretrainedConfig): method __init__ (line 107) | def __init__( class LlavaNextVideoCausalLMOutputWithPast (line 180) | class LlavaNextVideoCausalLMOutputWithPast(LlavaNextCausalLMOutputWithPa... class LlavaNextVideoPooler (line 184) | class LlavaNextVideoPooler(nn.Module): method __init__ (line 185) | def __init__(self, config): method forward (line 207) | def forward(self, image_features): class LlavaNextVideoMultiModalProjector (line 218) | class LlavaNextVideoMultiModalProjector(LlavaNextMultiModalProjector): class LlavaNextVideoForConditionalGeneration (line 222) | class LlavaNextVideoForConditionalGeneration(LlavaNextForConditionalGene... method __init__ (line 223) | def __init__(self, config: LlavaNextVideoConfig, **super_kwargs): method _get_image_features (line 228) | def _get_image_features(self, pixel_values, image_sizes): method _get_video_features (line 256) | def _get_video_features(self, pixel_values): method forward (line 273) | def forward( method prepare_inputs_for_generation (line 528) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next_video/image_processing_llava_next_video.py function make_batched_videos (line 52) | def make_batched_videos(videos) -> List[VideoInput]: class LlavaNextVideoImageProcessor (line 68) | class LlavaNextVideoImageProcessor(BaseImageProcessor): method __init__ (line 113) | def __init__( method resize (line 149) | def resize( method _preprocess (line 199) | def _preprocess( method preprocess (line 304) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next_video/modeling_llava_next_video.py function get_anyres_image_grid_shape (line 52) | def get_anyres_image_grid_shape(image_size, grid_pinpoints, patch_size): function image_size_to_num_patches (line 83) | def image_size_to_num_patches(image_size, grid_pinpoints, patch_size: int): function unpad_image (line 120) | def unpad_image(tensor, original_size): class LlavaNextVideoCausalLMOutputWithPast (line 155) | class LlavaNextVideoCausalLMOutputWithPast(ModelOutput): class LlavaNextVideoPooler (line 196) | class LlavaNextVideoPooler(nn.Module): method __init__ (line 197) | def __init__(self, config): method forward (line 219) | def forward(self, image_features): class LlavaNextVideoMultiModalProjector (line 231) | class LlavaNextVideoMultiModalProjector(nn.Module): method __init__ (line 232) | def __init__(self, config: LlavaNextVideoConfig): method forward (line 239) | def forward(self, image_features): class LlavaNextVideoPreTrainedModel (line 268) | class LlavaNextVideoPreTrainedModel(PreTrainedModel): method _init_weights (line 277) | def _init_weights(self, module): method _supports_sdpa (line 300) | def _supports_sdpa(self): class LlavaNextVideoForConditionalGeneration (line 390) | class LlavaNextVideoForConditionalGeneration(LlavaNextVideoPreTrainedMod... method __init__ (line 391) | def __init__( method padding_side (line 412) | def padding_side(self): method padding_side (line 416) | def padding_side(self, padding_side: str): method get_input_embeddings (line 422) | def get_input_embeddings(self): method set_input_embeddings (line 426) | def set_input_embeddings(self, value): method get_output_embeddings (line 430) | def get_output_embeddings(self): method set_output_embeddings (line 434) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 438) | def set_decoder(self, decoder): method get_decoder (line 442) | def get_decoder(self): method tie_weights (line 446) | def tie_weights(self): method resize_token_embeddings (line 450) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _merge_input_ids_with_image_features (line 458) | def _merge_input_ids_with_image_features( method pack_image_features (line 697) | def pack_image_features(self, image_features, image_sizes, image_newli... method forward (line 753) | def forward( method prepare_inputs_for_generation (line 1008) | def prepare_inputs_for_generation( method _get_image_features (line 1073) | def _get_image_features(self, pixel_values, image_sizes): method _get_video_features (line 1101) | def _get_video_features(self, pixel_values): FILE: mplsandbox_for_rl/transformers/src/transformers/models/llava_next_video/processing_llava_next_video.py class LlavaNextVideoProcessor (line 34) | class LlavaNextVideoProcessor(ProcessorMixin): method __init__ (line 70) | def __init__( method __call__ (line 88) | def __call__( method batch_decode (line 218) | def batch_decode(self, *args, **kwargs): method decode (line 226) | def decode(self, *args, **kwargs): method model_input_names (line 235) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/longformer/configuration_longformer.py class LongformerConfig (line 33) | class LongformerConfig(PretrainedConfig): method __init__ (line 97) | def __init__( class LongformerOnnxConfig (line 141) | class LongformerOnnxConfig(OnnxConfig): method __init__ (line 142) | def __init__(self, config: "PretrainedConfig", task: str = "default", ... method inputs (line 147) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 161) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 168) | def atol_for_validation(self) -> float: method default_onnx_opset (line 178) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 182) | def generate_dummy_inputs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/longformer/convert_longformer_original_pytorch_lightning_to_pytorch.py class LightningModel (line 26) | class LightningModel(pl.LightningModule): method __init__ (line 27) | def __init__(self, model): method forward (line 34) | def forward(self): function convert_longformer_qa_checkpoint_to_pytorch (line 38) | def convert_longformer_qa_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/transformers/models/longformer/modeling_longformer.py class LongformerBaseModelOutput (line 47) | class LongformerBaseModelOutput(ModelOutput): class LongformerBaseModelOutputWithPooling (line 90) | class LongformerBaseModelOutputWithPooling(ModelOutput): class LongformerMaskedLMOutput (line 138) | class LongformerMaskedLMOutput(ModelOutput): class LongformerQuestionAnsweringModelOutput (line 184) | class LongformerQuestionAnsweringModelOutput(ModelOutput): class LongformerSequenceClassifierOutput (line 233) | class LongformerSequenceClassifierOutput(ModelOutput): class LongformerMultipleChoiceModelOutput (line 279) | class LongformerMultipleChoiceModelOutput(ModelOutput): class LongformerTokenClassifierOutput (line 327) | class LongformerTokenClassifierOutput(ModelOutput): function _get_question_end_index (line 372) | def _get_question_end_index(input_ids, sep_token_id): function _compute_global_attention_mask (line 388) | def _compute_global_attention_mask(input_ids, sep_token_id, before_sep_t... function create_position_ids_from_input_ids (line 408) | def create_position_ids_from_input_ids(input_ids, padding_idx): class LongformerEmbeddings (line 424) | class LongformerEmbeddings(nn.Module): method __init__ (line 429) | def __init__(self, config): method forward (line 444) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... method create_position_ids_from_inputs_embeds (line 470) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class LongformerSelfAttention (line 488) | class LongformerSelfAttention(nn.Module): method __init__ (line 489) | def __init__(self, config, layer_id): method forward (line 524) | def forward( method _pad_and_transpose_last_two_dims (line 693) | def _pad_and_transpose_last_two_dims(hidden_states_padded, padding): method _pad_and_diagonalize (line 704) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 753) | def _chunk(hidden_states, window_overlap, onnx_export: bool = False): method _mask_invalid_locations (line 794) | def _mask_invalid_locations(input_tensor, affected_seq_len) -> torch.T... method _sliding_chunks_query_key_matmul (line 809) | def _sliding_chunks_query_key_matmul(self, query: torch.Tensor, key: t... method _sliding_chunks_matmul_attn_probs_value (line 875) | def _sliding_chunks_matmul_attn_probs_value( method _get_global_attn_indices (line 920) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 948) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 978) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 1014) | def _compute_global_attn_output_from_hidden( class LongformerSelfOutput (line 1124) | class LongformerSelfOutput(nn.Module): method __init__ (line 1125) | def __init__(self, config): method forward (line 1131) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LongformerAttention (line 1138) | class LongformerAttention(nn.Module): method __init__ (line 1139) | def __init__(self, config, layer_id=0): method prune_heads (line 1145) | def prune_heads(self, heads): method forward (line 1163) | def forward( class LongformerIntermediate (line 1188) | class LongformerIntermediate(nn.Module): method __init__ (line 1189) | def __init__(self, config): method forward (line 1197) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LongformerOutput (line 1204) | class LongformerOutput(nn.Module): method __init__ (line 1205) | def __init__(self, config): method forward (line 1211) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LongformerLayer (line 1218) | class LongformerLayer(nn.Module): method __init__ (line 1219) | def __init__(self, config, layer_id=0): method forward (line 1227) | def forward( method ff_chunk (line 1255) | def ff_chunk(self, attn_output): class LongformerEncoder (line 1261) | class LongformerEncoder(nn.Module): method __init__ (line 1262) | def __init__(self, config): method forward (line 1268) | def forward( class LongformerPooler (line 1354) | class LongformerPooler(nn.Module): method __init__ (line 1355) | def __init__(self, config): method forward (line 1360) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LongformerLMHead (line 1370) | class LongformerLMHead(nn.Module): method __init__ (line 1373) | def __init__(self, config): method forward (line 1382) | def forward(self, features, **kwargs): method _tie_weights (line 1392) | def _tie_weights(self): class LongformerPreTrainedModel (line 1401) | class LongformerPreTrainedModel(PreTrainedModel): method _init_weights (line 1412) | def _init_weights(self, module): class LongformerModel (line 1516) | class LongformerModel(LongformerPreTrainedModel): method __init__ (line 1532) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1553) | def get_input_embeddings(self): method set_input_embeddings (line 1556) | def set_input_embeddings(self, value): method _prune_heads (line 1559) | def _prune_heads(self, heads_to_prune): method _pad_to_window_size (line 1567) | def _pad_to_window_size( method _merge_to_attention_mask (line 1617) | def _merge_to_attention_mask(self, attention_mask: torch.Tensor, globa... method forward (line 1631) | def forward( class LongformerForMaskedLM (line 1754) | class LongformerForMaskedLM(LongformerPreTrainedModel): method __init__ (line 1757) | def __init__(self, config): method get_output_embeddings (line 1766) | def get_output_embeddings(self): method set_output_embeddings (line 1769) | def set_output_embeddings(self, new_embeddings): method forward (line 1774) | def forward( class LongformerForSequenceClassification (line 1868) | class LongformerForSequenceClassification(LongformerPreTrainedModel): method __init__ (line 1869) | def __init__(self, config): method forward (line 1888) | def forward( class LongformerClassificationHead (line 1969) | class LongformerClassificationHead(nn.Module): method __init__ (line 1972) | def __init__(self, config): method forward (line 1978) | def forward(self, hidden_states, **kwargs): class LongformerForQuestionAnswering (line 1995) | class LongformerForQuestionAnswering(LongformerPreTrainedModel): method __init__ (line 1996) | def __init__(self, config): method forward (line 2008) | def forward( class LongformerForTokenClassification (line 2132) | class LongformerForTokenClassification(LongformerPreTrainedModel): method __init__ (line 2133) | def __init__(self, config): method forward (line 2155) | def forward( class LongformerForMultipleChoice (line 2220) | class LongformerForMultipleChoice(LongformerPreTrainedModel): method __init__ (line 2221) | def __init__(self, config): method forward (line 2239) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/longformer/modeling_tf_longformer.py class TFLongformerBaseModelOutput (line 60) | class TFLongformerBaseModelOutput(ModelOutput): class TFLongformerBaseModelOutputWithPooling (line 103) | class TFLongformerBaseModelOutputWithPooling(ModelOutput): class TFLongformerMaskedLMOutput (line 151) | class TFLongformerMaskedLMOutput(ModelOutput): class TFLongformerQuestionAnsweringModelOutput (line 197) | class TFLongformerQuestionAnsweringModelOutput(ModelOutput): class TFLongformerSequenceClassifierOutput (line 246) | class TFLongformerSequenceClassifierOutput(ModelOutput): class TFLongformerMultipleChoiceModelOutput (line 292) | class TFLongformerMultipleChoiceModelOutput(ModelOutput): class TFLongformerTokenClassifierOutput (line 340) | class TFLongformerTokenClassifierOutput(ModelOutput): function _compute_global_attention_mask (line 385) | def _compute_global_attention_mask(input_ids_shape, sep_token_indices, b... class TFLongformerLMHead (line 410) | class TFLongformerLMHead(keras.layers.Layer): method __init__ (line 413) | def __init__(self, config, input_embeddings, **kwargs): method build (line 428) | def build(self, input_shape=None): method get_output_embeddings (line 441) | def get_output_embeddings(self): method set_output_embeddings (line 444) | def set_output_embeddings(self, value): method get_bias (line 448) | def get_bias(self): method set_bias (line 451) | def set_bias(self, value): method call (line 455) | def call(self, hidden_states): class TFLongformerEmbeddings (line 470) | class TFLongformerEmbeddings(keras.layers.Layer): method __init__ (line 475) | def __init__(self, config, **kwargs): method build (line 486) | def build(self, input_shape=None): method create_position_ids_from_input_ids (line 515) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 529) | def call( class TFLongformerIntermediate (line 577) | class TFLongformerIntermediate(keras.layers.Layer): method __init__ (line 578) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 591) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 597) | def build(self, input_shape=None): class TFLongformerOutput (line 607) | class TFLongformerOutput(keras.layers.Layer): method __init__ (line 608) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 618) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 625) | def build(self, input_shape=None): class TFLongformerPooler (line 638) | class TFLongformerPooler(keras.layers.Layer): method __init__ (line 639) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 650) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 658) | def build(self, input_shape=None): class TFLongformerSelfOutput (line 668) | class TFLongformerSelfOutput(keras.layers.Layer): method __init__ (line 669) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 679) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 686) | def build(self, input_shape=None): class TFLongformerSelfAttention (line 698) | class TFLongformerSelfAttention(keras.layers.Layer): method __init__ (line 699) | def __init__(self, config, layer_id, **kwargs): method build (line 758) | def build(self, input_shape=None): method call (line 789) | def call( method _sliding_chunks_query_key_matmul (line 980) | def _sliding_chunks_query_key_matmul(self, query, key, window_overlap): method _mask_invalid_locations (line 1097) | def _mask_invalid_locations(input_tensor, window_overlap): method _sliding_chunks_matmul_attn_probs_value (line 1126) | def _sliding_chunks_matmul_attn_probs_value(self, attn_probs, value, w... method _pad_and_transpose_last_two_dims (line 1200) | def _pad_and_transpose_last_two_dims(hidden_states_padded, paddings): method _pad_and_diagonalize (line 1211) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 1263) | def _chunk(hidden_states, window_overlap): method _get_global_attn_indices (line 1293) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 1323) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 1377) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 1418) | def _compute_global_attn_output_from_hidden( method reshape_and_transpose (line 1555) | def reshape_and_transpose(self, vector, batch_size): class TFLongformerAttention (line 1565) | class TFLongformerAttention(keras.layers.Layer): method __init__ (line 1566) | def __init__(self, config, layer_id=0, **kwargs): method prune_heads (line 1572) | def prune_heads(self, heads): method call (line 1575) | def call(self, inputs, training=False): method build (line 1594) | def build(self, input_shape=None): class TFLongformerLayer (line 1606) | class TFLongformerLayer(keras.layers.Layer): method __init__ (line 1607) | def __init__(self, config, layer_id=0, **kwargs): method call (line 1614) | def call(self, inputs, training=False): method build (line 1635) | def build(self, input_shape=None): class TFLongformerEncoder (line 1650) | class TFLongformerEncoder(keras.layers.Layer): method __init__ (line 1651) | def __init__(self, config, **kwargs): method call (line 1658) | def call( method build (line 1727) | def build(self, input_shape=None): class TFLongformerMainLayer (line 1738) | class TFLongformerMainLayer(keras.layers.Layer): method __init__ (line 1741) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 1766) | def get_input_embeddings(self): method set_input_embeddings (line 1769) | def set_input_embeddings(self, value): method _prune_heads (line 1773) | def _prune_heads(self, heads_to_prune): method call (line 1781) | def call( method _pad_to_window_size (line 1901) | def _pad_to_window_size( method _merge_to_attention_mask (line 1950) | def _merge_to_attention_mask(attention_mask: tf.Tensor, global_attenti... method build (line 1963) | def build(self, input_shape=None): class TFLongformerPreTrainedModel (line 1978) | class TFLongformerPreTrainedModel(TFPreTrainedModel): method input_signature (line 1988) | def input_signature(self): class TFLongformerModel (line 2108) | class TFLongformerModel(TFLongformerPreTrainedModel): method __init__ (line 2125) | def __init__(self, config, *inputs, **kwargs): method call (line 2132) | def call( method build (line 2162) | def build(self, input_shape=None): class TFLongformerForMaskedLM (line 2175) | class TFLongformerForMaskedLM(TFLongformerPreTrainedModel, TFMaskedLangu... method __init__ (line 2179) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 2185) | def get_lm_head(self): method get_prefix_bias_name (line 2188) | def get_prefix_bias_name(self): method call (line 2202) | def call( method build (line 2254) | def build(self, input_shape=None): class TFLongformerForQuestionAnswering (line 2273) | class TFLongformerForQuestionAnswering(TFLongformerPreTrainedModel, TFQu... method __init__ (line 2277) | def __init__(self, config, *inputs, **kwargs): method call (line 2298) | def call( method build (line 2396) | def build(self, input_shape=None): class TFLongformerClassificationHead (line 2408) | class TFLongformerClassificationHead(keras.layers.Layer): method __init__ (line 2411) | def __init__(self, config, **kwargs): method call (line 2425) | def call(self, hidden_states, training=False): method build (line 2433) | def build(self, input_shape=None): class TFLongformerForSequenceClassification (line 2452) | class TFLongformerForSequenceClassification(TFLongformerPreTrainedModel,... method __init__ (line 2456) | def __init__(self, config, *inputs, **kwargs): method call (line 2471) | def call( method build (line 2547) | def build(self, input_shape=None): class TFLongformerForMultipleChoice (line 2566) | class TFLongformerForMultipleChoice(TFLongformerPreTrainedModel, TFMulti... method __init__ (line 2570) | def __init__(self, config, *inputs, **kwargs): method input_signature (line 2581) | def input_signature(self): method call (line 2597) | def call( method build (line 2673) | def build(self, input_shape=None): class TFLongformerForTokenClassification (line 2692) | class TFLongformerForTokenClassification(TFLongformerPreTrainedModel, TF... method __init__ (line 2697) | def __init__(self, config, *inputs, **kwargs): method call (line 2715) | def call( method build (line 2765) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/longformer/tokenization_longformer.py function bytes_to_unicode (line 35) | def bytes_to_unicode(): function get_pairs (line 60) | def get_pairs(word): class LongformerTokenizer (line 75) | class LongformerTokenizer(PreTrainedTokenizer): method __init__ (line 156) | def __init__( method vocab_size (line 217) | def vocab_size(self): method get_vocab (line 220) | def get_vocab(self): method bpe (line 225) | def bpe(self, token): method _tokenize (line 267) | def _tokenize(self, text): method _convert_token_to_id (line 277) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 281) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 285) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 291) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 320) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 345) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 372) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 395) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: mplsandbox_for_rl/transformers/src/transformers/models/longformer/tokenization_longformer_fast.py class LongformerTokenizerFast (line 34) | class LongformerTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 119) | def __init__( method mask_token (line 193) | def mask_token(self) -> str: method mask_token (line 208) | def mask_token(self, value): method _batch_encode_plus (line 219) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 228) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 238) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 242) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 249) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/longt5/configuration_longt5.py class LongT5Config (line 27) | class LongT5Config(PretrainedConfig): method __init__ (line 84) | def __init__( class LongT5OnnxConfig (line 150) | class LongT5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 152) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 171) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/longt5/modeling_flax_longt5.py function shift_tokens_right (line 58) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... function _pad_to_multiple (line 70) | def _pad_to_multiple(x: jnp.ndarray, block_len: int, axis: int, pad_valu... function _split_into_blocks (line 79) | def _split_into_blocks(x: jnp.ndarray, block_len: int, axis: int) -> jnp... function _concatenate_3_blocks (line 91) | def _concatenate_3_blocks(x: jnp.ndarray, block_axis: int, sequence_axis... function _make_3block_relative_position_ids (line 113) | def _make_3block_relative_position_ids(block_len: int) -> jnp.ndarray: function _mask_local_attention_mask (line 121) | def _mask_local_attention_mask(local_attention_mask: np.ndarray, block_l... function _get_local_attention_mask (line 129) | def _get_local_attention_mask(attention_mask: np.ndarray, block_len: int... function _make_global_fixed_block_ids (line 145) | def _make_global_fixed_block_ids(attention_mask: np.ndarray, global_bloc... function _make_side_relative_position_ids (line 187) | def _make_side_relative_position_ids(attention_mask: np.ndarray, global_... function _create_global_aggregates (line 196) | def _create_global_aggregates(hidden_states: np.ndarray, block_ids: np.n... class FlaxLongT5LayerNorm (line 204) | class FlaxLongT5LayerNorm(nn.Module): method setup (line 210) | def setup(self): method __call__ (line 213) | def __call__(self, hidden_states): class FlaxLongT5DenseActDense (line 225) | class FlaxLongT5DenseActDense(nn.Module): method setup (line 229) | def setup(self): method __call__ (line 248) | def __call__(self, hidden_states, deterministic=True): class FlaxLongT5DenseGatedActDense (line 257) | class FlaxLongT5DenseGatedActDense(nn.Module): method setup (line 261) | def setup(self): method __call__ (line 286) | def __call__(self, hidden_states, deterministic): class FlaxLongT5LayerFF (line 296) | class FlaxLongT5LayerFF(nn.Module): method setup (line 300) | def setup(self): method __call__ (line 311) | def __call__(self, hidden_states, deterministic=True): class FlaxLongT5Attention (line 319) | class FlaxLongT5Attention(nn.Module): method setup (line 325) | def setup(self): method _relative_position_bucket (line 372) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 407) | def compute_bias(self, query_length, key_length): method _split_heads (line 424) | def _split_heads(self, hidden_states): method _merge_heads (line 427) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 431) | def _concatenate_to_cache(self, key, value, query, attention_mask): method _create_position_bias (line 463) | def _create_position_bias( method __call__ (line 487) | def __call__( class FlaxLongT5LocalAttention (line 603) | class FlaxLongT5LocalAttention(nn.Module): method setup (line 608) | def setup(self): method _relative_position_bucket (line 657) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 692) | def compute_bias(self, block_length: int): method _split_heads (line 709) | def _split_heads(self, hidden_states): method _merge_heads (line 712) | def _merge_heads(self, hidden_states): method _create_position_bias (line 715) | def _create_position_bias(self, block_len: int, attention_mask: Option... method __call__ (line 726) | def __call__( class FlaxLongT5TransientGlobalAttention (line 814) | class FlaxLongT5TransientGlobalAttention(nn.Module): method setup (line 819) | def setup(self): method _relative_position_bucket (line 880) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 915) | def compute_bias(self, block_length: int): method compute_side_bias (line 932) | def compute_side_bias(self, attention_mask: np.ndarray, global_segment... method _split_heads (line 957) | def _split_heads(self, hidden_states): method _merge_heads (line 960) | def _merge_heads(self, hidden_states): method _create_position_bias (line 963) | def _create_position_bias(self, block_len: int, attention_mask: Option... method __call__ (line 974) | def __call__( class FlaxLongT5LayerLocalSelfAttention (line 1102) | class FlaxLongT5LayerLocalSelfAttention(nn.Module): method setup (line 1109) | def setup(self): method __call__ (line 1118) | def __call__( class FlaxLongT5LayerTransientGlobalSelfAttention (line 1140) | class FlaxLongT5LayerTransientGlobalSelfAttention(nn.Module): method setup (line 1147) | def setup(self): method __call__ (line 1156) | def __call__( class FlaxLongT5LayerSelfAttention (line 1179) | class FlaxLongT5LayerSelfAttention(nn.Module): method setup (line 1184) | def setup(self): method __call__ (line 1196) | def __call__( class FlaxLongT5LayerCrossAttention (line 1220) | class FlaxLongT5LayerCrossAttention(nn.Module): method setup (line 1224) | def setup(self): method __call__ (line 1233) | def __call__( class FlaxLongT5Block (line 1255) | class FlaxLongT5Block(nn.Module): method setup (line 1260) | def setup(self): method __call__ (line 1289) | def __call__( class FlaxLongT5LayerCollection (line 1341) | class FlaxLongT5LayerCollection(nn.Module): method setup (line 1346) | def setup(self): method __call__ (line 1351) | def __call__( class FlaxLongT5BlockCollection (line 1377) | class FlaxLongT5BlockCollection(nn.Module): method setup (line 1382) | def setup(self): method __call__ (line 1406) | def __call__( class FlaxLongT5Stack (line 1464) | class FlaxLongT5Stack(nn.Module): method setup (line 1470) | def setup(self): method __call__ (line 1481) | def __call__( class FlaxLongT5PreTrainedModel (line 1665) | class FlaxLongT5PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 1675) | def __init__( method enable_gradient_checkpointing (line 1687) | def enable_gradient_checkpointing(self): method init_weights (line 1694) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 1724) | def __call__( method init_cache (line 1773) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 1811) | def encode( method decode (line 1869) | def decode( class FlaxLongT5Module (line 2017) | class FlaxLongT5Module(nn.Module): method _get_encoder_module (line 2022) | def _get_encoder_module(self): method _get_decoder_module (line 2025) | def _get_decoder_module(self): method setup (line 2028) | def setup(self): method __call__ (line 2055) | def __call__( class FlaxLongT5Model (line 2107) | class FlaxLongT5Model(FlaxLongT5PreTrainedModel): class FlaxLongT5ForConditionalGenerationModule (line 2142) | class FlaxLongT5ForConditionalGenerationModule(nn.Module): method _get_encoder_module (line 2147) | def _get_encoder_module(self): method _get_decoder_module (line 2150) | def _get_decoder_module(self): method setup (line 2153) | def setup(self): method __call__ (line 2186) | def __call__( class FlaxLongT5ForConditionalGeneration (line 2252) | class FlaxLongT5ForConditionalGeneration(FlaxLongT5PreTrainedModel): method decode (line 2257) | def decode( method prepare_inputs_for_generation (line 2386) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 2415) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/longt5/modeling_longt5.py function _pad_to_multiple (line 55) | def _pad_to_multiple(x: torch.Tensor, block_len: int, dim: int, pad_valu... function _split_into_blocks (line 71) | def _split_into_blocks(x: torch.Tensor, block_len: int, dim: int) -> tor... function _concatenate_3_blocks (line 86) | def _concatenate_3_blocks(x: torch.Tensor, block_dim: int, sequence_dim:... function _make_3block_relative_position_ids (line 111) | def _make_3block_relative_position_ids(block_len: int) -> torch.Tensor: function _mask_local_attention_mask (line 120) | def _mask_local_attention_mask(local_attention_mask: torch.Tensor, block... function _get_local_attention_mask (line 129) | def _get_local_attention_mask(attention_mask: torch.Tensor, block_len: i... function _make_global_fixed_block_ids (line 145) | def _make_global_fixed_block_ids( function _make_side_relative_position_ids (line 194) | def _make_side_relative_position_ids(attention_mask: torch.Tensor, globa... function _create_global_aggregates (line 203) | def _create_global_aggregates( class LongT5LayerNorm (line 216) | class LongT5LayerNorm(nn.Module): method __init__ (line 217) | def __init__(self, hidden_size, eps=1e-6): method forward (line 225) | def forward(self, hidden_states): class LongT5DenseActDense (line 258) | class LongT5DenseActDense(nn.Module): method __init__ (line 259) | def __init__(self, config: LongT5Config): method forward (line 266) | def forward(self, hidden_states): class LongT5DenseGatedActDense (line 280) | class LongT5DenseGatedActDense(nn.Module): method __init__ (line 281) | def __init__(self, config: LongT5Config): method forward (line 289) | def forward(self, hidden_states): class LongT5LayerFF (line 299) | class LongT5LayerFF(nn.Module): method __init__ (line 300) | def __init__(self, config: LongT5Config): method forward (line 310) | def forward(self, hidden_states): class LongT5Attention (line 318) | class LongT5Attention(nn.Module): method __init__ (line 319) | def __init__(self, config: LongT5Config, has_relative_attention_bias=F... method prune_heads (line 342) | def prune_heads(self, heads): method _relative_position_bucket (line 359) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 406) | def compute_bias(self, query_length, key_length, device=None): method forward (line 423) | def forward( class LongT5LocalAttention (line 553) | class LongT5LocalAttention(nn.Module): method __init__ (line 554) | def __init__(self, config: LongT5Config, has_relative_attention_bias: ... method prune_heads (line 580) | def prune_heads(self, heads): method _relative_position_bucket (line 598) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 645) | def compute_bias(self, block_length: int): method forward (line 669) | def forward( class LongT5TransientGlobalAttention (line 745) | class LongT5TransientGlobalAttention(nn.Module): method __init__ (line 746) | def __init__(self, config: LongT5Config, has_relative_attention_bias: ... method prune_heads (line 777) | def prune_heads(self, heads): method _relative_position_bucket (line 795) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 842) | def compute_bias(self, block_length: int): method compute_side_bias (line 866) | def compute_side_bias(self, mask: torch.Tensor, global_segment_ids: to... method forward (line 887) | def forward( class LongT5LayerSelfAttention (line 1009) | class LongT5LayerSelfAttention(nn.Module): method __init__ (line 1010) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1016) | def forward( class LongT5LayerLocalSelfAttention (line 1041) | class LongT5LayerLocalSelfAttention(nn.Module): method __init__ (line 1044) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1050) | def forward( class LongT5LayerTransientGlobalSelfAttention (line 1072) | class LongT5LayerTransientGlobalSelfAttention(nn.Module): method __init__ (line 1075) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1083) | def forward( class LongT5LayerCrossAttention (line 1106) | class LongT5LayerCrossAttention(nn.Module): method __init__ (line 1107) | def __init__(self, config): method forward (line 1113) | def forward( class LongT5Block (line 1142) | class LongT5Block(nn.Module): method __init__ (line 1143) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1164) | def forward( class LongT5PreTrainedModel (line 1265) | class LongT5PreTrainedModel(PreTrainedModel): method dummy_inputs (line 1278) | def dummy_inputs(self): method _init_weights (line 1288) | def _init_weights(self, module): method _shift_right (line 1337) | def _shift_right(self, input_ids): class LongT5Stack (line 1365) | class LongT5Stack(LongT5PreTrainedModel): method __init__ (line 1366) | def __init__(self, config, embed_tokens=None): method get_input_embeddings (line 1389) | def get_input_embeddings(self): method set_input_embeddings (line 1393) | def set_input_embeddings(self, new_embeddings): method forward (line 1396) | def forward( class LongT5Model (line 1748) | class LongT5Model(LongT5PreTrainedModel): method __init__ (line 1754) | def __init__(self, config: LongT5Config): method get_input_embeddings (line 1773) | def get_input_embeddings(self): method set_input_embeddings (line 1776) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1781) | def _tie_weights(self): method get_encoder (line 1786) | def get_encoder(self): method get_decoder (line 1789) | def get_decoder(self): method _prune_heads (line 1792) | def _prune_heads(self, heads_to_prune): method forward (line 1802) | def forward( class LongT5ForConditionalGeneration (line 1903) | class LongT5ForConditionalGeneration(LongT5PreTrainedModel): method __init__ (line 1909) | def __init__(self, config: LongT5Config): method get_input_embeddings (line 1932) | def get_input_embeddings(self): method set_input_embeddings (line 1935) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1940) | def _tie_weights(self): method set_output_embeddings (line 1945) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1948) | def get_output_embeddings(self): method get_encoder (line 1951) | def get_encoder(self): method get_decoder (line 1954) | def get_decoder(self): method forward (line 1959) | def forward( method prepare_inputs_for_generation (line 2087) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2123) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2126) | def _reorder_cache(self, past_key_values, beam_idx): class LongT5EncoderModel (line 2155) | class LongT5EncoderModel(LongT5PreTrainedModel): method __init__ (line 2159) | def __init__(self, config: LongT5Config): method get_input_embeddings (line 2171) | def get_input_embeddings(self): method set_input_embeddings (line 2174) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 2178) | def _tie_weights(self): 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: mplsandbox_for_rl/transformers/src/transformers/models/luke/configuration_luke.py class LukeConfig (line 24) | class LukeConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/luke/modeling_luke.py class BaseLukeModelOutputWithPooling (line 48) | class BaseLukeModelOutputWithPooling(BaseModelOutputWithPooling): class BaseLukeModelOutput (line 79) | class BaseLukeModelOutput(BaseModelOutput): class LukeMaskedLMOutput (line 110) | class LukeMaskedLMOutput(ModelOutput): class EntityClassificationOutput (line 153) | class EntityClassificationOutput(ModelOutput): class EntityPairClassificationOutput (line 184) | class EntityPairClassificationOutput(ModelOutput): class EntitySpanClassificationOutput (line 215) | class EntitySpanClassificationOutput(ModelOutput): class LukeSequenceClassifierOutput (line 246) | class LukeSequenceClassifierOutput(ModelOutput): class LukeTokenClassifierOutput (line 280) | class LukeTokenClassifierOutput(ModelOutput): class LukeQuestionAnsweringModelOutput (line 314) | class LukeQuestionAnsweringModelOutput(ModelOutput): class LukeMultipleChoiceModelOutput (line 351) | class LukeMultipleChoiceModelOutput(ModelOutput): class LukeEmbeddings (line 386) | class LukeEmbeddings(nn.Module): method __init__ (line 391) | def __init__(self, config): method forward (line 408) | def forward( method create_position_ids_from_inputs_embeds (line 441) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class LukeEntityEmbeddings (line 459) | class LukeEntityEmbeddings(nn.Module): method __init__ (line 460) | def __init__(self, config: LukeConfig): method forward (line 474) | def forward( class LukeSelfAttention (line 499) | class LukeSelfAttention(nn.Module): method __init__ (line 500) | def __init__(self, config): method transpose_for_scores (line 524) | def transpose_for_scores(self, x): method forward (line 529) | def forward( class LukeSelfOutput (line 613) | class LukeSelfOutput(nn.Module): method __init__ (line 614) | def __init__(self, config): method forward (line 620) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LukeAttention (line 627) | class LukeAttention(nn.Module): method __init__ (line 628) | def __init__(self, config): method prune_heads (line 634) | def prune_heads(self, heads): method forward (line 637) | def forward( class LukeIntermediate (line 675) | class LukeIntermediate(nn.Module): method __init__ (line 676) | def __init__(self, config): method forward (line 684) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LukeOutput (line 691) | class LukeOutput(nn.Module): method __init__ (line 692) | def __init__(self, config): method forward (line 698) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LukeLayer (line 705) | class LukeLayer(nn.Module): method __init__ (line 706) | def __init__(self, config): method forward (line 714) | def forward( method feed_forward_chunk (line 751) | def feed_forward_chunk(self, attention_output): class LukeEncoder (line 757) | class LukeEncoder(nn.Module): method __init__ (line 758) | def __init__(self, config): method forward (line 764) | def forward( class LukePooler (line 836) | class LukePooler(nn.Module): method __init__ (line 837) | def __init__(self, config): method forward (line 842) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EntityPredictionHeadTransform (line 851) | class EntityPredictionHeadTransform(nn.Module): method __init__ (line 852) | def __init__(self, config): method forward (line 861) | def forward(self, hidden_states): class EntityPredictionHead (line 868) | class EntityPredictionHead(nn.Module): method __init__ (line 869) | def __init__(self, config): method forward (line 876) | def forward(self, hidden_states): class LukePreTrainedModel (line 883) | class LukePreTrainedModel(PreTrainedModel): method _init_weights (line 894) | def _init_weights(self, module: nn.Module): class LukeModel (line 1008) | class LukeModel(LukePreTrainedModel): method __init__ (line 1009) | def __init__(self, config: LukeConfig, add_pooling_layer: bool = True): method get_input_embeddings (line 1022) | def get_input_embeddings(self): method set_input_embeddings (line 1025) | def set_input_embeddings(self, value): method get_entity_embeddings (line 1028) | def get_entity_embeddings(self): method set_entity_embeddings (line 1031) | def set_entity_embeddings(self, value): method _prune_heads (line 1034) | def _prune_heads(self, heads_to_prune): method forward (line 1039) | def forward( method get_extended_attention_mask (line 1177) | def get_extended_attention_mask( function create_position_ids_from_input_ids (line 1208) | def create_position_ids_from_input_ids(input_ids, padding_idx): class LukeLMHead (line 1225) | class LukeLMHead(nn.Module): method __init__ (line 1228) | def __init__(self, config): method forward (line 1237) | def forward(self, features, **kwargs): method _tie_weights (line 1247) | def _tie_weights(self): class LukeForMaskedLM (line 1263) | class LukeForMaskedLM(LukePreTrainedModel): method __init__ (line 1266) | def __init__(self, config): method tie_weights (line 1279) | def tie_weights(self): method get_output_embeddings (line 1283) | def get_output_embeddings(self): method set_output_embeddings (line 1286) | def set_output_embeddings(self, new_embeddings): method forward (line 1291) | def forward( class LukeForEntityClassification (line 1398) | class LukeForEntityClassification(LukePreTrainedModel): method __init__ (line 1399) | def __init__(self, config): method forward (line 1413) | def forward( class LukeForEntityPairClassification (line 1513) | class LukeForEntityPairClassification(LukePreTrainedModel): method __init__ (line 1514) | def __init__(self, config): method forward (line 1528) | def forward( class LukeForEntitySpanClassification (line 1633) | class LukeForEntitySpanClassification(LukePreTrainedModel): method __init__ (line 1634) | def __init__(self, config): method forward (line 1648) | def forward( class LukeForSequenceClassification (line 1779) | class LukeForSequenceClassification(LukePreTrainedModel): method __init__ (line 1780) | def __init__(self, config): method forward (line 1798) | def forward( class LukeForTokenClassification (line 1893) | class LukeForTokenClassification(LukePreTrainedModel): method __init__ (line 1894) | def __init__(self, config): method forward (line 1913) | def forward( class LukeForQuestionAnswering (line 1989) | class LukeForQuestionAnswering(LukePreTrainedModel): method __init__ (line 1990) | def __init__(self, config): method forward (line 2007) | def forward( class LukeForMultipleChoice (line 2108) | class LukeForMultipleChoice(LukePreTrainedModel): method __init__ (line 2109) | def __init__(self, config): method forward (line 2127) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/luke/tokenization_luke.py function bytes_to_unicode (line 135) | def bytes_to_unicode(): function get_pairs (line 160) | def get_pairs(word): class LukeTokenizer (line 174) | class LukeTokenizer(PreTrainedTokenizer): method __init__ (line 273) | def __init__( method vocab_size (line 391) | def vocab_size(self): method get_vocab (line 395) | def get_vocab(self): method bpe (line 401) | def bpe(self, token): method _tokenize (line 444) | def _tokenize(self, text): method _convert_token_to_id (line 455) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 460) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 465) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 472) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 498) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 526) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 550) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method __call__ (line 557) | def __call__( method _encode_plus (line 702) | def _encode_plus( method _batch_encode_plus (line 782) | def _batch_encode_plus( method _check_entity_input_format (line 890) | def _check_entity_input_format(self, entities: Optional[EntityInput], ... method _create_input_sequence (line 908) | def _create_input_sequence( method _batch_prepare_for_model (line 1061) | def _batch_prepare_for_model( method prepare_for_model (line 1143) | def prepare_for_model( method pad (line 1372) | def pad( method _pad (line 1532) | def _pad( method save_vocabulary (line 1671) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/lxmert/configuration_lxmert.py class LxmertConfig (line 24) | class LxmertConfig(PretrainedConfig): method __init__ (line 107) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/lxmert/convert_lxmert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 28) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: mplsandbox_for_rl/transformers/src/transformers/models/lxmert/modeling_lxmert.py class GeLU (line 46) | class GeLU(nn.Module): method __init__ (line 47) | def __init__(self): method forward (line 50) | def forward(self, x): class LxmertModelOutput (line 55) | class LxmertModelOutput(ModelOutput): class LxmertForQuestionAnsweringOutput (line 101) | class LxmertForQuestionAnsweringOutput(ModelOutput): class LxmertForPreTrainingOutput (line 141) | class LxmertForPreTrainingOutput(ModelOutput): function load_tf_weights_in_lxmert (line 188) | def load_tf_weights_in_lxmert(model, config, tf_checkpoint_path): class LxmertEmbeddings (line 267) | class LxmertEmbeddings(nn.Module): method __init__ (line 270) | def __init__(self, config): method forward (line 281) | def forward(self, input_ids, token_type_ids=None, inputs_embeds=None): class LxmertAttention (line 307) | class LxmertAttention(nn.Module): method __init__ (line 308) | def __init__(self, config, ctx_dim=None): method transpose_for_scores (line 328) | def transpose_for_scores(self, x): method forward (line 336) | def forward(self, hidden_states, context, attention_mask=None, output_... class LxmertAttentionOutput (line 368) | class LxmertAttentionOutput(nn.Module): method __init__ (line 369) | def __init__(self, config): method forward (line 375) | def forward(self, hidden_states, input_tensor): class LxmertCrossAttentionLayer (line 382) | class LxmertCrossAttentionLayer(nn.Module): method __init__ (line 383) | def __init__(self, config): method forward (line 388) | def forward(self, input_tensor, ctx_tensor, ctx_att_mask=None, output_... class LxmertSelfAttentionLayer (line 397) | class LxmertSelfAttentionLayer(nn.Module): method __init__ (line 398) | def __init__(self, config): method forward (line 403) | def forward(self, input_tensor, attention_mask, output_attentions=False): class LxmertIntermediate (line 418) | class LxmertIntermediate(nn.Module): method __init__ (line 419) | def __init__(self, config): method forward (line 424) | def forward(self, hidden_states): class LxmertOutput (line 430) | class LxmertOutput(nn.Module): method __init__ (line 431) | def __init__(self, config): method forward (line 437) | def forward(self, hidden_states, input_tensor): class LxmertLayer (line 444) | class LxmertLayer(nn.Module): method __init__ (line 445) | def __init__(self, config): method forward (line 451) | def forward(self, hidden_states, attention_mask=None, output_attention... class LxmertXLayer (line 460) | class LxmertXLayer(nn.Module): method __init__ (line 461) | def __init__(self, config): method cross_att (line 476) | def cross_att( method self_att (line 499) | def self_att(self, lang_input, lang_attention_mask, visual_input, visu... method output_fc (line 505) | def output_fc(self, lang_input, visual_input): method forward (line 516) | def forward( class LxmertVisualFeatureEncoder (line 551) | class LxmertVisualFeatureEncoder(nn.Module): method __init__ (line 552) | def __init__(self, config): method forward (line 567) | def forward(self, visual_feats, visual_pos): class LxmertEncoder (line 578) | class LxmertEncoder(nn.Module): method __init__ (line 579) | def __init__(self, config): method forward (line 597) | def forward( class LxmertPooler (line 659) | class LxmertPooler(nn.Module): method __init__ (line 660) | def __init__(self, config): method forward (line 665) | def forward(self, hidden_states): class LxmertPredictionHeadTransform (line 674) | class LxmertPredictionHeadTransform(nn.Module): method __init__ (line 675) | def __init__(self, config): method forward (line 681) | def forward(self, hidden_states): class LxmertLMPredictionHead (line 688) | class LxmertLMPredictionHead(nn.Module): method __init__ (line 689) | def __init__(self, config, lxmert_model_embedding_weights): method forward (line 703) | def forward(self, hidden_states): class LxmertVisualAnswerHead (line 709) | class LxmertVisualAnswerHead(nn.Module): method __init__ (line 710) | def __init__(self, config, num_labels): method forward (line 720) | def forward(self, hidden_states): class LxmertVisualObjHead (line 724) | class LxmertVisualObjHead(nn.Module): method __init__ (line 725) | def __init__(self, config): method forward (line 747) | def forward(self, hidden_states): class LxmertPreTrainingHeads (line 755) | class LxmertPreTrainingHeads(nn.Module): method __init__ (line 756) | def __init__(self, config, lxmert_model_embedding_weights): method forward (line 761) | def forward(self, sequence_output, pooled_output): class LxmertPreTrainedModel (line 767) | class LxmertPreTrainedModel(PreTrainedModel): method _init_weights (line 778) | def _init_weights(self, module): class LxmertModel (line 879) | class LxmertModel(LxmertPreTrainedModel): method __init__ (line 880) | def __init__(self, config): method get_input_embeddings (line 888) | def get_input_embeddings(self): method set_input_embeddings (line 891) | def set_input_embeddings(self, new_embeddings): method forward (line 900) | def forward( class LxmertForPreTraining (line 1017) | class LxmertForPreTraining(LxmertPreTrainedModel): method __init__ (line 1020) | def __init__(self, config): method resize_token_embeddings (line 1075) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_bias (line 1081) | def _resize_bias(self, bias, new_num_tokens: int): method resize_num_qa_labels (line 1091) | def resize_num_qa_labels(self, num_labels): method _resize_qa_labels (line 1115) | def _resize_qa_labels(self, num_labels): method get_qa_logit_layer (line 1121) | def get_qa_logit_layer(self) -> nn.Module: method _set_qa_logit_layer (line 1132) | def _set_qa_logit_layer(self, qa_logit_layer): method _get_resized_qa_labels (line 1135) | def _get_resized_qa_labels(self, cur_qa_logit_layer, num_labels): method forward (line 1164) | def forward( class LxmertForQuestionAnswering (line 1301) | class LxmertForQuestionAnswering(LxmertPreTrainedModel): method __init__ (line 1302) | def __init__(self, config): method resize_num_qa_labels (line 1321) | def resize_num_qa_labels(self, num_labels): method _resize_qa_labels (line 1345) | def _resize_qa_labels(self, num_labels): method get_qa_logit_layer (line 1351) | def get_qa_logit_layer(self) -> nn.Module: method _set_qa_logit_layer (line 1363) | def _set_qa_logit_layer(self, qa_logit_layer): method _get_resized_qa_labels (line 1366) | def _get_resized_qa_labels(self, cur_qa_logit_layer, num_labels): method forward (line 1399) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/lxmert/modeling_tf_lxmert.py class TFLxmertModelOutput (line 57) | class TFLxmertModelOutput(ModelOutput): class TFLxmertForPreTrainingOutput (line 103) | class TFLxmertForPreTrainingOutput(ModelOutput): class TFLxmertVisualFeatureEncoder (line 150) | class TFLxmertVisualFeatureEncoder(keras.layers.Layer): method __init__ (line 151) | def __init__(self, config, **kwargs): method call (line 175) | def call(self, visn_input, training=False): method build (line 187) | def build(self, input_shape=None): class TFLxmertEmbeddings (line 205) | class TFLxmertEmbeddings(keras.layers.Layer): method __init__ (line 208) | def __init__(self, config, **kwargs): method build (line 218) | def build(self, input_shape=None): method call (line 247) | def call(self, input_ids=None, token_type_ids=None, inputs_embeds=None... class TFLxmertAttention (line 275) | class TFLxmertAttention(keras.layers.Layer): method __init__ (line 276) | def __init__(self, config, **kwargs): method transpose_for_scores (line 309) | def transpose_for_scores(self, x, batch_size): method call (line 314) | def call(self, hidden_states, context, attention_mask, output_attentio... method build (line 352) | def build(self, input_shape=None): class TFLxmertIntermediate (line 367) | class TFLxmertIntermediate(keras.layers.Layer): method __init__ (line 368) | def __init__(self, config, **kwargs): method call (line 381) | def call(self, hidden_states): method build (line 386) | def build(self, input_shape=None): class TFLxmertOutput (line 395) | class TFLxmertOutput(keras.layers.Layer): method __init__ (line 396) | def __init__(self, config, **kwargs): method call (line 408) | def call(self, hidden_states, input_tensor, training=False): method build (line 414) | def build(self, input_shape=None): class TFLxmertAttentionOutput (line 426) | class TFLxmertAttentionOutput(keras.layers.Layer): method __init__ (line 427) | def __init__(self, config, **kwargs): method call (line 438) | def call(self, hidden_states, input_tensor, training=False): method build (line 444) | def build(self, input_shape=None): class TFLxmertSelfAttentionLayer (line 456) | class TFLxmertSelfAttentionLayer(keras.layers.Layer): method __init__ (line 457) | def __init__(self, config, **kwargs): method call (line 462) | def call(self, input_tensor, attention_mask, output_attentions, traini... method build (line 470) | def build(self, input_shape=None): class TFLxmertCrossAttentionLayer (line 482) | class TFLxmertCrossAttentionLayer(keras.layers.Layer): method __init__ (line 483) | def __init__(self, config, **kwargs): method call (line 488) | def call( method build (line 503) | def build(self, input_shape=None): class TFLxmertLayer (line 515) | class TFLxmertLayer(keras.layers.Layer): method __init__ (line 516) | def __init__(self, config, **kwargs): method call (line 522) | def call(self, hidden_states, attention_mask, output_attentions, train... method build (line 530) | def build(self, input_shape=None): class TFLxmertXLayer (line 545) | class TFLxmertXLayer(keras.layers.Layer): method __init__ (line 546) | def __init__(self, config, **kwargs): method cross_att (line 560) | def cross_att( method self_att (line 593) | def self_att( method output_fc (line 607) | def output_fc(self, lang_input, visn_input, training=False): method call (line 617) | def call( method build (line 649) | def build(self, input_shape=None): class TFLxmertEncoder (line 676) | class TFLxmertEncoder(keras.layers.Layer): method __init__ (line 677) | def __init__(self, config, **kwargs): method call (line 694) | def call( method build (line 764) | def build(self, input_shape=None): class TFLxmertMainLayer (line 786) | class TFLxmertMainLayer(keras.layers.Layer): method __init__ (line 789) | def __init__(self, config, **kwargs): method get_input_embeddings (line 805) | def get_input_embeddings(self): method set_input_embeddings (line 808) | def set_input_embeddings(self, value): method _prune_heads (line 812) | def _prune_heads(self, heads_to_prune): method call (line 816) | def call( method build (line 924) | def build(self, input_shape=None): class TFLxmertPreTrainedModel (line 939) | class TFLxmertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 949) | def dummy_inputs(self): method input_signature (line 969) | def input_signature(self): class TFLxmertModel (line 1091) | class TFLxmertModel(TFLxmertPreTrainedModel): method __init__ (line 1092) | def __init__(self, config, *inputs, **kwargs): method call (line 1103) | def call( method build (line 1133) | def build(self, input_shape=None): class TFLxmertPooler (line 1142) | class TFLxmertPooler(keras.layers.Layer): method __init__ (line 1143) | def __init__(self, config, **kwargs): method call (line 1153) | def call(self, hidden_states): method build (line 1160) | def build(self, input_shape=None): class TFLxmertPredictionHeadTransform (line 1170) | class TFLxmertPredictionHeadTransform(keras.layers.Layer): method __init__ (line 1171) | def __init__(self, config: LxmertConfig, **kwargs): method call (line 1188) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 1195) | def build(self, input_shape=None): class TFLxmertLMPredictionHead (line 1208) | class TFLxmertLMPredictionHead(keras.layers.Layer): method __init__ (line 1209) | def __init__(self, config: LxmertConfig, input_embeddings: keras.layer... method build (line 1221) | def build(self, input_shape=None): method get_output_embeddings (line 1231) | def get_output_embeddings(self) -> keras.layers.Layer: method set_output_embeddings (line 1234) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 1238) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 1241) | def set_bias(self, value: tf.Variable): method call (line 1245) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLxmertMLMHead (line 1257) | class TFLxmertMLMHead(keras.layers.Layer): method __init__ (line 1258) | def __init__(self, config: LxmertConfig, input_embeddings: keras.layer... method call (line 1263) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: method build (line 1268) | def build(self, input_shape=None): class TFLxmertPreTrainingHeads (line 1277) | class TFLxmertPreTrainingHeads(keras.layers.Layer): method __init__ (line 1278) | def __init__(self, config, input_embeddings, **kwargs): method call (line 1289) | def call(self, sequence_output, pooled_output): method build (line 1294) | def build(self, input_shape=None): class TFLxmertVisualAnswerHead (line 1306) | class TFLxmertVisualAnswerHead(keras.layers.Layer): method __init__ (line 1307) | def __init__(self, config, num_labels, **kwargs): method call (line 1324) | def call(self, hidden_states): method build (line 1332) | def build(self, input_shape=None): class TFLxmertVisualObjHead (line 1347) | class TFLxmertVisualObjHead(keras.layers.Layer): method __init__ (line 1348) | def __init__(self, config, **kwargs): method call (line 1374) | def call(self, hidden_states): method build (line 1381) | def build(self, input_shape=None): class TFLxmertForPreTraining (line 1395) | class TFLxmertForPreTraining(TFLxmertPreTrainedModel): method __init__ (line 1396) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1448) | def dummy_inputs(self): method get_lm_head (line 1488) | def get_lm_head(self): method get_prefix_bias_name (line 1491) | def get_prefix_bias_name(self): method call (line 1498) | def call( method build (line 1637) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/lxmert/tokenization_lxmert.py function load_vocab (line 31) | def load_vocab(vocab_file): function whitespace_tokenize (line 43) | def whitespace_tokenize(text): class LxmertTokenizer (line 53) | class LxmertTokenizer(PreTrainedTokenizer): method __init__ (line 97) | def __init__( method do_lower_case (line 145) | def do_lower_case(self): method vocab_size (line 149) | def vocab_size(self): method get_vocab (line 152) | def get_vocab(self): method _tokenize (line 155) | def _tokenize(self, text, split_special_tokens=False): method _convert_token_to_id (line 170) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 174) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 178) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 183) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 208) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 236) | def create_token_type_ids_from_sequences( method save_vocabulary (line 265) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 287) | class BasicTokenizer: method __init__ (line 310) | def __init__( method tokenize (line 326) | 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: 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: mplsandbox_for_rl/transformers/src/transformers/models/lxmert/tokenization_lxmert_fast.py class LxmertTokenizerFast (line 29) | class LxmertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 72) | def __init__( method build_inputs_with_special_tokens (line 114) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 138) | def create_token_type_ids_from_sequences( method save_vocabulary (line 167) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/m2m_100/configuration_m2m_100.py class M2M100Config (line 30) | class M2M100Config(PretrainedConfig): method __init__ (line 103) | def __init__( class M2M100OnnxConfig (line 160) | class M2M100OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 162) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 185) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 212) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/m2m_100/modeling_m2m_100.py function shift_tokens_right (line 58) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function create_position_ids_from_input_ids (line 74) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class M2M100ScaledWordEmbedding (line 86) | class M2M100ScaledWordEmbedding(nn.Embedding): method __init__ (line 91) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 95) | def forward(self, input_ids: torch.Tensor): class M2M100SinusoidalPositionalEmbedding (line 99) | class M2M100SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 102) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 109) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 118) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 139) | def forward( method create_position_ids_from_inputs_embeds (line 159) | def create_position_ids_from_inputs_embeds(self, inputs_embeds, past_k... class M2M100Attention (line 178) | class M2M100Attention(nn.Module): method __init__ (line 181) | def __init__( method _shape (line 212) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 215) | def forward( class M2M100FlashAttention2 (line 336) | class M2M100FlashAttention2(M2M100Attention): method __init__ (line 338) | def __init__(self, *args, **kwargs): method _reshape (line 346) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 349) | def forward( class M2M100EncoderLayer (line 431) | class M2M100EncoderLayer(nn.Module): method __init__ (line 432) | def __init__(self, config: M2M100Config): method forward (line 450) | def forward( class M2M100DecoderLayer (line 508) | class M2M100DecoderLayer(nn.Module): method __init__ (line 509) | def __init__(self, config: M2M100Config): method forward (line 538) | def forward( class M2M100PreTrainedModel (line 628) | class M2M100PreTrainedModel(PreTrainedModel): method _init_weights (line 635) | def _init_weights(self, module): class M2M100Encoder (line 771) | class M2M100Encoder(M2M100PreTrainedModel): method __init__ (line 781) | def __init__(self, config: M2M100Config, embed_tokens: Optional[nn.Emb... method forward (line 812) | def forward( class M2M100Decoder (line 952) | class M2M100Decoder(M2M100PreTrainedModel): method __init__ (line 961) | def __init__(self, config: M2M100Config, embed_tokens: Optional[nn.Emb... method forward (line 989) | def forward( class M2M100Model (line 1222) | class M2M100Model(M2M100PreTrainedModel): method __init__ (line 1225) | def __init__(self, config: M2M100Config): method get_input_embeddings (line 1243) | def get_input_embeddings(self): method set_input_embeddings (line 1246) | def set_input_embeddings(self, value): method _tie_weights (line 1251) | def _tie_weights(self): method get_encoder (line 1256) | def get_encoder(self): method get_decoder (line 1259) | def get_decoder(self): method forward (line 1268) | def forward( class M2M100ForConditionalGeneration (line 1345) | class M2M100ForConditionalGeneration(M2M100PreTrainedModel): method __init__ (line 1349) | def __init__(self, config: M2M100Config): method get_encoder (line 1357) | def get_encoder(self): method get_decoder (line 1360) | def get_decoder(self): method get_output_embeddings (line 1363) | def get_output_embeddings(self): method set_output_embeddings (line 1366) | def set_output_embeddings(self, new_embeddings): method forward (line 1372) | def forward( method prepare_inputs_for_generation (line 1449) | def prepare_inputs_for_generation( method _reorder_cache (line 1487) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/m2m_100/tokenization_m2m_100.py class M2M100Tokenizer (line 47) | class M2M100Tokenizer(PreTrainedTokenizer): method __init__ (line 112) | def __init__( method vocab_size (line 177) | def vocab_size(self) -> int: method get_vocab (line 180) | def get_vocab(self) -> Dict: method src_lang (line 186) | def src_lang(self) -> str: method src_lang (line 190) | def src_lang(self, new_src_lang: str) -> None: method _tokenize (line 194) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 197) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 202) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 208) | def convert_tokens_to_string(self, tokens): method get_special_tokens_mask (line 222) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 252) | def build_inputs_with_special_tokens( method __getstate__ (line 279) | def __getstate__(self) -> Dict: method __setstate__ (line 284) | def __setstate__(self, d: Dict) -> None: method save_vocabulary (line 293) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 315) | def prepare_seq2seq_batch( method _build_translation_inputs (line 328) | def _build_translation_inputs(self, raw_inputs, src_lang: Optional[str... 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: str) -> None: method set_tgt_lang_special_tokens (line 351) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: method get_lang_token (line 358) | def get_lang_token(self, lang: str) -> str: method get_lang_id (line 361) | def get_lang_id(self, lang: str) -> int: function load_spm (line 366) | def load_spm(path: str, sp_model_kwargs: Dict[str, Any]) -> sentencepiec... function load_json (line 372) | def load_json(path: str) -> Union[Dict, List]: function save_json (line 377) | def save_json(data, path: str) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/mamba/configuration_mamba.py class MambaConfig (line 26) | class MambaConfig(PretrainedConfig): method __init__ (line 103) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mamba/convert_mamba_ssm_checkpoint_to_pytorch.py function convert_ssm_config_to_hf_config (line 33) | def convert_ssm_config_to_hf_config(config_ssm: MambaConfigSSM) -> Mamba... function convert_mamba_ssm_checkpoint_to_huggingface_model (line 54) | def convert_mamba_ssm_checkpoint_to_huggingface_model( function validate_converted_model (line 76) | def validate_converted_model( function convert_mamba_checkpoint_file_to_huggingface_model_file (line 98) | def convert_mamba_checkpoint_file_to_huggingface_model_file( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mamba/modeling_mamba.py class MambaMixer (line 66) | class MambaMixer(nn.Module): method __init__ (line 74) | def __init__(self, config: MambaConfig, layer_idx: int): method cuda_kernels_forward (line 134) | def cuda_kernels_forward( method slow_forward (line 236) | def slow_forward(self, input_states, cache_params: Optional[MambaCache... method forward (line 317) | def forward( class MambaRMSNorm (line 329) | class MambaRMSNorm(nn.Module): method __init__ (line 330) | def __init__(self, hidden_size, eps=1e-6): method forward (line 338) | def forward(self, hidden_states): method extra_repr (line 345) | def extra_repr(self): class MambaBlock (line 349) | class MambaBlock(nn.Module): method __init__ (line 350) | def __init__(self, config, layer_idx): method forward (line 358) | def forward( class MambaPreTrainedModel (line 377) | class MambaPreTrainedModel(PreTrainedModel): method _init_weights (line 389) | def _init_weights(self, module): class MambaOutput (line 438) | class MambaOutput(ModelOutput): class MambaCausalLMOutput (line 463) | class MambaCausalLMOutput(ModelOutput): class MambaModel (line 543) | class MambaModel(MambaPreTrainedModel): method __init__ (line 544) | def __init__(self, config): method load_hook (line 556) | def load_hook(self, state_dict, prefix, *args): method get_input_embeddings (line 562) | def get_input_embeddings(self): method set_input_embeddings (line 565) | def set_input_embeddings(self, new_embeddings): method forward (line 574) | def forward( class MambaForCausalLM (line 660) | class MambaForCausalLM(MambaPreTrainedModel): method __init__ (line 663) | def __init__(self, config): method get_output_embeddings (line 670) | def get_output_embeddings(self): method set_output_embeddings (line 673) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 676) | def get_input_embeddings(self): method set_input_embeddings (line 679) | def set_input_embeddings(self, new_embeddings): method _update_model_kwargs_for_generation (line 682) | def _update_model_kwargs_for_generation( method prepare_inputs_for_generation (line 701) | def prepare_inputs_for_generation( method forward (line 753) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mamba2/configuration_mamba2.py class Mamba2Config (line 26) | class Mamba2Config(PretrainedConfig): method __init__ (line 113) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mamba2/convert_mamba2_ssm_checkpoint_to_pytorch.py function convert_mamba2_checkpoint_file_to_huggingface_model_file (line 25) | def convert_mamba2_checkpoint_file_to_huggingface_model_file( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mamba2/modeling_mamba2.py function pad_tensor_by_size (line 62) | def pad_tensor_by_size(input_tensor: torch.Tensor, pad_size: int): function reshape_into_chunks (line 73) | def reshape_into_chunks(input_tensor, pad_size, chunk_size): function segment_sum (line 93) | def segment_sum(input_tensor): class Mamba2Cache (line 113) | class Mamba2Cache: method __init__ (line 128) | def __init__( method update_conv_state (line 155) | def update_conv_state( method reset (line 167) | def reset(self): class MambaRMSNormGated (line 172) | class MambaRMSNormGated(torch.nn.Module): method __init__ (line 173) | def __init__(self, hidden_size, eps=1e-6): method forward (line 178) | def forward(self, hidden_states, gate=None): class Mamba2Mixer (line 190) | class Mamba2Mixer(nn.Module): method __init__ (line 198) | def __init__(self, config: Mamba2Config, layer_idx: int): method cuda_kernels_forward (line 265) | def cuda_kernels_forward( method torch_forward (line 406) | def torch_forward(self, input_states, cache_params: Optional[Mamba2Cac... method forward (line 593) | def forward( class Mamba2RMSNorm (line 610) | class Mamba2RMSNorm(nn.Module): method __init__ (line 611) | def __init__(self, hidden_size, eps=1e-6): method forward (line 619) | def forward(self, hidden_states): class Mamba2Block (line 627) | class Mamba2Block(nn.Module): method __init__ (line 628) | def __init__(self, config, layer_idx): method forward (line 636) | def forward( class Mamba2PreTrainedModel (line 655) | class Mamba2PreTrainedModel(PreTrainedModel): method _init_weights (line 667) | def _init_weights(self, module): class Mamba2Output (line 712) | class Mamba2Output(ModelOutput): class Mamba2CausalLMOutput (line 738) | class Mamba2CausalLMOutput(ModelOutput): class Mamba2Model (line 814) | class Mamba2Model(Mamba2PreTrainedModel): method __init__ (line 815) | def __init__(self, config): method load_hook (line 827) | def load_hook(self, state_dict, prefix, *args): method get_input_embeddings (line 833) | def get_input_embeddings(self): method set_input_embeddings (line 836) | def set_input_embeddings(self, new_embeddings): method forward (line 845) | def forward( class Mamba2ForCausalLM (line 935) | class Mamba2ForCausalLM(Mamba2PreTrainedModel): method __init__ (line 938) | def __init__(self, config): method get_output_embeddings (line 945) | def get_output_embeddings(self): method set_output_embeddings (line 948) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 951) | def get_input_embeddings(self): method set_input_embeddings (line 954) | def set_input_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 957) | def prepare_inputs_for_generation( method forward (line 1027) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/marian/configuration_marian.py class MarianConfig (line 30) | class MarianConfig(PretrainedConfig): method __init__ (line 106) | def __init__( class MarianOnnxConfig (line 166) | class MarianOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 169) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 214) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 226) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 294) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_encoder_and_decoder (line 334) | def _generate_dummy_inputs_for_encoder_and_decoder( method generate_dummy_inputs (line 360) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 381) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): method atol_for_validation (line 390) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/marian/convert_marian_tatoeba_to_pytorch.py class TatoebaConverter (line 43) | class TatoebaConverter: method __init__ (line 57) | def __init__(self, save_dir="marian_converted"): method convert_models (line 75) | def convert_models(self, tatoeba_ids, dry_run=False): method expand_group_to_two_letter_codes (line 92) | def expand_group_to_two_letter_codes(self, grp_name): method is_group (line 95) | def is_group(self, code, name): method get_tags (line 98) | def get_tags(self, code, name): method resolve_lang_code (line 110) | def resolve_lang_code(self, src, tgt) -> Tuple[str, str]: method model_type_info_from_model_name (line 116) | def model_type_info_from_model_name(name): method write_model_card (line 130) | def write_model_card(self, model_dict, dry_run=False) -> str: method download_lang_info (line 278) | def download_lang_info(self): method parse_metadata (line 291) | def parse_metadata(self, model_name, repo_path=DEFAULT_MODEL_DIR, meth... function l2front_matter (line 1304) | def l2front_matter(langs): function dedup (line 1308) | def dedup(lst): FILE: mplsandbox_for_rl/transformers/src/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 652) | def download_and_unzip(url, dest_dir): function convert (line 663) | def convert(source_dir: Path, dest_dir): function load_yaml (line 681) | def load_yaml(path): function save_json (line 688) | def save_json(content: Union[Dict, List], path: str) -> None: function unzip (line 693) | def unzip(zip_path: str, dest_dir: str) -> None: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/marian/modeling_marian.py function shift_tokens_right (line 54) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class MarianSinusoidalPositionalEmbedding (line 70) | class MarianSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 73) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 78) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 95) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class MarianAttention (line 105) | class MarianAttention(nn.Module): method __init__ (line 108) | def __init__( method _shape (line 139) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 142) | def forward( class MarianEncoderLayer (line 264) | class MarianEncoderLayer(nn.Module): method __init__ (line 265) | def __init__(self, config: MarianConfig): method forward (line 283) | def forward( class MarianDecoderLayer (line 338) | class MarianDecoderLayer(nn.Module): method __init__ (line 339) | def __init__(self, config: MarianConfig): method forward (line 368) | def forward( class MarianPreTrainedModel (line 458) | class MarianPreTrainedModel(PreTrainedModel): method _init_weights (line 463) | def _init_weights(self, module: Union[nn.Linear, nn.Embedding, MarianS... method dummy_inputs (line 477) | def dummy_inputs(self): class MarianEncoder (line 620) | class MarianEncoder(MarianPreTrainedModel): method __init__ (line 630) | def __init__(self, config: MarianConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 655) | def get_input_embeddings(self): method set_input_embeddings (line 658) | def set_input_embeddings(self, value): method forward (line 661) | def forward( class MarianDecoder (line 790) | class MarianDecoder(MarianPreTrainedModel): method __init__ (line 799) | def __init__(self, config: MarianConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 821) | def get_input_embeddings(self): method set_input_embeddings (line 824) | def set_input_embeddings(self, value): method forward (line 827) | def forward( class MarianModel (line 1041) | class MarianModel(MarianPreTrainedModel): method __init__ (line 1044) | def __init__(self, config: MarianConfig): method get_input_embeddings (line 1066) | def get_input_embeddings(self): method set_input_embeddings (line 1070) | def set_input_embeddings(self, value): method get_decoder_input_embeddings (line 1078) | def get_decoder_input_embeddings(self): method set_decoder_input_embeddings (line 1086) | def set_decoder_input_embeddings(self, value): method get_encoder (line 1095) | def get_encoder(self): method get_decoder (line 1098) | def get_decoder(self): method resize_decoder_token_embeddings (line 1101) | def resize_decoder_token_embeddings(self, new_num_tokens: int) -> nn.E... method forward (line 1127) | def forward( class MarianMTModel (line 1227) | class MarianMTModel(MarianPreTrainedModel): method __init__ (line 1237) | def __init__(self, config: MarianConfig): method get_encoder (line 1248) | def get_encoder(self): method get_decoder (line 1251) | def get_decoder(self): method resize_token_embeddings (line 1254) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_token_embeddings (line 1260) | def _resize_token_embeddings(self, new_num_tokens: int, pad_to_multipl... method resize_decoder_token_embeddings (line 1282) | def resize_decoder_token_embeddings(self, new_num_tokens): method _resize_final_logits_bias (line 1314) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1323) | def get_output_embeddings(self): method set_output_embeddings (line 1326) | def set_output_embeddings(self, new_embeddings: nn.Embedding): method tie_weights (line 1329) | def tie_weights(self): method forward (line 1360) | def forward( method prepare_inputs_for_generation (line 1439) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1476) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1480) | def _reorder_cache(past_key_values, beam_idx): class MarianDecoderWrapper (line 1492) | class MarianDecoderWrapper(MarianPreTrainedModel): method __init__ (line 1498) | def __init__(self, config): method forward (line 1502) | def forward(self, *args, **kwargs): class MarianForCausalLM (line 1507) | class MarianForCausalLM(MarianPreTrainedModel): method __init__ (line 1510) | def __init__(self, config): method get_input_embeddings (line 1522) | def get_input_embeddings(self): method set_input_embeddings (line 1525) | def set_input_embeddings(self, value): method get_output_embeddings (line 1528) | def get_output_embeddings(self): method set_output_embeddings (line 1531) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1534) | def set_decoder(self, decoder): method get_decoder (line 1537) | def get_decoder(self): method forward (line 1541) | def forward( method prepare_inputs_for_generation (line 1685) | def prepare_inputs_for_generation( method _reorder_cache (line 1712) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/marian/modeling_tf_marian.py function shift_tokens_right (line 63) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... 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 TFMarianSinusoidalPositionalEmbedding (line 119) | class TFMarianSinusoidalPositionalEmbedding(keras.layers.Layer): method __init__ (line 122) | def __init__(self, num_positions: int, embedding_dim: int, **kwargs): method build (line 131) | def build(self, input_shape: tf.TensorShape): method _init_weight (line 150) | def _init_weight(n_pos: int, dim: int): method call (line 167) | def call( class TFMarianAttention (line 178) | class TFMarianAttention(keras.layers.Layer): method __init__ (line 181) | def __init__( method _shape (line 209) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 212) | def call( method build (line 330) | def build(self, input_shape=None): class TFMarianEncoderLayer (line 349) | class TFMarianEncoderLayer(keras.layers.Layer): method __init__ (line 350) | def __init__(self, config: MarianConfig, **kwargs): method call (line 365) | def call( method build (line 405) | def build(self, input_shape=None): class TFMarianDecoderLayer (line 427) | class TFMarianDecoderLayer(keras.layers.Layer): method __init__ (line 428) | def __init__(self, config: MarianConfig, **kwargs): method call (line 456) | def call( method build (line 536) | def build(self, input_shape=None): class TFMarianPreTrainedModel (line 563) | class TFMarianPreTrainedModel(TFPreTrainedModel): class TFMarianEncoder (line 716) | class TFMarianEncoder(keras.layers.Layer): method __init__ (line 726) | def __init__(self, config: MarianConfig, embed_tokens: Optional[keras.... method get_embed_tokens (line 743) | def get_embed_tokens(self): method set_embed_tokens (line 746) | def set_embed_tokens(self, embed_tokens): method call (line 750) | def call( method build (line 869) | def build(self, input_shape=None): class TFMarianDecoder (line 883) | class TFMarianDecoder(keras.layers.Layer): method __init__ (line 893) | def __init__(self, config: MarianConfig, embed_tokens: Optional[keras.... method get_embed_tokens (line 909) | def get_embed_tokens(self): method set_embed_tokens (line 912) | def set_embed_tokens(self, embed_tokens): method call (line 916) | def call( method build (line 1105) | def build(self, input_shape=None): class TFMarianMainLayer (line 1119) | class TFMarianMainLayer(keras.layers.Layer): method __init__ (line 1122) | def __init__(self, config: MarianConfig, **kwargs): method get_input_embeddings (line 1138) | def get_input_embeddings(self): method set_input_embeddings (line 1141) | def set_input_embeddings(self, new_embeddings): method call (line 1147) | def call( method build (line 1228) | def build(self, input_shape=None): class TFMarianModel (line 1249) | class TFMarianModel(TFMarianPreTrainedModel): method __init__ (line 1250) | def __init__(self, config: MarianConfig, *inputs, **kwargs): method get_encoder (line 1255) | def get_encoder(self): method get_decoder (line 1258) | def get_decoder(self): method call (line 1268) | def call( method serving_output (line 1312) | def serving_output(self, output): method build (line 1331) | def build(self, input_shape=None): class BiasLayer (line 1341) | class BiasLayer(keras.layers.Layer): method __init__ (line 1347) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1354) | def call(self, x): class TFMarianMTModel (line 1362) | class TFMarianMTModel(TFMarianPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 1368) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1377) | def get_decoder(self): method get_encoder (line 1380) | def get_encoder(self): method get_output_embeddings (line 1383) | def get_output_embeddings(self): method set_output_embeddings (line 1386) | def set_output_embeddings(self, value): method get_bias (line 1389) | def get_bias(self): method set_bias (line 1392) | def set_bias(self, value): method call (line 1404) | def call( method serving_output (line 1486) | def serving_output(self, output): method prepare_inputs_for_generation (line 1506) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1544) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method build (line 1547) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/marian/tokenization_marian.py class MarianTokenizer (line 44) | class MarianTokenizer(PreTrainedTokenizer): method __init__ (line 107) | def __init__( method _setup_normalizer (line 169) | def _setup_normalizer(self): method normalize (line 178) | def normalize(self, x: str) -> str: method _convert_token_to_id (line 182) | def _convert_token_to_id(self, token): method remove_language_code (line 185) | def remove_language_code(self, text: str): method _tokenize (line 191) | def _tokenize(self, text: str) -> List[str]: method _convert_id_to_token (line 196) | def _convert_id_to_token(self, index: int) -> str: method batch_decode (line 200) | def batch_decode(self, sequences, **kwargs): method decode (line 223) | def decode(self, token_ids, **kwargs): method convert_tokens_to_string (line 249) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method build_inputs_with_special_tokens (line 265) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method _switch_to_input_mode (line 272) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 276) | def _switch_to_target_mode(self): method vocab_size (line 282) | def vocab_size(self) -> int: method save_vocabulary (line 285) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method get_vocab (line 330) | def get_vocab(self) -> Dict: method get_src_vocab (line 333) | def get_src_vocab(self): method get_tgt_vocab (line 336) | def get_tgt_vocab(self): method __getstate__ (line 339) | def __getstate__(self) -> Dict: method __setstate__ (line 346) | def __setstate__(self, d: Dict) -> None: method num_special_tokens_to_add (line 357) | def num_special_tokens_to_add(self, *args, **kwargs): method _special_token_mask (line 361) | def _special_token_mask(self, seq): method get_special_tokens_mask (line 366) | def get_special_tokens_mask( function load_spm (line 378) | def load_spm(path: str, sp_model_kwargs: Dict[str, Any]) -> sentencepiec... function save_json (line 384) | def save_json(data, path: str) -> None: function load_json (line 389) | def load_json(path: str) -> Union[Dict, List]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/markuplm/configuration_markuplm.py class MarkupLMConfig (line 24) | class MarkupLMConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/markuplm/modeling_markuplm.py class XPathEmbeddings (line 56) | class XPathEmbeddings(nn.Module): method __init__ (line 62) | def __init__(self, config): method forward (line 88) | def forward(self, xpath_tags_seq=None, xpath_subs_seq=None): function create_position_ids_from_input_ids (line 107) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class MarkupLMEmbeddings (line 123) | class MarkupLMEmbeddings(nn.Module): method __init__ (line 126) | def __init__(self, config): method create_position_ids_from_inputs_embeds (line 151) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): method forward (line 168) | def forward( class MarkupLMSelfOutput (line 222) | class MarkupLMSelfOutput(nn.Module): method __init__ (line 223) | def __init__(self, config): method forward (line 229) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MarkupLMIntermediate (line 237) | class MarkupLMIntermediate(nn.Module): method __init__ (line 238) | def __init__(self, config): method forward (line 246) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MarkupLMOutput (line 253) | class MarkupLMOutput(nn.Module): method __init__ (line 254) | def __init__(self, config): method forward (line 260) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MarkupLMPooler (line 268) | class MarkupLMPooler(nn.Module): method __init__ (line 269) | def __init__(self, config): method forward (line 274) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MarkupLMPredictionHeadTransform (line 284) | class MarkupLMPredictionHeadTransform(nn.Module): method __init__ (line 285) | def __init__(self, config): method forward (line 294) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MarkupLMLMPredictionHead (line 302) | class MarkupLMLMPredictionHead(nn.Module): method __init__ (line 303) | def __init__(self, config): method _tie_weights (line 316) | def _tie_weights(self): 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 477) | class MarkupLMAttention(nn.Module): method __init__ (line 478) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 486) | def prune_heads(self, heads): method forward (line 504) | def forward( class MarkupLMLayer (line 529) | class MarkupLMLayer(nn.Module): method __init__ (line 530) | def __init__(self, config): method forward (line 544) | def forward( method feed_forward_chunk (line 609) | def feed_forward_chunk(self, attention_output): class MarkupLMEncoder (line 616) | class MarkupLMEncoder(nn.Module): method __init__ (line 617) | def __init__(self, config): method forward (line 623) | def forward( class MarkupLMPreTrainedModel (line 709) | 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 940) | def prepare_inputs_for_generation( method _reorder_cache (line 969) | def _reorder_cache(self, past_key_values, beam_idx): class MarkupLMForQuestionAnswering (line 985) | class MarkupLMForQuestionAnswering(MarkupLMPreTrainedModel): method __init__ (line 987) | def __init__(self, config): method forward (line 999) | def forward( class MarkupLMForTokenClassification (line 1105) | class MarkupLMForTokenClassification(MarkupLMPreTrainedModel): method __init__ (line 1107) | def __init__(self, config): method forward (line 1123) | def forward( class MarkupLMForSequenceClassification (line 1211) | class MarkupLMForSequenceClassification(MarkupLMPreTrainedModel): method __init__ (line 1213) | def __init__(self, config): method forward (line 1230) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/markuplm/processing_markuplm.py class MarkupLMProcessor (line 26) | class MarkupLMProcessor(ProcessorMixin): method __call__ (line 50) | 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: mplsandbox_for_rl/transformers/src/transformers/models/markuplm/tokenization_markuplm.py function bytes_to_unicode (line 93) | def bytes_to_unicode(): function get_pairs (line 115) | def get_pairs(word): class MarkupLMTokenizer (line 128) | class MarkupLMTokenizer(PreTrainedTokenizer): method __init__ (line 185) | def __init__( method get_xpath_seq (line 267) | def get_xpath_seq(self, xpath): method vocab_size (line 293) | def vocab_size(self): method get_vocab (line 296) | def get_vocab(self): method bpe (line 301) | def bpe(self, token): method _tokenize (line 343) | 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 370) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 401) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method build_inputs_with_special_tokens (line 407) | def build_inputs_with_special_tokens( method build_xpath_tags_with_special_tokens (line 430) | def build_xpath_tags_with_special_tokens( method build_xpath_subs_with_special_tokens (line 438) | def build_xpath_subs_with_special_tokens( method get_special_tokens_mask (line 446) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 471) | def create_token_type_ids_from_sequences( method __call__ (line 494) | def __call__( method batch_encode_plus (line 639) | def batch_encode_plus( method _batch_encode_plus (line 697) | def _batch_encode_plus( method _batch_prepare_for_model (line 753) | def _batch_prepare_for_model( method encode (line 824) | def encode( method encode_plus (line 871) | def encode_plus( method _encode_plus (line 937) | def _encode_plus( method prepare_for_model (line 990) | def prepare_for_model( method truncate_sequences (line 1218) | def truncate_sequences( method _pad (line 1354) | def _pad( FILE: mplsandbox_for_rl/transformers/src/transformers/models/markuplm/tokenization_markuplm_fast.py function bytes_to_unicode (line 48) | def bytes_to_unicode(): function get_pairs (line 70) | def get_pairs(word): class MarkupLMTokenizerFast (line 83) | class MarkupLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 144) | def __init__( method get_xpath_seq (line 251) | def get_xpath_seq(self, xpath): method __call__ (line 277) | def __call__( method batch_encode_plus (line 422) | def batch_encode_plus( method tokenize (line 480) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode_plus (line 489) | def encode_plus( method _batch_encode_plus (line 555) | def _batch_encode_plus( method _encode_plus (line 712) | def _encode_plus( method _pad (line 778) | def _pad( method build_inputs_with_special_tokens (line 871) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 894) | def create_token_type_ids_from_sequences( method save_vocabulary (line 916) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mask2former/configuration_mask2former.py class Mask2FormerConfig (line 28) | class Mask2FormerConfig(PretrainedConfig): method __init__ (line 134) | def __init__( method from_backbone_config (line 240) | def from_backbone_config(cls, backbone_config: PretrainedConfig, **kwa... FILE: mplsandbox_for_rl/transformers/src/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 OriginalMask2FormerConfigToImageProcessorConverter (line 195) | class OriginalMask2FormerConfigToImageProcessorConverter: 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: mplsandbox_for_rl/transformers/src/transformers/models/mask2former/image_processing_mask2former.py function max_across_indices (line 64) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 72) | def get_max_height_width( function make_pixel_mask (line 91) | def make_pixel_mask( function binary_mask_to_rle (line 110) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 133) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 155) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 184) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 203) | def compute_segments( function convert_segmentation_map_to_binary_masks (line 265) | def convert_segmentation_map_to_binary_masks( function get_mask2former_resize_output_image_size (line 307) | def get_mask2former_resize_output_image_size( class Mask2FormerImageProcessor (line 352) | class Mask2FormerImageProcessor(BaseImageProcessor): method __init__ (line 404) | def __init__( method from_dict (line 443) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method to_dict (line 458) | def to_dict(self) -> Dict[str, Any]: method resize (line 469) | def resize( method rescale (line 527) | def rescale( method convert_segmentation_map_to_binary_masks (line 556) | def convert_segmentation_map_to_binary_masks( method __call__ (line 572) | def __call__(self, images, segmentation_maps=None, **kwargs) -> BatchF... method _preprocess (line 575) | def _preprocess( method _preprocess_image (line 599) | def _preprocess_image( method _preprocess_mask (line 641) | def _preprocess_mask( method preprocess (line 680) | def preprocess( method _pad_image (line 780) | def _pad_image( method pad (line 808) | def pad( method encode_inputs (line 863) | def encode_inputs( method post_process_semantic_segmentation (line 970) | def post_process_semantic_segmentation( method post_process_instance_segmentation (line 1025) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1144) | def post_process_panoptic_segmentation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mask2former/modeling_mask2former.py class Mask2FormerPixelDecoderOutput (line 59) | class Mask2FormerPixelDecoderOutput(ModelOutput): class Mask2FormerMaskedAttentionDecoderOutput (line 83) | class Mask2FormerMaskedAttentionDecoderOutput(BaseModelOutputWithCrossAt... class Mask2FormerPixelLevelModuleOutput (line 115) | class Mask2FormerPixelLevelModuleOutput(ModelOutput): class Mask2FormerModelOutput (line 146) | class Mask2FormerModelOutput(ModelOutput): class Mask2FormerForUniversalSegmentationOutput (line 192) | class Mask2FormerForUniversalSegmentationOutput(ModelOutput): function sample_point (line 249) | def sample_point( function dice_loss (line 282) | def dice_loss(inputs: Tensor, labels: Tensor, num_masks: int) -> Tensor: function sigmoid_cross_entropy_loss (line 312) | def sigmoid_cross_entropy_loss(inputs: torch.Tensor, labels: torch.Tenso... function pair_wise_dice_loss (line 332) | def pair_wise_dice_loss(inputs: Tensor, labels: Tensor) -> Tensor: function pair_wise_sigmoid_cross_entropy_loss (line 354) | def pair_wise_sigmoid_cross_entropy_loss(inputs: torch.Tensor, labels: t... class Mask2FormerHungarianMatcher (line 382) | class Mask2FormerHungarianMatcher(nn.Module): method __init__ (line 390) | def __init__( method forward (line 417) | def forward( class Mask2FormerLoss (line 488) | class Mask2FormerLoss(nn.Module): method __init__ (line 489) | def __init__(self, config: Mask2FormerConfig, weight_dict: Dict[str, f... method _max_by_axis (line 524) | def _max_by_axis(self, sizes: List[List[int]]) -> List[int]: method _pad_images_to_max_in_batch (line 532) | def _pad_images_to_max_in_batch(self, tensors: List[Tensor]) -> Tuple[... method loss_labels (line 549) | def loss_labels( method loss_masks (line 583) | def loss_masks( method _get_predictions_permutation_indices (line 645) | def _get_predictions_permutation_indices(self, indices): method _get_targets_permutation_indices (line 651) | def _get_targets_permutation_indices(self, indices): method calculate_uncertainty (line 657) | def calculate_uncertainty(self, logits: torch.Tensor) -> torch.Tensor: method sample_points_using_uncertainty (line 674) | def sample_points_using_uncertainty( method forward (line 729) | def forward( method get_num_masks (line 784) | def get_num_masks(self, class_labels: torch.Tensor, device: torch.devi... function multi_scale_deformable_attention (line 801) | def multi_scale_deformable_attention( class Mask2FormerSinePositionEmbedding (line 841) | class Mask2FormerSinePositionEmbedding(nn.Module): method __init__ (line 847) | def __init__( method forward (line 858) | def forward(self, x: Tensor, mask: Optional[Tensor] = None) -> Tensor: class Mask2FormerPixelDecoderEncoderMultiscaleDeformableAttention (line 881) | class Mask2FormerPixelDecoderEncoderMultiscaleDeformableAttention(nn.Mod... method __init__ (line 886) | def __init__(self, embed_dim: int, num_heads: int, n_levels: int, n_po... method with_pos_embed (line 913) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 916) | def forward( class Mask2FormerPixelDecoderEncoderLayer (line 974) | class Mask2FormerPixelDecoderEncoderLayer(nn.Module): method __init__ (line 975) | def __init__(self, config: Mask2FormerConfig): method forward (line 993) | def forward( class Mask2FormerPixelDecoderEncoderOnly (line 1064) | class Mask2FormerPixelDecoderEncoderOnly(nn.Module): method __init__ (line 1074) | def __init__(self, config: Mask2FormerConfig): method get_reference_points (line 1084) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1115) | def forward( class Mask2FormerPixelDecoder (line 1193) | class Mask2FormerPixelDecoder(nn.Module): method __init__ (line 1194) | def __init__(self, config: Mask2FormerConfig, feature_channels): method get_valid_ratio (line 1264) | def get_valid_ratio(self, mask, dtype=torch.float32): method forward (line 1275) | def forward( class Mask2FormerPixelLevelModule (line 1372) | class Mask2FormerPixelLevelModule(nn.Module): method __init__ (line 1373) | def __init__(self, config: Mask2FormerConfig): method forward (line 1388) | def forward(self, pixel_values: Tensor, output_hidden_states: bool = F... class Mask2FormerAttention (line 1401) | class Mask2FormerAttention(nn.Module): method __init__ (line 1407) | def __init__( method _shape (line 1432) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 1435) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 1438) | def forward( class Mask2FormerMaskedAttentionDecoderLayer (line 1537) | class Mask2FormerMaskedAttentionDecoderLayer(nn.Module): method __init__ (line 1551) | def __init__(self, config: Mask2FormerConfig): method with_pos_embed (line 1574) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 1577) | def forward_post( method forward_pre (line 1636) | def forward_pre( method forward (line 1697) | def forward( class Mask2FormerMaskedAttentionDecoder (line 1751) | class Mask2FormerMaskedAttentionDecoder(nn.Module): method __init__ (line 1764) | def __init__(self, config: Mask2FormerConfig): method forward (line 1787) | def forward( class Mask2FormerPredictionBlock (line 1923) | class Mask2FormerPredictionBlock(nn.Module): method __init__ (line 1924) | def __init__(self, in_dim: int, out_dim: int, activation: nn.Module) -... method forward (line 1931) | def forward(self, input: Tensor) -> Tensor: class Mask2FormerMLPPredictionHead (line 1938) | class Mask2FormerMLPPredictionHead(nn.Module): method __init__ (line 1939) | def __init__(self, input_dim: int, hidden_dim: int, output_dim: int, n... method forward (line 1970) | def forward(self, input: Tensor) -> Tensor: class Mask2FormerMaskPredictor (line 1977) | class Mask2FormerMaskPredictor(nn.Module): method __init__ (line 1978) | def __init__(self, hidden_size: int, num_heads: int, mask_feature_size... method forward (line 1999) | def forward(self, outputs: torch.Tensor, pixel_embeddings: torch.Tenso... class Mask2FormerTransformerModule (line 2030) | class Mask2FormerTransformerModule(nn.Module): method __init__ (line 2035) | def __init__(self, in_features: int, config: Mask2FormerConfig): method forward (line 2053) | def forward( class Mask2FormerPreTrainedModel (line 2130) | class Mask2FormerPreTrainedModel(PreTrainedModel): method _init_weights (line 2135) | def _init_weights(self, module: nn.Module): class Mask2FormerModel (line 2209) | class Mask2FormerModel(Mask2FormerPreTrainedModel): method __init__ (line 2212) | def __init__(self, config: Mask2FormerConfig): method forward (line 2221) | def forward( class Mask2FormerForUniversalSegmentation (line 2313) | class Mask2FormerForUniversalSegmentation(Mask2FormerPreTrainedModel): method __init__ (line 2316) | def __init__(self, config: Mask2FormerConfig): method get_loss_dict (line 2331) | def get_loss_dict( method get_loss (line 2355) | def get_loss(self, loss_dict: Dict[str, Tensor]) -> Tensor: method get_auxiliary_logits (line 2358) | def get_auxiliary_logits(self, classes: torch.Tensor, output_masks: to... method forward (line 2368) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/maskformer/configuration_maskformer.py class MaskFormerConfig (line 30) | class MaskFormerConfig(PretrainedConfig): method __init__ (line 110) | def __init__( method from_backbone_and_decoder_configs (line 204) | def from_backbone_and_decoder_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/maskformer/configuration_maskformer_swin.py class MaskFormerSwinConfig (line 25) | class MaskFormerSwinConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 103) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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 OriginalMaskFormerConfigToImageProcessorConverter (line 167) | class OriginalMaskFormerConfigToImageProcessorConverter: method __call__ (line 168) | def __call__(self, original_config: object) -> MaskFormerImageProcessor: 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, i... function get_name (line 612) | def get_name(checkpoint_file: Path): FILE: mplsandbox_for_rl/transformers/src/transformers/models/maskformer/convert_maskformer_resnet_to_pytorch.py function get_maskformer_config (line 36) | def get_maskformer_config(model_name: str): function create_rename_keys (line 79) | def create_rename_keys(config): function rename_key (line 220) | def rename_key(dct, old, new): function read_in_decoder_q_k_v (line 226) | def read_in_decoder_q_k_v(state_dict, config): function prepare_img (line 254) | def prepare_img() -> torch.Tensor: function convert_maskformer_checkpoint (line 261) | def convert_maskformer_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/maskformer/convert_maskformer_swin_to_pytorch.py function get_maskformer_config (line 36) | def get_maskformer_config(model_name: str): function create_rename_keys (line 74) | def create_rename_keys(config): function rename_key (line 163) | def rename_key(dct, old, new): function read_in_swin_q_k_v (line 169) | def read_in_swin_q_k_v(state_dict, backbone_config): function read_in_decoder_q_k_v (line 195) | def read_in_decoder_q_k_v(state_dict, config): function prepare_img (line 223) | def prepare_img() -> torch.Tensor: function convert_maskformer_checkpoint (line 230) | def convert_maskformer_checkpoint( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/maskformer/image_processing_maskformer.py function max_across_indices (line 69) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 77) | def get_max_height_width( function make_pixel_mask (line 96) | def make_pixel_mask( function binary_mask_to_rle (line 115) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 138) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 160) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 189) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 208) | def compute_segments( function convert_segmentation_map_to_binary_masks (line 269) | def convert_segmentation_map_to_binary_masks( function get_maskformer_resize_output_image_size (line 310) | def get_maskformer_resize_output_image_size( class MaskFormerImageProcessor (line 355) | class MaskFormerImageProcessor(BaseImageProcessor): method __init__ (line 408) | def __init__( method from_dict (line 447) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method to_dict (line 461) | def to_dict(self) -> Dict[str, Any]: method resize (line 471) | def resize( method rescale (line 529) | def rescale( method convert_segmentation_map_to_binary_masks (line 557) | def convert_segmentation_map_to_binary_masks( method __call__ (line 573) | def __call__(self, images, segmentation_maps=None, **kwargs) -> BatchF... method _preprocess (line 576) | def _preprocess( method _preprocess_image (line 600) | def _preprocess_image( method _preprocess_mask (line 642) | def _preprocess_mask( method preprocess (line 681) | def preprocess( method _pad_image (line 781) | def _pad_image( method pad (line 809) | def pad( method encode_inputs (line 864) | def encode_inputs( method post_process_segmentation (line 973) | def post_process_segmentation( method post_process_semantic_segmentation (line 1021) | def post_process_semantic_segmentation( method post_process_instance_segmentation (line 1071) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1185) | def post_process_panoptic_segmentation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/maskformer/modeling_maskformer.py class DetrDecoderOutput (line 63) | class DetrDecoderOutput(BaseModelOutputWithCrossAttentions): class MaskFormerPixelLevelModuleOutput (line 93) | class MaskFormerPixelLevelModuleOutput(ModelOutput): class MaskFormerPixelDecoderOutput (line 124) | class MaskFormerPixelDecoderOutput(ModelOutput): class MaskFormerModelOutput (line 148) | class MaskFormerModelOutput(ModelOutput): class MaskFormerForInstanceSegmentationOutput (line 191) | class MaskFormerForInstanceSegmentationOutput(ModelOutput): function upsample_like (line 250) | def upsample_like(pixel_values: Tensor, like: Tensor, mode: str = "bilin... function dice_loss (line 271) | def dice_loss(inputs: Tensor, labels: Tensor, num_masks: int) -> Tensor: function sigmoid_focal_loss (line 302) | def sigmoid_focal_loss( function pair_wise_dice_loss (line 346) | def pair_wise_dice_loss(inputs: Tensor, labels: Tensor) -> Tensor: function pair_wise_sigmoid_focal_loss (line 369) | def pair_wise_sigmoid_focal_loss(inputs: Tensor, labels: Tensor, alpha: ... class DetrAttention (line 409) | class DetrAttention(nn.Module): method __init__ (line 416) | def __init__( method _shape (line 440) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 443) | def with_pos_embed(self, tensor: torch.Tensor, object_queries: Optiona... method forward (line 446) | def forward( class DetrDecoderLayer (line 539) | class DetrDecoderLayer(nn.Module): method __init__ (line 540) | def __init__(self, config: DetrConfig): method forward (line 564) | def forward( class DetrDecoder (line 644) | class DetrDecoder(nn.Module): method __init__ (line 659) | def __init__(self, config: DetrConfig): method forward (line 671) | def forward( class MaskFormerHungarianMatcher (line 812) | class MaskFormerHungarianMatcher(nn.Module): method __init__ (line 820) | def __init__(self, cost_class: float = 1.0, cost_mask: float = 1.0, co... method forward (line 839) | def forward(self, masks_queries_logits, class_queries_logits, mask_lab... method __repr__ (line 897) | def __repr__(self): class MaskFormerLoss (line 910) | class MaskFormerLoss(nn.Module): method __init__ (line 911) | def __init__( method _max_by_axis (line 944) | def _max_by_axis(self, the_list: List[List[int]]) -> List[int]: method _pad_images_to_max_in_batch (line 951) | def _pad_images_to_max_in_batch(self, tensors: List[Tensor]) -> Tuple[... method loss_labels (line 970) | def loss_labels( method loss_masks (line 1005) | def loss_masks( method _get_predictions_permutation_indices (line 1047) | def _get_predictions_permutation_indices(self, indices): method _get_targets_permutation_indices (line 1053) | def _get_targets_permutation_indices(self, indices): method forward (line 1059) | def forward( method get_num_masks (line 1113) | def get_num_masks(self, class_labels: torch.Tensor, device: torch.devi... class MaskFormerFPNConvLayer (line 1129) | class MaskFormerFPNConvLayer(nn.Module): method __init__ (line 1130) | def __init__(self, in_features: int, out_features: int, kernel_size: i... method forward (line 1155) | def forward(self, input: Tensor) -> Tensor: class MaskFormerFPNLayer (line 1162) | class MaskFormerFPNLayer(nn.Module): method __init__ (line 1163) | def __init__(self, in_features: int, lateral_features: int): method forward (line 1182) | def forward(self, down: Tensor, left: Tensor) -> Tensor: class MaskFormerFPNModel (line 1190) | class MaskFormerFPNModel(nn.Module): method __init__ (line 1191) | def __init__(self, in_features: int, lateral_widths: List[int], featur... method forward (line 1210) | def forward(self, features: List[Tensor]) -> List[Tensor]: class MaskFormerPixelDecoder (line 1221) | class MaskFormerPixelDecoder(nn.Module): method __init__ (line 1222) | def __init__(self, *args, feature_size: int = 256, mask_feature_size: ... method forward (line 1239) | def forward( class MaskFormerSinePositionEmbedding (line 1255) | class MaskFormerSinePositionEmbedding(nn.Module): method __init__ (line 1261) | def __init__( method forward (line 1272) | def forward(self, x: Tensor, mask: Optional[Tensor] = None) -> Tensor: class PredictionBlock (line 1294) | class PredictionBlock(nn.Module): method __init__ (line 1295) | def __init__(self, in_dim: int, out_dim: int, activation: nn.Module) -... method forward (line 1302) | def forward(self, input: Tensor) -> Tensor: class MaskformerMLPPredictionHead (line 1309) | class MaskformerMLPPredictionHead(nn.Module): method __init__ (line 1310) | def __init__(self, input_dim: int, hidden_dim: int, output_dim: int, n... method forward (line 1341) | def forward(self, input: Tensor) -> Tensor: class MaskFormerPixelLevelModule (line 1348) | class MaskFormerPixelLevelModule(nn.Module): method __init__ (line 1349) | def __init__(self, config: MaskFormerConfig): method forward (line 1376) | def forward( class MaskFormerTransformerModule (line 1399) | class MaskFormerTransformerModule(nn.Module): method __init__ (line 1404) | def __init__(self, in_features: int, config: MaskFormerConfig): method forward (line 1413) | def forward( class MaskFormerPreTrainedModel (line 1480) | class MaskFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 1485) | def _init_weights(self, module: nn.Module): class MaskFormerModel (line 1529) | class MaskFormerModel(MaskFormerPreTrainedModel): method __init__ (line 1530) | def __init__(self, config: MaskFormerConfig): method forward (line 1541) | def forward( class MaskFormerForInstanceSegmentation (line 1628) | class MaskFormerForInstanceSegmentation(MaskFormerPreTrainedModel): method __init__ (line 1629) | def __init__(self, config: MaskFormerConfig): method get_loss_dict (line 1656) | def get_loss_dict( method get_loss (line 1675) | def get_loss(self, loss_dict: Dict[str, Tensor]) -> Tensor: method get_logits (line 1678) | def get_logits(self, outputs: MaskFormerModelOutput) -> Tuple[Tensor, ... method forward (line 1739) | def forward( FILE: mplsandbox_for_rl/transformers/src/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: torch.Tensor, drop_prob: float = 0.0, training: boo... class MaskFormerSwinEmbeddings (line 146) | class MaskFormerSwinEmbeddings(nn.Module): method __init__ (line 151) | def __init__(self, config): method interpolate_pos_encoding (line 166) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 198) | def forward(self, pixel_values, interpolate_pos_encoding): class MaskFormerSwinPatchEmbeddings (line 215) | class MaskFormerSwinPatchEmbeddings(nn.Module): method __init__ (line 222) | def __init__(self, config): method maybe_pad (line 237) | def maybe_pad(self, pixel_values, height, width): method forward (line 246) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class MaskFormerSwinPatchMerging (line 259) | class MaskFormerSwinPatchMerging(nn.Module): method __init__ (line 272) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 279) | def maybe_pad(self, input_feature, height, width): method forward (line 287) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... class MaskFormerSwinDropPath (line 314) | class MaskFormerSwinDropPath(nn.Module): method __init__ (line 317) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 321) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 324) | def extra_repr(self) -> str: class MaskFormerSwinSelfAttention (line 329) | class MaskFormerSwinSelfAttention(nn.Module): method __init__ (line 330) | def __init__(self, config, dim, num_heads, window_size): method transpose_for_scores (line 367) | def transpose_for_scores(self, x): method forward (line 372) | def forward( class MaskFormerSwinSelfOutput (line 430) | class MaskFormerSwinSelfOutput(nn.Module): method __init__ (line 431) | def __init__(self, config, dim): method forward (line 436) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MaskFormerSwinAttention (line 444) | class MaskFormerSwinAttention(nn.Module): method __init__ (line 445) | def __init__(self, config, dim, num_heads, window_size): method prune_heads (line 451) | def prune_heads(self, heads): method forward (line 469) | def forward( class MaskFormerSwinIntermediate (line 483) | class MaskFormerSwinIntermediate(nn.Module): method __init__ (line 484) | def __init__(self, config, dim): method forward (line 492) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MaskFormerSwinOutput (line 499) | class MaskFormerSwinOutput(nn.Module): method __init__ (line 500) | def __init__(self, config, dim): method forward (line 505) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MaskFormerSwinLayer (line 511) | class MaskFormerSwinLayer(nn.Module): method __init__ (line 512) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method get_attn_mask (line 526) | def get_attn_mask(self, input_resolution): method maybe_pad (line 555) | def maybe_pad(self, hidden_states, height, width): method forward (line 563) | def forward(self, hidden_states, input_dimensions, head_mask=None, out... class MaskFormerSwinStage (line 623) | class MaskFormerSwinStage(nn.Module): method __init__ (line 625) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 650) | def forward( class MaskFormerSwinEncoder (line 679) | class MaskFormerSwinEncoder(nn.Module): method __init__ (line 681) | def __init__(self, config, grid_size): method forward (line 703) | def forward( class MaskFormerSwinPreTrainedModel (line 760) | class MaskFormerSwinPreTrainedModel(PreTrainedModel): method _init_weights (line 772) | def _init_weights(self, module): class MaskFormerSwinModel (line 785) | class MaskFormerSwinModel(MaskFormerSwinPreTrainedModel): method __init__ (line 786) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 798) | def get_input_embeddings(self): method _prune_heads (line 801) | def _prune_heads(self, heads_to_prune): method forward (line 809) | def forward( class MaskFormerSwinBackbone (line 869) | class MaskFormerSwinBackbone(MaskFormerSwinPreTrainedModel, BackboneMixin): method __init__ (line 881) | def __init__(self, config: MaskFormerSwinConfig): method forward (line 896) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mbart/configuration_mbart.py class MBartConfig (line 30) | class MBartConfig(PretrainedConfig): method __init__ (line 108) | def __init__( class MBartOnnxConfig (line 167) | class MBartOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 169) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 213) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 225) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 293) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 331) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 357) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 381) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/mbart/modeling_mbart.py function shift_tokens_right (line 64) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int): class MBartLearnedPositionalEmbedding (line 85) | class MBartLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 90) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 96) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class MBartScaledWordEmbedding (line 108) | class MBartScaledWordEmbedding(nn.Embedding): method __init__ (line 113) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 117) | def forward(self, input_ids: torch.Tensor): class MBartAttention (line 122) | class MBartAttention(nn.Module): method __init__ (line 125) | def __init__( method _shape (line 156) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 159) | def forward( class MBartFlashAttention2 (line 281) | class MBartFlashAttention2(MBartAttention): method __init__ (line 289) | def __init__(self, *args, **kwargs): method _reshape (line 297) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 300) | def forward( class MBartEncoderLayer (line 414) | class MBartEncoderLayer(nn.Module): method __init__ (line 415) | def __init__(self, config: MBartConfig): method forward (line 433) | def forward( class MBartDecoderLayer (line 484) | class MBartDecoderLayer(nn.Module): method __init__ (line 485) | def __init__(self, config: MBartConfig): method forward (line 514) | def forward( class MBartClassificationHead (line 605) | class MBartClassificationHead(nn.Module): method __init__ (line 608) | def __init__( method forward (line 620) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MBartPreTrainedModel (line 629) | class MBartPreTrainedModel(PreTrainedModel): method _init_weights (line 636) | def _init_weights(self, module): method dummy_inputs (line 648) | def dummy_inputs(self): class MBartEncoder (line 811) | class MBartEncoder(MBartPreTrainedModel): method __init__ (line 821) | def __init__(self, config: MBartConfig, embed_tokens: Optional[nn.Embe... method _backward_compatibility_gradient_checkpointing (line 852) | def _backward_compatibility_gradient_checkpointing(self): method forward (line 857) | def forward( class MBartDecoder (line 995) | class MBartDecoder(MBartPreTrainedModel): method __init__ (line 1004) | def __init__(self, config: MBartConfig, embed_tokens: Optional[nn.Embe... method get_input_embeddings (line 1032) | def get_input_embeddings(self): method set_input_embeddings (line 1035) | def set_input_embeddings(self, value): method forward (line 1038) | def forward( class MBartModel (line 1267) | class MBartModel(MBartPreTrainedModel): method __init__ (line 1270) | def __init__(self, config: MBartConfig): method get_input_embeddings (line 1283) | def get_input_embeddings(self): method set_input_embeddings (line 1286) | def set_input_embeddings(self, value): method get_encoder (line 1291) | def get_encoder(self): method get_decoder (line 1294) | def get_decoder(self): method _tie_weights (line 1297) | def _tie_weights(self): method forward (line 1309) | def forward( class MBartForConditionalGeneration (line 1392) | class MBartForConditionalGeneration(MBartPreTrainedModel): method __init__ (line 1397) | def __init__(self, config: MBartConfig): method get_encoder (line 1406) | def get_encoder(self): method get_decoder (line 1409) | def get_decoder(self): method resize_token_embeddings (line 1412) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 1417) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1426) | def get_output_embeddings(self): method set_output_embeddings (line 1429) | def set_output_embeddings(self, new_embeddings): method forward (line 1435) | def forward( method prepare_inputs_for_generation (line 1512) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1549) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1553) | def _reorder_cache(past_key_values, beam_idx): class MBartForSequenceClassification (line 1571) | class MBartForSequenceClassification(MBartPreTrainedModel): method __init__ (line 1574) | def __init__(self, config: MBartConfig, **kwargs): method forward (line 1594) | def forward( class MBartForQuestionAnswering (line 1700) | class MBartForQuestionAnswering(MBartPreTrainedModel): method __init__ (line 1703) | def __init__(self, config): method forward (line 1722) | def forward( class MBartDecoderWrapper (line 1818) | class MBartDecoderWrapper(MBartPreTrainedModel): method __init__ (line 1824) | def __init__(self, config): method forward (line 1828) | def forward(self, *args, **kwargs): class MBartForCausalLM (line 1833) | class MBartForCausalLM(MBartPreTrainedModel): method __init__ (line 1836) | def __init__(self, config): method get_input_embeddings (line 1848) | def get_input_embeddings(self): method set_input_embeddings (line 1851) | def set_input_embeddings(self, value): method get_output_embeddings (line 1854) | def get_output_embeddings(self): method set_output_embeddings (line 1857) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1860) | def set_decoder(self, decoder): method get_decoder (line 1863) | def get_decoder(self): method forward (line 1867) | def forward( method prepare_inputs_for_generation (line 2011) | def prepare_inputs_for_generation( method _reorder_cache (line 2038) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mbart/modeling_tf_mbart.py function shift_tokens_right (line 62) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int): function _make_causal_mask (line 87) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 105) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFMBartLearnedPositionalEmbedding (line 119) | class TFMBartLearnedPositionalEmbedding(keras.layers.Embedding): method __init__ (line 124) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 130) | def call( class TFMBartAttention (line 147) | class TFMBartAttention(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( method build (line 299) | def build(self, input_shape=None): class TFMBartEncoderLayer (line 317) | class TFMBartEncoderLayer(keras.layers.Layer): method __init__ (line 318) | def __init__(self, config: MBartConfig, **kwargs): method call (line 333) | def call( method build (line 373) | def build(self, input_shape=None): class TFMBartDecoderLayer (line 394) | class TFMBartDecoderLayer(keras.layers.Layer): method __init__ (line 395) | def __init__(self, config: MBartConfig, **kwargs): method call (line 423) | def call( method build (line 503) | def build(self, input_shape=None): class TFMBartPreTrainedModel (line 530) | class TFMBartPreTrainedModel(TFPreTrainedModel): class TFMBartEncoder (line 706) | class TFMBartEncoder(keras.layers.Layer): method __init__ (line 716) | def __init__(self, config: MBartConfig, embed_tokens: Optional[keras.l... method get_embed_tokens (line 736) | def get_embed_tokens(self): method set_embed_tokens (line 739) | def set_embed_tokens(self, embed_tokens): method call (line 743) | def call( method build (line 865) | def build(self, input_shape=None): class TFMBartDecoder (line 885) | class TFMBartDecoder(keras.layers.Layer): method __init__ (line 895) | def __init__(self, config: MBartConfig, embed_tokens: Optional[keras.l... method get_embed_tokens (line 913) | def get_embed_tokens(self): method set_embed_tokens (line 916) | def set_embed_tokens(self, embed_tokens): method call (line 920) | def call( method build (line 1114) | def build(self, input_shape=None): class TFMBartMainLayer (line 1134) | class TFMBartMainLayer(keras.layers.Layer): method __init__ (line 1137) | def __init__(self, config: MBartConfig, **kwargs): method get_input_embeddings (line 1153) | def get_input_embeddings(self): method set_input_embeddings (line 1156) | def set_input_embeddings(self, new_embeddings): method call (line 1162) | def call( method build (line 1246) | def build(self, input_shape=None): class TFMBartModel (line 1267) | class TFMBartModel(TFMBartPreTrainedModel): method __init__ (line 1268) | def __init__(self, config: MBartConfig, *inputs, **kwargs): method get_encoder (line 1273) | def get_encoder(self): method get_decoder (line 1276) | def get_decoder(self): method call (line 1286) | def call( method serving_output (line 1330) | def serving_output(self, output): method build (line 1349) | def build(self, input_shape=None): class BiasLayer (line 1359) | class BiasLayer(keras.layers.Layer): method __init__ (line 1365) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1372) | def call(self, x): class TFMBartForConditionalGeneration (line 1380) | class TFMBartForConditionalGeneration(TFMBartPreTrainedModel, TFCausalLa... method __init__ (line 1386) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1395) | def get_decoder(self): method get_encoder (line 1398) | def get_encoder(self): method get_output_embeddings (line 1401) | def get_output_embeddings(self): method set_output_embeddings (line 1404) | def set_output_embeddings(self, value): method get_bias (line 1407) | def get_bias(self): method set_bias (line 1410) | def set_bias(self, value): method call (line 1422) | def call( method serving_output (line 1502) | def serving_output(self, output): method prepare_inputs_for_generation (line 1522) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1560) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method build (line 1563) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mbart/tokenization_mbart.py class MBartTokenizer (line 36) | class MBartTokenizer(PreTrainedTokenizer): method __init__ (line 63) | def __init__( method __getstate__ (line 141) | def __getstate__(self): method __setstate__ (line 147) | def __setstate__(self, d): method vocab_size (line 158) | def vocab_size(self): 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 get_special_tokens_mask (line 170) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 200) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 227) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 252) | def _build_translation_inputs( method get_vocab (line 264) | def get_vocab(self): method _tokenize (line 269) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 272) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 281) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 287) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 292) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 309) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 321) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 324) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 327) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 333) | def set_tgt_lang_special_tokens(self, lang: str) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/mbart/tokenization_mbart_fast.py class MBartTokenizerFast (line 42) | class MBartTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 73) | def __init__( method can_save_slow_tokenizer (line 127) | def can_save_slow_tokenizer(self) -> bool: method src_lang (line 131) | def src_lang(self) -> str: method src_lang (line 135) | def src_lang(self, new_src_lang: str) -> None: method build_inputs_with_special_tokens (line 139) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 168) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 193) | def _build_translation_inputs( method prepare_seq2seq_batch (line 205) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 217) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 220) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 223) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 238) | def set_tgt_lang_special_tokens(self, lang: str) -> None: method save_vocabulary (line 253) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mbart50/tokenization_mbart50.py class MBart50Tokenizer (line 36) | class MBart50Tokenizer(PreTrainedTokenizer): method __init__ (line 101) | def __init__( method vocab_size (line 170) | def vocab_size(self) -> int: method src_lang (line 174) | def src_lang(self) -> str: method src_lang (line 178) | def src_lang(self, new_src_lang: str) -> None: method __getstate__ (line 182) | def __getstate__(self) -> Dict: method __setstate__ (line 187) | def __setstate__(self, d: Dict) -> None: method get_vocab (line 197) | def get_vocab(self) -> Dict: method _tokenize (line 202) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 205) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 214) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 221) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 240) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method get_special_tokens_mask (line 257) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 287) | def build_inputs_with_special_tokens( method _build_translation_inputs (line 314) | def _build_translation_inputs( 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: str) -> None: method set_tgt_lang_special_tokens (line 350) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/mbart50/tokenization_mbart50_fast.py class MBart50TokenizerFast (line 41) | class MBart50TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 93) | def __init__( method can_save_slow_tokenizer (line 141) | def can_save_slow_tokenizer(self) -> bool: method src_lang (line 145) | def src_lang(self) -> str: method src_lang (line 149) | def src_lang(self, new_src_lang: str) -> None: method build_inputs_with_special_tokens (line 153) | def build_inputs_with_special_tokens( method prepare_seq2seq_batch (line 182) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 194) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 197) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 200) | def set_src_lang_special_tokens(self, src_lang: str) -> None: method set_tgt_lang_special_tokens (line 215) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: method _build_translation_inputs (line 230) | def _build_translation_inputs( method save_vocabulary (line 242) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/megatron_bert/configuration_megatron_bert.py class MegatronBertConfig (line 24) | class MegatronBertConfig(PretrainedConfig): method __init__ (line 92) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/megatron_bert/modeling_megatron_bert.py function load_tf_weights_in_megatron_bert (line 60) | def load_tf_weights_in_megatron_bert(model, config, tf_checkpoint_path): class MegatronBertEmbeddings (line 129) | class MegatronBertEmbeddings(nn.Module): method __init__ (line 132) | def __init__(self, config): method forward (line 151) | def forward( class MegatronBertSelfAttention (line 188) | class MegatronBertSelfAttention(nn.Module): method __init__ (line 189) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 215) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 220) | def forward( class MegatronBertSelfOutput (line 323) | class MegatronBertSelfOutput(nn.Module): method __init__ (line 324) | def __init__(self, config): method forward (line 329) | def forward(self, hidden_states: torch.Tensor, residual: torch.Tensor)... class MegatronBertAttention (line 336) | class MegatronBertAttention(nn.Module): method __init__ (line 337) | def __init__(self, config): method prune_heads (line 344) | def prune_heads(self, heads): method forward (line 362) | def forward( class MegatronBertIntermediate (line 388) | class MegatronBertIntermediate(nn.Module): method __init__ (line 389) | def __init__(self, config): method forward (line 397) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegatronBertOutput (line 404) | class MegatronBertOutput(nn.Module): method __init__ (line 405) | def __init__(self, config): method forward (line 410) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MegatronBertLayer (line 417) | class MegatronBertLayer(nn.Module): method __init__ (line 418) | def __init__(self, config): method forward (line 433) | def forward( method feed_forward_chunk (line 498) | def feed_forward_chunk(self, attention_output): class MegatronBertEncoder (line 505) | class MegatronBertEncoder(nn.Module): method __init__ (line 506) | def __init__(self, config): method forward (line 516) | def forward( class MegatronBertPooler (line 608) | class MegatronBertPooler(nn.Module): method __init__ (line 609) | def __init__(self, config): method forward (line 614) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegatronBertPredictionHeadTransform (line 624) | class MegatronBertPredictionHeadTransform(nn.Module): method __init__ (line 625) | def __init__(self, config): method forward (line 634) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegatronBertLMPredictionHead (line 642) | class MegatronBertLMPredictionHead(nn.Module): method __init__ (line 643) | def __init__(self, config): method _tie_weights (line 656) | def _tie_weights(self): method forward (line 659) | def forward(self, hidden_states): class MegatronBertOnlyMLMHead (line 666) | class MegatronBertOnlyMLMHead(nn.Module): method __init__ (line 667) | def __init__(self, config): method forward (line 671) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class MegatronBertOnlyNSPHead (line 677) | class MegatronBertOnlyNSPHead(nn.Module): method __init__ (line 678) | def __init__(self, config): method forward (line 682) | def forward(self, pooled_output): class MegatronBertPreTrainingHeads (line 688) | class MegatronBertPreTrainingHeads(nn.Module): method __init__ (line 689) | def __init__(self, config): method forward (line 694) | def forward(self, sequence_output, pooled_output): class MegatronBertPreTrainedModel (line 700) | class MegatronBertPreTrainedModel(PreTrainedModel): method _init_weights (line 711) | def _init_weights(self, module): class MegatronBertForPreTrainingOutput (line 726) | class MegatronBertForPreTrainingOutput(ModelOutput): class MegatronBertModel (line 829) | class MegatronBertModel(MegatronBertPreTrainedModel): method __init__ (line 842) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 854) | def get_input_embeddings(self): method set_input_embeddings (line 857) | def set_input_embeddings(self, value): method _prune_heads (line 860) | def _prune_heads(self, heads_to_prune): method forward (line 874) | def forward( class MegatronBertForPreTraining (line 1006) | class MegatronBertForPreTraining(MegatronBertPreTrainedModel): method __init__ (line 1009) | def __init__(self, config, add_binary_head=True): method get_output_embeddings (line 1018) | def get_output_embeddings(self): method set_output_embeddings (line 1021) | def set_output_embeddings(self, new_embeddings): method forward (line 1027) | def forward( class MegatronBertForCausalLM (line 1113) | class MegatronBertForCausalLM(MegatronBertPreTrainedModel): method __init__ (line 1116) | def __init__(self, config): method get_output_embeddings (line 1128) | def get_output_embeddings(self): method set_output_embeddings (line 1131) | def set_output_embeddings(self, new_embeddings): method forward (line 1137) | def forward( method prepare_inputs_for_generation (line 1238) | 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 1269) | class MegatronBertForMaskedLM(MegatronBertPreTrainedModel): method __init__ (line 1272) | def __init__(self, config): method get_output_embeddings (line 1287) | def get_output_embeddings(self): method set_output_embeddings (line 1290) | def set_output_embeddings(self, new_embeddings): method forward (line 1300) | def forward( method prepare_inputs_for_generation (line 1357) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class MegatronBertForNextSentencePrediction (line 1377) | 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 1672) | def __init__(self, config): method forward (line 1689) | def forward( class MegatronBertForQuestionAnswering (line 1749) | class MegatronBertForQuestionAnswering(MegatronBertPreTrainedModel): method __init__ (line 1750) | def __init__(self, config): method forward (line 1766) | def forward( FILE: mplsandbox_for_rl/transformers/src/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 303) | def get_element_from_dict_by_path(d, path): function convert_checkpoint_from_megatron_to_transformers (line 319) | def convert_checkpoint_from_megatron_to_transformers(args): function convert_checkpoint_from_transformers_to_megatron (line 593) | def convert_checkpoint_from_transformers_to_megatron(args): function main (line 891) | def main(): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/mgp_str/configuration_mgp_str.py class MgpstrConfig (line 24) | class MgpstrConfig(PretrainedConfig): method __init__ (line 91) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mgp_str/modeling_mgp_str.py function drop_path (line 49) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class MgpstrDropPath (line 70) | class MgpstrDropPath(nn.Module): method __init__ (line 73) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 77) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 80) | def extra_repr(self) -> str: class MgpstrModelOutput (line 85) | class MgpstrModelOutput(ModelOutput): class MgpstrEmbeddings (line 122) | class MgpstrEmbeddings(nn.Module): method __init__ (line 125) | def __init__(self, config: MgpstrConfig): method forward (line 150) | def forward(self, pixel_values): class MgpstrMlp (line 168) | class MgpstrMlp(nn.Module): method __init__ (line 171) | def __init__(self, config: MgpstrConfig, hidden_features): method forward (line 179) | def forward(self, hidden_states): class MgpstrAttention (line 188) | class MgpstrAttention(nn.Module): method __init__ (line 189) | def __init__(self, config: MgpstrConfig): method forward (line 200) | def forward(self, hidden_states): class MgpstrLayer (line 219) | class MgpstrLayer(nn.Module): method __init__ (line 220) | def __init__(self, config: MgpstrConfig, drop_path=None): method forward (line 230) | def forward(self, hidden_states): class MgpstrEncoder (line 245) | class MgpstrEncoder(nn.Module): method __init__ (line 246) | def __init__(self, config: MgpstrConfig): method forward (line 255) | def forward(self, hidden_states, output_attentions=False, output_hidde... class MgpstrA3Module (line 281) | class MgpstrA3Module(nn.Module): method __init__ (line 282) | def __init__(self, config: MgpstrConfig): method forward (line 294) | def forward(self, hidden_states): class MgpstrPreTrainedModel (line 309) | class MgpstrPreTrainedModel(PreTrainedModel): method _init_weights (line 319) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class MgpstrModel (line 364) | class MgpstrModel(MgpstrPreTrainedModel): method __init__ (line 365) | def __init__(self, config: MgpstrConfig): method get_input_embeddings (line 371) | def get_input_embeddings(self) -> nn.Module: method forward (line 375) | def forward( class MgpstrForSceneTextRecognition (line 416) | class MgpstrForSceneTextRecognition(MgpstrPreTrainedModel): method __init__ (line 420) | def __init__(self, config: MgpstrConfig) -> None: method forward (line 436) | def forward( FILE: mplsandbox_for_rl/transformers/src/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 57) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 79) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 102) | def batch_decode(self, sequences): method _decode_helper (line 144) | def _decode_helper(self, pred_logits, format): method char_decode (line 194) | def char_decode(self, sequences): method bpe_decode (line 207) | def bpe_decode(self, sequences): method wp_decode (line 219) | def wp_decode(self, sequences): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mgp_str/tokenization_mgp_str.py class MgpstrTokenizer (line 30) | class MgpstrTokenizer(PreTrainedTokenizer): method __init__ (line 54) | def __init__(self, vocab_file, unk_token="[GO]", bos_token="[GO]", eos... method vocab_size (line 67) | def vocab_size(self): method get_vocab (line 70) | def get_vocab(self): method _tokenize (line 75) | def _tokenize(self, text): method _convert_token_to_id (line 82) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 86) | def _convert_id_to_token(self, index): method save_vocabulary (line 90) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mistral/configuration_mistral.py class MistralConfig (line 24) | class MistralConfig(PretrainedConfig): method __init__ (line 101) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mistral/convert_mistral_weights_to_hf.py function compute_intermediate_size (line 66) | def compute_intermediate_size(n, ffn_dim_multiplier=1, multiple_of=256): function read_json (line 70) | def read_json(path): function write_json (line 75) | def write_json(text, path): function write_model (line 80) | def write_model(model_path, input_base_path, model_size, tokenizer_path=... function write_tokenizer (line 248) | def write_tokenizer(tokenizer_path, input_tokenizer_path): function main (line 255) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mistral/modeling_flax_mistral.py class FlaxMistralRMSNorm (line 131) | class FlaxMistralRMSNorm(nn.Module): method setup (line 135) | def setup(self): method __call__ (line 139) | def __call__(self, hidden_states): class FlaxMistralRotaryEmbedding (line 150) | class FlaxMistralRotaryEmbedding(nn.Module): method setup (line 154) | def setup(self): method __call__ (line 158) | def __call__(self, key, query, position_ids): class FlaxMistralMLP (line 172) | class FlaxMistralMLP(nn.Module): method setup (line 176) | def setup(self): method __call__ (line 187) | def __call__(self, hidden_states): function apply_rotary_pos_emb (line 196) | def apply_rotary_pos_emb(tensor, sin_pos, cos_pos): function create_sinusoidal_positions (line 201) | def create_sinusoidal_positions(num_pos, dim): function rotate_half (line 211) | def rotate_half(tensor): class FlaxMistralAttention (line 219) | class FlaxMistralAttention(nn.Module): method setup (line 223) | def setup(self): method _split_heads (line 246) | def _split_heads(self, hidden_states, num_heads): method _merge_heads (line 249) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 254) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 285) | def __call__( class FlaxMistralDecoderLayer (line 354) | class FlaxMistralDecoderLayer(nn.Module): method setup (line 358) | def setup(self): method __call__ (line 364) | def __call__( class FlaxMistralPreTrainedModel (line 397) | class FlaxMistralPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 407) | def __init__( method init_weights (line 419) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 439) | def init_cache(self, batch_size, max_length): method __call__ (line 459) | def __call__( class FlaxMistralLayerCollection (line 530) | class FlaxMistralLayerCollection(nn.Module): method setup (line 534) | def setup(self): method __call__ (line 540) | def __call__( class FlaxMistralModule (line 577) | class FlaxMistralModule(nn.Module): method setup (line 581) | def setup(self): method __call__ (line 593) | def __call__( class FlaxMistralModel (line 640) | class FlaxMistralModel(FlaxMistralPreTrainedModel): class FlaxMistralForCausalLMModule (line 654) | class FlaxMistralForCausalLMModule(nn.Module): method setup (line 658) | def setup(self): method __call__ (line 667) | def __call__( class FlaxMistralForCausalLM (line 706) | class FlaxMistralForCausalLM(FlaxMistralPreTrainedModel): method prepare_inputs_for_generation (line 709) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 730) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mistral/modeling_mistral.py class MistralRMSNorm (line 60) | class MistralRMSNorm(nn.Module): method __init__ (line 61) | def __init__(self, hidden_size, eps=1e-6): method forward (line 69) | def forward(self, hidden_states): method extra_repr (line 76) | def extra_repr(self): class MistralRotaryEmbedding (line 80) | class MistralRotaryEmbedding(nn.Module): method __init__ (line 81) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 93) | def forward(self, x, position_ids): function rotate_half (line 110) | def rotate_half(x): function apply_rotary_pos_emb (line 118) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... class MistralMLP (line 145) | class MistralMLP(nn.Module): method __init__ (line 146) | def __init__(self, config): method forward (line 155) | def forward(self, hidden_state): function repeat_kv (line 160) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class MistralAttention (line 172) | class MistralAttention(nn.Module): method __init__ (line 178) | def __init__(self, config: MistralConfig, layer_idx: Optional[int] = N... method forward (line 210) | def forward( class MistralFlashAttention2 (line 269) | class MistralFlashAttention2(MistralAttention): method __init__ (line 277) | def __init__(self, *args, **kwargs): method forward (line 285) | def forward( class MistralSdpaAttention (line 406) | class MistralSdpaAttention(MistralAttention): method forward (line 414) | def forward( class MistralDecoderLayer (line 503) | class MistralDecoderLayer(nn.Module): method __init__ (line 504) | def __init__(self, config: MistralConfig, layer_idx: int): method forward (line 514) | def forward( class MistralPreTrainedModel (line 599) | class MistralPreTrainedModel(PreTrainedModel): method _init_weights (line 610) | def _init_weights(self, module): class MistralModel (line 696) | class MistralModel(MistralPreTrainedModel): method __init__ (line 704) | def __init__(self, config: MistralConfig): method get_input_embeddings (line 720) | def get_input_embeddings(self): method set_input_embeddings (line 723) | def set_input_embeddings(self, value): method forward (line 727) | def forward( method _update_causal_mask (line 845) | def _update_causal_mask( class MistralForCausalLM (line 954) | class MistralForCausalLM(MistralPreTrainedModel): method __init__ (line 957) | def __init__(self, config): method get_input_embeddings (line 966) | def get_input_embeddings(self): method set_input_embeddings (line 969) | def set_input_embeddings(self, value): 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 set_decoder (line 978) | def set_decoder(self, decoder): method get_decoder (line 981) | def get_decoder(self): method forward (line 986) | def forward( method prepare_inputs_for_generation (line 1075) | def prepare_inputs_for_generation( class MistralForSequenceClassification (line 1139) | class MistralForSequenceClassification(MistralPreTrainedModel): method __init__ (line 1140) | def __init__(self, config): method get_input_embeddings (line 1149) | def get_input_embeddings(self): method set_input_embeddings (line 1152) | def set_input_embeddings(self, value): method forward (line 1156) | def forward( class MistralForTokenClassification (line 1255) | class MistralForTokenClassification(MistralPreTrainedModel): method __init__ (line 1256) | def __init__(self, config): method get_input_embeddings (line 1272) | def get_input_embeddings(self): method set_input_embeddings (line 1275) | def set_input_embeddings(self, value): method forward (line 1279) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mistral/modeling_tf_mistral.py function _make_causal_mask (line 57) | def _make_causal_mask(input_ids_shape, dtype, past_key_values_length=0): function _expand_mask (line 84) | def _expand_mask(mask, dtype, tgt_len=None): class TFMistralRMSNorm (line 101) | class TFMistralRMSNorm(keras.layers.Layer): method __init__ (line 102) | def __init__(self, hidden_size, eps=1e-6, **kwargs): method build (line 110) | def build(self, input_shape=None): method call (line 120) | def call(self, hidden_states): class TFMistralRotaryEmbedding (line 129) | class TFMistralRotaryEmbedding(keras.layers.Layer): method __init__ (line 130) | def __init__(self, dim, max_position_embeddings=2048, base=10000, **kw... method call (line 137) | def call(self, x, seq_len=None): function rotate_half (line 152) | def rotate_half(x): function apply_rotary_pos_emb (line 161) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class TFMistralMLP (line 189) | class TFMistralMLP(keras.layers.Layer): method __init__ (line 190) | def __init__(self, config, **kwargs): method call (line 200) | def call(self, x): method build (line 203) | def build(self, input_shape=None): function repeat_kv (line 219) | def repeat_kv(hidden_states: tf.Tensor, n_rep: int) -> tf.Tensor: class TFMistralAttention (line 232) | class TFMistralAttention(keras.layers.Layer): method __init__ (line 238) | def __init__(self, config: MistralConfig, layer_idx: Optional[int] = N... method _shape (line 277) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 282) | def call( method build (line 363) | def build(self, input_shape=None): class TFMistralDecoderLayer (line 381) | class TFMistralDecoderLayer(keras.layers.Layer): method __init__ (line 382) | def __init__(self, config: MistralConfig, layer_idx: int, **kwargs): method call (line 394) | def call( method build (line 453) | def build(self, input_shape=None): class TFMistralMainLayer (line 472) | class TFMistralMainLayer(keras.layers.Layer): method __init__ (line 482) | def __init__(self, config: MistralConfig, **kwargs): method get_input_embeddings (line 502) | def get_input_embeddings(self): method set_input_embeddings (line 505) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 508) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method call (line 529) | def call( method build (line 623) | def build(self, input_shape=None): class TFMistralPreTrainedModel (line 686) | class TFMistralPreTrainedModel(TFPreTrainedModel): class TFMistralModel (line 765) | class TFMistralModel(TFMistralPreTrainedModel): method __init__ (line 766) | def __init__(self, config: MistralConfig, *inputs, **kwargs): method call (line 772) | def call( method build (line 797) | def build(self, input_shape=None): class TFMistralForCausalLM (line 806) | class TFMistralForCausalLM(TFMistralPreTrainedModel, TFCausalLanguageMod... method __init__ (line 807) | def __init__(self, config, *inputs, **kwargs): method get_input_embeddings (line 819) | def get_input_embeddings(self): method set_input_embeddings (line 822) | def set_input_embeddings(self, value): method get_output_embeddings (line 825) | def get_output_embeddings(self): method set_output_embeddings (line 828) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 831) | def set_decoder(self, decoder): method get_decoder (line 834) | def get_decoder(self): method call (line 839) | def call( method prepare_inputs_for_generation (line 896) | def prepare_inputs_for_generation( method build (line 917) | def build(self, input_shape=None): class TFMistralForSequenceClassification (line 944) | class TFMistralForSequenceClassification(TFMistralPreTrainedModel, TFSeq... method __init__ (line 945) | def __init__(self, config, *inputs, **kwargs): method get_input_embeddings (line 957) | def get_input_embeddings(self): method set_input_embeddings (line 960) | def set_input_embeddings(self, value): method call (line 965) | def call( method build (line 1046) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mixtral/configuration_mixtral.py class MixtralConfig (line 24) | class MixtralConfig(PretrainedConfig): method __init__ (line 111) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mixtral/convert_mixtral_weights_to_hf.py function compute_intermediate_size (line 47) | def compute_intermediate_size(n, ffn_dim_multiplier=1, multiple_of=256): function read_json (line 51) | def read_json(path): function write_json (line 56) | def write_json(text, path): function write_model (line 61) | def write_model(model_path, input_base_path, model_size, safe_serializat... function main (line 219) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mixtral/modeling_mixtral.py function _prepare_4d_causal_attention_mask_with_cache_position (line 71) | def _prepare_4d_causal_attention_mask_with_cache_position( function load_balancing_loss_func (line 124) | def load_balancing_loss_func( class MixtralRMSNorm (line 201) | class MixtralRMSNorm(nn.Module): method __init__ (line 202) | def __init__(self, hidden_size, eps=1e-6): method forward (line 210) | def forward(self, hidden_states): method extra_repr (line 217) | def extra_repr(self): class MixtralRotaryEmbedding (line 223) | class MixtralRotaryEmbedding(nn.Module): method __init__ (line 224) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 238) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 248) | def forward(self, x, seq_len=None): function rotate_half (line 260) | def rotate_half(x): function apply_rotary_pos_emb (line 269) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): function repeat_kv (line 298) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class MixtralAttention (line 312) | class MixtralAttention(nn.Module): method __init__ (line 318) | def __init__(self, config: MixtralConfig, layer_idx: Optional[int] = N... method _shape (line 355) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 358) | def forward( class MixtralFlashAttention2 (line 434) | class MixtralFlashAttention2(MixtralAttention): method forward (line 441) | def forward( class MixtralSdpaAttention (line 565) | class MixtralSdpaAttention(MixtralAttention): method forward (line 573) | def forward( class MixtralBlockSparseTop2MLP (line 662) | class MixtralBlockSparseTop2MLP(nn.Module): method __init__ (line 663) | def __init__(self, config: MixtralConfig): method forward (line 674) | def forward(self, hidden_states): class MixtralSparseMoeBlock (line 680) | class MixtralSparseMoeBlock(nn.Module): method __init__ (line 692) | def __init__(self, config): method forward (line 707) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MixtralDecoderLayer (line 748) | class MixtralDecoderLayer(nn.Module): method __init__ (line 749) | def __init__(self, config: MixtralConfig, layer_idx: int): method forward (line 759) | def forward( class MixtralPreTrainedModel (line 851) | class MixtralPreTrainedModel(PreTrainedModel): method _init_weights (line 861) | def _init_weights(self, module): class MixtralModel (line 950) | class MixtralModel(MixtralPreTrainedModel): method __init__ (line 958) | def __init__(self, config: MixtralConfig): method get_input_embeddings (line 974) | def get_input_embeddings(self): method set_input_embeddings (line 977) | def set_input_embeddings(self, value): method forward (line 982) | def forward( method _update_causal_mask (line 1115) | def _update_causal_mask( class MixtralForCausalLM (line 1187) | class MixtralForCausalLM(MixtralPreTrainedModel): method __init__ (line 1190) | def __init__(self, config): method get_input_embeddings (line 1201) | def get_input_embeddings(self): method set_input_embeddings (line 1204) | def set_input_embeddings(self, value): method get_output_embeddings (line 1207) | def get_output_embeddings(self): method set_output_embeddings (line 1210) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1213) | def set_decoder(self, decoder): method get_decoder (line 1216) | def get_decoder(self): method forward (line 1222) | def forward( method prepare_inputs_for_generation (line 1332) | def prepare_inputs_for_generation( class MixtralForSequenceClassification (line 1395) | class MixtralForSequenceClassification(MixtralPreTrainedModel): method __init__ (line 1396) | def __init__(self, config): method get_input_embeddings (line 1405) | def get_input_embeddings(self): method set_input_embeddings (line 1408) | def set_input_embeddings(self, value): method forward (line 1412) | def forward( class MixtralForTokenClassification (line 1511) | class MixtralForTokenClassification(MixtralPreTrainedModel): method __init__ (line 1512) | 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 forward (line 1535) | def forward( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/mluke/tokenization_mluke.py class MLukeTokenizer (line 131) | class MLukeTokenizer(PreTrainedTokenizer): method __init__ (line 219) | def __init__( method vocab_size (line 333) | def vocab_size(self): method get_vocab (line 337) | def get_vocab(self): method _tokenize (line 343) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 348) | 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 363) | def convert_tokens_to_string(self, tokens): method __getstate__ (line 368) | def __getstate__(self): method __setstate__ (line 374) | def __setstate__(self, d): method __call__ (line 386) | def __call__( method _encode_plus (line 532) | def _encode_plus( method _batch_encode_plus (line 613) | def _batch_encode_plus( method _check_entity_input_format (line 722) | def _check_entity_input_format(self, entities: Optional[EntityInput], ... method _create_input_sequence (line 741) | def _create_input_sequence( method _batch_prepare_for_model (line 895) | def _batch_prepare_for_model( method prepare_for_model (line 978) | def prepare_for_model( method pad (line 1208) | def pad( method _pad (line 1369) | def _pad( method save_vocabulary (line 1508) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 1534) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 1561) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 1590) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilebert/configuration_mobilebert.py class MobileBertConfig (line 28) | class MobileBertConfig(PretrainedConfig): method __init__ (line 108) | def __init__( class MobileBertOnnxConfig (line 168) | class MobileBertOnnxConfig(OnnxConfig): method inputs (line 170) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/mobilebert/modeling_mobilebert.py function load_tf_weights_in_mobilebert (line 80) | def load_tf_weights_in_mobilebert(model, config, tf_checkpoint_path): class NoNorm (line 158) | class NoNorm(nn.Module): method __init__ (line 159) | def __init__(self, feat_size, eps=None): method forward (line 164) | def forward(self, input_tensor: torch.Tensor) -> torch.Tensor: class MobileBertEmbeddings (line 171) | class MobileBertEmbeddings(nn.Module): method __init__ (line 174) | 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 _tie_weights (line 650) | def _tie_weights(self) -> None: method forward (line 653) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileBertOnlyMLMHead (line 660) | class MobileBertOnlyMLMHead(nn.Module): method __init__ (line 661) | def __init__(self, config): method forward (line 665) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class MobileBertPreTrainingHeads (line 670) | class MobileBertPreTrainingHeads(nn.Module): method __init__ (line 671) | def __init__(self, config): method forward (line 676) | def forward(self, sequence_output: torch.Tensor, pooled_output: torch.... class MobileBertPreTrainedModel (line 682) | class MobileBertPreTrainedModel(PreTrainedModel): method _init_weights (line 692) | def _init_weights(self, module): class MobileBertForPreTrainingOutput (line 710) | class MobileBertForPreTrainingOutput(ModelOutput): class MobileBertModel (line 813) | class MobileBertModel(MobileBertPreTrainedModel): method __init__ (line 818) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 829) | def get_input_embeddings(self): method set_input_embeddings (line 832) | def set_input_embeddings(self, value): method _prune_heads (line 835) | def _prune_heads(self, heads_to_prune): method forward (line 849) | def forward( class MobileBertForPreTraining (line 927) | class MobileBertForPreTraining(MobileBertPreTrainedModel): method __init__ (line 930) | def __init__(self, config): method get_output_embeddings (line 938) | def get_output_embeddings(self): method set_output_embeddings (line 941) | def set_output_embeddings(self, new_embeddings): method resize_token_embeddings (line 945) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method forward (line 955) | def forward( class MobileBertForMaskedLM (line 1036) | class MobileBertForMaskedLM(MobileBertPreTrainedModel): method __init__ (line 1039) | def __init__(self, config): method get_output_embeddings (line 1048) | def get_output_embeddings(self): method set_output_embeddings (line 1051) | def set_output_embeddings(self, new_embeddings): method resize_token_embeddings (line 1055) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method forward (line 1070) | def forward( class MobileBertOnlyNSPHead (line 1123) | class MobileBertOnlyNSPHead(nn.Module): method __init__ (line 1124) | def __init__(self, config): method forward (line 1128) | def forward(self, pooled_output: torch.Tensor) -> torch.Tensor: class MobileBertForNextSentencePrediction (line 1137) | class MobileBertForNextSentencePrediction(MobileBertPreTrainedModel): method __init__ (line 1138) | def __init__(self, config): method forward (line 1149) | def forward( class MobileBertForSequenceClassification (line 1241) | class MobileBertForSequenceClassification(MobileBertPreTrainedModel): method __init__ (line 1242) | def __init__(self, config): method forward (line 1265) | def forward( class MobileBertForQuestionAnswering (line 1345) | class MobileBertForQuestionAnswering(MobileBertPreTrainedModel): method __init__ (line 1346) | def __init__(self, config): method forward (line 1366) | def forward( class MobileBertForMultipleChoice (line 1449) | class MobileBertForMultipleChoice(MobileBertPreTrainedModel): method __init__ (line 1450) | def __init__(self, config): method forward (line 1471) | def forward( class MobileBertForTokenClassification (line 1546) | class MobileBertForTokenClassification(MobileBertPreTrainedModel): method __init__ (line 1547) | def __init__(self, config): method forward (line 1569) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilebert/modeling_tf_mobilebert.py class TFMobileBertPreTrainingLoss (line 88) | class TFMobileBertPreTrainingLoss: method hf_compute_loss (line 95) | def hf_compute_loss(self, labels: tf.Tensor, logits: tf.Tensor) -> tf.... class TFMobileBertIntermediate (line 116) | class TFMobileBertIntermediate(keras.layers.Layer): method __init__ (line 117) | def __init__(self, config, **kwargs): method call (line 128) | def call(self, hidden_states): method build (line 134) | def build(self, input_shape=None): class TFLayerNorm (line 143) | class TFLayerNorm(keras.layers.LayerNormalization): method __init__ (line 144) | def __init__(self, feat_size, *args, **kwargs): method build (line 148) | def build(self, input_shape=None): class TFNoNorm (line 152) | class TFNoNorm(keras.layers.Layer): method __init__ (line 153) | def __init__(self, feat_size, epsilon=None, **kwargs): method build (line 157) | def build(self, input_shape): method call (line 162) | def call(self, inputs: tf.Tensor): class TFMobileBertEmbeddings (line 169) | class TFMobileBertEmbeddings(keras.layers.Layer): method __init__ (line 172) | def __init__(self, config, **kwargs): method build (line 191) | def build(self, input_shape=None): method call (line 223) | def call(self, input_ids=None, position_ids=None, token_type_ids=None,... class TFMobileBertSelfAttention (line 273) | class TFMobileBertSelfAttention(keras.layers.Layer): method __init__ (line 274) | def __init__(self, config, **kwargs): method transpose_for_scores (line 301) | def transpose_for_scores(self, x, batch_size): method call (line 306) | def call( method build (line 351) | def build(self, input_shape=None): class TFMobileBertSelfOutput (line 374) | class TFMobileBertSelfOutput(keras.layers.Layer): method __init__ (line 375) | def __init__(self, config, **kwargs): method call (line 388) | def call(self, hidden_states, residual_tensor, training=False): method build (line 395) | def build(self, input_shape=None): class TFMobileBertAttention (line 407) | class TFMobileBertAttention(keras.layers.Layer): method __init__ (line 408) | def __init__(self, config, **kwargs): method prune_heads (line 413) | def prune_heads(self, heads): method call (line 416) | def call( method build (line 435) | def build(self, input_shape=None): class TFOutputBottleneck (line 447) | class TFOutputBottleneck(keras.layers.Layer): method __init__ (line 448) | def __init__(self, config, **kwargs): method call (line 457) | def call(self, hidden_states, residual_tensor, training=False): method build (line 463) | def build(self, input_shape=None): class TFMobileBertOutput (line 475) | class TFMobileBertOutput(keras.layers.Layer): method __init__ (line 476) | def __init__(self, config, **kwargs): method call (line 491) | def call(self, hidden_states, residual_tensor_1, residual_tensor_2, tr... method build (line 501) | def build(self, input_shape=None): class TFBottleneckLayer (line 516) | class TFBottleneckLayer(keras.layers.Layer): method __init__ (line 517) | def __init__(self, config, **kwargs): method call (line 525) | def call(self, inputs): method build (line 530) | def build(self, input_shape=None): class TFBottleneck (line 542) | class TFBottleneck(keras.layers.Layer): method __init__ (line 543) | def __init__(self, config, **kwargs): method call (line 551) | def call(self, hidden_states): method build (line 577) | def build(self, input_shape=None): class TFFFNOutput (line 589) | class TFFFNOutput(keras.layers.Layer): method __init__ (line 590) | def __init__(self, config, **kwargs): method call (line 598) | def call(self, hidden_states, residual_tensor): method build (line 603) | def build(self, input_shape=None): class TFFFNLayer (line 615) | class TFFFNLayer(keras.layers.Layer): method __init__ (line 616) | def __init__(self, config, **kwargs): method call (line 621) | def call(self, hidden_states): method build (line 626) | def build(self, input_shape=None): class TFMobileBertLayer (line 638) | class TFMobileBertLayer(keras.layers.Layer): method __init__ (line 639) | def __init__(self, config, **kwargs): method call (line 652) | def call(self, hidden_states, attention_mask, head_mask, output_attent... method build (line 697) | def build(self, input_shape=None): class TFMobileBertEncoder (line 719) | class TFMobileBertEncoder(keras.layers.Layer): method __init__ (line 720) | def __init__(self, config, **kwargs): method call (line 726) | def call( method build (line 761) | def build(self, input_shape=None): class TFMobileBertPooler (line 771) | class TFMobileBertPooler(keras.layers.Layer): method __init__ (line 772) | def __init__(self, config, **kwargs): method call (line 784) | def call(self, hidden_states): method build (line 794) | def build(self, input_shape=None): class TFMobileBertPredictionHeadTransform (line 803) | class TFMobileBertPredictionHeadTransform(keras.layers.Layer): method __init__ (line 804) | def __init__(self, config, **kwargs): method call (line 816) | def call(self, hidden_states): method build (line 822) | def build(self, input_shape=None): class TFMobileBertLMPredictionHead (line 834) | class TFMobileBertLMPredictionHead(keras.layers.Layer): method __init__ (line 835) | def __init__(self, config, **kwargs): method build (line 840) | def build(self, input_shape=None): method get_output_embeddings (line 862) | def get_output_embeddings(self): method set_output_embeddings (line 865) | def set_output_embeddings(self, value): method get_bias (line 869) | def get_bias(self): method set_bias (line 872) | def set_bias(self, value): method call (line 876) | def call(self, hidden_states): class TFMobileBertMLMHead (line 883) | class TFMobileBertMLMHead(keras.layers.Layer): method __init__ (line 884) | def __init__(self, config, **kwargs): method call (line 888) | def call(self, sequence_output): method build (line 892) | def build(self, input_shape=None): class TFMobileBertMainLayer (line 902) | class TFMobileBertMainLayer(keras.layers.Layer): method __init__ (line 905) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 918) | def get_input_embeddings(self): method set_input_embeddings (line 921) | def set_input_embeddings(self, value): method _prune_heads (line 925) | def _prune_heads(self, heads_to_prune): method call (line 933) | def call( method build (line 1016) | def build(self, input_shape=None): class TFMobileBertPreTrainedModel (line 1031) | class TFMobileBertPreTrainedModel(TFPreTrainedModel): class TFMobileBertForPreTrainingOutput (line 1042) | class TFMobileBertForPreTrainingOutput(ModelOutput): class TFMobileBertModel (line 1174) | class TFMobileBertModel(TFMobileBertPreTrainedModel): method __init__ (line 1175) | def __init__(self, config, *inputs, **kwargs): method call (line 1186) | def call( method build (line 1214) | def build(self, input_shape=None): class TFMobileBertForPreTraining (line 1230) | class TFMobileBertForPreTraining(TFMobileBertPreTrainedModel, TFMobileBe... method __init__ (line 1231) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1237) | def get_lm_head(self): method get_prefix_bias_name (line 1240) | def get_prefix_bias_name(self): method call (line 1247) | def call( method build (line 1312) | def build(self, input_shape=None): method tf_to_pt_weight_rename (line 1326) | def tf_to_pt_weight_rename(self, tf_weight): class TFMobileBertForMaskedLM (line 1334) | class TFMobileBertForMaskedLM(TFMobileBertPreTrainedModel, TFMaskedLangu... method __init__ (line 1342) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1348) | def get_lm_head(self): method get_prefix_bias_name (line 1351) | def get_prefix_bias_name(self): method call (line 1364) | def call( method build (line 1412) | def build(self, input_shape=None): method tf_to_pt_weight_rename (line 1423) | def tf_to_pt_weight_rename(self, tf_weight): class TFMobileBertOnlyNSPHead (line 1430) | class TFMobileBertOnlyNSPHead(keras.layers.Layer): method __init__ (line 1431) | def __init__(self, config, **kwargs): method call (line 1436) | def call(self, pooled_output): method build (line 1440) | def build(self, input_shape=None): class TFMobileBertForNextSentencePrediction (line 1453) | class TFMobileBertForNextSentencePrediction(TFMobileBertPreTrainedModel,... method __init__ (line 1457) | def __init__(self, config, *inputs, **kwargs): method call (line 1466) | def call( method build (line 1530) | def build(self, input_shape=None): class TFMobileBertForSequenceClassification (line 1549) | class TFMobileBertForSequenceClassification(TFMobileBertPreTrainedModel,... method __init__ (line 1559) | def __init__(self, config, *inputs, **kwargs): method call (line 1582) | def call( method build (line 1632) | def build(self, input_shape=None): class TFMobileBertForQuestionAnswering (line 1651) | class TFMobileBertForQuestionAnswering(TFMobileBertPreTrainedModel, TFQu... method __init__ (line 1661) | def __init__(self, config, *inputs, **kwargs): method call (line 1682) | def call( method build (line 1743) | def build(self, input_shape=None): class TFMobileBertForMultipleChoice (line 1762) | class TFMobileBertForMultipleChoice(TFMobileBertPreTrainedModel, TFMulti... method __init__ (line 1772) | def __init__(self, config, *inputs, **kwargs): method call (line 1791) | def call( method build (line 1856) | def build(self, input_shape=None): class TFMobileBertForTokenClassification (line 1875) | class TFMobileBertForTokenClassification(TFMobileBertPreTrainedModel, TF... method __init__ (line 1886) | def __init__(self, config, *inputs, **kwargs): method call (line 1909) | def call( method build (line 1957) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilebert/tokenization_mobilebert.py function load_vocab (line 33) | def load_vocab(vocab_file): function whitespace_tokenize (line 45) | def whitespace_tokenize(text): class MobileBertTokenizer (line 55) | class MobileBertTokenizer(PreTrainedTokenizer): method __init__ (line 99) | def __init__( method do_lower_case (line 147) | def do_lower_case(self): method vocab_size (line 151) | def vocab_size(self): method get_vocab (line 154) | def get_vocab(self): method _tokenize (line 157) | def _tokenize(self, text, split_special_tokens=False): 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 185) | 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 save_vocabulary (line 267) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 289) | class BasicTokenizer: method __init__ (line 312) | def __init__( method tokenize (line 328) | 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: 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: mplsandbox_for_rl/transformers/src/transformers/models/mobilebert/tokenization_mobilebert_fast.py class MobileBertTokenizerFast (line 34) | class MobileBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 77) | def __init__( method build_inputs_with_special_tokens (line 119) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 143) | def create_token_type_ids_from_sequences( method save_vocabulary (line 172) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilenet_v1/configuration_mobilenet_v1.py class MobileNetV1Config (line 30) | class MobileNetV1Config(PretrainedConfig): method __init__ (line 78) | def __init__( class MobileNetV1OnnxConfig (line 107) | class MobileNetV1OnnxConfig(OnnxConfig): method inputs (line 111) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 115) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 122) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilenet_v1/convert_original_tf_checkpoint_to_pytorch.py function get_mobilenet_v1_config (line 40) | def get_mobilenet_v1_config(model_name): function prepare_img (line 66) | def prepare_img(): function convert_movilevit_checkpoint (line 73) | def convert_movilevit_checkpoint(model_name, checkpoint_path, pytorch_du... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 118) | def resize( method preprocess (line 168) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilenet_v1/modeling_mobilenet_v1.py function _build_tf_to_pytorch_map (line 45) | def _build_tf_to_pytorch_map(model, config, tf_weights=None): function load_tf_weights_in_mobilenet_v1 (line 92) | def load_tf_weights_in_mobilenet_v1(model, config, tf_checkpoint_path): function apply_tf_padding (line 148) | def apply_tf_padding(features: torch.Tensor, conv_layer: nn.Conv2d) -> t... class MobileNetV1ConvLayer (line 176) | class MobileNetV1ConvLayer(nn.Module): method __init__ (line 177) | def __init__( method forward (line 231) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV1PreTrainedModel (line 242) | class MobileNetV1PreTrainedModel(PreTrainedModel): method _init_weights (line 255) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d]) -> None: class MobileNetV1Model (line 294) | class MobileNetV1Model(MobileNetV1PreTrainedModel): method __init__ (line 295) | def __init__(self, config: MobileNetV1Config, add_pooling_layer: bool ... method _prune_heads (line 345) | def _prune_heads(self, heads_to_prune): method forward (line 356) | def forward( class MobileNetV1ForImageClassification (line 404) | class MobileNetV1ForImageClassification(MobileNetV1PreTrainedModel): method __init__ (line 405) | def __init__(self, config: MobileNetV1Config) -> None: method forward (line 427) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilenet_v2/configuration_mobilenet_v2.py class MobileNetV2Config (line 30) | class MobileNetV2Config(PretrainedConfig): method __init__ (line 94) | def __init__( class MobileNetV2OnnxConfig (line 135) | class MobileNetV2OnnxConfig(OnnxConfig): method inputs (line 139) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 143) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 150) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilenet_v2/convert_original_tf_checkpoint_to_pytorch.py function get_mobilenet_v2_config (line 41) | def get_mobilenet_v2_config(model_name): function prepare_img (line 78) | def prepare_img(): function convert_movilevit_checkpoint (line 85) | def convert_movilevit_checkpoint(model_name, checkpoint_path, pytorch_du... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 122) | def resize( method preprocess (line 172) | def preprocess( method post_process_semantic_segmentation (line 313) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilenet_v2/modeling_mobilenet_v2.py function _build_tf_to_pytorch_map (line 55) | def _build_tf_to_pytorch_map(model, config, tf_weights=None): function load_tf_weights_in_mobilenet_v2 (line 167) | def load_tf_weights_in_mobilenet_v2(model, config, tf_checkpoint_path): function make_divisible (line 224) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... function apply_depth_multiplier (line 239) | def apply_depth_multiplier(config: MobileNetV2Config, channels: int) -> ... function apply_tf_padding (line 243) | def apply_tf_padding(features: torch.Tensor, conv_layer: nn.Conv2d) -> t... class MobileNetV2ConvLayer (line 278) | class MobileNetV2ConvLayer(nn.Module): method __init__ (line 279) | def __init__( method forward (line 336) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV2InvertedResidual (line 347) | class MobileNetV2InvertedResidual(nn.Module): method __init__ (line 348) | def __init__( method forward (line 384) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV2Stem (line 394) | class MobileNetV2Stem(nn.Module): method __init__ (line 395) | def __init__(self, config: MobileNetV2Config, in_channels: int, expand... method forward (line 432) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV2PreTrainedModel (line 441) | class MobileNetV2PreTrainedModel(PreTrainedModel): method _init_weights (line 454) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d]) -> None: class MobileNetV2Model (line 493) | class MobileNetV2Model(MobileNetV2PreTrainedModel): method __init__ (line 494) | def __init__(self, config: MobileNetV2Config, add_pooling_layer: bool ... method _prune_heads (line 554) | def _prune_heads(self, heads_to_prune): method forward (line 565) | def forward( class MobileNetV2ForImageClassification (line 613) | class MobileNetV2ForImageClassification(MobileNetV2PreTrainedModel): method __init__ (line 614) | def __init__(self, config: MobileNetV2Config) -> None: method forward (line 636) | def forward( class MobileNetV2DeepLabV3Plus (line 691) | class MobileNetV2DeepLabV3Plus(nn.Module): method __init__ (line 697) | def __init__(self, config: MobileNetV2Config) -> None: method forward (line 747) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV2ForSemanticSegmentation (line 772) | class MobileNetV2ForSemanticSegmentation(MobileNetV2PreTrainedModel): method __init__ (line 773) | def __init__(self, config: MobileNetV2Config) -> None: method forward (line 785) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilevit/configuration_mobilevit.py class MobileViTConfig (line 30) | class MobileViTConfig(PretrainedConfig): method __init__ (line 101) | def __init__( class MobileViTOnnxConfig (line 153) | class MobileViTOnnxConfig(OnnxConfig): method inputs (line 157) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 161) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 168) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilevit/convert_mlcvnets_to_pytorch.py function get_mobilevit_config (line 39) | def get_mobilevit_config(mobilevit_name): function rename_key (line 73) | def rename_key(name, base_model=False): function convert_state_dict (line 152) | def convert_state_dict(orig_state_dict, model, base_model=False): function prepare_img (line 188) | def prepare_img(): function convert_movilevit_checkpoint (line 195) | def convert_movilevit_checkpoint(mobilevit_name, checkpoint_path, pytorc... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/mobilevit/image_processing_mobilevit.py class MobileViTImageProcessor (line 54) | class MobileViTImageProcessor(BaseImageProcessor): method __init__ (line 88) | def __init__( method resize (line 116) | def resize( method flip_channel_order (line 165) | def flip_channel_order( method __call__ (line 184) | def __call__(self, images, segmentation_maps=None, **kwargs): method _preprocess (line 193) | def _preprocess( method _preprocess_image (line 220) | def _preprocess_image( method _preprocess_mask (line 262) | def _preprocess_mask( method preprocess (line 301) | def preprocess( method post_process_semantic_segmentation (line 441) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilevit/modeling_mobilevit.py function make_divisible (line 62) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... class MobileViTConvLayer (line 77) | class MobileViTConvLayer(nn.Module): method __init__ (line 78) | def __init__( method forward (line 132) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTInvertedResidual (line 141) | class MobileViTInvertedResidual(nn.Module): method __init__ (line 146) | def __init__( method forward (line 179) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTMobileNetLayer (line 189) | class MobileViTMobileNetLayer(nn.Module): method __init__ (line 190) | def __init__( method forward (line 206) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTSelfAttention (line 212) | class MobileViTSelfAttention(nn.Module): method __init__ (line 213) | def __init__(self, config: MobileViTConfig, hidden_size: int) -> None: method transpose_for_scores (line 232) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 237) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTSelfOutput (line 263) | class MobileViTSelfOutput(nn.Module): method __init__ (line 264) | def __init__(self, config: MobileViTConfig, hidden_size: int) -> None: method forward (line 269) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTAttention (line 275) | class MobileViTAttention(nn.Module): method __init__ (line 276) | def __init__(self, config: MobileViTConfig, hidden_size: int) -> None: method prune_heads (line 282) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 300) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTIntermediate (line 306) | class MobileViTIntermediate(nn.Module): method __init__ (line 307) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method forward (line 315) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTOutput (line 321) | class MobileViTOutput(nn.Module): method __init__ (line 322) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method forward (line 327) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MobileViTTransformerLayer (line 334) | class MobileViTTransformerLayer(nn.Module): method __init__ (line 335) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method forward (line 343) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTTransformer (line 353) | class MobileViTTransformer(nn.Module): method __init__ (line 354) | def __init__(self, config: MobileViTConfig, hidden_size: int, num_stag... method forward (line 366) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTLayer (line 372) | class MobileViTLayer(nn.Module): method __init__ (line 377) | def __init__( method unfolding (line 435) | def unfolding(self, features: torch.Tensor) -> Tuple[torch.Tensor, Dict]: method folding (line 486) | def folding(self, patches: torch.Tensor, info_dict: Dict) -> torch.Ten... method forward (line 515) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTEncoder (line 541) | class MobileViTEncoder(nn.Module): method __init__ (line 542) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 616) | def forward( class MobileViTPreTrainedModel (line 642) | class MobileViTPreTrainedModel(PreTrainedModel): method _init_weights (line 654) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class MobileViTModel (line 695) | class MobileViTModel(MobileViTPreTrainedModel): method __init__ (line 696) | def __init__(self, config: MobileViTConfig, expand_output: bool = True): method _prune_heads (line 722) | def _prune_heads(self, heads_to_prune): method forward (line 740) | def forward( class MobileViTForImageClassification (line 789) | class MobileViTForImageClassification(MobileViTPreTrainedModel): method __init__ (line 790) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 812) | def forward( class MobileViTASPPPooling (line 867) | class MobileViTASPPPooling(nn.Module): method __init__ (line 868) | def __init__(self, config: MobileViTConfig, in_channels: int, out_chan... method forward (line 883) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTASPP (line 891) | class MobileViTASPP(nn.Module): method __init__ (line 896) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 939) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTDeepLabV3 (line 950) | class MobileViTDeepLabV3(nn.Module): method __init__ (line 955) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 971) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTForSemanticSegmentation (line 984) | class MobileViTForSemanticSegmentation(MobileViTPreTrainedModel): method __init__ (line 985) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 997) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilevit/modeling_tf_mobilevit.py function make_divisible (line 64) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... class TFMobileViTConvLayer (line 79) | class TFMobileViTConvLayer(keras.layers.Layer): method __init__ (line 80) | def __init__( method call (line 134) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 143) | def build(self, input_shape=None): class TFMobileViTInvertedResidual (line 156) | class TFMobileViTInvertedResidual(keras.layers.Layer): method __init__ (line 161) | def __init__( method call (line 196) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 205) | def build(self, input_shape=None): class TFMobileViTMobileNetLayer (line 220) | class TFMobileViTMobileNetLayer(keras.layers.Layer): method __init__ (line 221) | def __init__( method call (line 244) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 249) | def build(self, input_shape=None): class TFMobileViTSelfAttention (line 259) | class TFMobileViTSelfAttention(keras.layers.Layer): method __init__ (line 260) | def __init__(self, config: MobileViTConfig, hidden_size: int, **kwargs... method transpose_for_scores (line 282) | def transpose_for_scores(self, x: tf.Tensor) -> tf.Tensor: method call (line 287) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 311) | def build(self, input_shape=None): class TFMobileViTSelfOutput (line 326) | class TFMobileViTSelfOutput(keras.layers.Layer): method __init__ (line 327) | def __init__(self, config: MobileViTConfig, hidden_size: int, **kwargs... method call (line 333) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 338) | def build(self, input_shape=None): class TFMobileViTAttention (line 347) | class TFMobileViTAttention(keras.layers.Layer): method __init__ (line 348) | def __init__(self, config: MobileViTConfig, hidden_size: int, **kwargs... method prune_heads (line 353) | def prune_heads(self, heads): method call (line 356) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 361) | def build(self, input_shape=None): class TFMobileViTIntermediate (line 373) | class TFMobileViTIntermediate(keras.layers.Layer): method __init__ (line 374) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method call (line 383) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 388) | def build(self, input_shape=None): class TFMobileViTOutput (line 397) | class TFMobileViTOutput(keras.layers.Layer): method __init__ (line 398) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method call (line 404) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 410) | def build(self, input_shape=None): class TFMobileViTTransformerLayer (line 419) | class TFMobileViTTransformerLayer(keras.layers.Layer): method __init__ (line 420) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method call (line 429) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 438) | def build(self, input_shape=None): class TFMobileViTTransformer (line 459) | class TFMobileViTTransformer(keras.layers.Layer): method __init__ (line 460) | def __init__(self, config: MobileViTConfig, hidden_size: int, num_stag... method call (line 473) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 478) | def build(self, input_shape=None): class TFMobileViTLayer (line 488) | class TFMobileViTLayer(keras.layers.Layer): method __init__ (line 493) | def __init__( method unfolding (line 558) | def unfolding(self, features: tf.Tensor) -> Tuple[tf.Tensor, Dict]: method folding (line 602) | def folding(self, patches: tf.Tensor, info_dict: Dict) -> tf.Tensor: method call (line 630) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 655) | def build(self, input_shape=None): class TFMobileViTEncoder (line 682) | class TFMobileViTEncoder(keras.layers.Layer): method __init__ (line 683) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method call (line 761) | def call( method build (line 781) | def build(self, input_shape=None): class TFMobileViTMainLayer (line 792) | class TFMobileViTMainLayer(keras.layers.Layer): method __init__ (line 795) | def __init__(self, config: MobileViTConfig, expand_output: bool = True... method _prune_heads (line 822) | def _prune_heads(self, heads_to_prune): method call (line 830) | def call( method build (line 891) | def build(self, input_shape=None): class TFMobileViTPreTrainedModel (line 909) | class TFMobileViTPreTrainedModel(TFPreTrainedModel): class TFMobileViTModel (line 981) | class TFMobileViTModel(TFMobileViTPreTrainedModel): method __init__ (line 982) | def __init__(self, config: MobileViTConfig, expand_output: bool = True... method call (line 998) | def call( method build (line 1008) | def build(self, input_shape=None): class TFMobileViTForImageClassification (line 1024) | class TFMobileViTForImageClassification(TFMobileViTPreTrainedModel, TFSe... method __init__ (line 1025) | def __init__(self, config: MobileViTConfig, *inputs, **kwargs) -> None: method call (line 1046) | def call( method build (line 1077) | def build(self, input_shape=None): class TFMobileViTASPPPooling (line 1090) | class TFMobileViTASPPPooling(keras.layers.Layer): method __init__ (line 1091) | def __init__(self, config: MobileViTConfig, in_channels: int, out_chan... method call (line 1107) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 1114) | def build(self, input_shape=None): class TFMobileViTASPP (line 1126) | class TFMobileViTASPP(keras.layers.Layer): method __init__ (line 1131) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method call (line 1183) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 1196) | def build(self, input_shape=None): class TFMobileViTDeepLabV3 (line 1209) | class TFMobileViTDeepLabV3(keras.layers.Layer): method __init__ (line 1214) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method call (line 1231) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 1237) | def build(self, input_shape=None): class TFMobileViTForSemanticSegmentation (line 1255) | class TFMobileViTForSemanticSegmentation(TFMobileViTPreTrainedModel): method __init__ (line 1256) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method hf_compute_loss (line 1263) | def hf_compute_loss(self, logits, labels): method call (line 1286) | def call( method build (line 1361) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilevitv2/configuration_mobilevitv2.py class MobileViTV2Config (line 30) | class MobileViTV2Config(PretrainedConfig): method __init__ (line 99) | def __init__( class MobileViTV2OnnxConfig (line 149) | class MobileViTV2OnnxConfig(OnnxConfig): method inputs (line 153) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 157) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 164) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilevitv2/convert_mlcvnets_to_pytorch.py function load_orig_config_file (line 41) | def load_orig_config_file(orig_cfg_file): function get_mobilevitv2_config (line 67) | def get_mobilevitv2_config(task_name, orig_cfg_file): function rename_key (line 125) | def rename_key(dct, old, new): function create_rename_keys (line 130) | def create_rename_keys(state_dict, base_model=False): function remove_unused_keys (line 214) | def remove_unused_keys(state_dict): function prepare_img (line 225) | def prepare_img(): function convert_mobilevitv2_checkpoint (line 233) | def convert_mobilevitv2_checkpoint(task_name, checkpoint_path, orig_conf... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mobilevitv2/modeling_mobilevitv2.py function make_divisible (line 60) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... function clip (line 75) | def clip(value: float, min_val: float = float("-inf"), max_val: float = ... class MobileViTV2ConvLayer (line 80) | class MobileViTV2ConvLayer(nn.Module): method __init__ (line 81) | def __init__( method forward (line 135) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2InvertedResidual (line 145) | class MobileViTV2InvertedResidual(nn.Module): method __init__ (line 150) | def __init__( method forward (line 183) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2MobileNetLayer (line 194) | class MobileViTV2MobileNetLayer(nn.Module): method __init__ (line 195) | def __init__( method forward (line 211) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2LinearSelfAttention (line 217) | class MobileViTV2LinearSelfAttention(nn.Module): method __init__ (line 229) | def __init__(self, config: MobileViTV2Config, embed_dim: int) -> None: method forward (line 254) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2FFN (line 280) | class MobileViTV2FFN(nn.Module): method __init__ (line 281) | def __init__( method forward (line 313) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2TransformerLayer (line 321) | class MobileViTV2TransformerLayer(nn.Module): method __init__ (line 322) | def __init__( method forward (line 336) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2Transformer (line 348) | class MobileViTV2Transformer(nn.Module): method __init__ (line 349) | def __init__(self, config: MobileViTV2Config, n_layers: int, d_model: ... method forward (line 366) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2Layer (line 372) | class MobileViTV2Layer(nn.Module): method __init__ (line 377) | def __init__( method unfolding (line 438) | def unfolding(self, feature_map: torch.Tensor) -> Tuple[torch.Tensor, ... method folding (line 449) | def folding(self, patches: torch.Tensor, output_size: Tuple[int, int])... method forward (line 462) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2Encoder (line 486) | class MobileViTV2Encoder(nn.Module): method __init__ (line 487) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 568) | def forward( class MobileViTV2PreTrainedModel (line 595) | class MobileViTV2PreTrainedModel(PreTrainedModel): method _init_weights (line 607) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class MobileViTV2Model (line 648) | class MobileViTV2Model(MobileViTV2PreTrainedModel): method __init__ (line 649) | def __init__(self, config: MobileViTV2Config, expand_output: bool = Tr... method _prune_heads (line 672) | def _prune_heads(self, heads_to_prune): method forward (line 690) | def forward( class MobileViTV2ForImageClassification (line 739) | class MobileViTV2ForImageClassification(MobileViTV2PreTrainedModel): method __init__ (line 740) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 764) | def forward( class MobileViTV2ASPPPooling (line 820) | class MobileViTV2ASPPPooling(nn.Module): method __init__ (line 821) | def __init__(self, config: MobileViTV2Config, in_channels: int, out_ch... method forward (line 836) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2ASPP (line 844) | class MobileViTV2ASPP(nn.Module): method __init__ (line 849) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 893) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2DeepLabV3 (line 905) | class MobileViTV2DeepLabV3(nn.Module): method __init__ (line 910) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 926) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2ForSemanticSegmentation (line 939) | class MobileViTV2ForSemanticSegmentation(MobileViTV2PreTrainedModel): method __init__ (line 940) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 952) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mpnet/configuration_mpnet.py class MPNetConfig (line 25) | class MPNetConfig(PretrainedConfig): method __init__ (line 81) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mpnet/modeling_mpnet.py class MPNetPreTrainedModel (line 47) | class MPNetPreTrainedModel(PreTrainedModel): method _init_weights (line 51) | def _init_weights(self, module): class MPNetEmbeddings (line 68) | class MPNetEmbeddings(nn.Module): method __init__ (line 69) | def __init__(self, config): method forward (line 83) | def forward(self, input_ids=None, position_ids=None, inputs_embeds=Non... method create_position_ids_from_inputs_embeds (line 109) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class MPNetSelfAttention (line 127) | class MPNetSelfAttention(nn.Module): method __init__ (line 128) | def __init__(self, config): method transpose_for_scores (line 147) | def transpose_for_scores(self, x): method forward (line 152) | def forward( class MPNetAttention (line 200) | class MPNetAttention(nn.Module): method __init__ (line 201) | def __init__(self, config): method prune_heads (line 209) | def prune_heads(self, heads): method forward (line 225) | def forward( class MPNetIntermediate (line 247) | class MPNetIntermediate(nn.Module): method __init__ (line 248) | def __init__(self, config): method forward (line 256) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MPNetOutput (line 263) | class MPNetOutput(nn.Module): method __init__ (line 264) | def __init__(self, config): method forward (line 270) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MPNetLayer (line 277) | class MPNetLayer(nn.Module): method __init__ (line 278) | def __init__(self, config): method forward (line 284) | def forward( class MPNetEncoder (line 309) | class MPNetEncoder(nn.Module): method __init__ (line 310) | def __init__(self, config): method forward (line 317) | def forward( method compute_position_bias (line 359) | def compute_position_bias(self, x, position_ids=None, num_buckets=32): method relative_position_bucket (line 378) | def relative_position_bucket(relative_position, num_buckets=32, max_di... class MPNetPooler (line 399) | class MPNetPooler(nn.Module): method __init__ (line 400) | def __init__(self, config): method forward (line 405) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MPNetModel (line 476) | class MPNetModel(MPNetPreTrainedModel): method __init__ (line 477) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 488) | def get_input_embeddings(self): method set_input_embeddings (line 491) | def set_input_embeddings(self, value): method _prune_heads (line 494) | def _prune_heads(self, heads_to_prune): method forward (line 508) | def forward( class MPNetForMaskedLM (line 566) | class MPNetForMaskedLM(MPNetPreTrainedModel): method __init__ (line 569) | def __init__(self, config): method get_output_embeddings (line 578) | def get_output_embeddings(self): method set_output_embeddings (line 581) | def set_output_embeddings(self, new_embeddings): method forward (line 591) | def forward( class MPNetLMHead (line 642) | class MPNetLMHead(nn.Module): method __init__ (line 645) | def __init__(self, config): method _tie_weights (line 656) | def _tie_weights(self): method forward (line 659) | def forward(self, features, **kwargs): class MPNetForSequenceClassification (line 677) | class MPNetForSequenceClassification(MPNetPreTrainedModel): method __init__ (line 678) | def __init__(self, config): method forward (line 694) | def forward( class MPNetForMultipleChoice (line 769) | class MPNetForMultipleChoice(MPNetPreTrainedModel): method __init__ (line 770) | def __init__(self, config): method forward (line 786) | def forward( class MPNetForTokenClassification (line 857) | class MPNetForTokenClassification(MPNetPreTrainedModel): method __init__ (line 858) | def __init__(self, config): method forward (line 875) | def forward( class MPNetClassificationHead (line 927) | class MPNetClassificationHead(nn.Module): method __init__ (line 930) | def __init__(self, config): method forward (line 936) | def forward(self, features, **kwargs): class MPNetForQuestionAnswering (line 953) | class MPNetForQuestionAnswering(MPNetPreTrainedModel): method __init__ (line 954) | def __init__(self, config): method forward (line 970) | def forward( function create_position_ids_from_input_ids (line 1044) | def create_position_ids_from_input_ids(input_ids, padding_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mpnet/modeling_tf_mpnet.py class TFMPNetPreTrainedModel (line 66) | class TFMPNetPreTrainedModel(TFPreTrainedModel): class TFMPNetEmbeddings (line 76) | class TFMPNetEmbeddings(keras.layers.Layer): method __init__ (line 79) | def __init__(self, config, **kwargs): method build (line 90) | def build(self, input_shape=None): method create_position_ids_from_input_ids (line 112) | def create_position_ids_from_input_ids(self, input_ids): method call (line 126) | def call(self, input_ids=None, position_ids=None, inputs_embeds=None, ... class TFMPNetPooler (line 159) | class TFMPNetPooler(keras.layers.Layer): method __init__ (line 160) | def __init__(self, config: MPNetConfig, **kwargs): method call (line 171) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 179) | def build(self, input_shape=None): class TFMPNetSelfAttention (line 188) | class TFMPNetSelfAttention(keras.layers.Layer): method __init__ (line 189) | def __init__(self, config, **kwargs): method transpose_for_scores (line 218) | def transpose_for_scores(self, x, batch_size): method call (line 224) | def call(self, hidden_states, attention_mask, head_mask, output_attent... method build (line 261) | def build(self, input_shape=None): class TFMPNetAttention (line 279) | class TFMPNetAttention(keras.layers.Layer): method __init__ (line 280) | def __init__(self, config, **kwargs): method prune_heads (line 288) | def prune_heads(self, heads): method call (line 291) | def call(self, input_tensor, attention_mask, head_mask, output_attenti... method build (line 299) | def build(self, input_shape=None): class TFMPNetIntermediate (line 312) | class TFMPNetIntermediate(keras.layers.Layer): method __init__ (line 313) | def __init__(self, config: MPNetConfig, **kwargs): method call (line 326) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 332) | def build(self, input_shape=None): class TFMPNetOutput (line 342) | class TFMPNetOutput(keras.layers.Layer): method __init__ (line 343) | def __init__(self, config: MPNetConfig, **kwargs): method call (line 353) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 360) | def build(self, input_shape=None): class TFMPNetLayer (line 372) | class TFMPNetLayer(keras.layers.Layer): method __init__ (line 373) | def __init__(self, config, **kwargs): method call (line 380) | def call(self, hidden_states, attention_mask, head_mask, output_attent... method build (line 393) | def build(self, input_shape=None): class TFMPNetEncoder (line 408) | class TFMPNetEncoder(keras.layers.Layer): method __init__ (line 409) | def __init__(self, config, **kwargs): method build (line 422) | def build(self, input_shape=None): method call (line 437) | def call( method _relative_position_bucket (line 480) | def _relative_position_bucket(relative_position, num_buckets=32, max_d... method compute_position_bias (line 501) | def compute_position_bias(self, x, position_ids=None): class TFMPNetMainLayer (line 525) | class TFMPNetMainLayer(keras.layers.Layer): method __init__ (line 528) | def __init__(self, config, **kwargs): method get_input_embeddings (line 543) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 547) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 552) | def _prune_heads(self, heads_to_prune): method call (line 560) | def call( method build (line 644) | def build(self, input_shape=None): class TFMPNetModel (line 753) | class TFMPNetModel(TFMPNetPreTrainedModel): method __init__ (line 754) | def __init__(self, config, *inputs, **kwargs): method call (line 765) | def call( method build (line 790) | def build(self, input_shape=None): class TFMPNetLMHead (line 799) | class TFMPNetLMHead(keras.layers.Layer): method __init__ (line 802) | def __init__(self, config, input_embeddings, **kwargs): method build (line 817) | def build(self, input_shape=None): method get_output_embeddings (line 830) | def get_output_embeddings(self): method set_output_embeddings (line 833) | def set_output_embeddings(self, value): method get_bias (line 837) | def get_bias(self): method set_bias (line 840) | def set_bias(self, value): method call (line 844) | def call(self, hidden_states): class TFMPNetForMaskedLM (line 860) | class TFMPNetForMaskedLM(TFMPNetPreTrainedModel, TFMaskedLanguageModelin... method __init__ (line 863) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 869) | def get_lm_head(self): method get_prefix_bias_name (line 872) | def get_prefix_bias_name(self): method call (line 883) | def call( method build (line 929) | def build(self, input_shape=None): class TFMPNetClassificationHead (line 941) | class TFMPNetClassificationHead(keras.layers.Layer): method __init__ (line 944) | def __init__(self, config, **kwargs): method call (line 958) | def call(self, features, training=False): method build (line 966) | def build(self, input_shape=None): class TFMPNetForSequenceClassification (line 985) | class TFMPNetForSequenceClassification(TFMPNetPreTrainedModel, TFSequenc... method __init__ (line 988) | def __init__(self, config, *inputs, **kwargs): method call (line 1002) | def call( method build (line 1049) | def build(self, input_shape=None): class TFMPNetForMultipleChoice (line 1068) | class TFMPNetForMultipleChoice(TFMPNetPreTrainedModel, TFMultipleChoiceL... method __init__ (line 1069) | def __init__(self, config, *inputs, **kwargs): method call (line 1086) | def call( method build (line 1147) | def build(self, input_shape=None): class TFMPNetForTokenClassification (line 1166) | class TFMPNetForTokenClassification(TFMPNetPreTrainedModel, TFTokenClass... method __init__ (line 1169) | def __init__(self, config, *inputs, **kwargs): method call (line 1187) | def call( method build (line 1233) | def build(self, input_shape=None): class TFMPNetForQuestionAnswering (line 1252) | class TFMPNetForQuestionAnswering(TFMPNetPreTrainedModel, TFQuestionAnsw... method __init__ (line 1255) | def __init__(self, config, *inputs, **kwargs): method call (line 1272) | def call( method build (line 1332) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mpnet/tokenization_mpnet.py function load_vocab (line 32) | def load_vocab(vocab_file): function whitespace_tokenize (line 43) | def whitespace_tokenize(text): class MPNetTokenizer (line 52) | class MPNetTokenizer(PreTrainedTokenizer): method __init__ (line 116) | def __init__( method do_lower_case (line 177) | def do_lower_case(self): method vocab_size (line 181) | def vocab_size(self): method get_vocab (line 184) | def get_vocab(self): method _tokenize (line 190) | def _tokenize(self, text): method _convert_token_to_id (line 203) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 207) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 211) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 216) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 241) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 268) | 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: method __init__ (line 336) | def __init__( method tokenize (line 352) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 390) | def _run_strip_accents(self, text): method _run_split_on_punc (line 401) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 423) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 436) | def _is_chinese_char(self, cp): method _clean_text (line 460) | def _clean_text(self, text): class WordpieceTokenizer (line 475) | class WordpieceTokenizer: method __init__ (line 478) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 483) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mpnet/tokenization_mpnet_fast.py class MPNetTokenizerFast (line 34) | class MPNetTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 93) | def __init__( method mask_token (line 148) | def mask_token(self) -> str: method mask_token (line 163) | def mask_token(self, value): 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 181) | def create_token_type_ids_from_sequences( method save_vocabulary (line 204) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mpt/configuration_mpt.py class MptAttentionConfig (line 30) | class MptAttentionConfig(PretrainedConfig): method __init__ (line 69) | def __init__( method from_pretrained (line 101) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs) -> "... class MptConfig (line 118) | class MptConfig(PretrainedConfig): method __init__ (line 197) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mpt/modeling_mpt.py function build_mpt_alibi_tensor (line 46) | def build_mpt_alibi_tensor(num_heads, sequence_length, alibi_bias_max=8,... class MptAttention (line 69) | class MptAttention(nn.Module): method __init__ (line 74) | def __init__(self, config: MptConfig): method forward (line 89) | def forward( class MptMLP (line 145) | class MptMLP(nn.Module): method __init__ (line 146) | def __init__(self, config: MptConfig): method forward (line 155) | def forward(self, hidden_states: torch.Tensor, residual: torch.Tensor)... class MptBlock (line 166) | class MptBlock(nn.Module): method __init__ (line 167) | def __init__(self, config: MptConfig): method forward (line 187) | def forward( class MptPreTrainedModel (line 230) | class MptPreTrainedModel(PreTrainedModel): method __init__ (line 237) | def __init__(self, *inputs, **kwargs): method _init_weights (line 240) | def _init_weights(self, module: nn.Module): method _convert_to_mpt_cache (line 258) | def _convert_to_mpt_cache( class MptModel (line 346) | class MptModel(MptPreTrainedModel): method __init__ (line 347) | def __init__(self, config: MptConfig): method get_input_embeddings (line 369) | def get_input_embeddings(self): method build_mpt_alibi_tensor (line 372) | def build_mpt_alibi_tensor(self, num_heads, sequence_length, alibi_bia... method set_input_embeddings (line 375) | def set_input_embeddings(self, new_embeddings: torch.Tensor): method forward (line 384) | def forward( class MptForCausalLM (line 503) | class MptForCausalLM(MptPreTrainedModel): method __init__ (line 506) | def __init__(self, config: MptConfig): method get_output_embeddings (line 514) | def get_output_embeddings(self): method set_output_embeddings (line 517) | def set_output_embeddings(self, new_embeddings: torch.Tensor): method prepare_inputs_for_generation (line 520) | def prepare_inputs_for_generation( method forward (line 563) | def forward( method _reorder_cache (line 623) | def _reorder_cache( class MptForSequenceClassification (line 662) | class MptForSequenceClassification(MptPreTrainedModel): method __init__ (line 663) | def __init__(self, config: MptConfig): method forward (line 678) | def forward( class MptForTokenClassification (line 778) | class MptForTokenClassification(MptPreTrainedModel): method __init__ (line 779) | def __init__(self, config: MptConfig): method forward (line 802) | def forward( class MptForQuestionAnswering (line 867) | class MptForQuestionAnswering(MptPreTrainedModel): method __init__ (line 868) | def __init__(self, config): method forward (line 877) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mra/configuration_mra.py class MraConfig (line 24) | class MraConfig(PretrainedConfig): method __init__ (line 92) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mra/convert_mra_pytorch_to_pytorch.py function rename_key (line 24) | def rename_key(orig_key): function convert_checkpoint_helper (line 64) | def convert_checkpoint_helper(max_position_embeddings, orig_state_dict): function convert_mra_checkpoint (line 79) | def convert_mra_checkpoint(checkpoint_path, mra_config_file, pytorch_dum... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mra/modeling_mra.py function load_cuda_kernels (line 59) | def load_cuda_kernels(): function sparse_max (line 71) | def sparse_max(sparse_qk_prod, indices, query_num_block, key_num_block): function sparse_mask (line 99) | def sparse_mask(mask, indices, block_size=32): function mm_to_sparse (line 122) | def mm_to_sparse(dense_query, dense_key, indices, block_size=32): function sparse_dense_mm (line 162) | def sparse_dense_mm(sparse_query, indices, dense_key, query_num_block, b... function transpose_indices (line 202) | def transpose_indices(indices, dim_1_block, dim_2_block): class MraSampledDenseMatMul (line 206) | class MraSampledDenseMatMul(torch.autograd.Function): method forward (line 208) | def forward(ctx, dense_query, dense_key, indices, block_size): method backward (line 215) | def backward(ctx, grad): method operator_call (line 226) | def operator_call(dense_query, dense_key, indices, block_size=32): class MraSparseDenseMatMul (line 230) | class MraSparseDenseMatMul(torch.autograd.Function): method forward (line 232) | def forward(ctx, sparse_query, indices, dense_key, query_num_block): method backward (line 239) | def backward(ctx, grad): method operator_call (line 249) | def operator_call(sparse_query, indices, dense_key, query_num_block): class MraReduceSum (line 253) | class MraReduceSum: method operator_call (line 255) | def operator_call(sparse_query, indices, query_num_block, key_num_block): function get_low_resolution_logit (line 282) | def get_low_resolution_logit(query, key, block_size, mask=None, value=No... function get_block_idxes (line 322) | def get_block_idxes( function mra2_attention (line 360) | def mra2_attention( class MraEmbeddings (line 475) | class MraEmbeddings(nn.Module): method __init__ (line 478) | def __init__(self, config): method forward (line 498) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class MraSelfAttention (line 533) | class MraSelfAttention(nn.Module): method __init__ (line 534) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 569) | def transpose_for_scores(self, layer): method forward (line 574) | def forward(self, hidden_states, attention_mask=None): class MraSelfOutput (line 626) | class MraSelfOutput(nn.Module): method __init__ (line 627) | def __init__(self, config): method forward (line 633) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MraAttention (line 640) | class MraAttention(nn.Module): method __init__ (line 641) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 647) | def prune_heads(self, heads): method forward (line 665) | def forward(self, hidden_states, attention_mask=None): class MraIntermediate (line 673) | class MraIntermediate(nn.Module): method __init__ (line 674) | def __init__(self, config): method forward (line 682) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MraOutput (line 689) | class MraOutput(nn.Module): method __init__ (line 690) | def __init__(self, config): method forward (line 696) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MraLayer (line 703) | class MraLayer(nn.Module): method __init__ (line 704) | def __init__(self, config): method forward (line 713) | def forward(self, hidden_states, attention_mask=None): method feed_forward_chunk (line 726) | def feed_forward_chunk(self, attention_output): class MraEncoder (line 732) | class MraEncoder(nn.Module): method __init__ (line 733) | def __init__(self, config): method forward (line 739) | def forward( class MraPredictionHeadTransform (line 776) | class MraPredictionHeadTransform(nn.Module): method __init__ (line 777) | def __init__(self, config): method forward (line 786) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MraLMPredictionHead (line 794) | class MraLMPredictionHead(nn.Module): method __init__ (line 795) | def __init__(self, config): method _tie_weights (line 808) | def _tie_weights(self): method forward (line 811) | def forward(self, hidden_states): class MraOnlyMLMHead (line 818) | class MraOnlyMLMHead(nn.Module): method __init__ (line 819) | def __init__(self, config): method forward (line 823) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class MraPreTrainedModel (line 829) | class MraPreTrainedModel(PreTrainedModel): method _init_weights (line 839) | def _init_weights(self, module): class MraModel (line 918) | class MraModel(MraPreTrainedModel): method __init__ (line 919) | def __init__(self, config): method get_input_embeddings (line 929) | def get_input_embeddings(self): method set_input_embeddings (line 932) | def set_input_embeddings(self, value): method _prune_heads (line 935) | def _prune_heads(self, heads_to_prune): method forward (line 949) | def forward( class MraForMaskedLM (line 1027) | class MraForMaskedLM(MraPreTrainedModel): method __init__ (line 1030) | def __init__(self, config): method get_output_embeddings (line 1039) | def get_output_embeddings(self): method set_output_embeddings (line 1042) | def set_output_embeddings(self, new_embeddings): method forward (line 1052) | def forward( class MraClassificationHead (line 1104) | class MraClassificationHead(nn.Module): method __init__ (line 1107) | def __init__(self, config): method forward (line 1115) | def forward(self, features, **kwargs): class MraForSequenceClassification (line 1130) | class MraForSequenceClassification(MraPreTrainedModel): method __init__ (line 1131) | def __init__(self, config): method forward (line 1146) | def forward( class MraForMultipleChoice (line 1219) | class MraForMultipleChoice(MraPreTrainedModel): method __init__ (line 1220) | def __init__(self, config): method forward (line 1236) | def forward( class MraForTokenClassification (line 1308) | class MraForTokenClassification(MraPreTrainedModel): method __init__ (line 1309) | def __init__(self, config): method forward (line 1326) | def forward( class MraForQuestionAnswering (line 1391) | class MraForQuestionAnswering(MraPreTrainedModel): method __init__ (line 1392) | def __init__(self, config): method forward (line 1410) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mt5/configuration_mt5.py class MT5Config (line 27) | class MT5Config(PretrainedConfig): method __init__ (line 77) | def __init__( class MT5OnnxConfig (line 146) | class MT5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 149) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 169) | def default_onnx_opset(self) -> int: method atol_for_validation (line 173) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/mt5/modeling_flax_mt5.py function shift_tokens_right (line 30) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... class FlaxMT5Model (line 42) | class FlaxMT5Model(FlaxT5Model): class FlaxMT5EncoderModel (line 69) | class FlaxMT5EncoderModel(FlaxT5EncoderModel): class FlaxMT5ForConditionalGeneration (line 96) | class FlaxMT5ForConditionalGeneration(FlaxT5ForConditionalGeneration): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mt5/modeling_mt5.py class MT5LayerNorm (line 117) | class MT5LayerNorm(nn.Module): method __init__ (line 118) | def __init__(self, hidden_size, eps=1e-6): method forward (line 126) | def forward(self, hidden_states): class MT5DenseActDense (line 143) | class MT5DenseActDense(nn.Module): method __init__ (line 144) | def __init__(self, config: MT5Config): method forward (line 151) | def forward(self, hidden_states): class MT5DenseGatedActDense (line 166) | class MT5DenseGatedActDense(nn.Module): method __init__ (line 167) | def __init__(self, config: MT5Config): method forward (line 175) | def forward(self, hidden_states): class MT5LayerFF (line 196) | class MT5LayerFF(nn.Module): method __init__ (line 197) | def __init__(self, config: MT5Config): method forward (line 207) | def forward(self, hidden_states): class MT5Attention (line 215) | class MT5Attention(nn.Module): method __init__ (line 216) | def __init__(self, config: MT5Config, has_relative_attention_bias=False): method prune_heads (line 239) | def prune_heads(self, heads): method _relative_position_bucket (line 256) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 303) | def compute_bias(self, query_length, key_length, device=None): method forward (line 320) | def forward( class MT5LayerSelfAttention (line 451) | class MT5LayerSelfAttention(nn.Module): method __init__ (line 452) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 458) | def forward( class MT5LayerCrossAttention (line 484) | class MT5LayerCrossAttention(nn.Module): method __init__ (line 485) | def __init__(self, config): method forward (line 491) | def forward( class MT5Block (line 521) | class MT5Block(nn.Module): method __init__ (line 522) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 532) | def forward( function load_tf_weights_in_mt5 (line 645) | def load_tf_weights_in_mt5(model, config, tf_checkpoint_path): class MT5ClassificationHead (line 752) | class MT5ClassificationHead(nn.Module): method __init__ (line 755) | def __init__(self, config: MT5Config): method forward (line 761) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MT5PreTrainedModel (line 771) | class MT5PreTrainedModel(PreTrainedModel): method dummy_inputs (line 786) | def dummy_inputs(self): method _init_weights (line 796) | def _init_weights(self, module): method _shift_right (line 857) | def _shift_right(self, input_ids): class MT5Stack (line 886) | class MT5Stack(MT5PreTrainedModel): method __init__ (line 887) | def __init__(self, config, embed_tokens=None): method parallelize (line 907) | def parallelize(self, device_map=None): method deparallelize (line 935) | def deparallelize(self): method get_input_embeddings (line 950) | def get_input_embeddings(self): method set_input_embeddings (line 953) | def set_input_embeddings(self, new_embeddings): method forward (line 956) | def forward( class MT5Model (line 1327) | class MT5Model(MT5PreTrainedModel): method __init__ (line 1351) | def __init__(self, config: MT5Config): method parallelize (line 1376) | def parallelize(self, device_map=None): method deparallelize (line 1396) | def deparallelize(self): method get_input_embeddings (line 1410) | def get_input_embeddings(self): method set_input_embeddings (line 1414) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1420) | def get_encoder(self): method get_decoder (line 1424) | def get_decoder(self): method _prune_heads (line 1428) | def _prune_heads(self, heads_to_prune): method forward (line 1439) | def forward( class MT5ForConditionalGeneration (line 1553) | class MT5ForConditionalGeneration(MT5PreTrainedModel): method __init__ (line 1576) | def __init__(self, config: MT5Config): method parallelize (line 1605) | def parallelize(self, device_map=None): method deparallelize (line 1626) | def deparallelize(self): method get_input_embeddings (line 1641) | def get_input_embeddings(self): method set_input_embeddings (line 1645) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1651) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1655) | def get_output_embeddings(self): method get_encoder (line 1659) | def get_encoder(self): method get_decoder (line 1663) | def get_decoder(self): method forward (line 1669) | def forward( method prepare_inputs_for_generation (line 1823) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1862) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1866) | def _reorder_cache(self, past_key_values, beam_idx): class MT5EncoderModel (line 1901) | class MT5EncoderModel(MT5PreTrainedModel): method __init__ (line 1921) | def __init__(self, config: MT5Config): method parallelize (line 1939) | def parallelize(self, device_map=None): method deparallelize (line 1958) | def deparallelize(self): method get_input_embeddings (line 1970) | def get_input_embeddings(self): method set_input_embeddings (line 1974) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1979) | def get_encoder(self): method _prune_heads (line 1983) | def _prune_heads(self, heads_to_prune): method forward (line 1994) | def forward( class MT5ForSequenceClassification (line 2042) | class MT5ForSequenceClassification(MT5PreTrainedModel): method __init__ (line 2047) | def __init__(self, config: MT5Config): method forward (line 2060) | def forward( class MT5ForTokenClassification (line 2177) | class MT5ForTokenClassification(MT5PreTrainedModel): method __init__ (line 2181) | def __init__(self, config: MT5Config): method forward (line 2195) | def forward( class MT5ForQuestionAnswering (line 2251) | class MT5ForQuestionAnswering(MT5PreTrainedModel): method __init__ (line 2256) | def __init__(self, config: MT5Config): method get_input_embeddings (line 2283) | def get_input_embeddings(self): method set_input_embeddings (line 2287) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 2293) | def get_encoder(self): method get_decoder (line 2297) | def get_decoder(self): method forward (line 2303) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mt5/modeling_tf_mt5.py class TFMT5Model (line 27) | class TFMT5Model(TFT5Model): class TFMT5ForConditionalGeneration (line 52) | class TFMT5ForConditionalGeneration(TFT5ForConditionalGeneration): class TFMT5EncoderModel (line 76) | class TFMT5EncoderModel(TFT5EncoderModel): FILE: mplsandbox_for_rl/transformers/src/transformers/models/musicgen/configuration_musicgen.py class MusicgenDecoderConfig (line 25) | class MusicgenDecoderConfig(PretrainedConfig): method __init__ (line 81) | def __init__( class MusicgenConfig (line 134) | class MusicgenConfig(PretrainedConfig): method __init__ (line 194) | def __init__(self, **kwargs): method from_sub_models_config (line 213) | def from_sub_models_config( method sampling_rate (line 237) | def sampling_rate(self): method _attn_implementation (line 241) | def _attn_implementation(self): method _attn_implementation (line 253) | def _attn_implementation(self, value): FILE: mplsandbox_for_rl/transformers/src/transformers/models/musicgen/convert_musicgen_transformers.py function rename_keys (line 44) | def rename_keys(name): function rename_state_dict (line 70) | def rename_state_dict(state_dict: OrderedDict, hidden_size: int) -> Tupl... function decoder_config_from_checkpoint (line 91) | def decoder_config_from_checkpoint(checkpoint: str) -> MusicgenDecoderCo... function convert_musicgen_checkpoint (line 131) | def convert_musicgen_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/musicgen/modeling_musicgen.py class MusicgenUnconditionalInput (line 72) | class MusicgenUnconditionalInput(ModelOutput): function shift_tokens_right (line 90) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class MusicgenSinusoidalPositionalEmbedding (line 110) | class MusicgenSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 113) | def __init__(self, num_positions: int, embedding_dim: int): method make_weights (line 118) | def make_weights(self, num_embeddings: int, embedding_dim: int): method get_embedding (line 129) | def get_embedding(num_embeddings: int, embedding_dim: int): method forward (line 145) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class MusicgenAttention (line 156) | class MusicgenAttention(nn.Module): method __init__ (line 159) | def __init__( method _shape (line 190) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 193) | def forward( class MusicgenFlashAttention2 (line 315) | class MusicgenFlashAttention2(MusicgenAttention): method __init__ (line 323) | def __init__(self, *args, **kwargs): method _reshape (line 331) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 334) | def forward( class MusicgenSdpaAttention (line 442) | class MusicgenSdpaAttention(MusicgenAttention): method forward (line 443) | def forward( class MusicgenDecoderLayer (line 572) | class MusicgenDecoderLayer(nn.Module): method __init__ (line 573) | def __init__(self, config: MusicgenDecoderConfig): method forward (line 605) | def forward( class MusicgenPreTrainedModel (line 695) | class MusicgenPreTrainedModel(PreTrainedModel): method _init_weights (line 708) | def _init_weights(self, module): class MusicgenDecoder (line 920) | class MusicgenDecoder(MusicgenPreTrainedModel): method __init__ (line 925) | def __init__(self, config: MusicgenDecoderConfig): method get_input_embeddings (line 952) | def get_input_embeddings(self): method set_input_embeddings (line 955) | def set_input_embeddings(self, value): method forward (line 959) | def forward( class MusicgenModel (line 1138) | class MusicgenModel(MusicgenPreTrainedModel): method __init__ (line 1139) | def __init__(self, config: MusicgenDecoderConfig): method get_input_embeddings (line 1145) | def get_input_embeddings(self): method set_input_embeddings (line 1148) | def set_input_embeddings(self, value): method get_decoder (line 1151) | def get_decoder(self): method forward (line 1155) | def forward( class MusicgenForCausalLM (line 1209) | class MusicgenForCausalLM(MusicgenPreTrainedModel): method __init__ (line 1210) | def __init__(self, config: MusicgenDecoderConfig): method get_input_embeddings (line 1223) | def get_input_embeddings(self): method set_input_embeddings (line 1226) | def set_input_embeddings(self, value): method get_output_embeddings (line 1229) | def get_output_embeddings(self): method set_output_embeddings (line 1232) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1235) | def set_decoder(self, decoder): method get_decoder (line 1238) | def get_decoder(self): method forward (line 1243) | def forward( method prepare_inputs_for_generation (line 1329) | def prepare_inputs_for_generation( method build_delay_pattern_mask (line 1374) | def build_delay_pattern_mask(self, input_ids: torch.LongTensor, pad_to... method apply_delay_pattern_mask (line 1448) | def apply_delay_pattern_mask(input_ids, decoder_pad_token_mask): method generate (line 1457) | def generate( class MusicgenForConditionalGeneration (line 1661) | class MusicgenForConditionalGeneration(PreTrainedModel): method __init__ (line 1669) | def __init__( method tie_weights (line 1759) | def tie_weights(self): method get_audio_encoder (line 1775) | def get_audio_encoder(self): method get_text_encoder (line 1778) | def get_text_encoder(self): method get_encoder (line 1781) | def get_encoder(self): method get_decoder (line 1785) | def get_decoder(self): method get_input_embeddings (line 1788) | def get_input_embeddings(self): method get_output_embeddings (line 1791) | def get_output_embeddings(self): method set_output_embeddings (line 1794) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 1798) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_sub_models_pretrained (line 1819) | def from_sub_models_pretrained( method forward (line 2017) | def forward( method prepare_inputs_for_generation (line 2162) | def prepare_inputs_for_generation( method _prepare_decoder_input_ids_for_generation (line 2219) | def _prepare_decoder_input_ids_for_generation( method _prepare_text_encoder_kwargs_for_generation (line 2266) | def _prepare_text_encoder_kwargs_for_generation( method _prepare_audio_encoder_kwargs_for_generation (line 2315) | def _prepare_audio_encoder_kwargs_for_generation( method prepare_decoder_input_ids_from_labels (line 2391) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method resize_token_embeddings (line 2394) | def resize_token_embeddings(self, *args, **kwargs): method freeze_audio_encoder (line 2401) | def freeze_audio_encoder(self): method freeze_text_encoder (line 2409) | def freeze_text_encoder(self): method _maybe_initialize_input_ids_for_generation (line 2417) | def _maybe_initialize_input_ids_for_generation( method _get_decoder_start_token_id (line 2445) | def _get_decoder_start_token_id( method generate (line 2464) | def generate( method get_unconditional_inputs (line 2709) | def get_unconditional_inputs(self, num_samples=1): FILE: mplsandbox_for_rl/transformers/src/transformers/models/musicgen/processing_musicgen.py class MusicgenProcessor (line 27) | class MusicgenProcessor(ProcessorMixin): method __init__ (line 45) | def __init__(self, feature_extractor, tokenizer): method get_decoder_prompt_ids (line 50) | def get_decoder_prompt_ids(self, task=None, language=None, no_timestam... method __call__ (line 53) | def __call__(self, *args, **kwargs): method batch_decode (line 91) | def batch_decode(self, *args, **kwargs): method decode (line 109) | def decode(self, *args, **kwargs): method _decode_audio (line 116) | def _decode_audio(self, audio_values, padding_mask: Optional = None) -... FILE: mplsandbox_for_rl/transformers/src/transformers/models/musicgen_melody/configuration_musicgen_melody.py class MusicgenMelodyDecoderConfig (line 25) | class MusicgenMelodyDecoderConfig(PretrainedConfig): method __init__ (line 83) | def __init__( class MusicgenMelodyConfig (line 136) | class MusicgenMelodyConfig(PretrainedConfig): method __init__ (line 200) | def __init__( method from_sub_models_config (line 227) | def from_sub_models_config( method sampling_rate (line 251) | def sampling_rate(self): method _attn_implementation (line 255) | def _attn_implementation(self): method _attn_implementation (line 267) | def _attn_implementation(self, value): FILE: mplsandbox_for_rl/transformers/src/transformers/models/musicgen_melody/convert_musicgen_melody_transformers.py function rename_keys (line 47) | def rename_keys(name): function rename_state_dict (line 75) | def rename_state_dict(state_dict: OrderedDict, hidden_size: int) -> Tupl... function decoder_config_from_checkpoint (line 99) | def decoder_config_from_checkpoint(checkpoint: str) -> MusicgenMelodyDec... function convert_musicgen_melody_checkpoint (line 134) | def convert_musicgen_melody_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/musicgen_melody/feature_extraction_musicgen_melody.py class MusicgenMelodyFeatureExtractor (line 39) | class MusicgenMelodyFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 82) | def __init__( method _torch_extract_fbank_features (line 115) | def _torch_extract_fbank_features(self, waveform: torch.Tensor) -> tor... method _extract_stem_indices (line 146) | def _extract_stem_indices(self, audio, sampling_rate=None): method __call__ (line 181) | def __call__( method to_dict (line 316) | def to_dict(self) -> Dict[str, Any]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/musicgen_melody/modeling_musicgen_melody.py class MusicgenMelodyOutputWithPast (line 64) | class MusicgenMelodyOutputWithPast(ModelOutput): function shift_tokens_right (line 104) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class MusicgenMelodySinusoidalPositionalEmbedding (line 125) | class MusicgenMelodySinusoidalPositionalEmbedding(nn.Module): method __init__ (line 128) | def __init__(self, num_positions: int, embedding_dim: int): method make_weights (line 133) | def make_weights(self, num_embeddings: int, embedding_dim: int): method get_embedding (line 144) | def get_embedding(num_embeddings: int, embedding_dim: int): method forward (line 161) | def forward(self, inputs_embeds: torch.Tensor, past_key_values_length:... class MusicgenMelodyAttention (line 172) | class MusicgenMelodyAttention(nn.Module): method __init__ (line 175) | def __init__( method _shape (line 206) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 209) | def forward( class MusicgenMelodyFlashAttention2 (line 331) | class MusicgenMelodyFlashAttention2(MusicgenMelodyAttention): method __init__ (line 339) | def __init__(self, *args, **kwargs): method _reshape (line 347) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 350) | def forward( class MusicgenMelodySdpaAttention (line 459) | class MusicgenMelodySdpaAttention(MusicgenMelodyAttention): method forward (line 460) | def forward( class MusicgenMelodyDecoderLayer (line 572) | class MusicgenMelodyDecoderLayer(nn.Module): method __init__ (line 573) | def __init__(self, config: MusicgenMelodyDecoderConfig): method forward (line 596) | def forward( class MusicgenMelodyPreTrainedModel (line 654) | class MusicgenMelodyPreTrainedModel(PreTrainedModel): method _init_weights (line 667) | def _init_weights(self, module): class MusicgenMelodyDecoder (line 852) | class MusicgenMelodyDecoder(MusicgenMelodyPreTrainedModel): method __init__ (line 857) | def __init__(self, config: MusicgenMelodyDecoderConfig): method get_input_embeddings (line 884) | def get_input_embeddings(self): method set_input_embeddings (line 887) | def set_input_embeddings(self, value): method forward (line 892) | def forward( class MusicgenMelodyModel (line 1050) | class MusicgenMelodyModel(MusicgenMelodyPreTrainedModel): method __init__ (line 1051) | def __init__(self, config: MusicgenMelodyDecoderConfig): method get_input_embeddings (line 1057) | def get_input_embeddings(self): method set_input_embeddings (line 1060) | def set_input_embeddings(self, value): method get_decoder (line 1063) | def get_decoder(self): method forward (line 1068) | def forward( class MusicgenMelodyForCausalLM (line 1120) | class MusicgenMelodyForCausalLM(MusicgenMelodyPreTrainedModel): method __init__ (line 1121) | def __init__(self, config: MusicgenMelodyDecoderConfig): method get_input_embeddings (line 1134) | def get_input_embeddings(self): method set_input_embeddings (line 1137) | def set_input_embeddings(self, value): method get_output_embeddings (line 1140) | def get_output_embeddings(self): method set_output_embeddings (line 1143) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1146) | def set_decoder(self, decoder): method get_decoder (line 1149) | def get_decoder(self): method forward (line 1155) | def forward( method prepare_inputs_for_generation (line 1239) | def prepare_inputs_for_generation( method build_delay_pattern_mask (line 1295) | def build_delay_pattern_mask(self, input_ids: torch.LongTensor, pad_to... method apply_delay_pattern_mask (line 1369) | def apply_delay_pattern_mask(input_ids, decoder_pad_token_mask): method generate (line 1379) | def generate( class MusicgenMelodyForConditionalGeneration (line 1588) | class MusicgenMelodyForConditionalGeneration(PreTrainedModel): method __init__ (line 1595) | def __init__( method _init_weights (line 1652) | def _init_weights(self, module): method tie_weights (line 1661) | def tie_weights(self): method get_text_encoder (line 1677) | def get_text_encoder(self): method get_encoder (line 1680) | def get_encoder(self): method get_decoder (line 1684) | def get_decoder(self): method get_input_embeddings (line 1687) | def get_input_embeddings(self): method get_output_embeddings (line 1690) | def get_output_embeddings(self): method set_output_embeddings (line 1693) | def set_output_embeddings(self, new_embeddings): method from_sub_models_pretrained (line 1698) | def from_sub_models_pretrained( method forward (line 1898) | def forward( method prepare_inputs_for_generation (line 2042) | def prepare_inputs_for_generation( method _prepare_decoder_input_ids_for_generation (line 2100) | def _prepare_decoder_input_ids_for_generation( method _prepare_encoder_hidden_states_kwargs_for_generation (line 2147) | def _prepare_encoder_hidden_states_kwargs_for_generation( method prepare_decoder_input_ids_from_labels (line 2247) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method resize_token_embeddings (line 2250) | def resize_token_embeddings(self, *args, **kwargs): method _maybe_initialize_input_ids_for_generation (line 2257) | def _maybe_initialize_input_ids_for_generation( method freeze_audio_encoder (line 2279) | def freeze_audio_encoder(self): method freeze_text_encoder (line 2287) | def freeze_text_encoder(self): method _get_decoder_start_token_id (line 2296) | def _get_decoder_start_token_id( method generate (line 2315) | def generate( method _update_model_kwargs_for_generation (line 2550) | def _update_model_kwargs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/musicgen_melody/processing_musicgen_melody.py class MusicgenMelodyProcessor (line 27) | class MusicgenMelodyProcessor(ProcessorMixin): method __init__ (line 45) | def __init__(self, feature_extractor, tokenizer): method get_decoder_prompt_ids (line 49) | def get_decoder_prompt_ids(self, task=None, language=None, no_timestam... method __call__ (line 52) | def __call__(self, audio=None, text=None, **kwargs): method batch_decode (line 97) | def batch_decode(self, *args, **kwargs): method decode (line 116) | def decode(self, *args, **kwargs): method _decode_audio (line 124) | def _decode_audio(self, audio_values, attention_mask: Optional = None)... method get_unconditional_inputs (line 151) | def get_unconditional_inputs(self, num_samples=1, return_tensors="pt"): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mvp/configuration_mvp.py class MvpConfig (line 26) | class MvpConfig(PretrainedConfig): method __init__ (line 109) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/mvp/modeling_mvp.py function shift_tokens_right (line 59) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class MvpLearnedPositionalEmbedding (line 76) | class MvpLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 81) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 87) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class MvpAttention (line 98) | class MvpAttention(nn.Module): method __init__ (line 101) | def __init__( method _shape (line 128) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 131) | def forward( class MvpEncoderLayer (line 253) | class MvpEncoderLayer(nn.Module): method __init__ (line 254) | def __init__(self, config: MvpConfig): method forward (line 270) | def forward( class MvpDecoderLayer (line 325) | class MvpDecoderLayer(nn.Module): method __init__ (line 326) | def __init__(self, config: MvpConfig): method forward (line 352) | def forward( class MvpClassificationHead (line 451) | class MvpClassificationHead(nn.Module): method __init__ (line 454) | def __init__( method forward (line 466) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MvpPrompt (line 475) | class MvpPrompt(nn.Module): method __init__ (line 478) | def __init__(self, config, num_layers, num_heads): method forward (line 492) | def forward(self, prompt_ids: torch.Tensor) -> Tuple[torch.Tensor]: class MvpPreTrainedModel (line 500) | class MvpPreTrainedModel(PreTrainedModel): method _init_weights (line 505) | def _init_weights(self, module): method dummy_inputs (line 517) | def dummy_inputs(self): class MvpEncoder (line 735) | class MvpEncoder(MvpPreTrainedModel): method __init__ (line 746) | def __init__( method get_input_embeddings (line 784) | def get_input_embeddings(self): method set_input_embeddings (line 787) | def set_input_embeddings(self, value): method forward (line 790) | def forward( class MvpDecoder (line 931) | class MvpDecoder(MvpPreTrainedModel): method __init__ (line 941) | def __init__( method get_input_embeddings (line 981) | def get_input_embeddings(self): method set_input_embeddings (line 984) | def set_input_embeddings(self, value): method forward (line 987) | def forward( class MvpModel (line 1217) | class MvpModel(MvpPreTrainedModel): method __init__ (line 1221) | def __init__(self, config: MvpConfig): method get_input_embeddings (line 1234) | def get_input_embeddings(self): method set_input_embeddings (line 1237) | def set_input_embeddings(self, value): method get_encoder (line 1242) | def get_encoder(self): method get_decoder (line 1245) | def get_decoder(self): method set_lightweight_tuning (line 1248) | def set_lightweight_tuning(self): method forward (line 1263) | def forward( class MvpForConditionalGeneration (line 1354) | class MvpForConditionalGeneration(MvpPreTrainedModel): method __init__ (line 1357) | def __init__(self, config: MvpConfig): method get_encoder (line 1366) | def get_encoder(self): method get_decoder (line 1369) | def get_decoder(self): method resize_token_embeddings (line 1372) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 1377) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1386) | def get_output_embeddings(self): method set_output_embeddings (line 1389) | def set_output_embeddings(self, new_embeddings): method set_lightweight_tuning (line 1392) | def set_lightweight_tuning(self): method forward (line 1399) | def forward( method prepare_inputs_for_generation (line 1477) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1514) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1518) | def _reorder_cache(past_key_values, beam_idx): class MvpForSequenceClassification (line 1536) | class MvpForSequenceClassification(MvpPreTrainedModel): method __init__ (line 1539) | def __init__(self, config: MvpConfig, **kwargs): method set_lightweight_tuning (line 1552) | def set_lightweight_tuning(self): method forward (line 1558) | def forward( class MvpForQuestionAnswering (line 1663) | class MvpForQuestionAnswering(MvpPreTrainedModel): method __init__ (line 1666) | def __init__(self, config): method set_lightweight_tuning (line 1678) | def set_lightweight_tuning(self): method forward (line 1684) | def forward( class MvpDecoderWrapper (line 1780) | class MvpDecoderWrapper(MvpPreTrainedModel): method __init__ (line 1786) | def __init__(self, config): method forward (line 1790) | def forward(self, *args, **kwargs): class MvpForCausalLM (line 1794) | class MvpForCausalLM(MvpPreTrainedModel): method __init__ (line 1797) | def __init__(self, config): method get_input_embeddings (line 1809) | def get_input_embeddings(self): method set_input_embeddings (line 1812) | def set_input_embeddings(self, value): method get_output_embeddings (line 1815) | def get_output_embeddings(self): method set_output_embeddings (line 1818) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1821) | def set_decoder(self, decoder): method get_decoder (line 1824) | def get_decoder(self): method set_lightweight_tuning (line 1827) | def set_lightweight_tuning(self): method forward (line 1832) | def forward( method prepare_inputs_for_generation (line 1974) | def prepare_inputs_for_generation( method _reorder_cache (line 2001) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/mvp/tokenization_mvp.py function bytes_to_unicode (line 36) | def bytes_to_unicode(): function get_pairs (line 60) | def get_pairs(word): class MvpTokenizer (line 74) | class MvpTokenizer(PreTrainedTokenizer): method __init__ (line 155) | def __init__( method vocab_size (line 209) | def vocab_size(self): method get_vocab (line 212) | def get_vocab(self): method bpe (line 217) | def bpe(self, token): method _tokenize (line 259) | def _tokenize(self, text): method _convert_token_to_id (line 269) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 273) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 277) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 283) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 312) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 337) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 364) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 387) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: mplsandbox_for_rl/transformers/src/transformers/models/mvp/tokenization_mvp_fast.py class MvpTokenizerFast (line 35) | class MvpTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 120) | def __init__( method mask_token (line 199) | def mask_token(self) -> str: method mask_token (line 214) | def mask_token(self, value): method _batch_encode_plus (line 225) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 236) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 247) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 251) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 258) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/nemotron/configuration_nemotron.py class NemotronConfig (line 26) | class NemotronConfig(PretrainedConfig): method __init__ (line 103) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/nemotron/convert_nemotron_nemo_to_hf.py function get_args (line 54) | def get_args(): function convert_hf_config (line 93) | def convert_hf_config(nemo_config, tokenizer, vocab_size, dtype, hf_outp... function convert (line 134) | def convert(input_nemo_file, output_hf_file, precision=None, cpu_only=Fa... function extract_nemotron_tokenizer (line 298) | def extract_nemotron_tokenizer(nemo_file, model_config, output_hf_path, ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/nemotron/modeling_nemotron.py function _prepare_4d_causal_attention_mask_with_cache_position (line 57) | def _prepare_4d_causal_attention_mask_with_cache_position( function _cast_if_autocast_enabled (line 110) | def _cast_if_autocast_enabled(*args): class NemotronLayerNorm1P (line 117) | class NemotronLayerNorm1P(nn.LayerNorm): method __init__ (line 118) | def __init__( method forward (line 129) | def forward(self, input: Tensor) -> Tensor: class NemotronRotaryEmbedding (line 139) | class NemotronRotaryEmbedding(nn.Module): method __init__ (line 141) | def __init__( method _dynamic_frequency_update (line 160) | def _dynamic_frequency_update(self, position_ids, device): method forward (line 179) | def forward(self, x, position_ids): function rotate_half (line 203) | def rotate_half(x): function apply_rotary_pos_emb (line 210) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... class NemotronMLP (line 243) | class NemotronMLP(nn.Module): method __init__ (line 244) | def __init__(self, config): method forward (line 253) | def forward(self, x): function repeat_kv (line 258) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class NemotronAttention (line 270) | class NemotronAttention(nn.Module): method __init__ (line 273) | def __init__(self, config: NemotronConfig, layer_idx: Optional[int] = ... method forward (line 300) | def forward( class NemotronFlashAttention2 (line 357) | class NemotronFlashAttention2(NemotronAttention): method __init__ (line 364) | def __init__(self, *args, **kwargs): method forward (line 373) | def forward( class NemotronSdpaAttention (line 471) | class NemotronSdpaAttention(NemotronAttention): method forward (line 479) | def forward( class NemotronDecoderLayer (line 570) | class NemotronDecoderLayer(nn.Module): method __init__ (line 572) | def __init__(self, config: NemotronConfig, layer_idx: int): method forward (line 582) | def forward( class NemotronPreTrainedModel (line 672) | class NemotronPreTrainedModel(PreTrainedModel): method _init_weights (line 684) | def _init_weights(self, module): class NemotronModel (line 774) | class NemotronModel(NemotronPreTrainedModel): method __init__ (line 782) | def __init__(self, config: NemotronConfig): method get_input_embeddings (line 798) | def get_input_embeddings(self): method set_input_embeddings (line 801) | def set_input_embeddings(self, value): method forward (line 805) | def forward( method _update_causal_mask (line 913) | def _update_causal_mask( class NemotronForCausalLM (line 986) | class NemotronForCausalLM(NemotronPreTrainedModel): method __init__ (line 989) | def __init__(self, config): method get_input_embeddings (line 998) | def get_input_embeddings(self): method set_input_embeddings (line 1001) | def set_input_embeddings(self, value): method get_output_embeddings (line 1004) | def get_output_embeddings(self): method set_output_embeddings (line 1007) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1010) | def set_decoder(self, decoder): method get_decoder (line 1013) | def get_decoder(self): method forward (line 1019) | def forward( method prepare_inputs_for_generation (line 1107) | def prepare_inputs_for_generation( class NemotronForSequenceClassification (line 1194) | class NemotronForSequenceClassification(NemotronPreTrainedModel): method __init__ (line 1195) | def __init__(self, config): method get_input_embeddings (line 1204) | def get_input_embeddings(self): method set_input_embeddings (line 1207) | def set_input_embeddings(self, value): method forward (line 1211) | def forward( class NemotronForQuestionAnswering (line 1310) | class NemotronForQuestionAnswering(NemotronPreTrainedModel): method __init__ (line 1314) | def __init__(self, config): method get_input_embeddings (line 1322) | def get_input_embeddings(self): method set_input_embeddings (line 1325) | def set_input_embeddings(self, value): method forward (line 1329) | def forward( class NemotronForTokenClassification (line 1410) | class NemotronForTokenClassification(NemotronPreTrainedModel): method __init__ (line 1411) | def __init__(self, config): method get_input_embeddings (line 1427) | def get_input_embeddings(self): method set_input_embeddings (line 1430) | def set_input_embeddings(self, value): method forward (line 1434) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/nllb/tokenization_nllb.py class NllbTokenizer (line 36) | class NllbTokenizer(PreTrainedTokenizer): method __init__ (line 113) | def __init__( method __getstate__ (line 184) | def __getstate__(self): method __setstate__ (line 190) | def __setstate__(self, d): method vocab_size (line 201) | def vocab_size(self): method src_lang (line 205) | def src_lang(self) -> str: method src_lang (line 209) | def src_lang(self, new_src_lang: str) -> None: method get_special_tokens_mask (line 213) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 243) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 270) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 295) | def _build_translation_inputs( method get_vocab (line 307) | def get_vocab(self): method _tokenize (line 312) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 315) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 321) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 325) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 330) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 347) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 359) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 362) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 365) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 378) | def set_tgt_lang_special_tokens(self, lang: str) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/nllb/tokenization_nllb_fast.py class NllbTokenizerFast (line 42) | class NllbTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 119) | def __init__( method can_save_slow_tokenizer (line 170) | def can_save_slow_tokenizer(self) -> bool: method src_lang (line 174) | def src_lang(self) -> str: method src_lang (line 178) | def src_lang(self, new_src_lang: str) -> None: method build_inputs_with_special_tokens (line 182) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 211) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 236) | def _build_translation_inputs( method prepare_seq2seq_batch (line 248) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 260) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 263) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 266) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 289) | def set_tgt_lang_special_tokens(self, lang: str) -> None: method save_vocabulary (line 311) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/nllb_moe/configuration_nllb_moe.py class NllbMoeConfig (line 24) | class NllbMoeConfig(PretrainedConfig): method __init__ (line 130) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/nllb_moe/modeling_nllb_moe.py function shift_tokens_right (line 58) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function create_position_ids_from_input_ids (line 75) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... function load_balancing_loss_func (line 91) | def load_balancing_loss_func(router_probs: torch.Tensor, expert_indices:... class NllbMoeScaledWordEmbedding (line 134) | class NllbMoeScaledWordEmbedding(nn.Embedding): method __init__ (line 139) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 143) | def forward(self, input_ids: torch.Tensor): class NllbMoeSinusoidalPositionalEmbedding (line 148) | class NllbMoeSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 151) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 158) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 167) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 188) | def forward( method create_position_ids_from_inputs_embeds (line 208) | def create_position_ids_from_inputs_embeds(self, inputs_embeds, past_k... class NllbMoeTop2Router (line 226) | class NllbMoeTop2Router(nn.Module): method __init__ (line 238) | def __init__(self, config: NllbMoeConfig): method _cast_classifier (line 251) | def _cast_classifier(self): method normalize_router_probabilities (line 259) | def normalize_router_probabilities(self, router_probs, top_1_mask, top... method route_tokens (line 267) | def route_tokens( method forward (line 352) | def forward(self, hidden_states: torch.Tensor, padding_mask: Optional[... class NllbMoeDenseActDense (line 381) | class NllbMoeDenseActDense(nn.Module): method __init__ (line 382) | def __init__(self, config: NllbMoeConfig, ffn_dim: int): method forward (line 389) | def forward(self, hidden_states): class NllbMoeSparseMLP (line 403) | class NllbMoeSparseMLP(nn.Module): method __init__ (line 408) | def __init__(self, config: NllbMoeConfig, ffn_dim: int, expert_class: ... method forward (line 419) | def forward(self, hidden_states: torch.Tensor, padding_mask: Optional[... class NllbMoeAttention (line 469) | class NllbMoeAttention(nn.Module): method __init__ (line 472) | def __init__( method _shape (line 503) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 506) | def forward( class NllbMoeEncoderLayer (line 627) | class NllbMoeEncoderLayer(nn.Module): method __init__ (line 628) | def __init__(self, config: NllbMoeConfig, is_sparse: bool = False): method forward (line 646) | def forward( class NllbMoeDecoderLayer (line 708) | class NllbMoeDecoderLayer(nn.Module): method __init__ (line 709) | def __init__(self, config: NllbMoeConfig, is_sparse: bool = False): method forward (line 735) | def forward( class NllbMoePreTrainedModel (line 839) | class NllbMoePreTrainedModel(PreTrainedModel): method _init_weights (line 845) | def _init_weights(self, module): class NllbMoeEncoder (line 985) | class NllbMoeEncoder(NllbMoePreTrainedModel): method __init__ (line 997) | def __init__(self, config: NllbMoeConfig, embed_tokens: Optional[nn.Em... method forward (line 1032) | def forward( class NllbMoeDecoder (line 1177) | class NllbMoeDecoder(NllbMoePreTrainedModel): method __init__ (line 1188) | def __init__(self, config: NllbMoeConfig, embed_tokens: Optional[nn.Em... method forward (line 1221) | def forward( class NllbMoeModel (line 1469) | class NllbMoeModel(NllbMoePreTrainedModel): method __init__ (line 1472) | def __init__(self, config: NllbMoeConfig): method get_input_embeddings (line 1485) | def get_input_embeddings(self): method set_input_embeddings (line 1488) | def set_input_embeddings(self, value): method _tie_weights (line 1493) | def _tie_weights(self): method get_encoder (line 1498) | def get_encoder(self): method get_decoder (line 1501) | def get_decoder(self): method forward (line 1507) | def forward( class NllbMoeForConditionalGeneration (line 1607) | class NllbMoeForConditionalGeneration(NllbMoePreTrainedModel): method __init__ (line 1611) | def __init__(self, config: NllbMoeConfig): method get_encoder (line 1621) | def get_encoder(self): method get_decoder (line 1624) | def get_decoder(self): method get_output_embeddings (line 1627) | def get_output_embeddings(self): method set_output_embeddings (line 1630) | def set_output_embeddings(self, new_embeddings): method forward (line 1636) | def forward( method _unpack_router_logits (line 1750) | def _unpack_router_logits(self, router_outputs): method prepare_inputs_for_generation (line 1764) | def prepare_inputs_for_generation( method _reorder_cache (line 1802) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/nougat/convert_nougat_to_hf.py function get_configs (line 39) | def get_configs(model): function rename_key (line 68) | def rename_key(name): function convert_state_dict (line 102) | def convert_state_dict(orig_state_dict, model): function convert_nougat_checkpoint (line 142) | def convert_nougat_checkpoint(model_tag, pytorch_dump_folder_path=None, ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/nougat/image_processing_nougat.py class NougatImageProcessor (line 58) | class NougatImageProcessor(BaseImageProcessor): method __init__ (line 95) | def __init__( method python_find_non_zero (line 129) | def python_find_non_zero(self, image: np.array): method python_bounding_rect (line 136) | def python_bounding_rect(self, coordinates): method crop_margin (line 145) | def crop_margin( method align_long_axis (line 197) | def align_long_axis( method pad_image (line 233) | def pad_image( method thumbnail (line 269) | def thumbnail( method resize (line 320) | def resize( method preprocess (line 360) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/nougat/processing_nougat.py class NougatProcessor (line 27) | class NougatProcessor(ProcessorMixin): method __init__ (line 45) | def __init__(self, image_processor, tokenizer): method __call__ (line 49) | def __call__( method batch_decode (line 141) | def batch_decode(self, *args, **kwargs): method decode (line 148) | def decode(self, *args, **kwargs): method post_process_generation (line 155) | def post_process_generation(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/nougat/tokenization_nougat_fast.py function markdown_compatible (line 56) | def markdown_compatible(text: str) -> str: function normalize_list_like_lines (line 98) | def normalize_list_like_lines(generation): function find_next_punctuation (line 158) | def find_next_punctuation(text: str, start_idx=0): function truncate_repetitions (line 176) | def truncate_repetitions(text: str, min_len: int = 30) -> str: function remove_numbers (line 244) | def remove_numbers(lines): function get_slices (line 256) | def get_slices(lines, clean_lines): function remove_slice_from_lines (line 305) | def remove_slice_from_lines(lines, clean_text, slice) -> str: class NougatTokenizerFast (line 371) | class NougatTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 409) | def __init__( method remove_hallucinated_references (line 432) | def remove_hallucinated_references(self, text: str) -> str: method correct_tables (line 462) | def correct_tables(self, generation: str) -> str: method post_process_single (line 497) | def post_process_single(self, generation: str, fix_markdown: bool = Tr... method post_process_generation (line 592) | def post_process_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/nystromformer/configuration_nystromformer.py class NystromformerConfig (line 24) | class NystromformerConfig(PretrainedConfig): method __init__ (line 90) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/nystromformer/modeling_nystromformer.py class NystromformerEmbeddings (line 46) | class NystromformerEmbeddings(nn.Module): method __init__ (line 49) | def __init__(self, config): method forward (line 71) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class NystromformerSelfAttention (line 106) | class NystromformerSelfAttention(nn.Module): method __init__ (line 107) | def __init__(self, config, position_embedding_type=None): method iterative_inv (line 148) | def iterative_inv(self, mat, n_iter=6): method transpose_for_scores (line 169) | def transpose_for_scores(self, layer): method forward (line 174) | def forward(self, hidden_states, attention_mask=None, output_attention... class NystromformerSelfOutput (line 237) | class NystromformerSelfOutput(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 NystromformerAttention (line 251) | class NystromformerAttention(nn.Module): method __init__ (line 252) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 258) | def prune_heads(self, heads): method forward (line 276) | def forward(self, hidden_states, attention_mask=None, output_attention... class NystromformerIntermediate (line 284) | class NystromformerIntermediate(nn.Module): method __init__ (line 285) | def __init__(self, config): method forward (line 293) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NystromformerOutput (line 300) | class NystromformerOutput(nn.Module): method __init__ (line 301) | def __init__(self, config): method forward (line 307) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NystromformerLayer (line 314) | class NystromformerLayer(nn.Module): method __init__ (line 315) | def __init__(self, config): method forward (line 324) | def forward(self, hidden_states, attention_mask=None, output_attention... method feed_forward_chunk (line 337) | def feed_forward_chunk(self, attention_output): class NystromformerEncoder (line 343) | class NystromformerEncoder(nn.Module): method __init__ (line 344) | def __init__(self, config): method forward (line 350) | def forward( class NystromformerPredictionHeadTransform (line 393) | class NystromformerPredictionHeadTransform(nn.Module): method __init__ (line 394) | def __init__(self, config): method forward (line 403) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NystromformerLMPredictionHead (line 411) | class NystromformerLMPredictionHead(nn.Module): method __init__ (line 412) | def __init__(self, config): method _tie_weights (line 425) | def _tie_weights(self): method forward (line 428) | def forward(self, hidden_states): class NystromformerOnlyMLMHead (line 435) | class NystromformerOnlyMLMHead(nn.Module): method __init__ (line 436) | def __init__(self, config): method forward (line 440) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class NystromformerPreTrainedModel (line 445) | class NystromformerPreTrainedModel(PreTrainedModel): method _init_weights (line 455) | def _init_weights(self, module): class NystromformerModel (line 537) | class NystromformerModel(NystromformerPreTrainedModel): method __init__ (line 538) | def __init__(self, config): method get_input_embeddings (line 548) | def get_input_embeddings(self): method set_input_embeddings (line 551) | def set_input_embeddings(self, value): method _prune_heads (line 554) | def _prune_heads(self, heads_to_prune): method forward (line 568) | def forward( class NystromformerForMaskedLM (line 649) | class NystromformerForMaskedLM(NystromformerPreTrainedModel): 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 674) | def forward( class NystromformerClassificationHead (line 727) | class NystromformerClassificationHead(nn.Module): method __init__ (line 730) | def __init__(self, config): method forward (line 738) | def forward(self, features, **kwargs): class NystromformerForSequenceClassification (line 755) | class NystromformerForSequenceClassification(NystromformerPreTrainedModel): method __init__ (line 756) | def __init__(self, config): method forward (line 771) | def forward( class NystromformerForMultipleChoice (line 848) | class NystromformerForMultipleChoice(NystromformerPreTrainedModel): method __init__ (line 849) | def __init__(self, config): method forward (line 867) | def forward( class NystromformerForTokenClassification (line 943) | class NystromformerForTokenClassification(NystromformerPreTrainedModel): method __init__ (line 944) | def __init__(self, config): method forward (line 961) | def forward( class NystromformerForQuestionAnswering (line 1021) | class NystromformerForQuestionAnswering(NystromformerPreTrainedModel): method __init__ (line 1022) | def __init__(self, config): method forward (line 1040) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/olmo/configuration_olmo.py class OlmoConfig (line 29) | class OlmoConfig(PretrainedConfig): method __init__ (line 110) | def __init__( method _rope_scaling_validation (line 163) | def _rope_scaling_validation(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/olmo/convert_olmo_weights_to_hf.py function compute_intermediate_size (line 51) | def compute_intermediate_size(n, ffn_dim_multiplier=1, multiple_of=256): function read_json (line 55) | def read_json(path): function write_json (line 60) | def write_json(text, path): function write_model (line 65) | def write_model(model_path, input_base_path, tokenizer_path=None, safe_s... function _write_tokenizer (line 186) | def _write_tokenizer( function main (line 212) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/olmo/modeling_olmo.py function _prepare_4d_causal_attention_mask_with_cache_position (line 61) | def _prepare_4d_causal_attention_mask_with_cache_position( class OlmoLayerNorm (line 114) | class OlmoLayerNorm(nn.Module): method __init__ (line 117) | def __init__(self, hidden_size: int) -> None: method forward (line 121) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class OlmoRotaryEmbedding (line 133) | class OlmoRotaryEmbedding(nn.Module): method __init__ (line 134) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 146) | def forward(self, x, position_ids): class OlmoLinearScalingRotaryEmbedding (line 164) | class OlmoLinearScalingRotaryEmbedding(OlmoRotaryEmbedding): method forward (line 167) | def forward(self, x, position_ids): class OlmoDynamicNTKScalingRotaryEmbedding (line 176) | class OlmoDynamicNTKScalingRotaryEmbedding(OlmoRotaryEmbedding): method forward (line 179) | def forward(self, x, position_ids): function rotate_half (line 196) | def rotate_half(x): function apply_rotary_pos_emb (line 204) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... class OlmoMLP (line 231) | class OlmoMLP(nn.Module): method __init__ (line 232) | def __init__(self, config): method forward (line 242) | def forward(self, x): function repeat_kv (line 247) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class OlmoAttention (line 259) | class OlmoAttention(nn.Module): method __init__ (line 264) | def __init__(self, config: OlmoConfig, layer_idx: Optional[int] = None): method _init_rope (line 297) | def _init_rope(self): method forward (line 324) | def forward( class OlmoFlashAttention2 (line 390) | class OlmoFlashAttention2(OlmoAttention): method __init__ (line 398) | def __init__(self, *args, **kwargs): method forward (line 406) | def forward( class OlmoSdpaAttention (line 500) | class OlmoSdpaAttention(OlmoAttention): method forward (line 508) | def forward( class OlmoDecoderLayer (line 600) | class OlmoDecoderLayer(nn.Module): method __init__ (line 601) | def __init__(self, config: OlmoConfig, layer_idx: int): method forward (line 613) | def forward( class OlmoPreTrainedModel (line 699) | class OlmoPreTrainedModel(PreTrainedModel): method _init_weights (line 711) | def _init_weights(self, module): class OlmoModel (line 801) | class OlmoModel(OlmoPreTrainedModel): method __init__ (line 809) | def __init__(self, config: OlmoConfig): method get_input_embeddings (line 824) | def get_input_embeddings(self): method set_input_embeddings (line 827) | def set_input_embeddings(self, value): method forward (line 833) | def forward( method _update_causal_mask (line 952) | def _update_causal_mask( class OlmoForCausalLM (line 1025) | class OlmoForCausalLM(OlmoPreTrainedModel): method __init__ (line 1028) | def __init__(self, config): method get_input_embeddings (line 1037) | def get_input_embeddings(self): method set_input_embeddings (line 1040) | def set_input_embeddings(self, value): method get_output_embeddings (line 1043) | def get_output_embeddings(self): method set_output_embeddings (line 1046) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1049) | def set_decoder(self, decoder): method get_decoder (line 1052) | def get_decoder(self): method forward (line 1058) | def forward( method prepare_inputs_for_generation (line 1147) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/oneformer/configuration_oneformer.py class OneFormerConfig (line 28) | class OneFormerConfig(PretrainedConfig): method __init__ (line 151) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/oneformer/image_processing_oneformer.py function max_across_indices (line 67) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 75) | def get_max_height_width( function make_pixel_mask (line 94) | def make_pixel_mask( function binary_mask_to_rle (line 113) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 136) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 158) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 187) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 206) | def compute_segments( function convert_segmentation_map_to_binary_masks (line 267) | def convert_segmentation_map_to_binary_masks( function get_oneformer_resize_output_image_size (line 308) | def get_oneformer_resize_output_image_size( function prepare_metadata (line 343) | def prepare_metadata(class_info): function load_metadata (line 357) | def load_metadata(repo_id, class_info_file): class OneFormerImageProcessor (line 375) | class OneFormerImageProcessor(BaseImageProcessor): method __init__ (line 430) | def __init__( method from_dict (line 476) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method to_dict (line 486) | def to_dict(self) -> Dict[str, Any]: method resize (line 497) | def resize( method rescale (line 534) | def rescale( method convert_segmentation_map_to_binary_masks (line 563) | def convert_segmentation_map_to_binary_masks( method __call__ (line 579) | def __call__(self, images, task_inputs=None, segmentation_maps=None, *... method _preprocess (line 582) | def _preprocess( method _preprocess_image (line 603) | def _preprocess_image( method _preprocess_mask (line 643) | def _preprocess_mask( method preprocess (line 679) | def preprocess( method _pad_image (line 780) | def _pad_image( method pad (line 808) | def pad( method get_semantic_annotations (line 863) | def get_semantic_annotations(self, label, num_class_obj): method get_instance_annotations (line 898) | def get_instance_annotations(self, label, num_class_obj): method get_panoptic_annotations (line 930) | def get_panoptic_annotations(self, label, num_class_obj): method encode_inputs (line 960) | def encode_inputs( method post_process_semantic_segmentation (line 1095) | def post_process_semantic_segmentation( method post_process_instance_segmentation (line 1145) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1265) | def post_process_panoptic_segmentation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/oneformer/modeling_oneformer.py function _get_clones (line 60) | def _get_clones(module, N): function multi_scale_deformable_attention (line 65) | def multi_scale_deformable_attention( function dice_loss (line 105) | def dice_loss(inputs: Tensor, labels: Tensor, num_masks: int) -> Tensor: function sigmoid_cross_entropy_loss (line 136) | def sigmoid_cross_entropy_loss(inputs: torch.Tensor, labels: torch.Tenso... function pair_wise_dice_loss (line 156) | def pair_wise_dice_loss(inputs: Tensor, labels: Tensor) -> Tensor: function pair_wise_sigmoid_cross_entropy_loss (line 179) | 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 737) | class OneFormerTransformerDecoderOutput(BaseModelOutput): class OneFormerPixelDecoderOutput (line 764) | class OneFormerPixelDecoderOutput(ModelOutput): class OneFormerPixelLevelModuleOutput (line 788) | class OneFormerPixelLevelModuleOutput(ModelOutput): class OneFormerModelOutput (line 811) | class OneFormerModelOutput(ModelOutput): class OneFormerForUniversalSegmentationOutput (line 861) | class OneFormerForUniversalSegmentationOutput(ModelOutput): class OneFormerPixelDecoderFrozenBatchNorm2d (line 930) | class OneFormerPixelDecoderFrozenBatchNorm2d(nn.Module): method __init__ (line 938) | def __init__(self, n): method _load_from_state_dict (line 945) | def _load_from_state_dict( method forward (line 956) | def forward(self, x): class OneFormerPixelDecoderEncoderMultiscaleDeformableAttention (line 968) | class OneFormerPixelDecoderEncoderMultiscaleDeformableAttention(nn.Module): method __init__ (line 973) | def __init__(self, embed_dim: int, num_heads: int, n_levels: int, n_po... method with_pos_embed (line 1000) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 1003) | def forward( class OneFormerPixelDecoderEncoderLayer (line 1061) | class OneFormerPixelDecoderEncoderLayer(nn.Module): method __init__ (line 1062) | def __init__(self, config: OneFormerConfig): method forward (line 1082) | def forward( class OneFormerPixelDecoderEncoderOnly (line 1153) | class OneFormerPixelDecoderEncoderOnly(nn.Module): method __init__ (line 1164) | def __init__(self, config: OneFormerConfig): method get_reference_points (line 1172) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1200) | def forward( class OneFormerPixelDecoder (line 1276) | class OneFormerPixelDecoder(nn.Module): method __init__ (line 1277) | def __init__(self, config: OneFormerConfig, feature_channels): method get_valid_ratio (line 1362) | def get_valid_ratio(self, mask, dtype=torch.float32): method forward (line 1373) | def forward( class OneFormerPixelLevelModule (line 1476) | class OneFormerPixelLevelModule(nn.Module): method __init__ (line 1477) | def __init__(self, config: OneFormerConfig): method forward (line 1491) | def forward(self, pixel_values: Tensor, output_hidden_states: bool = F... class OneFormerAttention (line 1502) | class OneFormerAttention(nn.Module): method __init__ (line 1508) | def __init__( method _shape (line 1533) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 1536) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 1539) | def forward( class OneFormerTransformerDecoderSelfAttentionLayer (line 1638) | class OneFormerTransformerDecoderSelfAttentionLayer(nn.Module): method __init__ (line 1639) | def __init__( method with_pos_embed (line 1651) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 1654) | def forward_post( method forward_pre (line 1669) | def forward_pre( method forward (line 1684) | def forward( class OneFormerTransformerDecoderCrossAttentionLayer (line 1696) | class OneFormerTransformerDecoderCrossAttentionLayer(nn.Module): method __init__ (line 1697) | def __init__( method with_pos_embed (line 1709) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 1712) | def forward_post( method forward_pre (line 1733) | def forward_pre( method forward (line 1754) | def forward( class OneFormerTransformerDecoderFFNLayer (line 1768) | class OneFormerTransformerDecoderFFNLayer(nn.Module): method __init__ (line 1769) | def __init__( method with_pos_embed (line 1789) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 1792) | def forward_post(self, output): method forward_pre (line 1798) | def forward_pre(self, output): method forward (line 1804) | def forward(self, output): class OneFormerMLPPredictionHead (line 1810) | class OneFormerMLPPredictionHead(nn.Module): method __init__ (line 1811) | def __init__(self, input_dim: int, hidden_dim: int, output_dim: int, n... method forward (line 1837) | def forward(self, input: Tensor) -> Tensor: class OneFormerTransformerDecoderLayer (line 1842) | class OneFormerTransformerDecoderLayer(nn.Module): method __init__ (line 1843) | def __init__(self, config: OneFormerConfig): method forward (line 1872) | def forward( class OneFormerTransformerDecoderQueryTransformerDecoder (line 1929) | class OneFormerTransformerDecoderQueryTransformerDecoder(nn.Module): method __init__ (line 1930) | def __init__(self, decoder_layer, num_layers, norm=None, return_interm... method forward (line 1937) | def forward( class OneFormerTransformerDecoderQueryTransformerDecoderLayer (line 1976) | class OneFormerTransformerDecoderQueryTransformerDecoderLayer(nn.Module): method __init__ (line 1977) | def __init__( method with_pos_embed (line 2005) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 2008) | def forward_post( method forward_pre (line 2039) | def forward_pre( method forward (line 2070) | def forward( class OneFormerTransformerDecoderQueryTransformer (line 2104) | class OneFormerTransformerDecoderQueryTransformer(nn.Module): method __init__ (line 2105) | def __init__( method forward (line 2133) | def forward(self, src, mask, query_embed, pos_embed, task_token=None): class OneFormerTransformerDecoder (line 2150) | class OneFormerTransformerDecoder(nn.Module): method __init__ (line 2155) | def __init__(self, in_channels: int, config: OneFormerConfig): method forward (line 2194) | def forward( method forward_prediction_heads (line 2278) | def forward_prediction_heads(self, output, mask_features, attention_ma... method _get_aux_predictions (line 2299) | def _get_aux_predictions(self, outputs_class, outputs_seg_masks): class OneFormerTransformerModule (line 2310) | class OneFormerTransformerModule(nn.Module): method __init__ (line 2315) | def __init__(self, in_features: int, config: OneFormerConfig): method forward (line 2332) | def forward( class OneFormerSinePositionEmbedding (line 2382) | class OneFormerSinePositionEmbedding(nn.Module): method __init__ (line 2388) | def __init__( method forward (line 2399) | def forward(self, x: Tensor, mask: Optional[Tensor] = None) -> Tensor: class PredictionBlock (line 2422) | class PredictionBlock(nn.Module): method __init__ (line 2423) | def __init__(self, in_dim: int, out_dim: int, activation: nn.Module) -... method forward (line 2430) | def forward(self, input: Tensor) -> Tensor: class OneFormerTextMapperAttention (line 2437) | class OneFormerTextMapperAttention(nn.Module): method __init__ (line 2438) | def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, at... method forward (line 2453) | def forward(self, q, k, v): class OneFormerTextTransformerDecoderLayer (line 2473) | class OneFormerTextTransformerDecoderLayer(nn.Module): method __init__ (line 2474) | def __init__( method forward (line 2494) | def forward(self, hidden_state, mem): class OneFormerTextContextDecoder (line 2503) | class OneFormerTextContextDecoder(nn.Module): method __init__ (line 2504) | def __init__( method forward (line 2538) | def forward(self, text, visual): class OneFormerTextMLP (line 2548) | class OneFormerTextMLP(nn.Module): method __init__ (line 2549) | def __init__( method forward (line 2563) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class OneFormerTextTransformerLayer (line 2570) | class OneFormerTextTransformerLayer(nn.Module): method __init__ (line 2571) | def __init__(self, width: int, heads: int, attn_mask: torch.Tensor, la... method forward (line 2579) | def forward( class OneFormerTextTransformer (line 2604) | class OneFormerTextTransformer(nn.Module): method __init__ (line 2605) | def __init__( method forward (line 2622) | def forward(self, hidden_states: torch.Tensor): class OneFormerTextEncoder (line 2631) | class OneFormerTextEncoder(nn.Module): method __init__ (line 2632) | def __init__( method build_attention_mask (line 2658) | def build_attention_mask(self): method forward (line 2666) | def forward(self, text): class OneFormerTextMapper (line 2678) | class OneFormerTextMapper(nn.Module): method __init__ (line 2679) | def __init__(self, config: OneFormerConfig): method forward (line 2703) | def forward( method encode_text (line 2711) | def encode_text(self, text): class OneFormerTaskModel (line 2739) | class OneFormerTaskModel(nn.Module): method __init__ (line 2740) | def __init__(self, config: OneFormerConfig): method forward (line 2749) | def forward(self, inputs: Tensor) -> Tensor: class OneFormerPreTrainedModel (line 2789) | class OneFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 2794) | def _init_weights(self, module: nn.Module): class OneFormerModel (line 2908) | class OneFormerModel(OneFormerPreTrainedModel): method __init__ (line 2911) | def __init__(self, config: OneFormerConfig): method forward (line 2927) | def forward( class OneFormerForUniversalSegmentation (line 3037) | class OneFormerForUniversalSegmentation(OneFormerPreTrainedModel): method __init__ (line 3040) | def __init__(self, config: OneFormerConfig): method get_loss_dict (line 3071) | def get_loss_dict( method get_loss (line 3101) | def get_loss(self, loss_dict: Dict[str, Tensor]) -> Tensor: method forward (line 3106) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/oneformer/processing_oneformer.py class OneFormerProcessor (line 29) | class OneFormerProcessor(ProcessorMixin): method __init__ (line 50) | def __init__( method _preprocess_text (line 63) | def _preprocess_text(self, text_list=None, max_length=77): method __call__ (line 79) | 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: mplsandbox_for_rl/transformers/src/transformers/models/openai/configuration_openai.py class OpenAIGPTConfig (line 25) | class OpenAIGPTConfig(PretrainedConfig): method __init__ (line 117) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/openai/convert_openai_original_tf_checkpoint_to_pytorch.py function convert_openai_checkpoint_to_pytorch (line 28) | def convert_openai_checkpoint_to_pytorch(openai_checkpoint_folder_path, ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/openai/modeling_openai.py function load_tf_weights_in_openai_gpt (line 49) | def load_tf_weights_in_openai_gpt(model, config, openai_checkpoint_folde... class Attention (line 130) | class Attention(nn.Module): method __init__ (line 131) | def __init__(self, nx, n_positions, config, scale=False): method prune_heads (line 152) | def prune_heads(self, heads): method _attn (line 167) | def _attn(self, q, k, v, attention_mask=None, head_mask=None, output_a... method merge_heads (line 192) | def merge_heads(self, x): method split_heads (line 197) | def split_heads(self, x, k=False): method forward (line 205) | def forward(self, x, attention_mask=None, head_mask=None, output_atten... class MLP (line 223) | class MLP(nn.Module): method __init__ (line 224) | def __init__(self, n_state, config): # in MLP: n_state=3072 (4 * n_embd) method forward (line 232) | def forward(self, x): class Block (line 238) | class Block(nn.Module): method __init__ (line 239) | def __init__(self, n_positions, config, scale=False): method forward (line 247) | def forward(self, x, attention_mask=None, head_mask=None, output_atten... class OpenAIGPTPreTrainedModel (line 264) | class OpenAIGPTPreTrainedModel(PreTrainedModel): method _init_weights (line 274) | def _init_weights(self, module): class OpenAIGPTDoubleHeadsModelOutput (line 292) | class OpenAIGPTDoubleHeadsModelOutput(ModelOutput): class OpenAIGPTModel (line 396) | class OpenAIGPTModel(OpenAIGPTPreTrainedModel): method __init__ (line 397) | def __init__(self, config): method get_input_embeddings (line 409) | def get_input_embeddings(self): method set_input_embeddings (line 412) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 415) | def _prune_heads(self, heads_to_prune): method forward (line 428) | def forward( class OpenAIGPTLMHeadModel (line 527) | class OpenAIGPTLMHeadModel(OpenAIGPTPreTrainedModel): method __init__ (line 530) | def __init__(self, config): method get_output_embeddings (line 538) | def get_output_embeddings(self): method set_output_embeddings (line 541) | def set_output_embeddings(self, new_embeddings): method forward (line 550) | def forward( method prepare_inputs_for_generation (line 605) | def prepare_inputs_for_generation(self, input_ids: torch.LongTensor, *... class OpenAIGPTDoubleHeadsModel (line 618) | class OpenAIGPTDoubleHeadsModel(OpenAIGPTPreTrainedModel): method __init__ (line 621) | def __init__(self, config): method get_output_embeddings (line 632) | def get_output_embeddings(self): method set_output_embeddings (line 635) | def set_output_embeddings(self, new_embeddings): method forward (line 640) | def forward( class OpenAIGPTForSequenceClassification (line 746) | class OpenAIGPTForSequenceClassification(OpenAIGPTPreTrainedModel): method __init__ (line 747) | def __init__(self, config): method forward (line 762) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/openai/modeling_tf_openai.py class TFAttention (line 59) | class TFAttention(keras.layers.Layer): method __init__ (line 60) | def __init__(self, nx, config, scale=False, **kwargs): method prune_heads (line 80) | def prune_heads(self, heads): method causal_attention_mask (line 84) | def causal_attention_mask(nd, ns): method _attn (line 94) | def _attn(self, q, k, v, attention_mask, head_mask, output_attentions,... method merge_heads (line 124) | def merge_heads(self, x): method split_heads (line 130) | def split_heads(self, x): method call (line 136) | def call(self, x, attention_mask, head_mask, output_attentions, traini... method build (line 153) | def build(self, input_shape=None): class TFMLP (line 165) | class TFMLP(keras.layers.Layer): method __init__ (line 166) | def __init__(self, n_state, config, **kwargs): method call (line 176) | def call(self, x, training=False): method build (line 182) | def build(self, input_shape=None): class TFBlock (line 194) | class TFBlock(keras.layers.Layer): method __init__ (line 195) | def __init__(self, config, scale=False, **kwargs): method call (line 204) | def call(self, x, attention_mask, head_mask, output_attentions, traini... method build (line 215) | def build(self, input_shape=None): class TFOpenAIGPTMainLayer (line 234) | class TFOpenAIGPTMainLayer(keras.layers.Layer): method __init__ (line 237) | def __init__(self, config, *inputs, **kwargs): method build (line 255) | def build(self, input_shape=None): method get_input_embeddings (line 274) | def get_input_embeddings(self): method set_input_embeddings (line 277) | def set_input_embeddings(self, value): method _prune_heads (line 281) | def _prune_heads(self, heads_to_prune): method call (line 288) | def call( class TFOpenAIGPTPreTrainedModel (line 399) | class TFOpenAIGPTPreTrainedModel(TFPreTrainedModel): class TFOpenAIGPTDoubleHeadsModelOutput (line 410) | class TFOpenAIGPTDoubleHeadsModelOutput(ModelOutput): class TFOpenAIGPTModel (line 540) | class TFOpenAIGPTModel(TFOpenAIGPTPreTrainedModel): method __init__ (line 541) | def __init__(self, config, *inputs, **kwargs): method call (line 552) | def call( method build (line 579) | def build(self, input_shape=None): class TFOpenAIGPTLMHeadModel (line 595) | class TFOpenAIGPTLMHeadModel(TFOpenAIGPTPreTrainedModel, TFCausalLanguag... method __init__ (line 596) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 602) | def get_output_embeddings(self): method set_output_embeddings (line 605) | def set_output_embeddings(self, value): method call (line 615) | def call( method prepare_inputs_for_generation (line 669) | def prepare_inputs_for_generation(self, inputs, **kwargs): method build (line 672) | def build(self, input_shape=None): class TFOpenAIGPTDoubleHeadsModel (line 690) | class TFOpenAIGPTDoubleHeadsModel(TFOpenAIGPTPreTrainedModel): method __init__ (line 691) | def __init__(self, config, *inputs, **kwargs): method call (line 702) | def call( method input_signature (line 794) | def input_signature(self): method build (line 801) | def build(self, input_shape=None): class TFOpenAIGPTForSequenceClassification (line 828) | class TFOpenAIGPTForSequenceClassification(TFOpenAIGPTPreTrainedModel, T... method __init__ (line 829) | def __init__(self, config, *inputs, **kwargs): method call (line 848) | def call( method build (line 928) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/openai/tokenization_openai.py function whitespace_tokenize (line 36) | def whitespace_tokenize(text): class BasicTokenizer (line 46) | class BasicTokenizer: method __init__ (line 69) | def __init__( method tokenize (line 85) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 123) | def _run_strip_accents(self, text): method _run_split_on_punc (line 134) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 156) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 169) | def _is_chinese_char(self, cp): method _clean_text (line 193) | def _clean_text(self, text): function get_pairs (line 207) | def get_pairs(word): function text_standardize (line 220) | def text_standardize(text): class OpenAIGPTTokenizer (line 235) | 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: mplsandbox_for_rl/transformers/src/transformers/models/openai/tokenization_openai_fast.py class OpenAIGPTTokenizerFast (line 29) | class OpenAIGPTTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 54) | def __init__(self, vocab_file=None, merges_file=None, tokenizer_file=N... method do_lower_case (line 58) | def do_lower_case(self): method save_vocabulary (line 61) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/opt/configuration_opt.py class OPTConfig (line 24) | class OPTConfig(PretrainedConfig): method __init__ (line 92) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/opt/convert_opt_original_pytorch_checkpoint_to_pytorch.py function load_checkpoint (line 30) | def load_checkpoint(checkpoint_path): function convert_opt_checkpoint (line 80) | def convert_opt_checkpoint(checkpoint_path, pytorch_dump_folder_path, co... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/opt/modeling_opt.py class OPTLearnedPositionalEmbedding (line 63) | class OPTLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 68) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 74) | def forward(self, attention_mask: torch.LongTensor, past_key_values_le... class OPTAttention (line 87) | class OPTAttention(nn.Module): method __init__ (line 90) | def __init__( method _shape (line 119) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 122) | def forward( class OptFlashAttention2 (line 243) | class OptFlashAttention2(OPTAttention): method __init__ (line 251) | def __init__(self, *args, **kwargs): method forward (line 259) | def forward( class OPTDecoderLayer (line 368) | class OPTDecoderLayer(nn.Module): method __init__ (line 369) | def __init__(self, config: OPTConfig): method forward (line 386) | def forward( class OPTPreTrainedModel (line 485) | class OPTPreTrainedModel(PreTrainedModel): method _init_weights (line 492) | def _init_weights(self, module): class OPTDecoder (line 566) | class OPTDecoder(OPTPreTrainedModel): method __init__ (line 574) | def __init__(self, config: OPTConfig): method get_input_embeddings (line 612) | def get_input_embeddings(self): method set_input_embeddings (line 615) | def set_input_embeddings(self, value): method forward (line 618) | def forward( class OPTModel (line 819) | class OPTModel(OPTPreTrainedModel): method __init__ (line 820) | def __init__(self, config: OPTConfig): method get_input_embeddings (line 826) | def get_input_embeddings(self): method set_input_embeddings (line 829) | def set_input_embeddings(self, value): method get_decoder (line 832) | def get_decoder(self): method forward (line 842) | def forward( class OPTForCausalLM (line 885) | class OPTForCausalLM(OPTPreTrainedModel): method __init__ (line 888) | def __init__(self, config): method get_input_embeddings (line 898) | def get_input_embeddings(self): method set_input_embeddings (line 901) | def set_input_embeddings(self, value): method get_output_embeddings (line 904) | def get_output_embeddings(self): method set_output_embeddings (line 907) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 910) | def set_decoder(self, decoder): method get_decoder (line 913) | def get_decoder(self): method forward (line 917) | def forward( method prepare_inputs_for_generation (line 1048) | def prepare_inputs_for_generation( method _reorder_cache (line 1079) | def _reorder_cache(past_key_values, beam_idx): class OPTForSequenceClassification (line 1103) | class OPTForSequenceClassification(OPTPreTrainedModel): method __init__ (line 1104) | def __init__(self, config: OPTConfig): method forward (line 1121) | def forward( method get_input_embeddings (line 1212) | def get_input_embeddings(self): method set_input_embeddings (line 1215) | def set_input_embeddings(self, value): class OPTForQuestionAnswering (line 1226) | class OPTForQuestionAnswering(OPTPreTrainedModel): method __init__ (line 1227) | def __init__(self, config: OPTConfig): method forward (line 1237) | def forward( method get_input_embeddings (line 1343) | def get_input_embeddings(self): method set_input_embeddings (line 1346) | def set_input_embeddings(self, value): FILE: mplsandbox_for_rl/transformers/src/transformers/models/opt/modeling_tf_opt.py function _make_causal_mask (line 64) | 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(keras.layers.Embedding): 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(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( method build (line 271) | def build(self, input_shape=None): class TFOPTDecoderLayer (line 289) | class TFOPTDecoderLayer(keras.layers.Layer): method __init__ (line 290) | def __init__(self, config: OPTConfig, **kwargs): method call (line 310) | def call( method build (line 375) | def build(self, input_shape=None): class TFOPTPreTrainedModel (line 442) | class TFOPTPreTrainedModel(TFPreTrainedModel): class TFOPTDecoder (line 502) | class TFOPTDecoder(keras.layers.Layer): method __init__ (line 505) | def __init__(self, config: OPTConfig, **kwargs): method get_embed_tokens (line 539) | def get_embed_tokens(self): method set_embed_tokens (line 542) | def set_embed_tokens(self, embed_tokens): method set_input_embeddings (line 545) | def set_input_embeddings(self, new_embeddings): method get_input_embeddings (line 549) | def get_input_embeddings(self): method _prepare_decoder_attention_mask (line 552) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method call (line 575) | def call( method build (line 737) | def build(self, input_shape=None): class TFOPTMainLayer (line 763) | class TFOPTMainLayer(keras.layers.Layer): method __init__ (line 766) | def __init__(self, config: OPTConfig, **kwargs): method get_input_embeddings (line 771) | def get_input_embeddings(self): method set_input_embeddings (line 774) | def set_input_embeddings(self, new_embeddings): method call (line 778) | def call( method build (line 822) | def build(self, input_shape=None): class TFOPTModel (line 836) | class TFOPTModel(TFOPTPreTrainedModel): method __init__ (line 839) | def __init__(self, config: OPTConfig, **kwargs): method get_input_embeddings (line 844) | def get_input_embeddings(self): method set_input_embeddings (line 847) | def set_input_embeddings(self, new_embeddings): method call (line 858) | def call( method serving_output (line 902) | def serving_output(self, output): method build (line 914) | def build(self, input_shape=None): class TFOPTForCausalLM (line 930) | class TFOPTForCausalLM(TFOPTPreTrainedModel, TFCausalLanguageModelingLoss): method __init__ (line 933) | def __init__(self, config: OPTConfig, **kwargs): method get_output_embeddings (line 938) | def get_output_embeddings(self): method prepare_inputs_for_generation (line 941) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 963) | def call( method serving_output (line 1075) | def serving_output(self, output): method build (line 1088) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/owlv2/configuration_owlv2.py class Owlv2TextConfig (line 32) | class Owlv2TextConfig(PretrainedConfig): method __init__ (line 94) | def __init__( method from_pretrained (line 127) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class Owlv2VisionConfig (line 146) | class Owlv2VisionConfig(PretrainedConfig): method __init__ (line 201) | def __init__( method from_pretrained (line 233) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class Owlv2Config (line 252) | class Owlv2Config(PretrainedConfig): method __init__ (line 280) | def __init__( method from_pretrained (line 308) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method from_text_vision_configs (line 322) | def from_text_vision_configs(cls, text_config: Dict, vision_config: Di... FILE: mplsandbox_for_rl/transformers/src/transformers/models/owlv2/convert_owlv2_to_hf.py function get_owlv2_config (line 47) | def get_owlv2_config(model_name): function flatten_nested_dict (line 97) | def flatten_nested_dict(params, parent_key="", sep="/"): function create_rename_keys (line 111) | def create_rename_keys(config, model_name): function rename_and_reshape_key (line 216) | def rename_and_reshape_key(dct, old, new, config): function convert_owlv2_checkpoint (line 237) | def convert_owlv2_checkpoint(model_name, checkpoint_path, pytorch_dump_f... FILE: mplsandbox_for_rl/transformers/src/transformers/models/owlv2/image_processing_owlv2.py function _upcast (line 68) | def _upcast(t): function box_area (line 77) | def box_area(boxes): function box_iou (line 93) | def box_iou(boxes1, boxes2): function _preprocess_resize_output_shape (line 109) | def _preprocess_resize_output_shape(image, output_shape): function _clip_warp_output (line 148) | def _clip_warp_output(input_image, output_image): class Owlv2ImageProcessor (line 178) | class Owlv2ImageProcessor(BaseImageProcessor): method __init__ (line 212) | def __init__( method pad (line 237) | def pad( method resize (line 268) | def resize( method preprocess (line 336) | def preprocess( method post_process_object_detection (line 468) | def post_process_object_detection( method post_process_image_guided_detection (line 528) | def post_process_image_guided_detection(self, outputs, threshold=0.0, ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/owlv2/modeling_owlv2.py function contrastive_loss (line 52) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function owlv2_loss (line 57) | def owlv2_loss(similarity: torch.Tensor) -> torch.Tensor: class Owlv2Output (line 64) | class Owlv2Output(ModelOutput): method to_tuple (line 94) | def to_tuple(self) -> Tuple[Any]: function _upcast (line 102) | def _upcast(t: Tensor) -> Tensor: function box_area (line 111) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 128) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 145) | def generalized_box_iou(boxes1, boxes2): class Owlv2ObjectDetectionOutput (line 170) | class Owlv2ObjectDetectionOutput(ModelOutput): method to_tuple (line 216) | def to_tuple(self) -> Tuple[Any]: class Owlv2ImageGuidedObjectDetectionOutput (line 225) | class Owlv2ImageGuidedObjectDetectionOutput(ModelOutput): method to_tuple (line 266) | def to_tuple(self) -> Tuple[Any]: class Owlv2VisionEmbeddings (line 274) | class Owlv2VisionEmbeddings(nn.Module): method __init__ (line 275) | def __init__(self, config: Owlv2VisionConfig): method forward (line 294) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class Owlv2TextEmbeddings (line 307) | class Owlv2TextEmbeddings(nn.Module): method __init__ (line 308) | def __init__(self, config: Owlv2TextConfig): method forward (line 318) | def forward( class Owlv2Attention (line 339) | class Owlv2Attention(nn.Module): method __init__ (line 342) | def __init__(self, config): method _shape (line 361) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 364) | def forward( class Owlv2MLP (line 447) | class Owlv2MLP(nn.Module): method __init__ (line 448) | def __init__(self, config): method forward (line 455) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Owlv2EncoderLayer (line 463) | class Owlv2EncoderLayer(nn.Module): method __init__ (line 464) | def __init__(self, config: Owlv2Config): method forward (line 472) | def forward( class Owlv2PreTrainedModel (line 514) | class Owlv2PreTrainedModel(PreTrainedModel): method _init_weights (line 525) | def _init_weights(self, module): class Owlv2Encoder (line 682) | class Owlv2Encoder(nn.Module): method __init__ (line 691) | def __init__(self, config: Owlv2Config): method forward (line 696) | def forward( class Owlv2TextTransformer (line 772) | class Owlv2TextTransformer(nn.Module): method __init__ (line 773) | def __init__(self, config: Owlv2TextConfig): method forward (line 783) | def forward( class Owlv2TextModel (line 847) | class Owlv2TextModel(Owlv2PreTrainedModel): method __init__ (line 850) | def __init__(self, config: Owlv2TextConfig): method get_input_embeddings (line 856) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 859) | def set_input_embeddings(self, value): method forward (line 864) | def forward( class Owlv2VisionTransformer (line 900) | class Owlv2VisionTransformer(nn.Module): method __init__ (line 901) | def __init__(self, config: Owlv2VisionConfig): method forward (line 912) | def forward( class Owlv2VisionModel (line 959) | class Owlv2VisionModel(Owlv2PreTrainedModel): method __init__ (line 963) | def __init__(self, config: Owlv2VisionConfig): method get_input_embeddings (line 969) | def get_input_embeddings(self) -> nn.Module: method forward (line 974) | def forward( class Owlv2Model (line 1011) | class Owlv2Model(Owlv2PreTrainedModel): method __init__ (line 1014) | def __init__(self, config: Owlv2Config): method get_text_features (line 1047) | def get_text_features( method get_image_features (line 1082) | def get_image_features( method forward (line 1128) | def forward( class Owlv2BoxPredictionHead (line 1217) | class Owlv2BoxPredictionHead(nn.Module): method __init__ (line 1218) | def __init__(self, config: Owlv2Config, out_dim: int = 4): method forward (line 1227) | def forward(self, image_features: torch.Tensor) -> torch.FloatTensor: class Owlv2ClassPredictionHead (line 1237) | class Owlv2ClassPredictionHead(nn.Module): method __init__ (line 1238) | def __init__(self, config: Owlv2Config): method forward (line 1249) | def forward( class Owlv2ForObjectDetection (line 1285) | class Owlv2ForObjectDetection(Owlv2PreTrainedModel): method __init__ (line 1288) | def __init__(self, config: Owlv2Config): method normalize_grid_corner_coordinates (line 1304) | def normalize_grid_corner_coordinates(num_patches: int) -> torch.Tensor: method objectness_predictor (line 1319) | def objectness_predictor(self, image_features: torch.FloatTensor) -> t... method compute_box_bias (line 1335) | def compute_box_bias(self, num_patches: int, feature_map: Optional[tor... method box_predictor (line 1354) | def box_predictor( method class_predictor (line 1379) | def class_predictor( method image_text_embedder (line 1399) | def image_text_embedder( method image_embedder (line 1441) | def image_embedder( method embed_image_query (line 1473) | def embed_image_query( method image_guided_detection (line 1516) | def image_guided_detection( method forward (line 1626) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/owlv2/processing_owlv2.py class Owlv2Processor (line 28) | class Owlv2Processor(ProcessorMixin): method __init__ (line 45) | def __init__(self, image_processor, tokenizer, **kwargs): method __call__ (line 49) | def __call__(self, text=None, images=None, query_images=None, padding=... method post_process_object_detection (line 161) | def post_process_object_detection(self, *args, **kwargs): method post_process_image_guided_detection (line 169) | def post_process_image_guided_detection(self, *args, **kwargs): method batch_decode (line 177) | def batch_decode(self, *args, **kwargs): method decode (line 185) | def decode(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/owlvit/configuration_owlvit.py class OwlViTTextConfig (line 34) | 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 147) | class OwlViTVisionConfig(PretrainedConfig): method __init__ (line 202) | def __init__( method from_pretrained (line 234) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class OwlViTConfig (line 252) | class OwlViTConfig(PretrainedConfig): method __init__ (line 280) | def __init__( method from_pretrained (line 308) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method from_text_vision_configs (line 322) | def from_text_vision_configs(cls, text_config: Dict, vision_config: Di... class OwlViTOnnxConfig (line 337) | class OwlViTOnnxConfig(OnnxConfig): method inputs (line 339) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 349) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 360) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 363) | def generate_dummy_inputs( method default_onnx_opset (line 379) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/owlvit/image_processing_owlvit.py function _upcast (line 53) | def _upcast(t): function box_area (line 61) | def box_area(boxes): function box_iou (line 76) | def box_iou(boxes1, boxes2): class OwlViTImageProcessor (line 92) | class OwlViTImageProcessor(BaseImageProcessor): method __init__ (line 131) | def __init__( method resize (line 170) | def resize( method center_crop (line 208) | def center_crop( method rescale (line 243) | def rescale( method preprocess (line 272) | def preprocess( method post_process (line 415) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 461) | def post_process_object_detection( method post_process_image_guided_detection (line 517) | def post_process_image_guided_detection(self, outputs, threshold=0.0, ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/owlvit/modeling_owlvit.py function contrastive_loss (line 52) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function owlvit_loss (line 57) | def owlvit_loss(similarity: torch.Tensor) -> torch.Tensor: class OwlViTOutput (line 64) | class OwlViTOutput(ModelOutput): method to_tuple (line 94) | def to_tuple(self) -> Tuple[Any]: function _upcast (line 102) | def _upcast(t: Tensor) -> Tensor: function box_area (line 111) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 128) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 145) | def generalized_box_iou(boxes1, boxes2): class OwlViTObjectDetectionOutput (line 170) | class OwlViTObjectDetectionOutput(ModelOutput): method to_tuple (line 212) | def to_tuple(self) -> Tuple[Any]: class OwlViTImageGuidedObjectDetectionOutput (line 220) | class OwlViTImageGuidedObjectDetectionOutput(ModelOutput): method to_tuple (line 261) | def to_tuple(self) -> Tuple[Any]: class OwlViTVisionEmbeddings (line 268) | class OwlViTVisionEmbeddings(nn.Module): method __init__ (line 269) | def __init__(self, config: OwlViTVisionConfig): method forward (line 288) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class OwlViTTextEmbeddings (line 300) | class OwlViTTextEmbeddings(nn.Module): method __init__ (line 301) | def __init__(self, config: OwlViTTextConfig): method forward (line 311) | def forward( class OwlViTAttention (line 331) | class OwlViTAttention(nn.Module): method __init__ (line 334) | def __init__(self, config): method _shape (line 353) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 356) | def forward( class OwlViTMLP (line 439) | class OwlViTMLP(nn.Module): method __init__ (line 440) | def __init__(self, config): method forward (line 447) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class OwlViTEncoderLayer (line 455) | class OwlViTEncoderLayer(nn.Module): method __init__ (line 456) | def __init__(self, config: OwlViTConfig): method forward (line 464) | def forward( class OwlViTPreTrainedModel (line 505) | class OwlViTPreTrainedModel(PreTrainedModel): method _init_weights (line 516) | def _init_weights(self, module): class OwlViTEncoder (line 670) | class OwlViTEncoder(nn.Module): method __init__ (line 679) | def __init__(self, config: OwlViTConfig): method forward (line 684) | def forward( class OwlViTTextTransformer (line 759) | class OwlViTTextTransformer(nn.Module): method __init__ (line 760) | def __init__(self, config: OwlViTTextConfig): method forward (line 770) | def forward( class OwlViTTextModel (line 833) | class OwlViTTextModel(OwlViTPreTrainedModel): method __init__ (line 836) | def __init__(self, config: OwlViTTextConfig): method get_input_embeddings (line 842) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 845) | def set_input_embeddings(self, value): method forward (line 850) | def forward( class OwlViTVisionTransformer (line 885) | class OwlViTVisionTransformer(nn.Module): method __init__ (line 886) | def __init__(self, config: OwlViTVisionConfig): method forward (line 897) | def forward( class OwlViTVisionModel (line 943) | class OwlViTVisionModel(OwlViTPreTrainedModel): method __init__ (line 947) | def __init__(self, config: OwlViTVisionConfig): method get_input_embeddings (line 953) | def get_input_embeddings(self) -> nn.Module: method forward (line 958) | def forward( class OwlViTModel (line 994) | class OwlViTModel(OwlViTPreTrainedModel): method __init__ (line 997) | def __init__(self, config: OwlViTConfig): method get_text_features (line 1030) | def get_text_features( method get_image_features (line 1065) | def get_image_features( method forward (line 1111) | def forward( class OwlViTBoxPredictionHead (line 1199) | class OwlViTBoxPredictionHead(nn.Module): method __init__ (line 1200) | def __init__(self, config: OwlViTConfig, out_dim: int = 4): method forward (line 1209) | def forward(self, image_features: torch.Tensor) -> torch.FloatTensor: class OwlViTClassPredictionHead (line 1218) | class OwlViTClassPredictionHead(nn.Module): method __init__ (line 1219) | def __init__(self, config: OwlViTConfig): method forward (line 1230) | def forward( class OwlViTForObjectDetection (line 1266) | class OwlViTForObjectDetection(OwlViTPreTrainedModel): method __init__ (line 1269) | def __init__(self, config: OwlViTConfig): method normalize_grid_corner_coordinates (line 1283) | def normalize_grid_corner_coordinates(num_patches: int) -> torch.Tensor: method compute_box_bias (line 1299) | def compute_box_bias(self, num_patches: int, feature_map: Optional[tor... method box_predictor (line 1317) | def box_predictor( method class_predictor (line 1341) | def class_predictor( method image_text_embedder (line 1360) | def image_text_embedder( method image_embedder (line 1401) | def image_embedder( method embed_image_query (line 1432) | def embed_image_query( method image_guided_detection (line 1475) | def image_guided_detection( method forward (line 1570) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/owlvit/processing_owlvit.py class OwlViTProcessor (line 29) | class OwlViTProcessor(ProcessorMixin): method __init__ (line 46) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 64) | def __call__(self, text=None, images=None, query_images=None, padding=... method post_process (line 175) | def post_process(self, *args, **kwargs): method post_process_object_detection (line 182) | def post_process_object_detection(self, *args, **kwargs): method post_process_image_guided_detection (line 189) | def post_process_image_guided_detection(self, *args, **kwargs): method batch_decode (line 196) | def batch_decode(self, *args, **kwargs): method decode (line 203) | def decode(self, *args, **kwargs): method feature_extractor_class (line 211) | def feature_extractor_class(self): method feature_extractor (line 219) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/paligemma/configuration_paligemma.py class PaliGemmaConfig (line 26) | class PaliGemmaConfig(PretrainedConfig): method __init__ (line 78) | def __init__( method ignore_index (line 133) | def ignore_index(self): method ignore_index (line 141) | def ignore_index(self, value): method vocab_size (line 145) | def vocab_size(self): method vocab_size (line 153) | def vocab_size(self, value): method to_dict (line 156) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/paligemma/convert_paligemma_weights_to_hf.py function get_paligemma_config (line 46) | def get_paligemma_config(variant: str, precision: str): function slice_state_dict (line 92) | def slice_state_dict(state_dict, config): function flatten_nested_dict (line 206) | def flatten_nested_dict(params, parent_key="", sep="/"): function convert_paligemma_checkpoint (line 221) | def convert_paligemma_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/paligemma/modeling_paligemma.py class PaliGemmaCausalLMOutputWithPast (line 49) | class PaliGemmaCausalLMOutputWithPast(ModelOutput): class PaliGemmaMultiModalProjector (line 90) | class PaliGemmaMultiModalProjector(nn.Module): method __init__ (line 91) | def __init__(self, config: PaliGemmaConfig): method forward (line 95) | def forward(self, image_features): class PaliGemmaPreTrainedModel (line 122) | class PaliGemmaPreTrainedModel(PreTrainedModel): method _init_weights (line 135) | def _init_weights(self, module): method _supports_sdpa (line 157) | def _supports_sdpa(self): class PaliGemmaForConditionalGeneration (line 239) | class PaliGemmaForConditionalGeneration(PaliGemmaPreTrainedModel): method __init__ (line 240) | def __init__(self, config: PaliGemmaConfig): method get_input_embeddings (line 259) | def get_input_embeddings(self): method set_input_embeddings (line 263) | def set_input_embeddings(self, value): method get_output_embeddings (line 267) | def get_output_embeddings(self): method set_output_embeddings (line 271) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 275) | def set_decoder(self, decoder): method get_decoder (line 279) | def get_decoder(self): method tie_weights (line 283) | def tie_weights(self): method resize_token_embeddings (line 286) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _update_causal_mask (line 295) | def _update_causal_mask( method forward (line 344) | def forward( method prepare_inputs_for_generation (line 495) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/paligemma/processing_paligemma.py function is_url (line 42) | def is_url(val) -> bool: function is_image_or_image_url (line 47) | def is_image_or_image_url(elem): function _is_str_or_image (line 51) | def _is_str_or_image(elem): function build_string_from_input (line 55) | def build_string_from_input(prompt, bos_token, image_seq_len, image_token): class PaliGemmaProcessor (line 76) | class PaliGemmaProcessor(ProcessorMixin): method __init__ (line 97) | def __init__( method __call__ (line 123) | def __call__( method batch_decode (line 288) | def batch_decode(self, *args, **kwargs): method decode (line 296) | def decode(self, *args, **kwargs): method model_input_names (line 305) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/patchtsmixer/configuration_patchtsmixer.py class PatchTSMixerConfig (line 26) | class PatchTSMixerConfig(PretrainedConfig): method __init__ (line 150) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/patchtsmixer/modeling_patchtsmixer.py class PatchTSMixerGatedAttention (line 79) | class PatchTSMixerGatedAttention(nn.Module): method __init__ (line 88) | def __init__(self, in_size: int, out_size: int): method forward (line 93) | def forward(self, inputs): class PatchTSMixerBatchNorm (line 100) | class PatchTSMixerBatchNorm(nn.Module): method __init__ (line 105) | def __init__(self, config: PatchTSMixerConfig): method forward (line 109) | def forward(self, inputs: torch.Tensor): class PatchTSMixerPositionalEncoding (line 122) | class PatchTSMixerPositionalEncoding(nn.Module): method __init__ (line 127) | def __init__(self, config: PatchTSMixerConfig): method _init_pe (line 136) | def _init_pe(config: PatchTSMixerConfig) -> nn.Parameter: method forward (line 155) | def forward(self, patch_input: torch.Tensor): class PatchTSMixerNormLayer (line 161) | class PatchTSMixerNormLayer(nn.Module): method __init__ (line 169) | def __init__(self, config: PatchTSMixerConfig): method forward (line 179) | def forward(self, inputs: torch.Tensor): class PatchTSMixerMLP (line 210) | class PatchTSMixerMLP(nn.Module): method __init__ (line 211) | def __init__(self, in_features, out_features, config): method forward (line 219) | def forward(self, inputs: torch.Tensor): class PatchTSMixerChannelFeatureMixerBlock (line 233) | class PatchTSMixerChannelFeatureMixerBlock(nn.Module): method __init__ (line 241) | def __init__(self, config: PatchTSMixerConfig): method forward (line 257) | def forward(self, inputs: torch.Tensor): class PatchTSMixerAttention (line 282) | class PatchTSMixerAttention(nn.Module): method __init__ (line 285) | def __init__( method _shape (line 316) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 319) | def forward( class PatchMixerBlock (line 440) | class PatchMixerBlock(nn.Module): method __init__ (line 448) | def __init__(self, config: PatchTSMixerConfig): method forward (line 473) | def forward(self, hidden_state): class FeatureMixerBlock (line 509) | class FeatureMixerBlock(nn.Module): method __init__ (line 518) | def __init__(self, config: PatchTSMixerConfig): method forward (line 534) | def forward(self, hidden: torch.Tensor): class PatchTSMixerLayer (line 554) | class PatchTSMixerLayer(nn.Module): method __init__ (line 564) | def __init__(self, config: PatchTSMixerConfig): method forward (line 575) | def forward(self, hidden: torch.Tensor): class PatchTSMixerBlock (line 592) | class PatchTSMixerBlock(nn.Module): method __init__ (line 600) | def __init__(self, config: PatchTSMixerConfig): method forward (line 607) | def forward(self, hidden_state, output_hidden_states: bool = False): class PatchTSMixerForPredictionHead (line 633) | class PatchTSMixerForPredictionHead(nn.Module): method __init__ (line 641) | def __init__(self, config: PatchTSMixerConfig, distribution_output=None): method forward (line 659) | def forward(self, hidden_features): class PatchTSMixerLinearHead (line 689) | class PatchTSMixerLinearHead(nn.Module): method __init__ (line 697) | def __init__(self, config: PatchTSMixerConfig, distribution_output=None): method forward (line 725) | def forward(self, hidden_features): class PatchTSMixerPreTrainedModel (line 760) | class PatchTSMixerPreTrainedModel(PreTrainedModel): method _init_weights (line 767) | def _init_weights(self, module): class PatchTSMixerPretrainHead (line 785) | class PatchTSMixerPretrainHead(nn.Module): method __init__ (line 793) | def __init__(self, config: PatchTSMixerConfig): method forward (line 799) | def forward(self, hidden_features): function random_masking (line 816) | def random_masking( function forecast_masking (line 875) | def forecast_masking( class PatchTSMixerPatchify (line 944) | class PatchTSMixerPatchify(nn.Module): method __init__ (line 952) | def __init__(self, config: PatchTSMixerConfig): method forward (line 969) | def forward(self, past_values: torch.Tensor): class PatchTSMixerMasking (line 993) | class PatchTSMixerMasking(nn.Module): method __init__ (line 1006) | def __init__(self, config: PatchTSMixerConfig): method forward (line 1017) | def forward(self, patch_input: torch.Tensor): class PatchTSMixerStdScaler (line 1054) | class PatchTSMixerStdScaler(nn.Module): method __init__ (line 1060) | def __init__(self, config: PatchTSMixerConfig): method forward (line 1066) | def forward( class PatchTSMixerMeanScaler (line 1090) | class PatchTSMixerMeanScaler(nn.Module): method __init__ (line 1096) | def __init__(self, config: PatchTSMixerConfig): method forward (line 1103) | def forward( class PatchTSMixerNOPScaler (line 1145) | class PatchTSMixerNOPScaler(nn.Module): method __init__ (line 1150) | def __init__(self, config: PatchTSMixerConfig): method forward (line 1155) | def forward( class PatchTSMixerEncoderOutput (line 1173) | class PatchTSMixerEncoderOutput(ModelOutput): class PatchTSMixerEncoder (line 1188) | class PatchTSMixerEncoder(PatchTSMixerPreTrainedModel): method __init__ (line 1197) | def __init__(self, config: PatchTSMixerConfig): method forward (line 1214) | def forward( class PatchTSMixerModelOutput (line 1265) | class PatchTSMixerModelOutput(ModelOutput): class PatchTSMixerModel (line 1298) | class PatchTSMixerModel(PatchTSMixerPreTrainedModel): method __init__ (line 1299) | def __init__(self, config: PatchTSMixerConfig, mask_input: bool = False): method forward (line 1324) | def forward( class PatchTSMixerForPreTrainingOutput (line 1389) | class PatchTSMixerForPreTrainingOutput(ModelOutput): class PatchTSMixerForPretraining (line 1410) | class PatchTSMixerForPretraining(PatchTSMixerPreTrainedModel): method __init__ (line 1422) | def __init__(self, config: PatchTSMixerConfig): method forward (line 1435) | def forward( class PatchTSMixerForPredictionOutput (line 1503) | class PatchTSMixerForPredictionOutput(ModelOutput): class SamplePatchTSMixerPredictionOutput (line 1532) | class SamplePatchTSMixerPredictionOutput(ModelOutput): class SamplePatchTSMixerRegressionOutput (line 1546) | class SamplePatchTSMixerRegressionOutput(ModelOutput): function nll (line 1560) | def nll(input: torch.distributions.Distribution, target: torch.Tensor) -... function weighted_average (line 1568) | def weighted_average(input_tensor: torch.Tensor, weights: Optional[torch... class PatchTSMixerForPrediction (line 1592) | class PatchTSMixerForPrediction(PatchTSMixerPreTrainedModel): method __init__ (line 1604) | def __init__(self, config: PatchTSMixerConfig): method forward (line 1638) | def forward( method generate (line 1755) | def generate( class PatchTSMixerForTimeSeriesClassificationOutput (line 1804) | class PatchTSMixerForTimeSeriesClassificationOutput(ModelOutput): class PatchTSMixerForTimeSeriesClassification (line 1825) | class PatchTSMixerForTimeSeriesClassification(PatchTSMixerPreTrainedModel): method __init__ (line 1837) | def __init__(self, config: PatchTSMixerConfig): method forward (line 1859) | def forward( class PatchTSMixerForRegressionOutput (line 1935) | class PatchTSMixerForRegressionOutput(ModelOutput): class InjectScalerStatistics4D (line 1956) | class InjectScalerStatistics4D(nn.Module): method __init__ (line 1957) | def __init__(self, d_model: int, num_patches: int, expansion: int = 2): method forward (line 1966) | def forward(self, inputs: torch.Tensor, loc: torch.Tensor, scale: torc... class PatchTSMixerForRegression (line 1996) | class PatchTSMixerForRegression(PatchTSMixerPreTrainedModel): method __init__ (line 2008) | def __init__(self, config: PatchTSMixerConfig): method forward (line 2049) | def forward( method generate (line 2137) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/patchtst/configuration_patchtst.py class PatchTSTConfig (line 26) | class PatchTSTConfig(PretrainedConfig): method __init__ (line 148) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/patchtst/modeling_patchtst.py class PatchTSTAttention (line 38) | class PatchTSTAttention(nn.Module): method __init__ (line 41) | def __init__( method _shape (line 72) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 75) | def forward( class PatchTSTBatchNorm (line 196) | class PatchTSTBatchNorm(nn.Module): method __init__ (line 201) | def __init__(self, config: PatchTSTConfig): method forward (line 205) | def forward(self, inputs: torch.Tensor): function random_masking (line 218) | def random_masking( function forecast_masking (line 276) | def forecast_masking( class PatchTSTPatchify (line 344) | class PatchTSTPatchify(nn.Module): method __init__ (line 352) | def __init__(self, config: PatchTSTConfig): method forward (line 369) | def forward(self, past_values: torch.Tensor): class PatchTSTMasking (line 392) | class PatchTSTMasking(nn.Module): method __init__ (line 405) | def __init__(self, config: PatchTSTConfig): method forward (line 416) | def forward(self, patch_input: torch.Tensor): class PatchTSTEncoderLayer (line 452) | class PatchTSTEncoderLayer(nn.Module): method __init__ (line 457) | def __init__(self, config: PatchTSTConfig): method forward (line 506) | def forward(self, hidden_state: torch.Tensor, output_attentions: Optio... class PatchTSTPreTrainedModel (line 590) | class PatchTSTPreTrainedModel(PreTrainedModel): method _init_weights (line 596) | def _init_weights(self, module): method _set_gradient_checkpointing (line 618) | def _set_gradient_checkpointing(self, module, value=False): class PatchTSTEmbedding (line 623) | class PatchTSTEmbedding(nn.Module): method __init__ (line 624) | def __init__(self, config: PatchTSTConfig): method forward (line 636) | def forward(self, patch_input: torch.Tensor): class PatchTSTPositionalEncoding (line 659) | class PatchTSTPositionalEncoding(nn.Module): method __init__ (line 664) | def __init__(self, config: PatchTSTConfig, num_patches: int): method _init_pe (line 680) | def _init_pe(config: PatchTSTConfig, num_patches: int) -> nn.Parameter: method forward (line 699) | def forward(self, patch_input: torch.Tensor): class PatchTSTEncoder (line 715) | class PatchTSTEncoder(PatchTSTPreTrainedModel): method __init__ (line 720) | def __init__(self, config: PatchTSTConfig, num_patches: int): method forward (line 734) | def forward( class PatchTSTModelOutput (line 795) | class PatchTSTModelOutput(ModelOutput): class PatchTSTForPretrainingOutput (line 826) | class PatchTSTForPretrainingOutput(ModelOutput): class PatchTSTForRegressionOutput (line 855) | class PatchTSTForRegressionOutput(ModelOutput): class PatchTSTForPredictionOutput (line 884) | class PatchTSTForPredictionOutput(ModelOutput): class PatchTSTForClassificationOutput (line 919) | class PatchTSTForClassificationOutput(ModelOutput): class SamplePatchTSTOutput (line 949) | class SamplePatchTSTOutput(ModelOutput): function nll (line 963) | def nll(input: torch.distributions.Distribution, target: torch.Tensor) -... function weighted_average (line 971) | def weighted_average(input_tensor: torch.Tensor, weights: Optional[torch... class PatchTSTStdScaler (line 996) | class PatchTSTStdScaler(nn.Module): method __init__ (line 1002) | def __init__(self, config: PatchTSTConfig): method forward (line 1008) | def forward( class PatchTSTMeanScaler (line 1032) | class PatchTSTMeanScaler(nn.Module): method __init__ (line 1038) | def __init__(self, config: PatchTSTConfig): method forward (line 1045) | def forward( class PatchTSTNOPScaler (line 1087) | class PatchTSTNOPScaler(nn.Module): method __init__ (line 1092) | def __init__(self, config: PatchTSTConfig): method forward (line 1097) | def forward( class PatchTSTScaler (line 1114) | class PatchTSTScaler(nn.Module): method __init__ (line 1115) | def __init__(self, config: PatchTSTConfig): method forward (line 1124) | def forward( class PatchTSTModel (line 1146) | class PatchTSTModel(PatchTSTPreTrainedModel): method __init__ (line 1147) | def __init__(self, config: PatchTSTConfig): method forward (line 1165) | def forward( class PatchTSTMaskPretrainHead (line 1258) | class PatchTSTMaskPretrainHead(nn.Module): method __init__ (line 1263) | def __init__(self, config: PatchTSTConfig): method forward (line 1269) | def forward(self, embedding: torch.Tensor) -> torch.Tensor: class PatchTSTForPretraining (line 1290) | class PatchTSTForPretraining(PatchTSTPreTrainedModel): method __init__ (line 1291) | def __init__(self, config: PatchTSTConfig): method forward (line 1301) | def forward( class PatchTSTClassificationHead (line 1401) | class PatchTSTClassificationHead(nn.Module): method __init__ (line 1402) | def __init__(self, config: PatchTSTConfig): method forward (line 1410) | def forward(self, embedding: torch.Tensor): class PatchTSTForClassification (line 1442) | class PatchTSTForClassification(PatchTSTPreTrainedModel): method __init__ (line 1443) | def __init__(self, config: PatchTSTConfig): method forward (line 1457) | def forward( class PatchTSTPredictionHead (line 1543) | class PatchTSTPredictionHead(nn.Module): method __init__ (line 1544) | def __init__(self, config: PatchTSTConfig, num_patches, distribution_o... method forward (line 1581) | def forward(self, embedding: torch.Tensor): class PatchTSTForPrediction (line 1637) | class PatchTSTForPrediction(PatchTSTPreTrainedModel): method __init__ (line 1638) | def __init__(self, config: PatchTSTConfig): method forward (line 1667) | def forward( method generate (line 1776) | def generate( class PatchTSTRegressionHead (line 1824) | class PatchTSTRegressionHead(nn.Module): method __init__ (line 1829) | def __init__(self, config: PatchTSTConfig, distribution_output=None): method forward (line 1846) | def forward(self, embedding: torch.Tensor): class PatchTSTForRegression (line 1883) | class PatchTSTForRegression(PatchTSTPreTrainedModel): method __init__ (line 1884) | def __init__(self, config: PatchTSTConfig): method forward (line 1910) | def forward( method generate (line 1993) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pegasus/configuration_pegasus.py class PegasusConfig (line 24) | class PegasusConfig(PretrainedConfig): method __init__ (line 100) | def __init__( method num_attention_heads (line 156) | def num_attention_heads(self) -> int: method hidden_size (line 160) | def hidden_size(self) -> int: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py function shift_tokens_right (line 212) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... function create_sinusoidal_positions (line 225) | def create_sinusoidal_positions(n_pos, dim): class FlaxPegasusAttention (line 236) | class FlaxPegasusAttention(nn.Module): method setup (line 245) | def setup(self) -> None: method _split_heads (line 271) | def _split_heads(self, hidden_states): method _merge_heads (line 274) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 278) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 309) | def __call__( class FlaxPegasusEncoderLayer (line 404) | class FlaxPegasusEncoderLayer(nn.Module): method setup (line 408) | def setup(self) -> None: method __call__ (line 431) | def __call__( class FlaxPegasusEncoderLayerCollection (line 461) | class FlaxPegasusEncoderLayerCollection(nn.Module): method setup (line 465) | def setup(self): method __call__ (line 472) | def __call__( class FlaxPegasusDecoderLayer (line 516) | class FlaxPegasusDecoderLayer(nn.Module): method setup (line 520) | def setup(self) -> None: method __call__ (line 553) | def __call__( class FlaxPegasusDecoderLayerCollection (line 605) | class FlaxPegasusDecoderLayerCollection(nn.Module): method setup (line 609) | def setup(self): method __call__ (line 616) | def __call__( class FlaxPegasusEncoder (line 675) | class FlaxPegasusEncoder(nn.Module): method setup (line 680) | def setup(self): method __call__ (line 692) | def __call__( class FlaxPegasusDecoder (line 742) | class FlaxPegasusDecoder(nn.Module): method setup (line 747) | def setup(self): method __call__ (line 760) | def __call__( class FlaxPegasusModule (line 818) | class FlaxPegasusModule(nn.Module): method setup (line 822) | def setup(self): method _get_encoder_module (line 833) | def _get_encoder_module(self): method _get_decoder_module (line 836) | def _get_decoder_module(self): method __call__ (line 839) | def __call__( class FlaxPegasusPreTrainedModel (line 888) | class FlaxPegasusPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 893) | def __init__( method init_weights (line 905) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 939) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 982) | def encode( method decode (line 1045) | def decode( method __call__ (line 1158) | def __call__( class FlaxPegasusModel (line 1222) | class FlaxPegasusModel(FlaxPegasusPreTrainedModel): class FlaxPegasusForConditionalGenerationModule (line 1232) | class FlaxPegasusForConditionalGenerationModule(nn.Module): method setup (line 1237) | def setup(self): method _get_encoder_module (line 1247) | def _get_encoder_module(self): method _get_decoder_module (line 1250) | def _get_decoder_module(self): method __call__ (line 1253) | def __call__( class FlaxPegasusForConditionalGeneration (line 1307) | class FlaxPegasusForConditionalGeneration(FlaxPegasusPreTrainedModel): method decode (line 1313) | def decode( method prepare_inputs_for_generation (line 1448) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1479) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/pegasus/modeling_pegasus.py function shift_tokens_right (line 54) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class PegasusSinusoidalPositionalEmbedding (line 71) | class PegasusSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 74) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 79) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 96) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class PegasusAttention (line 106) | class PegasusAttention(nn.Module): method __init__ (line 109) | def __init__( method _shape (line 140) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 143) | def forward( class PegasusEncoderLayer (line 268) | class PegasusEncoderLayer(nn.Module): method __init__ (line 269) | def __init__(self, config: PegasusConfig): method forward (line 287) | def forward( class PegasusDecoderLayer (line 339) | class PegasusDecoderLayer(nn.Module): method __init__ (line 340) | def __init__(self, config: PegasusConfig): method forward (line 369) | def forward( class PegasusPreTrainedModel (line 459) | class PegasusPreTrainedModel(PreTrainedModel): method _init_weights (line 464) | def _init_weights(self, module): class PegasusEncoder (line 608) | class PegasusEncoder(PegasusPreTrainedModel): method __init__ (line 618) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[nn.Em... method resize_position_embeddings (line 646) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 669) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 675) | def forward( class PegasusDecoder (line 809) | class PegasusDecoder(PegasusPreTrainedModel): method __init__ (line 818) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[nn.Em... method get_input_embeddings (line 843) | def get_input_embeddings(self): method set_input_embeddings (line 846) | def set_input_embeddings(self, value): method resize_position_embeddings (line 849) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 872) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 878) | def forward( class PegasusModel (line 1096) | class PegasusModel(PegasusPreTrainedModel): method __init__ (line 1099) | def __init__(self, config: PegasusConfig): method get_input_embeddings (line 1111) | def get_input_embeddings(self): method set_input_embeddings (line 1114) | def set_input_embeddings(self, value): method get_encoder (line 1119) | def get_encoder(self): method get_decoder (line 1122) | def get_decoder(self): method resize_position_embeddings (line 1125) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1142) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1150) | def forward( class PegasusForConditionalGeneration (line 1247) | class PegasusForConditionalGeneration(PegasusPreTrainedModel): method __init__ (line 1252) | def __init__(self, config: PegasusConfig): method get_encoder (line 1261) | def get_encoder(self): method get_decoder (line 1264) | def get_decoder(self): method resize_token_embeddings (line 1267) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 1272) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1281) | def get_output_embeddings(self): method set_output_embeddings (line 1284) | def set_output_embeddings(self, new_embeddings): method resize_position_embeddings (line 1287) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1304) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1313) | def forward( method prepare_inputs_for_generation (line 1392) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1429) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1433) | def _reorder_cache(past_key_values, beam_idx): class PegasusDecoderWrapper (line 1445) | class PegasusDecoderWrapper(PegasusPreTrainedModel): method __init__ (line 1451) | def __init__(self, config): method forward (line 1455) | def forward(self, *args, **kwargs): class PegasusForCausalLM (line 1459) | class PegasusForCausalLM(PegasusPreTrainedModel): method __init__ (line 1462) | def __init__(self, config): method get_input_embeddings (line 1474) | def get_input_embeddings(self): method set_input_embeddings (line 1477) | def set_input_embeddings(self, value): method get_output_embeddings (line 1480) | def get_output_embeddings(self): method set_output_embeddings (line 1483) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1486) | def set_decoder(self, decoder): method get_decoder (line 1489) | def get_decoder(self): method get_position_embeddings (line 1492) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 1498) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 1516) | def forward( method prepare_inputs_for_generation (line 1660) | def prepare_inputs_for_generation( method _reorder_cache (line 1694) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/pegasus/modeling_tf_pegasus.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 TFPegasusSinusoidalPositionalEmbedding (line 121) | class TFPegasusSinusoidalPositionalEmbedding(keras.layers.Layer): method __init__ (line 124) | def __init__(self, num_positions: int, embedding_dim: int, **kwargs): method build (line 133) | def build(self, input_shape: tf.TensorShape): method _init_weight (line 152) | def _init_weight(n_pos: int, dim: int): method call (line 169) | def call( class TFPegasusAttention (line 180) | class TFPegasusAttention(keras.layers.Layer): method __init__ (line 183) | def __init__( method _shape (line 211) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 214) | def call( method build (line 332) | def build(self, input_shape=None): class TFPegasusEncoderLayer (line 351) | class TFPegasusEncoderLayer(keras.layers.Layer): method __init__ (line 352) | def __init__(self, config: PegasusConfig, **kwargs): method call (line 367) | def call( method build (line 407) | def build(self, input_shape=None): class TFPegasusDecoderLayer (line 429) | class TFPegasusDecoderLayer(keras.layers.Layer): method __init__ (line 430) | def __init__(self, config: PegasusConfig, **kwargs): method call (line 458) | def call( method build (line 538) | def build(self, input_shape=None): class TFPegasusPreTrainedModel (line 565) | class TFPegasusPreTrainedModel(TFPreTrainedModel): class TFPegasusEncoder (line 719) | class TFPegasusEncoder(keras.layers.Layer): method __init__ (line 729) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[keras... method get_embed_tokens (line 747) | def get_embed_tokens(self): method set_embed_tokens (line 750) | def set_embed_tokens(self, embed_tokens): method call (line 754) | def call( method build (line 875) | def build(self, input_shape=None): class TFPegasusDecoder (line 892) | class TFPegasusDecoder(keras.layers.Layer): method __init__ (line 902) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[keras... method get_embed_tokens (line 919) | def get_embed_tokens(self): method set_embed_tokens (line 922) | def set_embed_tokens(self, embed_tokens): method call (line 926) | def call( method build (line 1117) | def build(self, input_shape=None): class TFPegasusMainLayer (line 1134) | class TFPegasusMainLayer(keras.layers.Layer): method __init__ (line 1137) | def __init__(self, config: PegasusConfig, **kwargs): method get_input_embeddings (line 1153) | def get_input_embeddings(self): method set_input_embeddings (line 1156) | def set_input_embeddings(self, new_embeddings): method call (line 1162) | def call( method build (line 1243) | def build(self, input_shape=None): class TFPegasusModel (line 1264) | class TFPegasusModel(TFPegasusPreTrainedModel): method __init__ (line 1265) | def __init__(self, config: PegasusConfig, *inputs, **kwargs): method get_encoder (line 1270) | def get_encoder(self): method get_decoder (line 1273) | def get_decoder(self): method call (line 1283) | def call( method serving_output (line 1327) | def serving_output(self, output): method build (line 1346) | def build(self, input_shape=None): class BiasLayer (line 1356) | class BiasLayer(keras.layers.Layer): method __init__ (line 1362) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1369) | def call(self, x): class TFPegasusForConditionalGeneration (line 1377) | class TFPegasusForConditionalGeneration(TFPegasusPreTrainedModel, TFCaus... method __init__ (line 1383) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1392) | def get_decoder(self): method get_encoder (line 1395) | def get_encoder(self): method get_output_embeddings (line 1398) | def get_output_embeddings(self): method set_output_embeddings (line 1401) | def set_output_embeddings(self, value): method get_bias (line 1404) | def get_bias(self): method set_bias (line 1407) | def set_bias(self, value): method call (line 1419) | def call( method serving_output (line 1501) | def serving_output(self, output): method prepare_inputs_for_generation (line 1521) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1559) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method build (line 1562) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/pegasus/tokenization_pegasus.py class PegasusTokenizer (line 34) | class PegasusTokenizer(PreTrainedTokenizer): method __init__ (line 95) | def __init__( method vocab_size (line 171) | def vocab_size(self) -> int: method get_vocab (line 174) | def get_vocab(self) -> Dict[str, int]: method __getstate__ (line 179) | def __getstate__(self): method __setstate__ (line 184) | def __setstate__(self, d): method _tokenize (line 194) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 198) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 203) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 210) | def convert_tokens_to_string(self, tokens): method num_special_tokens_to_add (line 224) | def num_special_tokens_to_add(self, pair=False): method _special_token_mask (line 228) | def _special_token_mask(self, seq): method get_special_tokens_mask (line 234) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 245) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method save_vocabulary (line 270) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/pegasus/tokenization_pegasus_fast.py class PegasusTokenizerFast (line 39) | class PegasusTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 87) | def __init__( method can_save_slow_tokenizer (line 152) | def can_save_slow_tokenizer(self) -> bool: method _special_token_mask (line 155) | def _special_token_mask(self, seq): method get_special_tokens_mask (line 167) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 178) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method save_vocabulary (line 199) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/pegasus_x/configuration_pegasus_x.py class PegasusXConfig (line 24) | class PegasusXConfig(PretrainedConfig): method __init__ (line 105) | def __init__( method num_attention_heads (line 169) | def num_attention_heads(self) -> int: method hidden_size (line 173) | def hidden_size(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/pegasus_x/modeling_pegasus_x.py class DimensionInfo (line 53) | class DimensionInfo: function shift_tokens_right (line 71) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class PegasusXScaledWordEmbedding (line 88) | class PegasusXScaledWordEmbedding(nn.Embedding): method __init__ (line 93) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 97) | def forward(self, input_ids: torch.Tensor): class PegasusXSinusoidalPositionalEmbedding (line 101) | class PegasusXSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 104) | def __init__(self, embed_dim, max_scale: int = 10000.0): method forward (line 110) | def forward(self, input_embeds: torch.Tensor, past_key_values_length: ... class PegasusXAttention (line 128) | class PegasusXAttention(nn.Module): method __init__ (line 131) | def __init__( method _shape (line 162) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 165) | def forward( class PegasusXGlobalLocalAttention (line 286) | class PegasusXGlobalLocalAttention(nn.Module): method __init__ (line 289) | def __init__( method _shape (line 317) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 320) | def forward( method compute_global_attention_representations (line 413) | def compute_global_attention_representations( method compute_local_attention_representations (line 456) | def compute_local_attention_representations( class PegasusXEncoderLayer (line 520) | class PegasusXEncoderLayer(nn.Module): method __init__ (line 521) | def __init__(self, stagger_blocks_this_layer: bool, config: PegasusXCo... method forward (line 541) | def forward( method pad_local_tokens (line 613) | def pad_local_tokens(cls, hidden_states, attention_mask, block_size): method unpad_local_tokens (line 629) | def unpad_local_tokens(cls, padded_hidden_states, block_size): class PegasusXDecoderLayer (line 635) | class PegasusXDecoderLayer(nn.Module): method __init__ (line 636) | def __init__(self, config: PegasusXConfig): method forward (line 664) | def forward( class PegasusXPreTrainedModel (line 747) | class PegasusXPreTrainedModel(PreTrainedModel): method _init_weights (line 753) | def _init_weights(self, module): class PegasusXEncoder (line 877) | class PegasusXEncoder(PegasusXPreTrainedModel): method __init__ (line 887) | def __init__(self, config: PegasusXConfig, embed_tokens: Optional[nn.E... method resize_position_embeddings (line 921) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 940) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 946) | def forward( class PegasusXDecoder (line 1089) | class PegasusXDecoder(PegasusXPreTrainedModel): method __init__ (line 1098) | def __init__(self, config: PegasusXConfig, embed_tokens: Optional[nn.E... method get_input_embeddings (line 1121) | def get_input_embeddings(self): method set_input_embeddings (line 1124) | def set_input_embeddings(self, value): method forward (line 1127) | def forward( class PegasusXModel (line 1320) | class PegasusXModel(PegasusXPreTrainedModel): method __init__ (line 1323) | def __init__(self, config: PegasusXConfig): method get_input_embeddings (line 1339) | def get_input_embeddings(self): method set_input_embeddings (line 1342) | def set_input_embeddings(self, value): method get_encoder (line 1347) | def get_encoder(self): method get_decoder (line 1350) | def get_decoder(self): method resize_position_embeddings (line 1353) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1370) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1378) | def forward( class PegasusXForConditionalGeneration (line 1467) | class PegasusXForConditionalGeneration(PegasusXPreTrainedModel): method __init__ (line 1471) | def __init__(self, config: PegasusXConfig): method get_encoder (line 1479) | def get_encoder(self): method get_decoder (line 1482) | def get_decoder(self): method get_output_embeddings (line 1485) | def get_output_embeddings(self): method set_output_embeddings (line 1488) | def set_output_embeddings(self, new_embeddings): method resize_position_embeddings (line 1491) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1508) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1517) | def forward( method prepare_inputs_for_generation (line 1590) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1621) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1625) | def _reorder_cache(past_key_values, beam_idx): class PegasusXDecoderWrapper (line 1637) | class PegasusXDecoderWrapper(PegasusXPreTrainedModel): method __init__ (line 1643) | def __init__(self, config): method forward (line 1647) | def forward(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/perceiver/configuration_perceiver.py class PerceiverConfig (line 31) | class PerceiverConfig(PretrainedConfig): method __init__ (line 118) | def __init__( class PerceiverOnnxConfig (line 184) | class PerceiverOnnxConfig(OnnxConfig): method inputs (line 186) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 199) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 202) | def generate_dummy_inputs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/perceiver/convert_perceiver_haiku_to_pytorch.py function prepare_img (line 47) | def prepare_img(): function rename_keys (line 54) | def rename_keys(state_dict, architecture): function convert_perceiver_checkpoint (line 263) | def convert_perceiver_checkpoint(pickle_file, pytorch_dump_folder_path, ... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/perceiver/image_processing_perceiver.py class PerceiverImageProcessor (line 47) | class PerceiverImageProcessor(BaseImageProcessor): method __init__ (line 86) | def __init__( method center_crop (line 117) | def center_crop( method resize (line 162) | def resize( method preprocess (line 211) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/perceiver/modeling_perceiver.py class PerceiverModelOutput (line 56) | class PerceiverModelOutput(ModelOutput): class PerceiverDecoderOutput (line 87) | class PerceiverDecoderOutput(ModelOutput): class PerceiverMaskedLMOutput (line 105) | class PerceiverMaskedLMOutput(ModelOutput): class PerceiverClassifierOutput (line 136) | class PerceiverClassifierOutput(ModelOutput): class PerceiverEmbeddings (line 167) | class PerceiverEmbeddings(nn.Module): method __init__ (line 170) | def __init__(self, config): method forward (line 174) | def forward(self, batch_size: int): class PerceiverSelfAttention (line 178) | class PerceiverSelfAttention(nn.Module): method __init__ (line 181) | def __init__( method transpose_for_scores (line 222) | def transpose_for_scores(self, x, channels_per_head): method forward (line 227) | def forward( class PerceiverSelfOutput (line 293) | class PerceiverSelfOutput(nn.Module): method __init__ (line 294) | def __init__(self, config, input_channels, output_channels): method forward (line 298) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PerceiverAttention (line 303) | class PerceiverAttention(nn.Module): method __init__ (line 306) | def __init__( method prune_heads (line 354) | def prune_heads(self, heads): method forward (line 372) | def forward( class PerceiverMLP (line 403) | class PerceiverMLP(nn.Module): method __init__ (line 406) | def __init__(self, config, input_size, widening_factor): method forward (line 415) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PerceiverLayer (line 422) | class PerceiverLayer(nn.Module): method __init__ (line 423) | def __init__( method forward (line 451) | def forward( method feed_forward_chunk (line 482) | def feed_forward_chunk(self, attention_output): class PerceiverEncoder (line 488) | class PerceiverEncoder(nn.Module): method __init__ (line 491) | def __init__(self, config, kv_dim=None): method forward (line 538) | def forward( class PerceiverPreTrainedModel (line 603) | class PerceiverPreTrainedModel(PreTrainedModel): method _init_weights (line 613) | def _init_weights(self, module): class PerceiverModel (line 722) | class PerceiverModel(PerceiverPreTrainedModel): method __init__ (line 723) | def __init__( 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 PerceiverForMaskedLM (line 963) | class PerceiverForMaskedLM(PerceiverPreTrainedModel): method __init__ (line 964) | def __init__(self, config: PerceiverConfig): method forward (line 997) | def forward( class PerceiverForSequenceClassification (line 1098) | class PerceiverForSequenceClassification(PerceiverPreTrainedModel): method __init__ (line 1099) | def __init__(self, config): method forward (line 1121) | def forward( class PerceiverForImageClassificationLearned (line 1223) | class PerceiverForImageClassificationLearned(PerceiverPreTrainedModel): method __init__ (line 1224) | def __init__(self, config): method forward (line 1256) | def forward( class PerceiverForImageClassificationFourier (line 1368) | class PerceiverForImageClassificationFourier(PerceiverPreTrainedModel): method __init__ (line 1369) | def __init__(self, config): method forward (line 1402) | def forward( class PerceiverForImageClassificationConvProcessing (line 1511) | class PerceiverForImageClassificationConvProcessing(PerceiverPreTrainedM... method __init__ (line 1512) | def __init__(self, config): method forward (line 1546) | def forward( class PerceiverForOpticalFlow (line 1655) | class PerceiverForOpticalFlow(PerceiverPreTrainedModel): method __init__ (line 1656) | def __init__(self, config): method forward (line 1707) | def forward( class PerceiverForMultimodalAutoencoding (line 1800) | class PerceiverForMultimodalAutoencoding(PerceiverPreTrainedModel): method __init__ (line 1801) | def __init__(self, config: PerceiverConfig): method forward (line 1918) | def forward( function build_position_encoding (line 2008) | def build_position_encoding( class PerceiverAbstractDecoder (line 2045) | class PerceiverAbstractDecoder(nn.Module, metaclass=abc.ABCMeta): method decoder_query (line 2049) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method num_query_channels (line 2054) | def num_query_channels(self): method forward (line 2058) | def forward(self, query, z, query_mask=None): class PerceiverProjectionDecoder (line 2062) | class PerceiverProjectionDecoder(PerceiverAbstractDecoder): method __init__ (line 2071) | def __init__(self, config): method decoder_query (line 2075) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2078) | def forward( class PerceiverBasicDecoder (line 2088) | class PerceiverBasicDecoder(PerceiverAbstractDecoder): method __init__ (line 2124) | def __init__( method num_query_channels (line 2182) | def num_query_channels(self) -> int: method decoder_query (line 2195) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2243) | def forward( class PerceiverClassificationDecoder (line 2274) | class PerceiverClassificationDecoder(PerceiverAbstractDecoder): method __init__ (line 2285) | def __init__(self, config, **decoder_kwargs): method num_query_channels (line 2297) | def num_query_channels(self) -> int: method decoder_query (line 2300) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2305) | def forward( class PerceiverOpticalFlowDecoder (line 2320) | class PerceiverOpticalFlowDecoder(PerceiverAbstractDecoder): method __init__ (line 2323) | def __init__(self, config, output_image_shape, output_num_channels=2, ... method num_query_channels (line 2332) | def num_query_channels(self) -> int: method decoder_query (line 2335) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2340) | def forward( class PerceiverBasicVideoAutoencodingDecoder (line 2355) | class PerceiverBasicVideoAutoencodingDecoder(PerceiverAbstractDecoder): method __init__ (line 2369) | def __init__( method num_query_channels (line 2387) | def num_query_channels(self) -> int: method decoder_query (line 2390) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2398) | def forward( function restructure (line 2408) | def restructure(modality_sizes: ModalitySizeType, inputs: torch.Tensor) ... class PerceiverMultimodalDecoder (line 2432) | class PerceiverMultimodalDecoder(PerceiverAbstractDecoder): method __init__ (line 2458) | def __init__( method num_query_channels (line 2490) | def num_query_channels(self) -> int: method decoder_query (line 2495) | def decoder_query(self, inputs, modality_sizes, inputs_without_pos=Non... method forward (line 2529) | def forward( function space_to_depth (line 2543) | def space_to_depth(frames: torch.Tensor, temporal_block_size: int = 1, s... class Conv2dSamePadding (line 2603) | class Conv2dSamePadding(nn.Conv2d): method __init__ (line 2609) | def __init__(self, *args, **kwargs): method forward (line 2615) | def forward(self, input): class Conv2DDownsample (line 2619) | class Conv2DDownsample(nn.Module): method __init__ (line 2622) | def __init__( method forward (line 2649) | def forward(self, inputs: torch.Tensor) -> torch.Tensor: function generate_fourier_features (line 2657) | def generate_fourier_features(pos, num_bands, max_resolution=(224, 224),... function build_linear_positions (line 2709) | def build_linear_positions(index_dims, output_range=(-1.0, 1.0)): class PerceiverAbstractPositionEncoding (line 2732) | class PerceiverAbstractPositionEncoding(nn.Module, metaclass=abc.ABCMeta): method num_dimensions (line 2737) | def num_dimensions(self) -> int: method output_size (line 2741) | def output_size(self, *args, **kwargs) -> int: method forward (line 2745) | def forward(self, batch_size, pos): class PerceiverTrainablePositionEncoding (line 2749) | class PerceiverTrainablePositionEncoding(PerceiverAbstractPositionEncodi... method __init__ (line 2752) | def __init__(self, index_dims, num_channels=128): method num_dimensions (line 2760) | def num_dimensions(self) -> int: method output_size (line 2765) | def output_size(self, *args, **kwargs) -> int: method interpolate_pos_encoding (line 2768) | def interpolate_pos_encoding(self, position_embeddings: torch.Tensor, ... method forward (line 2783) | def forward( function _check_or_build_spatial_positions (line 2798) | def _check_or_build_spatial_positions(pos, index_dims, batch_size): class PerceiverFourierPositionEncoding (line 2828) | class PerceiverFourierPositionEncoding(PerceiverAbstractPositionEncoding): method __init__ (line 2831) | def __init__(self, num_bands, max_resolution, concat_pos=True, sine_on... method num_dimensions (line 2839) | def num_dimensions(self) -> int: method output_size (line 2842) | def output_size(self): method forward (line 2853) | def forward( class AbstractPreprocessor (line 2872) | class AbstractPreprocessor(nn.Module): method num_channels (line 2874) | def num_channels(self) -> int: class PerceiverTextPreprocessor (line 2879) | class PerceiverTextPreprocessor(AbstractPreprocessor): method __init__ (line 2890) | def __init__(self, config: PerceiverConfig) -> None: method num_channels (line 2897) | def num_channels(self) -> int: method forward (line 2900) | def forward( class PerceiverEmbeddingDecoder (line 2916) | class PerceiverEmbeddingDecoder(nn.Module): method __init__ (line 2925) | def __init__(self, config: PerceiverConfig) -> None: method forward (line 2931) | def forward(self, hidden_states: torch.Tensor, embedding_layer: torch.... class PerceiverMultimodalPostprocessor (line 2940) | class PerceiverMultimodalPostprocessor(nn.Module): method __init__ (line 2953) | def __init__(self, modalities: Mapping[str, PostprocessorType], input_... method forward (line 2958) | def forward( class PerceiverClassificationPostprocessor (line 2974) | class PerceiverClassificationPostprocessor(nn.Module): method __init__ (line 2985) | def __init__(self, config: PerceiverConfig, in_channels: int) -> None: method forward (line 2989) | def forward(self, inputs, pos: Optional[torch.Tensor] = None, modality... class PerceiverAudioPostprocessor (line 2994) | class PerceiverAudioPostprocessor(nn.Module): method __init__ (line 3007) | def __init__(self, config: PerceiverConfig, in_channels: int, postproc... method forward (line 3016) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverProjectionPostprocessor (line 3021) | class PerceiverProjectionPostprocessor(nn.Module): method __init__ (line 3033) | def __init__(self, in_channels: int, out_channels: int) -> None: method forward (line 3037) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverImagePreprocessor (line 3042) | class PerceiverImagePreprocessor(AbstractPreprocessor): method __init__ (line 3079) | def __init__( method num_channels (line 3154) | def num_channels(self) -> int: method _build_network_inputs (line 3186) | def _build_network_inputs( method forward (line 3224) | def forward( class PerceiverOneHotPreprocessor (line 3280) | class PerceiverOneHotPreprocessor(AbstractPreprocessor): method __init__ (line 3289) | def __init__(self, config: PerceiverConfig) -> None: method num_channels (line 3294) | def num_channels(self) -> int: method forward (line 3297) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverAudioPreprocessor (line 3306) | class PerceiverAudioPreprocessor(AbstractPreprocessor): method __init__ (line 3329) | def __init__( method num_channels (line 3363) | def num_channels(self) -> int: method _build_network_inputs (line 3373) | def _build_network_inputs(self, inputs): method forward (line 3394) | def forward( class PerceiverMultimodalPreprocessor (line 3409) | class PerceiverMultimodalPreprocessor(AbstractPreprocessor): method __init__ (line 3426) | def __init__( method num_channels (line 3447) | def num_channels(self) -> int: method forward (line 3452) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/perceiver/tokenization_perceiver.py class PerceiverTokenizer (line 26) | class PerceiverTokenizer(PreTrainedTokenizer): method __init__ (line 59) | def __init__( method get_vocab (line 100) | def get_vocab(self) -> Dict[str, int]: method vocab_size (line 109) | def vocab_size(self): method get_special_tokens_mask (line 112) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 140) | def build_inputs_with_special_tokens( method _tokenize (line 164) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 169) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 177) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 183) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 196) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/persimmon/configuration_persimmon.py class PersimmonConfig (line 24) | class PersimmonConfig(PretrainedConfig): method __init__ (line 91) | def __init__( method _rope_scaling_validation (line 141) | def _rope_scaling_validation(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/persimmon/convert_persimmon_weights_to_hf.py function rename_state_dict (line 69) | def rename_state_dict(state_dict): function convert_persimmon_checkpoint (line 81) | def convert_persimmon_checkpoint(pytorch_dump_folder_path, ada_lib_path,... function main (line 96) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/persimmon/modeling_persimmon.py function _prepare_4d_causal_attention_mask_with_cache_position (line 50) | def _prepare_4d_causal_attention_mask_with_cache_position( class PersimmonRotaryEmbedding (line 104) | class PersimmonRotaryEmbedding(nn.Module): method __init__ (line 105) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 119) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 129) | def forward(self, x, seq_len=None): class PersimmonLinearScalingRotaryEmbedding (line 141) | class PersimmonLinearScalingRotaryEmbedding(PersimmonRotaryEmbedding): method __init__ (line 144) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 148) | def _set_cos_sin_cache(self, seq_len, device, dtype): class PersimmonDynamicNTKScalingRotaryEmbedding (line 161) | class PersimmonDynamicNTKScalingRotaryEmbedding(PersimmonRotaryEmbedding): method __init__ (line 164) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 168) | def _set_cos_sin_cache(self, seq_len, device, dtype): function rotate_half (line 188) | def rotate_half(x): function apply_rotary_pos_emb (line 196) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class PersimmonMLP (line 225) | class PersimmonMLP(nn.Module): method __init__ (line 226) | def __init__(self, config): method forward (line 232) | def forward(self, hidden_states): class PersimmonAttention (line 239) | class PersimmonAttention(nn.Module): method __init__ (line 242) | def __init__(self, config: PersimmonConfig, layer_idx: Optional[int] =... method _init_rope (line 280) | def _init_rope(self): method _split_heads (line 307) | def _split_heads(self, fused_qkv: torch.Tensor) -> Tuple[torch.Tensor,... method forward (line 323) | def forward( class PersimmonDecoderLayer (line 422) | class PersimmonDecoderLayer(nn.Module): method __init__ (line 423) | def __init__(self, config: PersimmonConfig, layer_idx: int): method forward (line 432) | def forward( class PersimmonPreTrainedModel (line 518) | class PersimmonPreTrainedModel(PreTrainedModel): method _init_weights (line 526) | def _init_weights(self, module): class PersimmonModel (line 616) | class PersimmonModel(PersimmonPreTrainedModel): method __init__ (line 624) | def __init__(self, config: PersimmonConfig): method get_input_embeddings (line 639) | def get_input_embeddings(self): method set_input_embeddings (line 642) | def set_input_embeddings(self, value): method forward (line 646) | def forward( method _update_causal_mask (line 764) | def _update_causal_mask( class PersimmonForCausalLM (line 836) | class PersimmonForCausalLM(PersimmonPreTrainedModel): method __init__ (line 840) | def __init__(self, config): method get_input_embeddings (line 850) | def get_input_embeddings(self): method set_input_embeddings (line 854) | def set_input_embeddings(self, value): method get_output_embeddings (line 858) | def get_output_embeddings(self): method set_output_embeddings (line 862) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 866) | def set_decoder(self, decoder): method get_decoder (line 870) | def get_decoder(self): method forward (line 875) | def forward( method prepare_inputs_for_generation (line 964) | def prepare_inputs_for_generation( class PersimmonForSequenceClassification (line 1051) | class PersimmonForSequenceClassification(PersimmonPreTrainedModel): method __init__ (line 1052) | def __init__(self, config): method get_input_embeddings (line 1061) | def get_input_embeddings(self): method set_input_embeddings (line 1064) | def set_input_embeddings(self, value): method forward (line 1068) | def forward( class PersimmonForTokenClassification (line 1167) | class PersimmonForTokenClassification(PersimmonPreTrainedModel): method __init__ (line 1168) | def __init__(self, config): method get_input_embeddings (line 1184) | def get_input_embeddings(self): method set_input_embeddings (line 1187) | def set_input_embeddings(self, value): method forward (line 1191) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/phi/configuration_phi.py class PhiConfig (line 25) | class PhiConfig(PretrainedConfig): method __init__ (line 112) | def __init__( method _rope_scaling_validation (line 168) | def _rope_scaling_validation(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/phi/convert_phi_weights_to_hf.py function convert_weights (line 59) | def convert_weights(original_weights, mapping, config): function _download (line 94) | def _download(url: str, root: str): function convert_phi_weights (line 105) | def convert_phi_weights( FILE: mplsandbox_for_rl/transformers/src/transformers/models/phi/modeling_phi.py function _prepare_4d_causal_attention_mask_with_cache_position (line 61) | def _prepare_4d_causal_attention_mask_with_cache_position( class PhiRotaryEmbedding (line 115) | class PhiRotaryEmbedding(nn.Module): method __init__ (line 116) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 130) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 140) | def forward(self, x, seq_len=None): class PhiLinearScalingRotaryEmbedding (line 152) | class PhiLinearScalingRotaryEmbedding(PhiRotaryEmbedding): method __init__ (line 155) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 159) | def _set_cos_sin_cache(self, seq_len, device, dtype): class PhiDynamicNTKScalingRotaryEmbedding (line 172) | class PhiDynamicNTKScalingRotaryEmbedding(PhiRotaryEmbedding): method __init__ (line 175) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 179) | def _set_cos_sin_cache(self, seq_len, device, dtype): function rotate_half (line 199) | def rotate_half(x): function apply_rotary_pos_emb (line 207) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class PhiMLP (line 236) | class PhiMLP(nn.Module): method __init__ (line 237) | def __init__(self, config): method forward (line 244) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: function repeat_kv (line 252) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class PhiAttention (line 264) | class PhiAttention(nn.Module): method __init__ (line 267) | def __init__(self, config: PhiConfig, layer_idx: Optional[int] = None): method _init_rope (line 311) | def _init_rope(self): method forward (line 338) | def forward( class PhiFlashAttention2 (line 439) | class PhiFlashAttention2(PhiAttention): method __init__ (line 447) | def __init__(self, *args, **kwargs): method forward (line 455) | def forward( class PhiSdpaAttention (line 572) | class PhiSdpaAttention(PhiAttention): method __init__ (line 573) | def __init__(self, *args, **kwargs): method forward (line 584) | def forward( class PhiDecoderLayer (line 704) | class PhiDecoderLayer(nn.Module): method __init__ (line 705) | def __init__(self, config: PhiConfig, layer_idx: int): method forward (line 712) | def forward( class PhiPreTrainedModel (line 796) | class PhiPreTrainedModel(PreTrainedModel): method _init_weights (line 806) | def _init_weights(self, module): class PhiModel (line 896) | class PhiModel(PhiPreTrainedModel): method __init__ (line 904) | def __init__(self, config: PhiConfig): method get_input_embeddings (line 923) | def get_input_embeddings(self): method set_input_embeddings (line 926) | def set_input_embeddings(self, value): method forward (line 930) | def forward( method _update_causal_mask (line 1048) | def _update_causal_mask( class PhiForCausalLM (line 1120) | class PhiForCausalLM(PhiPreTrainedModel): method __init__ (line 1124) | def __init__(self, config): method get_input_embeddings (line 1134) | def get_input_embeddings(self): method set_input_embeddings (line 1138) | def set_input_embeddings(self, value): method get_output_embeddings (line 1142) | def get_output_embeddings(self): method set_output_embeddings (line 1146) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1150) | def set_decoder(self, decoder): method get_decoder (line 1154) | def get_decoder(self): method forward (line 1159) | def forward( method prepare_inputs_for_generation (line 1249) | def prepare_inputs_for_generation( class PhiForSequenceClassification (line 1336) | class PhiForSequenceClassification(PhiPreTrainedModel): method __init__ (line 1337) | def __init__(self, config): method get_input_embeddings (line 1346) | def get_input_embeddings(self): method set_input_embeddings (line 1349) | def set_input_embeddings(self, value): method forward (line 1353) | def forward( class PhiForTokenClassification (line 1452) | class PhiForTokenClassification(PhiPreTrainedModel): method __init__ (line 1453) | def __init__(self, config: PhiConfig): method forward (line 1476) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/phi3/configuration_phi3.py class Phi3Config (line 25) | class Phi3Config(PretrainedConfig): method __init__ (line 111) | def __init__( method _rope_scaling_adjustment (line 170) | def _rope_scaling_adjustment(self): method _rope_scaling_validation (line 183) | def _rope_scaling_validation(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/phi3/modeling_phi3.py function _prepare_4d_causal_attention_mask_with_cache_position (line 59) | def _prepare_4d_causal_attention_mask_with_cache_position( class Phi3RMSNorm (line 113) | class Phi3RMSNorm(nn.Module): method __init__ (line 114) | def __init__(self, hidden_size, eps=1e-6): method forward (line 122) | def forward(self, hidden_states): method extra_repr (line 129) | def extra_repr(self): class Phi3RotaryEmbedding (line 134) | class Phi3RotaryEmbedding(nn.Module): method __init__ (line 135) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 146) | def forward(self, x, position_ids, seq_len=None): class Phi3SuScaledRotaryEmbedding (line 163) | class Phi3SuScaledRotaryEmbedding(Phi3RotaryEmbedding): method __init__ (line 164) | def __init__(self, dim, config, device=None): method forward (line 177) | def forward(self, x, position_ids, seq_len=None): class Phi3YarnScaledRotaryEmbedding (line 204) | class Phi3YarnScaledRotaryEmbedding(Phi3RotaryEmbedding): method __init__ (line 205) | def __init__(self, dim, config, device=None): method forward (line 217) | def forward(self, x, position_ids, seq_len=None): class Phi3LongRoPEScaledRotaryEmbedding (line 249) | class Phi3LongRoPEScaledRotaryEmbedding(Phi3RotaryEmbedding): method __init__ (line 250) | def __init__(self, dim, config, device=None): method forward (line 258) | def forward(self, x, position_ids, seq_len=None): function rotate_half (line 291) | def rotate_half(x): function apply_rotary_pos_emb (line 299) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... class Phi3MLP (line 326) | class Phi3MLP(nn.Module): method __init__ (line 327) | def __init__(self, config): method forward (line 336) | def forward(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor: function repeat_kv (line 346) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class Phi3Attention (line 358) | class Phi3Attention(nn.Module): method __init__ (line 361) | def __init__(self, config: Phi3Config, layer_idx: Optional[int] = None): method _init_rope (line 395) | def _init_rope(self): method forward (line 409) | def forward( class Phi3FlashAttention2 (line 483) | class Phi3FlashAttention2(Phi3Attention): method __init__ (line 491) | def __init__(self, *args, **kwargs): method forward (line 499) | def forward( class Phi3SdpaAttention (line 636) | class Phi3SdpaAttention(Phi3Attention): method forward (line 644) | def forward( class Phi3DecoderLayer (line 735) | class Phi3DecoderLayer(nn.Module): method __init__ (line 736) | def __init__(self, config: Phi3Config, layer_idx: int): method forward (line 749) | def forward( class Phi3PreTrainedModel (line 837) | class Phi3PreTrainedModel(PreTrainedModel): method _init_weights (line 849) | def _init_weights(self, module): class Phi3Model (line 939) | class Phi3Model(Phi3PreTrainedModel): method __init__ (line 947) | def __init__(self, config: Phi3Config): method get_input_embeddings (line 964) | def get_input_embeddings(self): method set_input_embeddings (line 967) | def set_input_embeddings(self, value): method forward (line 971) | def forward( method _update_causal_mask (line 1088) | def _update_causal_mask( class Phi3ForCausalLM (line 1160) | class Phi3ForCausalLM(Phi3PreTrainedModel): method __init__ (line 1164) | def __init__(self, config): method get_input_embeddings (line 1174) | def get_input_embeddings(self): method set_input_embeddings (line 1178) | def set_input_embeddings(self, value): method get_output_embeddings (line 1182) | def get_output_embeddings(self): method set_output_embeddings (line 1186) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1190) | def set_decoder(self, decoder): method get_decoder (line 1194) | def get_decoder(self): method forward (line 1200) | def forward( method prepare_inputs_for_generation (line 1289) | def prepare_inputs_for_generation( class Phi3ForSequenceClassification (line 1376) | class Phi3ForSequenceClassification(Phi3PreTrainedModel): method __init__ (line 1377) | def __init__(self, config): method get_input_embeddings (line 1386) | def get_input_embeddings(self): method set_input_embeddings (line 1389) | def set_input_embeddings(self, value): method forward (line 1393) | def forward( class Phi3ForTokenClassification (line 1492) | class Phi3ForTokenClassification(Phi3PreTrainedModel): method __init__ (line 1493) | def __init__(self, config: Phi3Config): method forward (line 1516) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/phobert/tokenization_phobert.py function get_pairs (line 35) | def get_pairs(word): class PhobertTokenizer (line 51) | class PhobertTokenizer(PreTrainedTokenizer): method __init__ (line 102) | def __init__( method build_inputs_with_special_tokens (line 146) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 172) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 200) | def create_token_type_ids_from_sequences( method vocab_size (line 225) | def vocab_size(self): method get_vocab (line 228) | def get_vocab(self): method bpe (line 231) | def bpe(self, token): method _tokenize (line 275) | def _tokenize(self, text): method _convert_token_to_id (line 285) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 289) | 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... method add_from_file (line 327) | def add_from_file(self, f): FILE: mplsandbox_for_rl/transformers/src/transformers/models/pix2struct/configuration_pix2struct.py class Pix2StructTextConfig (line 27) | class Pix2StructTextConfig(PretrainedConfig): method __init__ (line 96) | def __init__( method from_pretrained (line 147) | def from_pretrained( class Pix2StructVisionConfig (line 167) | class Pix2StructVisionConfig(PretrainedConfig): method __init__ (line 228) | def __init__( method from_pretrained (line 266) | def from_pretrained( class Pix2StructConfig (line 286) | class Pix2StructConfig(PretrainedConfig): method __init__ (line 336) | def __init__( method from_text_vision_configs (line 373) | def from_text_vision_configs( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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( class Pix2StructImageProcessor (line 189) | class Pix2StructImageProcessor(BaseImageProcessor): method __init__ (line 212) | def __init__( method extract_flattened_patches (line 228) | def extract_flattened_patches( method normalize (line 309) | def normalize( method preprocess (line 348) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pix2struct/modeling_pix2struct.py class Pix2StructLayerNorm (line 53) | class Pix2StructLayerNorm(nn.Module): method __init__ (line 54) | def __init__(self, hidden_size, eps=1e-6): method forward (line 62) | def forward(self, hidden_states): class Pix2StructVisionEmbeddings (line 94) | class Pix2StructVisionEmbeddings(nn.Module): method __init__ (line 101) | def __init__(self, config: Pix2StructConfig) -> None: method forward (line 110) | def forward(self, flattened_patches: torch.Tensor) -> torch.Tensor: class Pix2StructVisionAttention (line 130) | class Pix2StructVisionAttention(nn.Module): method __init__ (line 131) | def __init__(self, config): method forward (line 147) | def forward( class Pix2StructVisionMlp (line 225) | class Pix2StructVisionMlp(nn.Module): method __init__ (line 226) | def __init__(self, config: Pix2StructVisionConfig): method forward (line 234) | def forward(self, hidden_states): class Pix2StructVisionLayer (line 254) | class Pix2StructVisionLayer(nn.Module): method __init__ (line 255) | def __init__(self, config: Pix2StructConfig) -> None: method forward (line 264) | def forward( class Pix2StructVisionEncoder (line 297) | class Pix2StructVisionEncoder(nn.Module): method __init__ (line 298) | def __init__(self, config: Pix2StructConfig) -> None: method forward (line 304) | def forward( class Pix2StructPreTrainedModel (line 350) | class Pix2StructPreTrainedModel(PreTrainedModel): method dummy_inputs (line 359) | def dummy_inputs(self): method _init_weights (line 369) | def _init_weights(self, module): method _shift_right (line 449) | def _shift_right(self, input_ids): class Pix2StructVisionModel (line 519) | class Pix2StructVisionModel(Pix2StructPreTrainedModel): method __init__ (line 525) | def __init__(self, config: Pix2StructConfig): method get_input_embeddings (line 537) | def get_input_embeddings(self): method _prune_heads (line 540) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 550) | def forward( class Pix2StructTextDenseGatedActDense (line 629) | class Pix2StructTextDenseGatedActDense(nn.Module): method __init__ (line 630) | def __init__(self, config: Pix2StructTextConfig): method forward (line 638) | def forward(self, hidden_states): class Pix2StructTextLayerFF (line 658) | class Pix2StructTextLayerFF(nn.Module): method __init__ (line 659) | def __init__(self, config: Pix2StructTextConfig): method forward (line 667) | def forward(self, hidden_states): class Pix2StructTextAttention (line 674) | class Pix2StructTextAttention(nn.Module): method __init__ (line 675) | def __init__(self, config: Pix2StructTextConfig, has_relative_attentio... method _relative_position_bucket (line 699) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 747) | def compute_bias(self, query_length, key_length, device=None): method forward (line 764) | def forward( class Pix2StructTextLayerSelfAttention (line 894) | class Pix2StructTextLayerSelfAttention(nn.Module): method __init__ (line 895) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 901) | def forward( class Pix2StructTextLayerCrossAttention (line 927) | class Pix2StructTextLayerCrossAttention(nn.Module): method __init__ (line 928) | def __init__(self, config): method forward (line 934) | def forward( class Pix2StructTextBlock (line 963) | class Pix2StructTextBlock(nn.Module): method __init__ (line 964) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 975) | def forward( class Pix2StructTextModel (line 1284) | class Pix2StructTextModel(Pix2StructPreTrainedModel): method __init__ (line 1290) | def __init__(self, config): method _reorder_cache (line 1307) | def _reorder_cache(self, past_key_values, beam_idx): method get_input_embeddings (line 1337) | def get_input_embeddings(self): method set_input_embeddings (line 1340) | def set_input_embeddings(self, new_embeddings): method get_output_embeddings (line 1343) | def get_output_embeddings(self): method set_output_embeddings (line 1346) | def set_output_embeddings(self, new_embeddings): method forward (line 1351) | def forward( class Pix2StructForConditionalGeneration (line 1556) | class Pix2StructForConditionalGeneration(Pix2StructPreTrainedModel): method __init__ (line 1561) | def __init__(self, config: Pix2StructConfig): method get_input_embeddings (line 1572) | def get_input_embeddings(self): method set_input_embeddings (line 1575) | def set_input_embeddings(self, new_embeddings): method get_output_embeddings (line 1578) | def get_output_embeddings(self) -> nn.Module: method set_output_embeddings (line 1581) | def set_output_embeddings(self, new_embeddings): method resize_token_embeddings (line 1584) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method get_decoder (line 1592) | def get_decoder(self): method get_encoder (line 1595) | def get_encoder(self): method forward (line 1600) | def forward( method prepare_inputs_for_generation (line 1742) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pix2struct/processing_pix2struct.py class Pix2StructProcessor (line 26) | class Pix2StructProcessor(ProcessorMixin): method __init__ (line 45) | def __init__(self, image_processor, tokenizer): method __call__ (line 49) | def __call__( method batch_decode (line 145) | def batch_decode(self, *args, **kwargs): method decode (line 152) | def decode(self, *args, **kwargs): method model_input_names (line 160) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/plbart/configuration_plbart.py class PLBartConfig (line 28) | class PLBartConfig(PretrainedConfig): method __init__ (line 106) | def __init__( class PLBartOnnxConfig (line 164) | class PLBartOnnxConfig(OnnxConfigWithPast): method inputs (line 166) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 175) | def outputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/plbart/modeling_plbart.py function shift_tokens_right (line 60) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int): class PLBartLearnedPositionalEmbedding (line 81) | class PLBartLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 86) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 92) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class PLBartScaledWordEmbedding (line 104) | class PLBartScaledWordEmbedding(nn.Embedding): method __init__ (line 109) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 113) | def forward(self, input_ids: torch.Tensor): class PLBartAttention (line 118) | class PLBartAttention(nn.Module): method __init__ (line 121) | def __init__( method _shape (line 152) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 155) | def forward( class PLBartEncoderLayer (line 277) | class PLBartEncoderLayer(nn.Module): method __init__ (line 278) | def __init__(self, config: PLBartConfig): method forward (line 296) | def forward( class PLBartDecoderLayer (line 352) | class PLBartDecoderLayer(nn.Module): method __init__ (line 353) | def __init__(self, config: PLBartConfig): method forward (line 382) | def forward( class PLBartClassificationHead (line 473) | class PLBartClassificationHead(nn.Module): method __init__ (line 476) | def __init__( method forward (line 488) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PLBartPreTrainedModel (line 497) | class PLBartPreTrainedModel(PreTrainedModel): method _init_weights (line 503) | def _init_weights(self, module): class PLBartEncoder (line 654) | class PLBartEncoder(PLBartPreTrainedModel): method __init__ (line 664) | def __init__(self, config: PLBartConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 695) | def get_input_embeddings(self): method set_input_embeddings (line 698) | def set_input_embeddings(self, value): method forward (line 701) | 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 881) | def get_input_embeddings(self): method set_input_embeddings (line 884) | def set_input_embeddings(self, value): method forward (line 887) | def forward( class PLBartModel (line 1134) | class PLBartModel(PLBartPreTrainedModel): method __init__ (line 1137) | def __init__(self, config: PLBartConfig): method get_input_embeddings (line 1149) | def get_input_embeddings(self): method set_input_embeddings (line 1152) | def set_input_embeddings(self, value): method _tie_weights (line 1157) | def _tie_weights(self): method get_encoder (line 1162) | def get_encoder(self): method get_decoder (line 1165) | def get_decoder(self): method forward (line 1174) | def forward( class PLBartForConditionalGeneration (line 1257) | class PLBartForConditionalGeneration(PLBartPreTrainedModel): method __init__ (line 1262) | def __init__(self, config: PLBartConfig): method get_encoder (line 1270) | def get_encoder(self): method get_decoder (line 1273) | def get_decoder(self): method resize_token_embeddings (line 1276) | def resize_token_embeddings(self, new_num_tokens: int, pad_to_multiple... method _resize_final_logits_bias (line 1281) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1290) | def get_output_embeddings(self): method set_output_embeddings (line 1293) | def set_output_embeddings(self, new_embeddings): method forward (line 1299) | def forward( method prepare_inputs_for_generation (line 1374) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1411) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1415) | def _reorder_cache(past_key_values, beam_idx): class PLBartForSequenceClassification (line 1433) | class PLBartForSequenceClassification(PLBartPreTrainedModel): method __init__ (line 1436) | def __init__(self, config: PLBartConfig, **kwargs): method forward (line 1456) | def forward( class PLBartDecoderWrapper (line 1556) | class PLBartDecoderWrapper(PLBartPreTrainedModel): method __init__ (line 1562) | def __init__(self, config): method forward (line 1566) | def forward(self, *args, **kwargs): class PLBartForCausalLM (line 1571) | class PLBartForCausalLM(PLBartPreTrainedModel): method __init__ (line 1574) | def __init__(self, config): method get_input_embeddings (line 1586) | def get_input_embeddings(self): method set_input_embeddings (line 1589) | def set_input_embeddings(self, value): method get_output_embeddings (line 1592) | def get_output_embeddings(self): method set_output_embeddings (line 1595) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1598) | def set_decoder(self, decoder): method get_decoder (line 1601) | def get_decoder(self): method forward (line 1605) | def forward( method prepare_inputs_for_generation (line 1749) | def prepare_inputs_for_generation( method _reorder_cache (line 1776) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/plbart/tokenization_plbart.py class PLBartTokenizer (line 49) | class PLBartTokenizer(PreTrainedTokenizer): method __init__ (line 117) | def __init__( method __getstate__ (line 209) | def __getstate__(self): method __setstate__ (line 215) | def __setstate__(self, d): method vocab_size (line 226) | def vocab_size(self): method src_lang (line 235) | def src_lang(self) -> str: method src_lang (line 239) | def src_lang(self, new_src_lang: str) -> None: method get_special_tokens_mask (line 244) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 274) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 301) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 325) | def _build_translation_inputs( method get_vocab (line 338) | def get_vocab(self): method _tokenize (line 343) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 346) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 355) | 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... method prepare_seq2seq_batch (line 383) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 395) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 398) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 401) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 411) | def set_tgt_lang_special_tokens(self, lang: str) -> None: method _convert_lang_code_special_format (line 422) | def _convert_lang_code_special_format(self, lang: str) -> str: FILE: mplsandbox_for_rl/transformers/src/transformers/models/poolformer/configuration_poolformer.py class PoolFormerConfig (line 30) | class PoolFormerConfig(PretrainedConfig): method __init__ (line 93) | def __init__( class PoolFormerOnnxConfig (line 132) | class PoolFormerOnnxConfig(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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 preprocess (line 213) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/poolformer/modeling_poolformer.py function drop_path (line 47) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class PoolFormerDropPath (line 68) | class PoolFormerDropPath(nn.Module): method __init__ (line 71) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 75) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 78) | def extra_repr(self) -> str: class PoolFormerEmbeddings (line 82) | class PoolFormerEmbeddings(nn.Module): method __init__ (line 87) | def __init__(self, hidden_size, num_channels, patch_size, stride, padd... method forward (line 96) | def forward(self, pixel_values): class PoolFormerGroupNorm (line 102) | class PoolFormerGroupNorm(nn.GroupNorm): method __init__ (line 107) | def __init__(self, num_channels, **kwargs): class PoolFormerPooling (line 111) | class PoolFormerPooling(nn.Module): method __init__ (line 112) | def __init__(self, pool_size): method forward (line 116) | def forward(self, hidden_states): class PoolFormerOutput (line 120) | class PoolFormerOutput(nn.Module): method __init__ (line 121) | def __init__(self, config, dropout_prob, hidden_size, intermediate_size): method forward (line 131) | def forward(self, hidden_states): class PoolFormerLayer (line 141) | class PoolFormerLayer(nn.Module): method __init__ (line 144) | def __init__(self, config, num_channels, pool_size, hidden_size, inter... method forward (line 162) | def forward(self, hidden_states): class PoolFormerEncoder (line 192) | class PoolFormerEncoder(nn.Module): method __init__ (line 193) | def __init__(self, config): method forward (line 236) | def forward(self, pixel_values, output_hidden_states=False, return_dic... class PoolFormerPreTrainedModel (line 258) | class PoolFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 269) | def _init_weights(self, module): class PoolFormerModel (line 303) | class PoolFormerModel(PoolFormerPreTrainedModel): method __init__ (line 304) | def __init__(self, config): method get_input_embeddings (line 313) | def get_input_embeddings(self): method forward (line 324) | def forward( class PoolFormerFinalPooler (line 354) | class PoolFormerFinalPooler(nn.Module): method __init__ (line 355) | def __init__(self, config): method forward (line 359) | def forward(self, hidden_states): class PoolFormerForImageClassification (line 370) | class PoolFormerForImageClassification(PoolFormerPreTrainedModel): method __init__ (line 371) | def __init__(self, config): method forward (line 393) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pop2piano/configuration_pop2piano.py class Pop2PianoConfig (line 24) | class Pop2PianoConfig(PretrainedConfig): method __init__ (line 75) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pop2piano/convert_pop2piano_weights_to_hf.py function tokenize (line 156) | def tokenize(idx, token_type, n_special=4, n_note=128, n_velocity=2): function detokenize (line 170) | def detokenize(idx, n_special=4, n_note=128, n_velocity=2, time_idx_offs... FILE: mplsandbox_for_rl/transformers/src/transformers/models/pop2piano/feature_extraction_pop2piano.py class Pop2PianoFeatureExtractor (line 50) | class Pop2PianoFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 82) | def __init__( method mel_spectrogram (line 116) | def mel_spectrogram(self, sequence: np.ndarray): method extract_rhythm (line 141) | def extract_rhythm(self, audio: np.ndarray): method interpolate_beat_times (line 157) | def interpolate_beat_times( method preprocess_mel (line 187) | def preprocess_mel(self, audio: np.ndarray, beatstep: np.ndarray): method _pad (line 235) | def _pad(self, features: np.ndarray, add_zero_line=True): method pad (line 278) | def pad( method __call__ (line 342) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pop2piano/modeling_pop2piano.py class Pop2PianoLayerNorm (line 142) | class Pop2PianoLayerNorm(nn.Module): method __init__ (line 143) | def __init__(self, hidden_size, eps=1e-6): method forward (line 151) | def forward(self, hidden_states): class Pop2PianoDenseActDense (line 174) | class Pop2PianoDenseActDense(nn.Module): method __init__ (line 175) | def __init__(self, config: Pop2PianoConfig): method forward (line 182) | def forward(self, hidden_states): class Pop2PianoDenseGatedActDense (line 197) | class Pop2PianoDenseGatedActDense(nn.Module): method __init__ (line 198) | def __init__(self, config: Pop2PianoConfig): method forward (line 206) | def forward(self, hidden_states): class Pop2PianoLayerFF (line 227) | class Pop2PianoLayerFF(nn.Module): method __init__ (line 228) | def __init__(self, config: Pop2PianoConfig): method forward (line 238) | def forward(self, hidden_states): class Pop2PianoAttention (line 246) | class Pop2PianoAttention(nn.Module): method __init__ (line 247) | def __init__(self, config: Pop2PianoConfig, has_relative_attention_bia... method prune_heads (line 270) | def prune_heads(self, heads): method _relative_position_bucket (line 287) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 334) | def compute_bias(self, query_length, key_length, device=None): method forward (line 351) | def forward( class Pop2PianoLayerSelfAttention (line 482) | class Pop2PianoLayerSelfAttention(nn.Module): method __init__ (line 483) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 489) | def forward( class Pop2PianoLayerCrossAttention (line 515) | class Pop2PianoLayerCrossAttention(nn.Module): method __init__ (line 516) | def __init__(self, config): method forward (line 522) | def forward( class Pop2PianoBlock (line 552) | class Pop2PianoBlock(nn.Module): method __init__ (line 553) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 563) | def forward( class Pop2PianoPreTrainedModel (line 676) | class Pop2PianoPreTrainedModel(PreTrainedModel): method _init_weights (line 689) | def _init_weights(self, module): method _shift_right (line 735) | def _shift_right(self, input_ids): class Pop2PianoStack (line 762) | class Pop2PianoStack(Pop2PianoPreTrainedModel): method __init__ (line 764) | def __init__(self, config, embed_tokens=None): method get_input_embeddings (line 784) | def get_input_embeddings(self): method set_input_embeddings (line 788) | def set_input_embeddings(self, new_embeddings): method forward (line 791) | def forward( class Pop2PianoConcatEmbeddingToMel (line 973) | class Pop2PianoConcatEmbeddingToMel(nn.Module): method __init__ (line 976) | def __init__(self, config): method forward (line 980) | def forward(self, feature, index_value, embedding_offset): class Pop2PianoForConditionalGeneration (line 1004) | class Pop2PianoForConditionalGeneration(Pop2PianoPreTrainedModel): method __init__ (line 1007) | def __init__(self, config: Pop2PianoConfig): method get_input_embeddings (line 1034) | def get_input_embeddings(self): method set_input_embeddings (line 1037) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1042) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1045) | def get_output_embeddings(self): method get_encoder (line 1048) | def get_encoder(self): method get_decoder (line 1051) | def get_decoder(self): method get_mel_conditioner_outputs (line 1054) | def get_mel_conditioner_outputs( method forward (line 1105) | def forward( method generate (line 1212) | def generate( method prepare_inputs_for_generation (line 1301) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1328) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1331) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/pop2piano/processing_pop2piano.py class Pop2PianoProcessor (line 28) | class Pop2PianoProcessor(ProcessorMixin): method __init__ (line 47) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 50) | def __call__( method batch_decode (line 108) | def batch_decode( method model_input_names (line 125) | def model_input_names(self): method save_pretrained (line 130) | def save_pretrained(self, save_directory, **kwargs): method from_pretrained (line 137) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/pop2piano/tokenization_pop2piano.py function token_time_to_note (line 39) | def token_time_to_note(number, cutoff_time_idx, current_idx): function token_note_to_note (line 47) | def token_note_to_note(number, current_velocity, default_velocity, note_... class Pop2PianoTokenizer (line 62) | class Pop2PianoTokenizer(PreTrainedTokenizer): method __init__ (line 91) | def __init__( method vocab_size (line 126) | def vocab_size(self): method get_vocab (line 130) | def get_vocab(self): method _convert_id_to_token (line 134) | def _convert_id_to_token(self, token_id: int) -> list: method _convert_token_to_id (line 152) | def _convert_token_to_id(self, token, token_type="TOKEN_TIME") -> int: method relative_batch_tokens_ids_to_notes (line 168) | def relative_batch_tokens_ids_to_notes( method relative_batch_tokens_ids_to_midi (line 212) | def relative_batch_tokens_ids_to_midi( method relative_tokens_ids_to_notes (line 248) | def relative_tokens_ids_to_notes(self, tokens: np.ndarray, start_idx: ... method notes_to_midi (line 308) | def notes_to_midi(self, notes: np.ndarray, beatstep: np.ndarray, offse... method save_vocabulary (line 340) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method encode_plus (line 363) | def encode_plus( method batch_encode_plus (line 434) | def batch_encode_plus( method __call__ (line 473) | def __call__( method batch_decode (line 597) | def batch_decode( FILE: mplsandbox_for_rl/transformers/src/transformers/models/prophetnet/configuration_prophetnet.py class ProphetNetConfig (line 26) | class ProphetNetConfig(PretrainedConfig): method __init__ (line 102) | def __init__( method num_hidden_layers (line 169) | def num_hidden_layers(self) -> int: method num_hidden_layers (line 173) | def num_hidden_layers(self, value): FILE: mplsandbox_for_rl/transformers/src/transformers/models/prophetnet/convert_prophetnet_original_pytorch_checkpoint_to_pytorch.py function convert_prophetnet_checkpoint_to_pytorch (line 37) | def convert_prophetnet_checkpoint_to_pytorch(prophetnet_checkpoint_path:... FILE: mplsandbox_for_rl/transformers/src/transformers/models/prophetnet/modeling_prophetnet.py function softmax (line 173) | def softmax(hidden_state, dim, onnx_trace=False): function ngram_attention_bias (line 180) | def ngram_attention_bias(sequence_length, ngram, device, dtype): function compute_relative_buckets (line 197) | def compute_relative_buckets(num_buckets, max_distance, relative_positio... function compute_all_stream_relative_buckets (line 224) | def compute_all_stream_relative_buckets(num_buckets, max_distance, posit... class ProphetNetSeq2SeqLMOutput (line 248) | class ProphetNetSeq2SeqLMOutput(ModelOutput): method decoder_cross_attentions (line 323) | def decoder_cross_attentions(self): class ProphetNetSeq2SeqModelOutput (line 333) | class ProphetNetSeq2SeqModelOutput(ModelOutput): method decoder_cross_attentions (line 409) | def decoder_cross_attentions(self): class ProphetNetDecoderModelOutput (line 419) | class ProphetNetDecoderModelOutput(ModelOutput): class ProphetNetDecoderLMOutput (line 479) | class ProphetNetDecoderLMOutput(ModelOutput): class ProphetNetPreTrainedModel (line 540) | class ProphetNetPreTrainedModel(PreTrainedModel): method _init_weights (line 545) | def _init_weights(self, module): method _shift_right (line 555) | def _shift_right(self, input_ids): class ProphetNetPositionalEmbeddings (line 578) | class ProphetNetPositionalEmbeddings(nn.Embedding): method __init__ (line 585) | def __init__(self, config: ProphetNetConfig) -> None: method forward (line 589) | def forward(self, inputs_shape, device, attention_mask=None, past_key_... method _forward (line 617) | def _forward(self, position_ids): class ProphetNetAttention (line 621) | class ProphetNetAttention(nn.Module): method __init__ (line 624) | def __init__( method _shape (line 648) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 651) | def forward( class ProphetNetFeedForward (line 750) | class ProphetNetFeedForward(nn.Module): method __init__ (line 755) | def __init__(self, config: ProphetNetConfig, ffn_dim: int): method forward (line 763) | def forward(self, hidden_states): class ProphetNetNgramSelfAttention (line 773) | class ProphetNetNgramSelfAttention(nn.Module): method __init__ (line 774) | def __init__(self, config: ProphetNetConfig): method _shape (line 803) | def _shape(self, tensor, seq_len, batch_size): method prepare_for_onnx_export_ (line 806) | def prepare_for_onnx_export_(self): method forward (line 809) | def forward( method get_main_relative_pos_embeddings (line 987) | def get_main_relative_pos_embeddings( method get_predict_relative_pos_embeddings (line 1032) | def get_predict_relative_pos_embeddings( class ProphetNetEncoderLayer (line 1092) | class ProphetNetEncoderLayer(nn.Module): method __init__ (line 1097) | def __init__(self, config: ProphetNetConfig): method forward (line 1107) | def forward( class ProphetNetDecoderLayer (line 1135) | class ProphetNetDecoderLayer(nn.Module): method __init__ (line 1140) | def __init__(self, config: ProphetNetConfig): method forward (line 1155) | def forward( class ProphetNetEncoder (line 1223) | class ProphetNetEncoder(ProphetNetPreTrainedModel): method __init__ (line 1230) | def __init__(self, config: ProphetNetConfig, word_embeddings: nn.Embed... method get_input_embeddings (line 1247) | def get_input_embeddings(self): method set_input_embeddings (line 1250) | def set_input_embeddings(self, value): method forward (line 1255) | def forward( class ProphetNetDecoder (line 1357) | class ProphetNetDecoder(ProphetNetPreTrainedModel): method __init__ (line 1364) | def __init__(self, config: ProphetNetConfig, word_embeddings: Optional... method get_input_embeddings (line 1388) | def get_input_embeddings(self): method set_input_embeddings (line 1391) | def set_input_embeddings(self, value): method forward (line 1396) | def forward( method compute_buffered_relative_buckets (line 1639) | def compute_buffered_relative_buckets(self, position_ids): method prepare_attention_mask (line 1661) | def prepare_attention_mask(self, hidden_states, attention_mask): method prepare_predict_attention_mask (line 1685) | def prepare_predict_attention_mask(self, hidden_states, attention_mask): class ProphetNetModel (line 1725) | class ProphetNetModel(ProphetNetPreTrainedModel): method __init__ (line 1728) | def __init__(self, config: ProphetNetConfig): method get_input_embeddings (line 1745) | def get_input_embeddings(self): method set_input_embeddings (line 1748) | def set_input_embeddings(self, value): method _tie_weights (line 1753) | def _tie_weights(self): method get_encoder (line 1758) | def get_encoder(self): method get_decoder (line 1761) | def get_decoder(self): method forward (line 1766) | def forward( class ProphetNetForConditionalGeneration (line 1859) | class ProphetNetForConditionalGeneration(ProphetNetPreTrainedModel): method __init__ (line 1862) | def __init__(self, config: ProphetNetConfig): method get_output_embeddings (line 1873) | def get_output_embeddings(self): method set_output_embeddings (line 1876) | def set_output_embeddings(self, new_embeddings): method _tie_weights (line 1879) | def _tie_weights(self): method get_input_embeddings (line 1883) | def get_input_embeddings(self): method forward (line 1888) | def forward( method _compute_loss (line 1992) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2020) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2049) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2054) | def _reorder_cache(past_key_values, beam_idx): method get_encoder (line 2064) | def get_encoder(self): method get_decoder (line 2067) | def get_decoder(self): class ProphetNetForCausalLM (line 2076) | class ProphetNetForCausalLM(ProphetNetPreTrainedModel): method __init__ (line 2083) | def __init__(self, config: ProphetNetConfig): method get_input_embeddings (line 2099) | def get_input_embeddings(self): method set_input_embeddings (line 2102) | def set_input_embeddings(self, value): method get_output_embeddings (line 2105) | def get_output_embeddings(self): method set_output_embeddings (line 2108) | def set_output_embeddings(self, new_embeddings): method _tie_weights (line 2111) | def _tie_weights(self): method set_decoder (line 2115) | def set_decoder(self, decoder): method get_decoder (line 2118) | def get_decoder(self): method forward (line 2123) | def forward( method _compute_loss (line 2255) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2283) | def prepare_inputs_for_generation( method _reorder_cache (line 2309) | def _reorder_cache(past_key_values, beam_idx): class ProphetNetDecoderWrapper (line 2318) | class ProphetNetDecoderWrapper(ProphetNetPreTrainedModel): method __init__ (line 2324) | def __init__(self, config: ProphetNetConfig): method _tie_weights (line 2333) | def _tie_weights(self): method forward (line 2336) | def forward(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/prophetnet/tokenization_prophetnet.py function whitespace_tokenize (line 31) | def whitespace_tokenize(text): class BasicTokenizer (line 41) | class BasicTokenizer: method __init__ (line 64) | def __init__( method tokenize (line 80) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 118) | def _run_strip_accents(self, text): method _run_split_on_punc (line 129) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 151) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 164) | def _is_chinese_char(self, cp): method _clean_text (line 188) | def _clean_text(self, text): class WordpieceTokenizer (line 203) | class WordpieceTokenizer: method __init__ (line 206) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 211) | def tokenize(self, text): function load_vocab (line 260) | def load_vocab(vocab_file): class ProphetNetTokenizer (line 271) | class ProphetNetTokenizer(PreTrainedTokenizer): method __init__ (line 320) | def __init__( method vocab_size (line 367) | def vocab_size(self): method get_vocab (line 370) | def get_vocab(self): method _tokenize (line 373) | def _tokenize(self, text): method _convert_token_to_id (line 386) | def _convert_token_to_id(self, token: str): method _convert_id_to_token (line 390) | def _convert_id_to_token(self, index: int): method convert_tokens_to_string (line 394) | def convert_tokens_to_string(self, tokens: str): method get_special_tokens_mask (line 399) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 429) | def create_token_type_ids_from_sequences( method save_vocabulary (line 457) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 477) | def build_inputs_with_special_tokens( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pvt/configuration_pvt.py class PvtConfig (line 32) | class PvtConfig(PretrainedConfig): method __init__ (line 98) | def __init__( class PvtOnnxConfig (line 142) | class PvtOnnxConfig(OnnxConfig): method inputs (line 146) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 154) | def atol_for_validation(self) -> float: method default_onnx_opset (line 158) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/pvt/convert_pvt_to_pytorch.py function create_rename_keys (line 35) | def create_rename_keys(config): function read_in_k_v (line 120) | def read_in_k_v(state_dict, config): function rename_key (line 137) | def rename_key(dct, old, new): function prepare_img (line 143) | def prepare_img(): function convert_pvt_checkpoint (line 150) | def convert_pvt_checkpoint(pvt_size, pvt_checkpoint, pytorch_dump_folder... FILE: mplsandbox_for_rl/transformers/src/transformers/models/pvt/image_processing_pvt.py class PvtImageProcessor (line 42) | class PvtImageProcessor(BaseImageProcessor): method __init__ (line 75) | def __init__( method resize (line 100) | def resize( method preprocess (line 149) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pvt/modeling_pvt.py function drop_path (line 54) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class PvtDropPath (line 75) | class PvtDropPath(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 PvtPatchEmbeddings (line 89) | class PvtPatchEmbeddings(nn.Module): method __init__ (line 96) | def __init__( method interpolate_pos_encoding (line 124) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 133) | def forward(self, pixel_values: torch.Tensor) -> Tuple[torch.Tensor, i... class PvtSelfOutput (line 155) | class PvtSelfOutput(nn.Module): method __init__ (line 156) | def __init__(self, config: PvtConfig, hidden_size: int): method forward (line 161) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PvtEfficientSelfAttention (line 167) | class PvtEfficientSelfAttention(nn.Module): method __init__ (line 170) | def __init__( method transpose_for_scores (line 199) | def transpose_for_scores(self, hidden_states: int) -> torch.Tensor: method forward (line 204) | def forward( class PvtAttention (line 249) | class PvtAttention(nn.Module): method __init__ (line 250) | def __init__( method prune_heads (line 263) | def prune_heads(self, heads): method forward (line 281) | def forward( class PvtFFN (line 291) | class PvtFFN(nn.Module): method __init__ (line 292) | def __init__( method forward (line 309) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PvtLayer (line 318) | class PvtLayer(nn.Module): method __init__ (line 319) | def __init__( method forward (line 341) | def forward(self, hidden_states: torch.Tensor, height: int, width: int... class PvtEncoder (line 364) | class PvtEncoder(nn.Module): method __init__ (line 365) | def __init__(self, config: PvtConfig): method forward (line 415) | def forward( class PvtPreTrainedModel (line 453) | class PvtPreTrainedModel(PreTrainedModel): method _init_weights (line 464) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class PvtModel (line 520) | class PvtModel(PvtPreTrainedModel): method __init__ (line 521) | def __init__(self, config: PvtConfig): method _prune_heads (line 531) | def _prune_heads(self, heads_to_prune): method forward (line 547) | def forward( class PvtForImageClassification (line 585) | class PvtForImageClassification(PvtPreTrainedModel): method __init__ (line 586) | def __init__(self, config: PvtConfig) -> None: method forward (line 607) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pvt_v2/configuration_pvt_v2.py class PvtV2Config (line 29) | class PvtV2Config(BackboneConfigMixin, PretrainedConfig): method __init__ (line 104) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/pvt_v2/convert_pvt_v2_to_pytorch.py function create_rename_keys (line 35) | def create_rename_keys(config): function read_in_k_v (line 150) | def read_in_k_v(state_dict, config): function rename_key (line 171) | def rename_key(dct, old, new): function prepare_img (line 177) | def prepare_img(): function convert_pvt_v2_checkpoint (line 184) | def convert_pvt_v2_checkpoint(pvt_v2_size, pvt_v2_checkpoint, pytorch_du... FILE: mplsandbox_for_rl/transformers/src/transformers/models/pvt_v2/modeling_pvt_v2.py function drop_path (line 54) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class PvtV2DropPath (line 75) | class PvtV2DropPath(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 PvtV2OverlapPatchEmbeddings (line 89) | class PvtV2OverlapPatchEmbeddings(nn.Module): method __init__ (line 92) | def __init__(self, config: PvtV2Config, layer_idx: int): method forward (line 109) | def forward(self, pixel_values): class PvtV2DepthWiseConv (line 117) | class PvtV2DepthWiseConv(nn.Module): method __init__ (line 124) | def __init__(self, config: PvtV2Config, dim: int = 768): method forward (line 128) | def forward(self, hidden_states, height, width): class PvtV2SelfAttention (line 137) | class PvtV2SelfAttention(nn.Module): method __init__ (line 140) | def __init__(self, config: PvtV2Config, hidden_size: int, num_attentio... method transpose_for_scores (line 175) | def transpose_for_scores(self, hidden_states) -> torch.Tensor: method forward (line 180) | def forward( method prune_heads (line 225) | def prune_heads(self, heads): class PvtV2ConvFeedForwardNetwork (line 244) | class PvtV2ConvFeedForwardNetwork(nn.Module): method __init__ (line 245) | def __init__( method forward (line 264) | def forward(self, hidden_states: torch.Tensor, height, width) -> torch... class PvtV2BlockLayer (line 275) | class PvtV2BlockLayer(nn.Module): method __init__ (line 276) | def __init__(self, config: PvtV2Config, layer_idx: int, drop_path: flo... method forward (line 294) | def forward(self, hidden_states: torch.Tensor, height: int, width: int... class PvtV2EncoderLayer (line 317) | class PvtV2EncoderLayer(nn.Module): method __init__ (line 318) | def __init__(self, config: PvtV2Config, layer_idx: int): method forward (line 341) | def forward(self, hidden_states, output_attentions): class PvtV2Encoder (line 362) | class PvtV2Encoder(nn.Module): method __init__ (line 363) | def __init__(self, config: PvtV2Config): method forward (line 371) | def forward( class PvtV2PreTrainedModel (line 405) | class PvtV2PreTrainedModel(PreTrainedModel): method _init_weights (line 416) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class PvtV2Model (line 466) | class PvtV2Model(PvtV2PreTrainedModel): method __init__ (line 467) | def __init__(self, config: PvtV2Config): method _prune_heads (line 477) | def _prune_heads(self, heads_to_prune): method forward (line 493) | def forward( class PvtV2ForImageClassification (line 531) | class PvtV2ForImageClassification(PvtV2PreTrainedModel): method __init__ (line 532) | def __init__(self, config: PvtV2Config) -> None: method forward (line 553) | def forward( class PvtV2Backbone (line 630) | class PvtV2Backbone(PvtV2Model, BackboneMixin): method __init__ (line 631) | def __init__(self, config: PvtV2Config): method forward (line 638) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/qwen2/configuration_qwen2.py class Qwen2Config (line 24) | class Qwen2Config(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/qwen2/modeling_qwen2.py function _prepare_4d_causal_attention_mask_with_cache_position (line 63) | def _prepare_4d_causal_attention_mask_with_cache_position( class Qwen2RMSNorm (line 117) | class Qwen2RMSNorm(nn.Module): method __init__ (line 118) | def __init__(self, hidden_size, eps=1e-6): method forward (line 126) | def forward(self, hidden_states): method extra_repr (line 133) | def extra_repr(self): class Qwen2RotaryEmbedding (line 138) | class Qwen2RotaryEmbedding(nn.Module): method __init__ (line 139) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 153) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 163) | def forward(self, x, seq_len=None): function rotate_half (line 175) | def rotate_half(x): function apply_rotary_pos_emb (line 183) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class Qwen2MLP (line 212) | class Qwen2MLP(nn.Module): method __init__ (line 213) | def __init__(self, config): method forward (line 222) | def forward(self, hidden_state): function repeat_kv (line 227) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class Qwen2Attention (line 239) | class Qwen2Attention(nn.Module): method __init__ (line 245) | def __init__(self, config: Qwen2Config, layer_idx: Optional[int] = None): method forward (line 282) | def forward( class Qwen2FlashAttention2 (line 356) | class Qwen2FlashAttention2(Qwen2Attention): method __init__ (line 366) | def __init__(self, *args, **kwargs): method forward (line 374) | def forward( class Qwen2SdpaAttention (line 507) | class Qwen2SdpaAttention(Qwen2Attention): method forward (line 515) | def forward( class Qwen2DecoderLayer (line 604) | class Qwen2DecoderLayer(nn.Module): method __init__ (line 605) | def __init__(self, config: Qwen2Config, layer_idx: int): method forward (line 620) | def forward( class Qwen2PreTrainedModel (line 704) | class Qwen2PreTrainedModel(PreTrainedModel): method _init_weights (line 714) | def _init_weights(self, module): class Qwen2Model (line 804) | class Qwen2Model(Qwen2PreTrainedModel): method __init__ (line 812) | def __init__(self, config: Qwen2Config): method get_input_embeddings (line 828) | def get_input_embeddings(self): method set_input_embeddings (line 831) | def set_input_embeddings(self, value): method forward (line 835) | def forward( method _update_causal_mask (line 953) | def _update_causal_mask( class Qwen2ForCausalLM (line 1025) | class Qwen2ForCausalLM(Qwen2PreTrainedModel): method __init__ (line 1028) | def __init__(self, config): method get_input_embeddings (line 1037) | def get_input_embeddings(self): method set_input_embeddings (line 1040) | def set_input_embeddings(self, value): method get_output_embeddings (line 1043) | def get_output_embeddings(self): method set_output_embeddings (line 1046) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1049) | def set_decoder(self, decoder): method get_decoder (line 1052) | def get_decoder(self): method forward (line 1057) | def forward( method prepare_inputs_for_generation (line 1147) | def prepare_inputs_for_generation( class Qwen2ForSequenceClassification (line 1233) | class Qwen2ForSequenceClassification(Qwen2PreTrainedModel): method __init__ (line 1234) | def __init__(self, config): method get_input_embeddings (line 1243) | def get_input_embeddings(self): method set_input_embeddings (line 1246) | def set_input_embeddings(self, value): method forward (line 1250) | def forward( class Qwen2ForTokenClassification (line 1349) | class Qwen2ForTokenClassification(Qwen2PreTrainedModel): method __init__ (line 1350) | def __init__(self, config): method get_input_embeddings (line 1366) | def get_input_embeddings(self): method set_input_embeddings (line 1369) | def set_input_embeddings(self, value): method forward (line 1373) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/qwen2/tokenization_qwen2.py function bytes_to_unicode (line 44) | def bytes_to_unicode(): function get_pairs (line 69) | def get_pairs(word): class Qwen2Tokenizer (line 83) | class Qwen2Tokenizer(PreTrainedTokenizer): method __init__ (line 137) | def __init__( method vocab_size (line 211) | def vocab_size(self) -> int: method get_vocab (line 215) | def get_vocab(self): method bpe (line 219) | def bpe(self, token): method _tokenize (line 262) | def _tokenize(self, text): method _convert_token_to_id (line 273) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 278) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 283) | def convert_tokens_to_string(self, tokens): method decode (line 289) | def decode( method save_vocabulary (line 308) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 337) | def prepare_for_tokenization(self, text, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/qwen2/tokenization_qwen2_fast.py class Qwen2TokenizerFast (line 37) | class Qwen2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 83) | def __init__( method save_vocabulary (line 132) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/qwen2_audio/configuration_qwen2_audio.py class Qwen2AudioEncoderConfig (line 24) | class Qwen2AudioEncoderConfig(PretrainedConfig): method __init__ (line 84) | def __init__( class Qwen2AudioConfig (line 119) | class Qwen2AudioConfig(PretrainedConfig): method __init__ (line 162) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/qwen2_audio/modeling_qwen2_audio.py class Qwen2AudioCausalLMOutputWithPast (line 51) | class Qwen2AudioCausalLMOutputWithPast(ModelOutput): class Qwen2AudioAttention (line 90) | class Qwen2AudioAttention(nn.Module): method __init__ (line 93) | def __init__( method _shape (line 134) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 137) | def forward( class Qwen2AudioFlashAttention2 (line 218) | class Qwen2AudioFlashAttention2(Qwen2AudioAttention): method __init__ (line 226) | def __init__(self, *args, **kwargs): method forward (line 234) | def forward( class Qwen2AudioSdpaAttention (line 342) | class Qwen2AudioSdpaAttention(Qwen2AudioAttention): method forward (line 343) | def forward( class Qwen2AudioEncoderLayer (line 448) | class Qwen2AudioEncoderLayer(nn.Module): method __init__ (line 449) | def __init__(self, config: Qwen2AudioConfig): method forward (line 467) | def forward( class Qwen2AudioPreTrainedModel (line 539) | class Qwen2AudioPreTrainedModel(PreTrainedModel): method _init_weights (line 547) | def _init_weights(self, module): method _supports_sdpa (line 562) | def _supports_sdpa(self): class Qwen2AudioEncoder (line 592) | class Qwen2AudioEncoder(Qwen2AudioPreTrainedModel): method __init__ (line 606) | def __init__(self, config: Qwen2AudioEncoderConfig): method _freeze_parameters (line 632) | def _freeze_parameters(self): method get_input_embeddings (line 637) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 640) | def set_input_embeddings(self, value: nn.Module): method forward (line 643) | def forward( method _get_feat_extract_output_lengths (line 762) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... class Qwen2AudioMultiModalProjector (line 771) | class Qwen2AudioMultiModalProjector(nn.Module): method __init__ (line 772) | def __init__(self, config: Qwen2AudioConfig): method forward (line 776) | def forward(self, audio_features): class Qwen2AudioForConditionalGeneration (line 858) | class Qwen2AudioForConditionalGeneration(Qwen2AudioPreTrainedModel): method __init__ (line 859) | def __init__(self, config: Qwen2AudioConfig): method padding_side (line 873) | def padding_side(self): method padding_side (line 877) | def padding_side(self, padding_side: str): method get_input_embeddings (line 883) | def get_input_embeddings(self): method set_input_embeddings (line 887) | def set_input_embeddings(self, value): method get_output_embeddings (line 891) | def get_output_embeddings(self): method set_output_embeddings (line 895) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 899) | def set_decoder(self, decoder): method get_decoder (line 903) | def get_decoder(self): method tie_weights (line 907) | def tie_weights(self): method resize_token_embeddings (line 911) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _merge_input_ids_with_audio_features (line 918) | def _merge_input_ids_with_audio_features( method forward (line 1117) | def forward( method prepare_inputs_for_generation (line 1256) | def prepare_inputs_for_generation( method _update_model_kwargs_for_generation (line 1326) | def _update_model_kwargs_for_generation( method _reorder_cache (line 1374) | def _reorder_cache(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/qwen2_audio/processing_qwen2_audio.py class Qwen2AudioProcessor (line 28) | class Qwen2AudioProcessor(ProcessorMixin): method __init__ (line 49) | def __init__(self, feature_extractor=None, tokenizer=None, chat_templa... method __call__ (line 54) | def __call__( 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): method default_chat_template (line 125) | def default_chat_template(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/qwen2_moe/configuration_qwen2_moe.py class Qwen2MoeConfig (line 24) | class Qwen2MoeConfig(PretrainedConfig): method __init__ (line 115) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/qwen2_moe/modeling_qwen2_moe.py function _prepare_4d_causal_attention_mask_with_cache_position (line 62) | def _prepare_4d_causal_attention_mask_with_cache_position( function load_balancing_loss_func (line 116) | def load_balancing_loss_func( class Qwen2MoeRMSNorm (line 193) | class Qwen2MoeRMSNorm(nn.Module): method __init__ (line 194) | def __init__(self, hidden_size, eps=1e-6): method forward (line 202) | def forward(self, hidden_states): method extra_repr (line 209) | def extra_repr(self): class Qwen2MoeRotaryEmbedding (line 214) | class Qwen2MoeRotaryEmbedding(nn.Module): method __init__ (line 215) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 229) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 239) | def forward(self, x, seq_len=None): function rotate_half (line 251) | def rotate_half(x): function apply_rotary_pos_emb (line 259) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class Qwen2MoeMLP (line 288) | class Qwen2MoeMLP(nn.Module): method __init__ (line 289) | def __init__(self, config, intermediate_size=None): method forward (line 299) | def forward(self, x): function repeat_kv (line 304) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class Qwen2MoeAttention (line 317) | class Qwen2MoeAttention(nn.Module): method __init__ (line 323) | def __init__(self, config: Qwen2MoeConfig, layer_idx: Optional[int] = ... method forward (line 360) | def forward( class Qwen2MoeFlashAttention2 (line 435) | class Qwen2MoeFlashAttention2(Qwen2MoeAttention): method __init__ (line 445) | def __init__(self, *args, **kwargs): method forward (line 453) | def forward( class Qwen2MoeSdpaAttention (line 586) | class Qwen2MoeSdpaAttention(Qwen2MoeAttention): method forward (line 594) | def forward( class Qwen2MoeSparseMoeBlock (line 683) | class Qwen2MoeSparseMoeBlock(nn.Module): method __init__ (line 684) | def __init__(self, config): method forward (line 699) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Qwen2MoeDecoderLayer (line 745) | class Qwen2MoeDecoderLayer(nn.Module): method __init__ (line 746) | def __init__(self, config: Qwen2MoeConfig, layer_idx: int): method forward (line 762) | def forward( class Qwen2MoePreTrainedModel (line 859) | class Qwen2MoePreTrainedModel(PreTrainedModel): method _init_weights (line 869) | def _init_weights(self, module): class Qwen2MoeModel (line 962) | class Qwen2MoeModel(Qwen2MoePreTrainedModel): method __init__ (line 970) | def __init__(self, config: Qwen2MoeConfig): method get_input_embeddings (line 986) | def get_input_embeddings(self): method set_input_embeddings (line 989) | def set_input_embeddings(self, value): method forward (line 993) | def forward( method _update_causal_mask (line 1126) | def _update_causal_mask( class Qwen2MoeForCausalLM (line 1198) | class Qwen2MoeForCausalLM(Qwen2MoePreTrainedModel): method __init__ (line 1201) | def __init__(self, config): method get_input_embeddings (line 1213) | def get_input_embeddings(self): method set_input_embeddings (line 1216) | def set_input_embeddings(self, value): method get_output_embeddings (line 1219) | def get_output_embeddings(self): method set_output_embeddings (line 1222) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1225) | def set_decoder(self, decoder): method get_decoder (line 1228) | def get_decoder(self): method forward (line 1233) | def forward( method prepare_inputs_for_generation (line 1343) | def prepare_inputs_for_generation( class Qwen2MoeForSequenceClassification (line 1430) | class Qwen2MoeForSequenceClassification(Qwen2MoePreTrainedModel): method __init__ (line 1431) | def __init__(self, config): method get_input_embeddings (line 1440) | def get_input_embeddings(self): method set_input_embeddings (line 1443) | def set_input_embeddings(self, value): method forward (line 1447) | def forward( class Qwen2MoeForTokenClassification (line 1546) | class Qwen2MoeForTokenClassification(Qwen2MoePreTrainedModel): method __init__ (line 1547) | def __init__(self, config): method get_input_embeddings (line 1563) | def get_input_embeddings(self): method set_input_embeddings (line 1566) | def set_input_embeddings(self, value): method forward (line 1570) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/rag/configuration_rag.py class RagConfig (line 80) | class RagConfig(PretrainedConfig): method __init__ (line 84) | def __init__( method from_question_encoder_generator_configs (line 171) | def from_question_encoder_generator_configs( FILE: mplsandbox_for_rl/transformers/src/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 486) | class RagModel(RagPreTrainedModel): method __init__ (line 487) | def __init__( method forward (line 535) | def forward( class RagSequenceForGeneration (line 736) | class RagSequenceForGeneration(RagPreTrainedModel): method __init__ (line 737) | def __init__( method set_retriever (line 758) | def set_retriever(self, retriever: RagRetriever): method set_context_encoder_for_training (line 761) | def set_context_encoder_for_training(self, ctx_encoder: PreTrainedModel): method forward (line 767) | def forward( method retriever (line 895) | def retriever(self): method generator (line 899) | def generator(self): method question_encoder (line 903) | def question_encoder(self): method generate (line 907) | def generate( method get_nll (line 1057) | def get_nll( method _cat_and_pad (line 1117) | def _cat_and_pad(tensors, pad_token_id): class RagTokenForGeneration (line 1134) | class RagTokenForGeneration(RagPreTrainedModel): method __init__ (line 1135) | def __init__( method set_retriever (line 1157) | def set_retriever(self, retriever: RagRetriever): method set_context_encoder_for_training (line 1160) | def set_context_encoder_for_training(self, ctx_encoder: PreTrainedModel): method prepare_inputs_for_generation (line 1164) | def prepare_inputs_for_generation( method retriever (line 1192) | def retriever(self): method generator (line 1196) | def generator(self): method question_encoder (line 1200) | def question_encoder(self): method _reorder_cache (line 1204) | def _reorder_cache(past_key_values, beam_idx): method marginalize (line 1223) | def marginalize(self, seq_logits, doc_scores, n_docs=None): method forward (line 1236) | def forward( method generate (line 1376) | def generate( method get_input_embeddings (line 1589) | def get_input_embeddings(self): method get_output_embeddings (line 1592) | def get_output_embeddings(self): method set_output_embeddings (line 1595) | def set_output_embeddings(self, new_embeddings): method shift_tokens_right (line 1598) | def shift_tokens_right(self, input_ids, start_token_id=None): method get_nll (line 1607) | def get_nll(self, seq_logits, doc_scores, target, reduce_loss=False, e... FILE: mplsandbox_for_rl/transformers/src/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 233) | def from_pretrained_question_encoder_generator( class TFRagModel (line 497) | class TFRagModel(TFRagPreTrainedModel): method __init__ (line 500) | def __init__( method set_retriever (line 544) | def set_retriever(self, retriever: RagRetriever): method call (line 550) | def call( method build (line 723) | def build(self, input_shape=None): class TFRagTokenForGeneration (line 739) | class TFRagTokenForGeneration(TFRagPreTrainedModel, TFCausalLanguageMode... method __init__ (line 742) | def __init__( method set_retriever (line 771) | def set_retriever(self, retriever: RagRetriever): method prepare_inputs_for_generation (line 775) | def prepare_inputs_for_generation( method retriever (line 803) | def retriever(self): method generator (line 807) | def generator(self): method question_encoder (line 811) | def question_encoder(self): method _gather_beams (line 815) | def _gather_beams(nested, beam_indices, batch_axis=0): method marginalize (line 840) | def marginalize(self, seq_logits, doc_scores, n_docs=None): method call (line 855) | def call( method generate (line 1007) | def generate( method get_input_embeddings (line 1220) | def get_input_embeddings(self): method get_output_embeddings (line 1223) | def get_output_embeddings(self): method shift_tokens_right (line 1227) | def shift_tokens_right(self, input_ids, start_token_id=None): method get_nll (line 1260) | def get_nll(self, seq_logits, doc_scores, target, reduce_loss=False, e... method hf_compute_loss (line 1274) | def hf_compute_loss(self, labels, y_pred, smooth_epsilon=0.0, from_log... method build (line 1304) | def build(self, input_shape=None): class TFRagSequenceForGeneration (line 1319) | class TFRagSequenceForGeneration(TFRagPreTrainedModel, TFCausalLanguageM... method __init__ (line 1322) | def __init__( method set_retriever (line 1351) | def set_retriever(self, retriever: RagRetriever): method retriever (line 1355) | def retriever(self): method generator (line 1359) | def generator(self): method question_encoder (line 1363) | def question_encoder(self): method call (line 1369) | def call( method get_nll (line 1517) | def get_nll( method generate (line 1601) | def generate( method _cat_and_pad (line 1744) | def _cat_and_pad(tensors, pad_token_id): method build (line 1764) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/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 145) | def _deserialize_index(self): method is_initialized (line 163) | def is_initialized(self): method init_index (line 166) | def init_index(self): method get_doc_dicts (line 174) | def get_doc_dicts(self, doc_ids: np.array): method get_top_docs (line 188) | def get_top_docs(self, question_hidden_states: np.ndarray, n_docs=5) -... class HFIndexBase (line 197) | class HFIndexBase(Index): method __init__ (line 198) | def __init__(self, vector_size, dataset, index_initialized=False): method _check_dataset_format (line 205) | def _check_dataset_format(self, with_index: bool): method init_index (line 220) | def init_index(self): method is_initialized (line 223) | def is_initialized(self): method get_doc_dicts (line 226) | def get_doc_dicts(self, doc_ids: np.ndarray) -> List[dict]: method get_top_docs (line 229) | def get_top_docs(self, question_hidden_states: np.ndarray, n_docs=5) -... class CanonicalHFIndex (line 239) | class CanonicalHFIndex(HFIndexBase): method __init__ (line 261) | def __init__( method init_index (line 289) | def init_index(self): class CustomHFIndex (line 308) | class CustomHFIndex(HFIndexBase): method __init__ (line 322) | def __init__(self, vector_size: int, dataset, index_path=None): method load_from_disk (line 327) | def load_from_disk(cls, vector_size, dataset_path, index_path): method init_index (line 337) | def init_index(self): class RagRetriever (line 344) | class RagRetriever: method __init__ (line 398) | def __init__(self, config, question_encoder_tokenizer, generator_token... method _build_index (line 417) | def _build_index(config): method from_pretrained (line 441) | def from_pretrained(cls, retriever_name_or_path, indexed_dataset=None,... method save_pretrained (line 459) | def save_pretrained(self, save_directory): method init_retrieval (line 479) | def init_retrieval(self): method postprocess_docs (line 487) | def postprocess_docs(self, docs, input_strings, prefix, n_docs, return... method _chunk_tensor (line 539) | def _chunk_tensor(self, t: Iterable, chunk_size: int) -> List[Iterable]: method _main_retrieve (line 542) | def _main_retrieve(self, question_hidden_states: np.ndarray, n_docs: i... method retrieve (line 559) | def retrieve(self, question_hidden_states: np.ndarray, n_docs: int) ->... method set_ctx_encoder_tokenizer (line 581) | def set_ctx_encoder_tokenizer(self, ctx_encoder_tokenizer: PreTrainedT... method __call__ (line 586) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/rag/tokenization_rag.py class RagTokenizer (line 29) | class RagTokenizer: method __init__ (line 30) | def __init__(self, question_encoder, generator): method save_pretrained (line 35) | def save_pretrained(self, save_directory): method from_pretrained (line 45) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method __call__ (line 62) | def __call__(self, *args, **kwargs): method batch_decode (line 65) | def batch_decode(self, *args, **kwargs): method decode (line 68) | def decode(self, *args, **kwargs): method _switch_to_input_mode (line 71) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 74) | def _switch_to_target_mode(self): method prepare_seq2seq_batch (line 77) | def prepare_seq2seq_batch( FILE: mplsandbox_for_rl/transformers/src/transformers/models/recurrent_gemma/configuration_recurrent_gemma.py class RecurrentGemmaConfig (line 24) | class RecurrentGemmaConfig(PretrainedConfig): method __init__ (line 100) | def __init__( method layers_block_type (line 157) | def layers_block_type(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/recurrent_gemma/convert_recurrent_gemma_to_hf.py function write_model (line 72) | def write_model(save_path, input_base_path, config, safe_serialization=T... function write_tokenizer (line 144) | def write_tokenizer(input_tokenizer_path, save_path, push_to_hub=False): function main (line 155) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/recurrent_gemma/modeling_recurrent_gemma.py class RecurrentGemmaRMSNorm (line 46) | class RecurrentGemmaRMSNorm(nn.Module): method __init__ (line 47) | def __init__(self, dim: int, eps: float = 1e-6): method _norm (line 52) | def _norm(self, x): method forward (line 55) | def forward(self, x): method extra_repr (line 62) | def extra_repr(self): class RecurrentGemmaRotaryEmbedding (line 69) | class RecurrentGemmaRotaryEmbedding(nn.Module): method __init__ (line 70) | def __init__(self, dim, base=10000, device=None): method forward (line 79) | def forward(self, x, position_ids, seq_len=None): function rotate_half (line 97) | def rotate_half(x): function apply_rotary_pos_emb (line 105) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... function repeat_kv (line 133) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class RecurrentGemmaSdpaAttention (line 145) | class RecurrentGemmaSdpaAttention(nn.Module): method __init__ (line 148) | def __init__(self, config: RecurrentGemmaConfig): method forward (line 168) | def forward( method _setup_cache (line 220) | def _setup_cache(self, batch_size, device, dtype=None): method _update_cache (line 229) | def _update_cache(self, key_states, value_states, **cache_kwargs): class SqrtBoundDerivative (line 267) | class SqrtBoundDerivative(torch.autograd.Function): method forward (line 271) | def forward(ctx, x: torch.Tensor) -> torch.Tensor: method backward (line 277) | def backward(ctx, grad_output: torch.Tensor) -> torch.Tensor: class RecurrentGemmaRglru (line 284) | class RecurrentGemmaRglru(nn.Module): method __init__ (line 287) | def __init__(self, config): method forward (line 304) | def forward( method _rnn_scan (line 350) | def _rnn_scan( class RecurrentGemmaRecurrentBlock (line 400) | class RecurrentGemmaRecurrentBlock(nn.Module): method __init__ (line 403) | def __init__(self, config): method forward (line 423) | def forward( method _setup_cache (line 457) | def _setup_cache(self, batch, device, dtype): class RecurrentGemmaMlp (line 466) | class RecurrentGemmaMlp(nn.Module): method __init__ (line 467) | def __init__(self, config): method forward (line 477) | def forward(self, hidden_states): class RecurrentGemmaDecoderLayer (line 482) | class RecurrentGemmaDecoderLayer(nn.Module): method __init__ (line 485) | def __init__(self, config, layer_idx): method forward (line 492) | def forward( class RecurrentGemmaPreTrainedModel (line 537) | class RecurrentGemmaPreTrainedModel(PreTrainedModel): method _init_weights (line 548) | def _init_weights(self, module): method _setup_cache (line 587) | def _setup_cache(self, config, batch, device, dtype): method reset_cache (line 592) | def reset_cache(self, batch, device, dtype): class RecurrentGemmaModel (line 645) | class RecurrentGemmaModel(RecurrentGemmaPreTrainedModel): method __init__ (line 653) | def __init__(self, config: RecurrentGemmaConfig): method get_input_embeddings (line 672) | def get_input_embeddings(self): method set_input_embeddings (line 676) | def set_input_embeddings(self, value): method forward (line 680) | def forward( method _update_causal_mask (line 755) | def _update_causal_mask(self, attention_mask, input_tensor, cache_posi... class RecurrentGemmaForCausalLM (line 785) | class RecurrentGemmaForCausalLM(RecurrentGemmaPreTrainedModel): method __init__ (line 788) | def __init__(self, config): method get_input_embeddings (line 797) | def get_input_embeddings(self): method set_input_embeddings (line 800) | def set_input_embeddings(self, value): method get_output_embeddings (line 803) | def get_output_embeddings(self): method set_output_embeddings (line 806) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 809) | def set_decoder(self, decoder): method get_decoder (line 812) | def get_decoder(self): method forward (line 818) | def forward( method prepare_inputs_for_generation (line 904) | def prepare_inputs_for_generation( method _reorder_cache (line 941) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/reformer/configuration_reformer.py class ReformerConfig (line 25) | class ReformerConfig(PretrainedConfig): method __init__ (line 159) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/reformer/convert_reformer_trax_checkpoint_to_pytorch.py function set_param (line 31) | def set_param(torch_layer, weight, bias=None): function set_layer_weights_in_torch_lsh (line 40) | def set_layer_weights_in_torch_lsh(weights, torch_layer, hidden_size): function set_layer_weights_in_torch_local (line 60) | def set_layer_weights_in_torch_local(weights, torch_layer, hidden_size): function set_block_weights_in_torch (line 85) | def set_block_weights_in_torch(weights, torch_block, hidden_size): function set_model_weights_in_torch (line 138) | def set_model_weights_in_torch(weights, torch_model, hidden_size): function convert_trax_checkpoint_to_pytorch (line 185) | def convert_trax_checkpoint_to_pytorch(trax_model_pkl_path, config_file,... FILE: mplsandbox_for_rl/transformers/src/transformers/models/reformer/modeling_reformer.py function _stable_argsort (line 68) | def _stable_argsort(vector, dim): function _get_least_common_mult_chunk_len (line 77) | def _get_least_common_mult_chunk_len(config): function _get_min_chunk_len (line 93) | def _get_min_chunk_len(config): class AxialPositionEmbeddings (line 109) | class AxialPositionEmbeddings(nn.Module): method __init__ (line 114) | def __init__(self, config): method forward (line 139) | def forward(self, position_ids): class PositionEmbeddings (line 205) | class PositionEmbeddings(nn.Module): method __init__ (line 208) | def __init__(self, config): method forward (line 213) | def forward(self, position_ids): class ReformerEmbeddings (line 219) | class ReformerEmbeddings(nn.Module): method __init__ (line 222) | def __init__(self, config): method forward (line 232) | def forward(self, input_ids=None, position_ids=None, inputs_embeds=Non... class EfficientAttentionMixin (line 265) | class EfficientAttentionMixin: method _look_adjacent (line 270) | def _look_adjacent(self, vectors, num_chunks_before, num_chunks_after): method _split_hidden_size_dim (line 293) | def _split_hidden_size_dim(self, x, num_attn_heads, attn_head_size): method _merge_hidden_size_dims (line 301) | def _merge_hidden_size_dims(self, x, num_attn_heads, attn_head_size): method _split_seq_length_dim_to (line 308) | def _split_seq_length_dim_to(self, vectors, dim_factor_1, dim_factor_2... class LSHSelfAttention (line 323) | class LSHSelfAttention(nn.Module, EfficientAttentionMixin): method __init__ (line 324) | def __init__(self, config): method forward (line 354) | def forward( method _query_per_attn_head (line 591) | def _query_per_attn_head(self, hidden_states): method _value_per_attn_head (line 599) | def _value_per_attn_head(self, hidden_states): method _hash_vectors (line 607) | def _hash_vectors(self, vectors, num_hashes, attention_mask, increase_... method _get_sorted_bucket_idx_and_undo_sorted_bucket_idx (line 681) | def _get_sorted_bucket_idx_and_undo_sorted_bucket_idx(self, sequence_l... method _set_num_buckets (line 700) | def _set_num_buckets(self, sequence_length): method _attend (line 720) | def _attend( method _compute_attn_mask (line 832) | def _compute_attn_mask( method _get_relevant_hid_states_and_buckets (line 860) | def _get_relevant_hid_states_and_buckets( method _expand_to_indices_in_relevant_chunk (line 946) | def _expand_to_indices_in_relevant_chunk(self, indices, sequence_length): method _len_and_dim_norm (line 966) | def _len_and_dim_norm(self, vectors, sqrt_num): method _len_norm (line 974) | def _len_norm(self, x, epsilon=1e-6): method _gather_by_expansion (line 982) | def _gather_by_expansion(self, vectors, idxs, num_hashes): class ReverseSort (line 991) | class ReverseSort(Function): method forward (line 998) | def forward(ctx, out_vectors, logits, sorted_bucket_idx, undo_sorted_b... method backward (line 1010) | def backward(ctx, grad_out_vectors, grad_logits): class LocalSelfAttention (line 1023) | class LocalSelfAttention(nn.Module, EfficientAttentionMixin): method __init__ (line 1024) | def __init__(self, config): method forward (line 1049) | def forward( method _compute_attn_mask (line 1216) | def _compute_attn_mask( method _retrieve_relevant_hidden_states (line 1242) | def _retrieve_relevant_hidden_states(previous_hidden_states, chunk_len... class ReformerSelfOutput (line 1247) | class ReformerSelfOutput(nn.Module): method __init__ (line 1248) | def __init__(self, config): method forward (line 1255) | def forward(self, hidden_states): class ReformerAttention (line 1261) | class ReformerAttention(nn.Module): method __init__ (line 1262) | def __init__(self, config, layer_id=0): method forward (line 1286) | def forward( class ReformerFeedForwardDense (line 1353) | class ReformerFeedForwardDense(nn.Module): method __init__ (line 1354) | def __init__(self, config): method forward (line 1365) | def forward(self, hidden_states): class ReformerFeedForwardOutput (line 1372) | class ReformerFeedForwardOutput(nn.Module): method __init__ (line 1373) | def __init__(self, config): method forward (line 1379) | def forward(self, hidden_states): class ChunkReformerFeedForward (line 1385) | class ChunkReformerFeedForward(nn.Module): method __init__ (line 1386) | def __init__(self, config): method forward (line 1395) | def forward(self, attention_output): method forward_chunk (line 1403) | def forward_chunk(self, hidden_states): class ReformerLayer (line 1409) | class ReformerLayer(nn.Module): method __init__ (line 1410) | def __init__(self, config, layer_id=0): method _init_attention_seed (line 1420) | def _init_attention_seed(self): method _init_feed_forward_seed (line 1438) | def _init_feed_forward_seed(self): method forward (line 1455) | def forward( method backward_pass (line 1508) | def backward_pass( class _ReversibleFunction (line 1577) | class _ReversibleFunction(Function): method forward (line 1585) | def forward( method backward (line 1643) | def backward(ctx, grad_hidden_states): class ReformerEncoder (line 1689) | class ReformerEncoder(nn.Module): method __init__ (line 1690) | def __init__(self, config): method forward (line 1699) | def forward( class ReformerOnlyLMHead (line 1750) | class ReformerOnlyLMHead(nn.Module): method __init__ (line 1751) | def __init__(self, config): method forward (line 1761) | def forward(self, hidden_states): method forward_chunk (line 1764) | def forward_chunk(self, hidden_states): method _tie_weights (line 1768) | def _tie_weights(self) -> None: class ReformerPreTrainedModel (line 1777) | class ReformerPreTrainedModel(PreTrainedModel): method dummy_inputs (line 1787) | def dummy_inputs(self): method _init_weights (line 1796) | def _init_weights(self, module): class ReformerModelOutput (line 1817) | class ReformerModelOutput(ModelOutput): class ReformerModelWithLMHeadOutput (line 1854) | class ReformerModelWithLMHeadOutput(ModelOutput): class ReformerModel (line 1974) | class ReformerModel(ReformerPreTrainedModel): method __init__ (line 1975) | def __init__(self, config): method get_input_embeddings (line 1988) | def get_input_embeddings(self): method set_input_embeddings (line 1991) | def set_input_embeddings(self, value): method _prune_heads (line 1994) | def _prune_heads(self, heads_to_prune): method forward (line 2008) | def forward( method _pad_to_mult_of_chunk_length (line 2129) | def _pad_to_mult_of_chunk_length( class ReformerModelWithLMHead (line 2186) | class ReformerModelWithLMHead(ReformerPreTrainedModel): method __init__ (line 2189) | def __init__(self, config): method get_output_embeddings (line 2207) | def get_output_embeddings(self): method set_output_embeddings (line 2210) | 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 2316) | def __init__(self, config): method get_output_embeddings (line 2328) | def get_output_embeddings(self): method set_output_embeddings (line 2331) | def set_output_embeddings(self, new_embeddings): method forward (line 2337) | def forward( class ReformerForSequenceClassification (line 2444) | class ReformerForSequenceClassification(ReformerPreTrainedModel): method __init__ (line 2445) | def __init__(self, config): method forward (line 2460) | def forward( class ReformerClassificationHead (line 2562) | class ReformerClassificationHead(nn.Module): method __init__ (line 2565) | def __init__(self, config): method forward (line 2574) | def forward(self, hidden_states, **kwargs): class ReformerForQuestionAnswering (line 2591) | class ReformerForQuestionAnswering(ReformerPreTrainedModel): method __init__ (line 2592) | def __init__(self, config): method forward (line 2609) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/reformer/tokenization_reformer.py class ReformerTokenizer (line 35) | class ReformerTokenizer(PreTrainedTokenizer): method __init__ (line 81) | def __init__( method vocab_size (line 105) | def vocab_size(self): method get_vocab (line 108) | def get_vocab(self) -> Dict[str, int]: method __getstate__ (line 113) | def __getstate__(self): method __setstate__ (line 118) | def __setstate__(self, d): method _tokenize (line 128) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 132) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 136) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 142) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 156) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/reformer/tokenization_reformer_fast.py class ReformerTokenizerFast (line 39) | class ReformerTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 74) | def __init__( method can_save_slow_tokenizer (line 95) | def can_save_slow_tokenizer(self) -> bool: method save_vocabulary (line 98) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/regnet/configuration_regnet.py class RegNetConfig (line 24) | class RegNetConfig(PretrainedConfig): method __init__ (line 69) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/regnet/convert_regnet_to_pytorch.py class Tracker (line 41) | class Tracker: method _forward_hook (line 46) | def _forward_hook(self, m, inputs: Tensor, outputs: Tensor): method __call__ (line 51) | def __call__(self, x: Tensor): method parametrized (line 59) | def parametrized(self): class ModuleTransfer (line 65) | class ModuleTransfer: method __call__ (line 73) | def __call__(self, x: Tensor): class FakeRegNetVisslWrapper (line 96) | class FakeRegNetVisslWrapper(nn.Module): method __init__ (line 101) | def __init__(self, model: nn.Module): method forward (line 115) | def forward(self, x: Tensor): class NameToFromModelFuncMap (line 123) | class NameToFromModelFuncMap(dict): method convert_name_to_timm (line 128) | def convert_name_to_timm(self, x: str) -> str: method __getitem__ (line 132) | def __getitem__(self, x: str) -> Callable[[], Tuple[nn.Module, Dict]]: class NameToOurModelFuncMap (line 144) | class NameToOurModelFuncMap(dict): method __getitem__ (line 149) | def __getitem__(self, x: str) -> Callable[[], nn.Module]: function manually_copy_vissl_head (line 157) | def manually_copy_vissl_head(from_state_dict, to_state_dict, keys: List[... function convert_weight_and_push (line 164) | def convert_weight_and_push( function convert_weights_and_push (line 221) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: mplsandbox_for_rl/transformers/src/transformers/models/regnet/modeling_flax_regnet.py class Identity (line 95) | class Identity(nn.Module): method __call__ (line 99) | def __call__(self, x, **kwargs): class FlaxRegNetConvLayer (line 103) | class FlaxRegNetConvLayer(nn.Module): method setup (line 111) | def setup(self): method __call__ (line 125) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetEmbeddings (line 132) | class FlaxRegNetEmbeddings(nn.Module): method setup (line 136) | def setup(self): method __call__ (line 145) | def __call__(self, pixel_values: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetShortCut (line 156) | class FlaxRegNetShortCut(nn.Module): method setup (line 166) | def setup(self): method __call__ (line 177) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxRegNetSELayerCollection (line 183) | class FlaxRegNetSELayerCollection(nn.Module): method setup (line 188) | def setup(self): method __call__ (line 204) | def __call__(self, hidden_state: jnp.ndarray) -> jnp.ndarray: class FlaxRegNetSELayer (line 213) | class FlaxRegNetSELayer(nn.Module): method setup (line 222) | def setup(self): method __call__ (line 226) | def __call__(self, hidden_state: jnp.ndarray) -> jnp.ndarray: class FlaxRegNetXLayerCollection (line 237) | class FlaxRegNetXLayerCollection(nn.Module): method setup (line 243) | def setup(self): method __call__ (line 271) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetXLayer (line 277) | class FlaxRegNetXLayer(nn.Module): method setup (line 288) | def setup(self): method __call__ (line 308) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetYLayerCollection (line 317) | class FlaxRegNetYLayerCollection(nn.Module): method setup (line 324) | def setup(self): method __call__ (line 358) | def __call__(self, hidden_state: jnp.ndarray) -> jnp.ndarray: class FlaxRegNetYLayer (line 364) | class FlaxRegNetYLayer(nn.Module): method setup (line 375) | def setup(self): method __call__ (line 396) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetStageLayersCollection (line 405) | class FlaxRegNetStageLayersCollection(nn.Module): method setup (line 417) | def setup(self): method __call__ (line 445) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxRegNetStage (line 453) | class FlaxRegNetStage(nn.Module): method setup (line 465) | def setup(self): method __call__ (line 475) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxRegNetStageCollection (line 480) | class FlaxRegNetStageCollection(nn.Module): method setup (line 484) | def setup(self): method __call__ (line 505) | def __call__( class FlaxRegNetEncoder (line 523) | class FlaxRegNetEncoder(nn.Module): method setup (line 527) | def setup(self): method __call__ (line 530) | def __call__( class FlaxRegNetPreTrainedModel (line 554) | class FlaxRegNetPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 565) | def __init__( method init_weights (line 579) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 598) | def __call__( class FlaxRegNetModule (line 631) | class FlaxRegNetModule(nn.Module): method setup (line 635) | def setup(self): method __call__ (line 645) | def __call__( class FlaxRegNetModel (line 690) | class FlaxRegNetModel(FlaxRegNetPreTrainedModel): class FlaxRegNetClassifierCollection (line 725) | class FlaxRegNetClassifierCollection(nn.Module): method setup (line 729) | def setup(self): method __call__ (line 732) | def __call__(self, x: jnp.ndarray) -> jnp.ndarray: class FlaxRegNetForImageClassificationModule (line 737) | class FlaxRegNetForImageClassificationModule(nn.Module): method setup (line 741) | def setup(self): method __call__ (line 749) | def __call__( class FlaxRegNetForImageClassification (line 783) | class FlaxRegNetForImageClassification(FlaxRegNetPreTrainedModel): FILE: mplsandbox_for_rl/transformers/src/transformers/models/regnet/modeling_regnet.py class RegNetConvLayer (line 51) | class RegNetConvLayer(nn.Module): method __init__ (line 52) | def __init__( method forward (line 74) | def forward(self, hidden_state): class RegNetEmbeddings (line 81) | class RegNetEmbeddings(nn.Module): method __init__ (line 86) | def __init__(self, config: RegNetConfig): method forward (line 93) | def forward(self, pixel_values): class RegNetShortCut (line 104) | class RegNetShortCut(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 RegNetSELayer (line 121) | class RegNetSELayer(nn.Module): method __init__ (line 126) | def __init__(self, in_channels: int, reduced_channels: int): method forward (line 137) | def forward(self, hidden_state): class RegNetXLayer (line 145) | class RegNetXLayer(nn.Module): method __init__ (line 150) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method forward (line 164) | def forward(self, hidden_state): class RegNetYLayer (line 173) | class RegNetYLayer(nn.Module): method __init__ (line 178) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method forward (line 193) | def forward(self, hidden_state): class RegNetStage (line 202) | class RegNetStage(nn.Module): method __init__ (line 207) | def __init__( method forward (line 230) | def forward(self, hidden_state): class RegNetEncoder (line 235) | class RegNetEncoder(nn.Module): method __init__ (line 236) | def __init__(self, config: RegNetConfig): method forward (line 253) | def forward( class RegNetPreTrainedModel (line 273) | class RegNetPreTrainedModel(PreTrainedModel): method _init_weights (line 285) | def _init_weights(self, module): class RegNetModel (line 330) | class RegNetModel(RegNetPreTrainedModel): method __init__ (line 331) | def __init__(self, config): method forward (line 348) | def forward( class RegNetForImageClassification (line 384) | class RegNetForImageClassification(RegNetPreTrainedModel): method __init__ (line 385) | def __init__(self, config): method forward (line 404) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/regnet/modeling_tf_regnet.py class TFRegNetConvLayer (line 54) | class TFRegNetConvLayer(keras.layers.Layer): method __init__ (line 55) | def __init__( method call (line 83) | def call(self, hidden_state): method build (line 89) | def build(self, input_shape=None): class TFRegNetEmbeddings (line 101) | class TFRegNetEmbeddings(keras.layers.Layer): method __init__ (line 106) | def __init__(self, config: RegNetConfig, **kwargs): method call (line 118) | def call(self, pixel_values): method build (line 132) | def build(self, input_shape=None): class TFRegNetShortCut (line 141) | class TFRegNetShortCut(keras.layers.Layer): method __init__ (line 147) | def __init__(self, in_channels: int, out_channels: int, stride: int = ... method call (line 156) | def call(self, inputs: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 159) | def build(self, input_shape=None): class TFRegNetSELayer (line 171) | class TFRegNetSELayer(keras.layers.Layer): method __init__ (line 176) | def __init__(self, in_channels: int, reduced_channels: int, **kwargs): method call (line 186) | def call(self, hidden_state): method build (line 194) | def build(self, input_shape=None): class TFRegNetXLayer (line 208) | class TFRegNetXLayer(keras.layers.Layer): method __init__ (line 213) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method call (line 232) | def call(self, hidden_state): method build (line 241) | def build(self, input_shape=None): class TFRegNetYLayer (line 254) | class TFRegNetYLayer(keras.layers.Layer): method __init__ (line 259) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method call (line 278) | def call(self, hidden_state): method build (line 287) | def build(self, input_shape=None): class TFRegNetStage (line 300) | class TFRegNetStage(keras.layers.Layer): method __init__ (line 305) | def __init__( method call (line 317) | def call(self, hidden_state): method build (line 322) | def build(self, input_shape=None): class TFRegNetEncoder (line 332) | class TFRegNetEncoder(keras.layers.Layer): method __init__ (line 333) | def __init__(self, config: RegNetConfig, **kwargs): method call (line 351) | def call( method build (line 370) | def build(self, input_shape=None): class TFRegNetMainLayer (line 380) | class TFRegNetMainLayer(keras.layers.Layer): method __init__ (line 383) | def __init__(self, config, **kwargs): method call (line 391) | def call( method build (line 429) | def build(self, input_shape=None): class TFRegNetPreTrainedModel (line 444) | class TFRegNetPreTrainedModel(TFPreTrainedModel): method input_signature (line 455) | def input_signature(self): class TFRegNetModel (line 488) | class TFRegNetModel(TFRegNetPreTrainedModel): method __init__ (line 489) | def __init__(self, config: RegNetConfig, *inputs, **kwargs): method call (line 502) | def call( method build (line 529) | def build(self, input_shape=None): class TFRegNetForImageClassification (line 545) | class TFRegNetForImageClassification(TFRegNetPreTrainedModel, TFSequence... method __init__ (line 546) | def __init__(self, config: RegNetConfig, *inputs, **kwargs): method call (line 564) | def call( method build (line 599) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/rembert/configuration_rembert.py class RemBertConfig (line 28) | class RemBertConfig(PretrainedConfig): method __init__ (line 98) | def __init__( class RemBertOnnxConfig (line 142) | class RemBertOnnxConfig(OnnxConfig): method inputs (line 144) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 158) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/rembert/convert_rembert_tf_checkpoint_to_pytorch.py function convert_rembert_tf_checkpoint_to_pytorch (line 28) | def convert_rembert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_co... FILE: mplsandbox_for_rl/transformers/src/transformers/models/rembert/modeling_rembert.py function load_tf_weights_in_rembert (line 55) | def load_tf_weights_in_rembert(model, config, tf_checkpoint_path): class RemBertEmbeddings (line 138) | class RemBertEmbeddings(nn.Module): method __init__ (line 141) | def __init__(self, config): method forward (line 159) | def forward( class RemBertPooler (line 193) | class RemBertPooler(nn.Module): method __init__ (line 194) | def __init__(self, config): method forward (line 199) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertSelfAttention (line 208) | class RemBertSelfAttention(nn.Module): method __init__ (line 209) | def __init__(self, config): method transpose_for_scores (line 229) | def transpose_for_scores(self, x): method forward (line 234) | def forward( class RemBertSelfOutput (line 314) | class RemBertSelfOutput(nn.Module): method __init__ (line 315) | def __init__(self, config): method forward (line 321) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RemBertAttention (line 328) | class RemBertAttention(nn.Module): method __init__ (line 329) | def __init__(self, config): method prune_heads (line 336) | def prune_heads(self, heads): method forward (line 355) | def forward( class RemBertIntermediate (line 380) | class RemBertIntermediate(nn.Module): method __init__ (line 381) | def __init__(self, config): method forward (line 389) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertOutput (line 396) | class RemBertOutput(nn.Module): method __init__ (line 397) | def __init__(self, config): method forward (line 403) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RemBertLayer (line 410) | class RemBertLayer(nn.Module): method __init__ (line 411) | def __init__(self, config): method forward (line 426) | def forward( method feed_forward_chunk (line 492) | def feed_forward_chunk(self, attention_output): class RemBertEncoder (line 498) | class RemBertEncoder(nn.Module): method __init__ (line 499) | def __init__(self, config): method forward (line 507) | def forward( class RemBertPredictionHeadTransform (line 594) | class RemBertPredictionHeadTransform(nn.Module): method __init__ (line 595) | def __init__(self, config): method forward (line 604) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertLMPredictionHead (line 611) | class RemBertLMPredictionHead(nn.Module): method __init__ (line 612) | def __init__(self, config): method forward (line 619) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertOnlyMLMHead (line 628) | class RemBertOnlyMLMHead(nn.Module): method __init__ (line 629) | def __init__(self, config): method forward (line 633) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class RemBertPreTrainedModel (line 638) | class RemBertPreTrainedModel(PreTrainedModel): method _init_weights (line 649) | def _init_weights(self, module): class RemBertModel (line 731) | class RemBertModel(RemBertPreTrainedModel): method __init__ (line 744) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 756) | def get_input_embeddings(self): method set_input_embeddings (line 759) | def set_input_embeddings(self, value): method _prune_heads (line 762) | def _prune_heads(self, heads_to_prune): method forward (line 776) | def forward( class RemBertForMaskedLM (line 901) | class RemBertForMaskedLM(RemBertPreTrainedModel): method __init__ (line 904) | def __init__(self, config): method get_output_embeddings (line 919) | def get_output_embeddings(self): method set_output_embeddings (line 922) | def set_output_embeddings(self, new_embeddings): method forward (line 931) | def forward( method prepare_inputs_for_generation (line 987) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class RemBertForCausalLM (line 1005) | class RemBertForCausalLM(RemBertPreTrainedModel): method __init__ (line 1008) | def __init__(self, config): method get_output_embeddings (line 1020) | def get_output_embeddings(self): method set_output_embeddings (line 1023) | def set_output_embeddings(self, new_embeddings): method forward (line 1028) | def forward( method prepare_inputs_for_generation (line 1128) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1150) | def _reorder_cache(self, past_key_values, beam_idx): class RemBertForSequenceClassification (line 1167) | class RemBertForSequenceClassification(RemBertPreTrainedModel): method __init__ (line 1168) | def __init__(self, config): method forward (line 1184) | def forward( class RemBertForMultipleChoice (line 1263) | class RemBertForMultipleChoice(RemBertPreTrainedModel): method __init__ (line 1264) | def __init__(self, config): method forward (line 1280) | def forward( class RemBertForTokenClassification (line 1354) | class RemBertForTokenClassification(RemBertPreTrainedModel): method __init__ (line 1355) | def __init__(self, config): method forward (line 1372) | def forward( class RemBertForQuestionAnswering (line 1432) | class RemBertForQuestionAnswering(RemBertPreTrainedModel): method __init__ (line 1433) | def __init__(self, config): method forward (line 1450) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/rembert/modeling_tf_rembert.py class TFRemBertEmbeddings (line 65) | class TFRemBertEmbeddings(keras.layers.Layer): method __init__ (line 68) | def __init__(self, config: RemBertConfig, **kwargs): method build (line 78) | def build(self, input_shape=None): method call (line 107) | def call( class TFRemBertSelfAttention (line 148) | class TFRemBertSelfAttention(keras.layers.Layer): method __init__ (line 149) | def __init__(self, config: RemBertConfig, **kwargs): method transpose_for_scores (line 177) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 184) | def call( method build (line 265) | def build(self, input_shape=None): class TFRemBertSelfOutput (line 281) | class TFRemBertSelfOutput(keras.layers.Layer): method __init__ (line 282) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 292) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 299) | def build(self, input_shape=None): class TFRemBertAttention (line 312) | class TFRemBertAttention(keras.layers.Layer): method __init__ (line 313) | def __init__(self, config: RemBertConfig, **kwargs): method prune_heads (line 319) | def prune_heads(self, heads): method call (line 322) | def call( method build (line 351) | def build(self, input_shape=None): class TFRemBertIntermediate (line 364) | class TFRemBertIntermediate(keras.layers.Layer): method __init__ (line 365) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 378) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 384) | def build(self, input_shape=None): class TFRemBertOutput (line 394) | class TFRemBertOutput(keras.layers.Layer): method __init__ (line 395) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 405) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 412) | def build(self, input_shape=None): class TFRemBertLayer (line 425) | class TFRemBertLayer(keras.layers.Layer): method __init__ (line 426) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 439) | def call( method build (line 510) | def build(self, input_shape=None): class TFRemBertEncoder (line 528) | class TFRemBertEncoder(keras.layers.Layer): method __init__ (line 529) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 540) | def call( method build (line 603) | def build(self, input_shape=None): class TFRemBertPooler (line 617) | class TFRemBertPooler(keras.layers.Layer): method __init__ (line 618) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 629) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 637) | def build(self, input_shape=None): class TFRemBertLMPredictionHead (line 646) | class TFRemBertLMPredictionHead(keras.layers.Layer): method __init__ (line 647) | def __init__(self, config: RemBertConfig, input_embeddings: keras.laye... method build (line 662) | def build(self, input_shape=None): method get_output_embeddings (line 682) | def get_output_embeddings(self) -> keras.layers.Layer: method set_output_embeddings (line 685) | def set_output_embeddings(self, value): method get_bias (line 689) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 692) | def set_bias(self, value: tf.Variable): method call (line 696) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRemBertMLMHead (line 709) | class TFRemBertMLMHead(keras.layers.Layer): method __init__ (line 710) | def __init__(self, config: RemBertConfig, input_embeddings: keras.laye... method call (line 715) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: method build (line 720) | def build(self, input_shape=None): class TFRemBertMainLayer (line 730) | class TFRemBertMainLayer(keras.layers.Layer): method __init__ (line 733) | def __init__(self, config: RemBertConfig, add_pooling_layer: bool = Tr... method get_input_embeddings (line 743) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 746) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 750) | def _prune_heads(self, heads_to_prune): method call (line 759) | def call( method build (line 916) | def build(self, input_shape=None): class TFRemBertPreTrainedModel (line 931) | class TFRemBertPreTrainedModel(TFPreTrainedModel): class TFRemBertModel (line 1043) | class TFRemBertModel(TFRemBertPreTrainedModel): method __init__ (line 1044) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1056) | def call( method build (line 1112) | def build(self, input_shape=None): class TFRemBertForMaskedLM (line 1122) | class TFRemBertForMaskedLM(TFRemBertPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1123) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method get_lm_head (line 1135) | def get_lm_head(self) -> keras.layers.Layer: method call (line 1145) | def call( method build (line 1192) | def build(self, input_shape=None): class TFRemBertForCausalLM (line 1207) | class TFRemBertForCausalLM(TFRemBertPreTrainedModel, TFCausalLanguageMod... method __init__ (line 1208) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method get_lm_head (line 1217) | def get_lm_head(self) -> keras.layers.Layer: method prepare_inputs_for_generation (line 1221) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1239) | def call( method build (line 1319) | def build(self, input_shape=None): class TFRemBertForSequenceClassification (line 1337) | class TFRemBertForSequenceClassification(TFRemBertPreTrainedModel, TFSeq... method __init__ (line 1338) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1359) | def call( method build (line 1407) | def build(self, input_shape=None): class TFRemBertForMultipleChoice (line 1426) | class TFRemBertForMultipleChoice(TFRemBertPreTrainedModel, TFMultipleCho... method __init__ (line 1427) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1444) | def call( method build (line 1515) | def build(self, input_shape=None): class TFRemBertForTokenClassification (line 1534) | class TFRemBertForTokenClassification(TFRemBertPreTrainedModel, TFTokenC... method __init__ (line 1535) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1554) | def call( method build (line 1600) | def build(self, input_shape=None): class TFRemBertForQuestionAnswering (line 1619) | class TFRemBertForQuestionAnswering(TFRemBertPreTrainedModel, TFQuestion... method __init__ (line 1620) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1638) | def call( method build (line 1699) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/rembert/tokenization_rembert.py class RemBertTokenizer (line 32) | class RemBertTokenizer(PreTrainedTokenizer): method __init__ (line 86) | def __init__( method vocab_size (line 126) | def vocab_size(self): method get_vocab (line 129) | def get_vocab(self): method __getstate__ (line 134) | def __getstate__(self): method __setstate__ (line 139) | def __setstate__(self, d): method _tokenize (line 144) | def _tokenize(self, text, sample=False): 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 157) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 161) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 186) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 217) | def create_token_type_ids_from_sequences( method save_vocabulary (line 247) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/rembert/tokenization_rembert_fast.py class RemBertTokenizerFast (line 38) | class RemBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 88) | def __init__( method can_save_slow_tokenizer (line 129) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 132) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 157) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 188) | def create_token_type_ids_from_sequences( method save_vocabulary (line 218) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/resnet/configuration_resnet.py class ResNetConfig (line 31) | class ResNetConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 89) | def __init__( class ResNetOnnxConfig (line 120) | class ResNetOnnxConfig(OnnxConfig): method inputs (line 124) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 132) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/resnet/convert_resnet_to_pytorch.py class Tracker (line 39) | class Tracker: method _forward_hook (line 44) | def _forward_hook(self, m, inputs: Tensor, outputs: Tensor): method __call__ (line 49) | def __call__(self, x: Tensor): method parametrized (line 57) | def parametrized(self): class ModuleTransfer (line 63) | class ModuleTransfer: method __call__ (line 70) | def __call__(self, x: Tensor): function convert_weight_and_push (line 93) | def convert_weight_and_push(name: str, config: ResNetConfig, save_direct... function convert_weights_and_push (line 125) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: mplsandbox_for_rl/transformers/src/transformers/models/resnet/modeling_flax_resnet.py class Identity (line 89) | class Identity(nn.Module): method __call__ (line 93) | def __call__(self, x, **kwargs): class FlaxResNetConvLayer (line 97) | class FlaxResNetConvLayer(nn.Module): method setup (line 104) | def setup(self): method __call__ (line 117) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxResNetEmbeddings (line 124) | class FlaxResNetEmbeddings(nn.Module): method setup (line 132) | def setup(self): method __call__ (line 143) | def __call__(self, pixel_values: jnp.ndarray, deterministic: bool = Tr... class FlaxResNetShortCut (line 154) | class FlaxResNetShortCut(nn.Module): method setup (line 164) | def setup(self): method __call__ (line 175) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxResNetBasicLayerCollection (line 181) | class FlaxResNetBasicLayerCollection(nn.Module): method setup (line 186) | def setup(self): method __call__ (line 192) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxResNetBasicLayer (line 198) | class FlaxResNetBasicLayer(nn.Module): method setup (line 209) | 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: mplsandbox_for_rl/transformers/src/transformers/models/resnet/modeling_resnet.py class ResNetConvLayer (line 58) | class ResNetConvLayer(nn.Module): method __init__ (line 59) | def __init__( method forward (line 69) | def forward(self, input: Tensor) -> Tensor: class ResNetEmbeddings (line 76) | class ResNetEmbeddings(nn.Module): method __init__ (line 81) | def __init__(self, config: ResNetConfig): method forward (line 89) | def forward(self, pixel_values: Tensor) -> Tensor: class ResNetShortCut (line 100) | class ResNetShortCut(nn.Module): method __init__ (line 106) | def __init__(self, in_channels: int, out_channels: int, stride: int = 2): method forward (line 111) | def forward(self, input: Tensor) -> Tensor: class ResNetBasicLayer (line 117) | class ResNetBasicLayer(nn.Module): method __init__ (line 122) | def __init__(self, in_channels: int, out_channels: int, stride: int = ... method forward (line 134) | def forward(self, hidden_state): class ResNetBottleNeckLayer (line 143) | class ResNetBottleNeckLayer(nn.Module): method __init__ (line 152) | def __init__( method forward (line 176) | def forward(self, hidden_state): class ResNetStage (line 185) | class ResNetStage(nn.Module): method __init__ (line 190) | def __init__( method forward (line 216) | def forward(self, input: Tensor) -> Tensor: class ResNetEncoder (line 223) | class ResNetEncoder(nn.Module): method __init__ (line 224) | def __init__(self, config: ResNetConfig): method forward (line 241) | def forward( class ResNetPreTrainedModel (line 264) | class ResNetPreTrainedModel(PreTrainedModel): method _init_weights (line 275) | def _init_weights(self, module): class ResNetModel (line 319) | class ResNetModel(ResNetPreTrainedModel): method __init__ (line 320) | def __init__(self, config): method forward (line 337) | def forward( class ResNetForImageClassification (line 372) | class ResNetForImageClassification(ResNetPreTrainedModel): method __init__ (line 373) | def __init__(self, config): method forward (line 392) | def forward( class ResNetBackbone (line 448) | class ResNetBackbone(ResNetPreTrainedModel, BackboneMixin): method __init__ (line 449) | def __init__(self, config): method forward (line 462) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/resnet/modeling_tf_resnet.py class TFResNetConvLayer (line 53) | class TFResNetConvLayer(keras.layers.Layer): method __init__ (line 54) | def __init__( method convolution (line 74) | def convolution(self, hidden_state: tf.Tensor) -> tf.Tensor: method call (line 81) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... method build (line 87) | def build(self, input_shape=None): class TFResNetEmbeddings (line 99) | class TFResNetEmbeddings(keras.layers.Layer): method __init__ (line 104) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 117) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... method build (line 129) | def build(self, input_shape=None): class TFResNetShortCut (line 141) | class TFResNetShortCut(keras.layers.Layer): method __init__ (line 147) | def __init__(self, in_channels: int, out_channels: int, stride: int = ... method call (line 157) | def call(self, x: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 163) | def build(self, input_shape=None): class TFResNetBasicLayer (line 175) | class TFResNetBasicLayer(keras.layers.Layer): method __init__ (line 180) | def __init__( method call (line 194) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... method build (line 203) | def build(self, input_shape=None): class TFResNetBottleNeckLayer (line 218) | class TFResNetBottleNeckLayer(keras.layers.Layer): method __init__ (line 226) | def __init__( method call (line 248) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... method build (line 258) | def build(self, input_shape=None): class TFResNetStage (line 276) | class TFResNetStage(keras.layers.Layer): method __init__ (line 281) | def __init__( method call (line 295) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... method build (line 300) | def build(self, input_shape=None): class TFResNetEncoder (line 310) | class TFResNetEncoder(keras.layers.Layer): method __init__ (line 311) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 329) | def call( method build (line 352) | def build(self, input_shape=None): class TFResNetPreTrainedModel (line 362) | class TFResNetPreTrainedModel(TFPreTrainedModel): method input_signature (line 373) | def input_signature(self): class TFResNetMainLayer (line 405) | class TFResNetMainLayer(keras.layers.Layer): method __init__ (line 408) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 416) | def call( method build (line 461) | def build(self, input_shape=None): class TFResNetModel (line 477) | class TFResNetModel(TFResNetPreTrainedModel): method __init__ (line 478) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 491) | def call( method build (line 511) | def build(self, input_shape=None): class TFResNetForImageClassification (line 527) | class TFResNetForImageClassification(TFResNetPreTrainedModel, TFSequence... method __init__ (line 528) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method classifier (line 540) | def classifier(self, x: tf.Tensor) -> tf.Tensor: method call (line 553) | def call( method build (line 584) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta/configuration_roberta.py class RobertaConfig (line 29) | class RobertaConfig(PretrainedConfig): method __init__ (line 99) | def __init__( class RobertaOnnxConfig (line 140) | class RobertaOnnxConfig(OnnxConfig): method inputs (line 142) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta/convert_roberta_original_pytorch_checkpoint_to_pytorch.py function convert_roberta_checkpoint_to_pytorch (line 47) | def convert_roberta_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/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 138) | class FlaxRobertaEmbeddings(nn.Module): method setup (line 144) | def setup(self): method __call__ (line 166) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxRobertaSelfAttention (line 182) | class FlaxRobertaSelfAttention(nn.Module): method setup (line 187) | def setup(self): method _split_heads (line 216) | def _split_heads(self, hidden_states): method _merge_heads (line 219) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 224) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 255) | def __call__( class FlaxRobertaSelfOutput (line 354) | class FlaxRobertaSelfOutput(nn.Module): method setup (line 358) | def setup(self): method __call__ (line 367) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxRobertaAttention (line 375) | class FlaxRobertaAttention(nn.Module): method setup (line 380) | def setup(self): method __call__ (line 384) | def __call__( class FlaxRobertaIntermediate (line 418) | class FlaxRobertaIntermediate(nn.Module): method setup (line 422) | def setup(self): method __call__ (line 430) | def __call__(self, hidden_states): class FlaxRobertaOutput (line 437) | class FlaxRobertaOutput(nn.Module): method setup (line 441) | def setup(self): method __call__ (line 450) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxRobertaLayer (line 458) | class FlaxRobertaLayer(nn.Module): method setup (line 462) | def setup(self): method __call__ (line 469) | def __call__( class FlaxRobertaLayerCollection (line 516) | class FlaxRobertaLayerCollection(nn.Module): method setup (line 521) | def setup(self): method __call__ (line 534) | def __call__( class FlaxRobertaEncoder (line 599) | class FlaxRobertaEncoder(nn.Module): method setup (line 604) | def setup(self): method __call__ (line 611) | def __call__( class FlaxRobertaPooler (line 639) | class FlaxRobertaPooler(nn.Module): method setup (line 643) | def setup(self): method __call__ (line 650) | def __call__(self, hidden_states): class FlaxRobertaLMHead (line 656) | class FlaxRobertaLMHead(nn.Module): method setup (line 661) | def setup(self): method __call__ (line 676) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRobertaClassificationHead (line 691) | class FlaxRobertaClassificationHead(nn.Module): method setup (line 695) | def setup(self): method __call__ (line 713) | def __call__(self, hidden_states, deterministic=True): class FlaxRobertaPreTrainedModel (line 723) | class FlaxRobertaPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 734) | def __init__( method enable_gradient_checkpointing (line 748) | def enable_gradient_checkpointing(self): method init_weights (line 755) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 798) | def init_cache(self, batch_size, max_length): method __call__ (line 818) | def __call__( class FlaxRobertaModule (line 916) | class FlaxRobertaModule(nn.Module): method setup (line 922) | def setup(self): method __call__ (line 931) | def __call__( class FlaxRobertaModel (line 991) | class FlaxRobertaModel(FlaxRobertaPreTrainedModel): class FlaxRobertaForMaskedLMModule (line 998) | class FlaxRobertaForMaskedLMModule(nn.Module): method setup (line 1003) | def setup(self): method __call__ (line 1012) | def __call__( class FlaxRobertaForMaskedLM (line 1057) | class FlaxRobertaForMaskedLM(FlaxRobertaPreTrainedModel): class FlaxRobertaForSequenceClassificationModule (line 1070) | class FlaxRobertaForSequenceClassificationModule(nn.Module): method setup (line 1075) | def setup(self): method __call__ (line 1084) | def __call__( class FlaxRobertaForSequenceClassification (line 1129) | class FlaxRobertaForSequenceClassification(FlaxRobertaPreTrainedModel): class FlaxRobertaForMultipleChoiceModule (line 1142) | class FlaxRobertaForMultipleChoiceModule(nn.Module): method setup (line 1147) | def setup(self): method __call__ (line 1156) | def __call__( class FlaxRobertaForMultipleChoice (line 1210) | class FlaxRobertaForMultipleChoice(FlaxRobertaPreTrainedModel): class FlaxRobertaForTokenClassificationModule (line 1226) | class FlaxRobertaForTokenClassificationModule(nn.Module): method setup (line 1231) | def setup(self): method __call__ (line 1246) | def __call__( class FlaxRobertaForTokenClassification (line 1292) | class FlaxRobertaForTokenClassification(FlaxRobertaPreTrainedModel): class FlaxRobertaForQuestionAnsweringModule (line 1305) | class FlaxRobertaForQuestionAnsweringModule(nn.Module): method setup (line 1310) | def setup(self): method __call__ (line 1319) | def __call__( class FlaxRobertaForQuestionAnswering (line 1369) | class FlaxRobertaForQuestionAnswering(FlaxRobertaPreTrainedModel): class FlaxRobertaForCausalLMModule (line 1381) | class FlaxRobertaForCausalLMModule(nn.Module): method setup (line 1386) | def setup(self): method __call__ (line 1395) | def __call__( class FlaxRobertaForCausalLM (line 1453) | class FlaxRobertaForCausalLM(FlaxRobertaPreTrainedModel): method prepare_inputs_for_generation (line 1456) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1477) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta/modeling_roberta.py class RobertaEmbeddings (line 55) | class RobertaEmbeddings(nn.Module): method __init__ (line 61) | def __init__(self, config): method forward (line 86) | def forward( method create_position_ids_from_inputs_embeds (line 126) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class RobertaSelfAttention (line 145) | class RobertaSelfAttention(nn.Module): method __init__ (line 146) | 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 RobertaSelfOutput (line 280) | class RobertaSelfOutput(nn.Module): method __init__ (line 281) | def __init__(self, config): method forward (line 287) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaAttention (line 300) | class RobertaAttention(nn.Module): method __init__ (line 301) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 309) | def prune_heads(self, heads): method forward (line 327) | def forward( class RobertaIntermediate (line 352) | class RobertaIntermediate(nn.Module): method __init__ (line 353) | def __init__(self, config): method forward (line 361) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaOutput (line 368) | class RobertaOutput(nn.Module): method __init__ (line 369) | def __init__(self, config): method forward (line 375) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaLayer (line 383) | class RobertaLayer(nn.Module): method __init__ (line 384) | def __init__(self, config): method forward (line 398) | def forward( method feed_forward_chunk (line 463) | def feed_forward_chunk(self, attention_output): class RobertaEncoder (line 470) | class RobertaEncoder(nn.Module): method __init__ (line 471) | def __init__(self, config): method forward (line 477) | def forward( class RobertaPooler (line 564) | class RobertaPooler(nn.Module): method __init__ (line 565) | def __init__(self, config): method forward (line 570) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaPreTrainedModel (line 579) | class RobertaPreTrainedModel(PreTrainedModel): method _init_weights (line 591) | def _init_weights(self, module): class RobertaModel (line 679) | class RobertaModel(RobertaPreTrainedModel): method __init__ (line 696) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 708) | def get_input_embeddings(self): method set_input_embeddings (line 711) | def set_input_embeddings(self, value): method _prune_heads (line 714) | def _prune_heads(self, heads_to_prune): method forward (line 729) | def forward( class RobertaForCausalLM (line 863) | class RobertaForCausalLM(RobertaPreTrainedModel): method __init__ (line 866) | def __init__(self, config): 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( method prepare_inputs_for_generation (line 992) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1013) | def _reorder_cache(self, past_key_values, beam_idx): class RobertaForMaskedLM (line 1023) | class RobertaForMaskedLM(RobertaPreTrainedModel): method __init__ (line 1026) | def __init__(self, config): method get_output_embeddings (line 1041) | def get_output_embeddings(self): method set_output_embeddings (line 1044) | def set_output_embeddings(self, new_embeddings): method forward (line 1056) | def forward( class RobertaLMHead (line 1116) | class RobertaLMHead(nn.Module): method __init__ (line 1119) | def __init__(self, config): method forward (line 1128) | def forward(self, features, **kwargs): method _tie_weights (line 1138) | def _tie_weights(self): class RobertaForSequenceClassification (line 1154) | class RobertaForSequenceClassification(RobertaPreTrainedModel): method __init__ (line 1155) | def __init__(self, config): method forward (line 1174) | def forward( class RobertaForMultipleChoice (line 1253) | class RobertaForMultipleChoice(RobertaPreTrainedModel): method __init__ (line 1254) | def __init__(self, config): method forward (line 1270) | def forward( class RobertaForTokenClassification (line 1345) | class RobertaForTokenClassification(RobertaPreTrainedModel): method __init__ (line 1346) | def __init__(self, config): method forward (line 1368) | def forward( class RobertaClassificationHead (line 1423) | class RobertaClassificationHead(nn.Module): method __init__ (line 1426) | def __init__(self, config): method forward (line 1435) | def forward(self, features, **kwargs): class RobertaForQuestionAnswering (line 1452) | class RobertaForQuestionAnswering(RobertaPreTrainedModel): method __init__ (line 1453) | def __init__(self, config): method forward (line 1471) | def forward( function create_position_ids_from_input_ids (line 1546) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta/modeling_tf_roberta.py class TFRobertaEmbeddings (line 68) | class TFRobertaEmbeddings(keras.layers.Layer): method __init__ (line 73) | def __init__(self, config, **kwargs): method build (line 84) | def build(self, input_shape=None): method create_position_ids_from_input_ids (line 113) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 127) | def call( class TFRobertaPooler (line 174) | class TFRobertaPooler(keras.layers.Layer): method __init__ (line 175) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 186) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 194) | def build(self, input_shape=None): class TFRobertaSelfAttention (line 204) | class TFRobertaSelfAttention(keras.layers.Layer): method __init__ (line 205) | def __init__(self, config: RobertaConfig, **kwargs): method transpose_for_scores (line 233) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 240) | def call( method build (line 321) | def build(self, input_shape=None): class TFRobertaSelfOutput (line 337) | class TFRobertaSelfOutput(keras.layers.Layer): method __init__ (line 338) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 348) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 355) | def build(self, input_shape=None): class TFRobertaAttention (line 368) | class TFRobertaAttention(keras.layers.Layer): method __init__ (line 369) | def __init__(self, config: RobertaConfig, **kwargs): method prune_heads (line 375) | def prune_heads(self, heads): method call (line 378) | def call( method build (line 407) | def build(self, input_shape=None): class TFRobertaIntermediate (line 420) | class TFRobertaIntermediate(keras.layers.Layer): method __init__ (line 421) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 434) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 440) | def build(self, input_shape=None): class TFRobertaOutput (line 450) | class TFRobertaOutput(keras.layers.Layer): method __init__ (line 451) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 461) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 468) | def build(self, input_shape=None): class TFRobertaLayer (line 481) | class TFRobertaLayer(keras.layers.Layer): method __init__ (line 482) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 495) | def call( method build (line 566) | def build(self, input_shape=None): class TFRobertaEncoder (line 585) | class TFRobertaEncoder(keras.layers.Layer): method __init__ (line 586) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 591) | def call( method build (line 653) | def build(self, input_shape=None): class TFRobertaMainLayer (line 664) | class TFRobertaMainLayer(keras.layers.Layer): method __init__ (line 667) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 684) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 688) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 693) | def _prune_heads(self, heads_to_prune): method call (line 702) | def call( method build (line 859) | def build(self, input_shape=None): class TFRobertaPreTrainedModel (line 874) | class TFRobertaPreTrainedModel(TFPreTrainedModel): class TFRobertaModel (line 986) | class TFRobertaModel(TFRobertaPreTrainedModel): method __init__ (line 987) | def __init__(self, config, *inputs, **kwargs): method call (line 998) | def call( method build (line 1054) | def build(self, input_shape=None): class TFRobertaLMHead (line 1063) | class TFRobertaLMHead(keras.layers.Layer): method __init__ (line 1066) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1081) | def build(self, input_shape=None): method get_output_embeddings (line 1094) | def get_output_embeddings(self): method set_output_embeddings (line 1097) | def set_output_embeddings(self, value): method get_bias (line 1101) | def get_bias(self): method set_bias (line 1104) | def set_bias(self, value): method call (line 1108) | def call(self, hidden_states): class TFRobertaForMaskedLM (line 1124) | class TFRobertaForMaskedLM(TFRobertaPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1128) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1134) | def get_lm_head(self): method get_prefix_bias_name (line 1137) | def get_prefix_bias_name(self): method call (line 1151) | def call( method build (line 1200) | def build(self, input_shape=None): class TFRobertaForCausalLM (line 1212) | class TFRobertaForCausalLM(TFRobertaPreTrainedModel, TFCausalLanguageMod... method __init__ (line 1216) | def __init__(self, config: RobertaConfig, *inputs, **kwargs): method get_lm_head (line 1225) | def get_lm_head(self): method get_prefix_bias_name (line 1228) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1233) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1252) | def call( method build (line 1333) | def build(self, input_shape=None): class TFRobertaClassificationHead (line 1345) | class TFRobertaClassificationHead(keras.layers.Layer): method __init__ (line 1348) | def __init__(self, config, **kwargs): method call (line 1365) | def call(self, features, training=False): method build (line 1373) | def build(self, input_shape=None): class TFRobertaForSequenceClassification (line 1392) | class TFRobertaForSequenceClassification(TFRobertaPreTrainedModel, TFSeq... method __init__ (line 1396) | def __init__(self, config, *inputs, **kwargs): method call (line 1412) | def call( method build (line 1460) | def build(self, input_shape=None): class TFRobertaForMultipleChoice (line 1479) | class TFRobertaForMultipleChoice(TFRobertaPreTrainedModel, TFMultipleCho... method __init__ (line 1484) | def __init__(self, config, *inputs, **kwargs): method call (line 1501) | def call( method build (line 1562) | def build(self, input_shape=None): class TFRobertaForTokenClassification (line 1581) | class TFRobertaForTokenClassification(TFRobertaPreTrainedModel, TFTokenC... method __init__ (line 1586) | def __init__(self, config, *inputs, **kwargs): method call (line 1609) | def call( method build (line 1657) | def build(self, input_shape=None): class TFRobertaForQuestionAnswering (line 1676) | class TFRobertaForQuestionAnswering(TFRobertaPreTrainedModel, TFQuestion... method __init__ (line 1680) | def __init__(self, config, *inputs, **kwargs): method call (line 1699) | def call( method build (line 1761) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta/tokenization_roberta.py function bytes_to_unicode (line 37) | def bytes_to_unicode(): function get_pairs (line 61) | def get_pairs(word): class RobertaTokenizer (line 75) | class RobertaTokenizer(PreTrainedTokenizer): method __init__ (line 156) | def __init__( method vocab_size (line 217) | def vocab_size(self): method get_vocab (line 220) | def get_vocab(self): method bpe (line 225) | def bpe(self, token): method _tokenize (line 267) | def _tokenize(self, text): method _convert_token_to_id (line 277) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 281) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 285) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 291) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 320) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 345) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 372) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 395) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta/tokenization_roberta_fast.py class RobertaTokenizerFast (line 33) | class RobertaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 118) | def __init__( method mask_token (line 192) | def mask_token(self) -> str: method mask_token (line 207) | def mask_token(self, value): method _batch_encode_plus (line 218) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 227) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 237) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 241) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 248) | def create_token_type_ids_from_sequences( FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta_prelayernorm/configuration_roberta_prelayernorm.py class RobertaPreLayerNormConfig (line 30) | class RobertaPreLayerNormConfig(PretrainedConfig): method __init__ (line 100) | def __init__( class RobertaPreLayerNormOnnxConfig (line 142) | class RobertaPreLayerNormOnnxConfig(OnnxConfig): method inputs (line 144) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta_prelayernorm/convert_roberta_prelayernorm_original_pytorch_checkpoint_to_pytorch.py function convert_roberta_prelayernorm_checkpoint_to_pytorch (line 30) | def convert_roberta_prelayernorm_checkpoint_to_pytorch(checkpoint_repo: ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py function create_position_ids_from_input_ids (line 55) | def create_position_ids_from_input_ids(input_ids, padding_idx): class FlaxRobertaPreLayerNormEmbeddings (line 141) | class FlaxRobertaPreLayerNormEmbeddings(nn.Module): method setup (line 147) | def setup(self): method __call__ (line 169) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxRobertaPreLayerNormSelfAttention (line 185) | class FlaxRobertaPreLayerNormSelfAttention(nn.Module): method setup (line 190) | def setup(self): method _split_heads (line 219) | def _split_heads(self, hidden_states): method _merge_heads (line 222) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 227) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 258) | def __call__( class FlaxRobertaPreLayerNormSelfOutput (line 356) | class FlaxRobertaPreLayerNormSelfOutput(nn.Module): method setup (line 360) | def setup(self): method __call__ (line 368) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxRobertaPreLayerNormAttention (line 375) | class FlaxRobertaPreLayerNormAttention(nn.Module): method setup (line 380) | def setup(self): method __call__ (line 385) | def __call__( class FlaxRobertaPreLayerNormIntermediate (line 419) | class FlaxRobertaPreLayerNormIntermediate(nn.Module): method setup (line 423) | def setup(self): method __call__ (line 432) | def __call__(self, hidden_states): class FlaxRobertaPreLayerNormOutput (line 439) | class FlaxRobertaPreLayerNormOutput(nn.Module): method setup (line 443) | def setup(self): method __call__ (line 451) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxRobertaPreLayerNormLayer (line 459) | class FlaxRobertaPreLayerNormLayer(nn.Module): method setup (line 463) | def setup(self): method __call__ (line 470) | def __call__( class FlaxRobertaPreLayerNormLayerCollection (line 517) | class FlaxRobertaPreLayerNormLayerCollection(nn.Module): method setup (line 522) | def setup(self): method __call__ (line 535) | def __call__( class FlaxRobertaPreLayerNormEncoder (line 600) | class FlaxRobertaPreLayerNormEncoder(nn.Module): method setup (line 605) | def setup(self): method __call__ (line 612) | def __call__( class FlaxRobertaPreLayerNormPooler (line 640) | class FlaxRobertaPreLayerNormPooler(nn.Module): method setup (line 644) | def setup(self): method __call__ (line 651) | def __call__(self, hidden_states): class FlaxRobertaPreLayerNormLMHead (line 658) | class FlaxRobertaPreLayerNormLMHead(nn.Module): method setup (line 663) | def setup(self): method __call__ (line 678) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRobertaPreLayerNormClassificationHead (line 694) | class FlaxRobertaPreLayerNormClassificationHead(nn.Module): method setup (line 698) | def setup(self): method __call__ (line 716) | def __call__(self, hidden_states, deterministic=True): class FlaxRobertaPreLayerNormPreTrainedModel (line 727) | class FlaxRobertaPreLayerNormPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 738) | def __init__( method enable_gradient_checkpointing (line 752) | def enable_gradient_checkpointing(self): method init_weights (line 759) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 802) | def init_cache(self, batch_size, max_length): method __call__ (line 822) | def __call__( class FlaxRobertaPreLayerNormModule (line 919) | class FlaxRobertaPreLayerNormModule(nn.Module): method setup (line 925) | def setup(self): method __call__ (line 935) | def __call__( class FlaxRobertaPreLayerNormModel (line 997) | class FlaxRobertaPreLayerNormModel(FlaxRobertaPreLayerNormPreTrainedModel): class FlaxRobertaPreLayerNormForMaskedLMModule (line 1010) | class FlaxRobertaPreLayerNormForMaskedLMModule(nn.Module): method setup (line 1015) | def setup(self): method __call__ (line 1024) | def __call__( class FlaxRobertaPreLayerNormForMaskedLM (line 1074) | class FlaxRobertaPreLayerNormForMaskedLM(FlaxRobertaPreLayerNormPreTrain... class FlaxRobertaPreLayerNormForSequenceClassificationModule (line 1088) | class FlaxRobertaPreLayerNormForSequenceClassificationModule(nn.Module): method setup (line 1093) | def setup(self): method __call__ (line 1102) | def __call__( class FlaxRobertaPreLayerNormForSequenceClassification (line 1148) | class FlaxRobertaPreLayerNormForSequenceClassification(FlaxRobertaPreLay... class FlaxRobertaPreLayerNormForMultipleChoiceModule (line 1161) | class FlaxRobertaPreLayerNormForMultipleChoiceModule(nn.Module): method setup (line 1166) | def setup(self): method __call__ (line 1175) | def __call__( class FlaxRobertaPreLayerNormForMultipleChoice (line 1230) | class FlaxRobertaPreLayerNormForMultipleChoice(FlaxRobertaPreLayerNormPr... class FlaxRobertaPreLayerNormForTokenClassificationModule (line 1247) | class FlaxRobertaPreLayerNormForTokenClassificationModule(nn.Module): method setup (line 1252) | def setup(self): method __call__ (line 1267) | def __call__( class FlaxRobertaPreLayerNormForTokenClassification (line 1314) | class FlaxRobertaPreLayerNormForTokenClassification(FlaxRobertaPreLayerN... class FlaxRobertaPreLayerNormForQuestionAnsweringModule (line 1327) | class FlaxRobertaPreLayerNormForQuestionAnsweringModule(nn.Module): method setup (line 1332) | def setup(self): method __call__ (line 1341) | def __call__( class FlaxRobertaPreLayerNormForQuestionAnswering (line 1392) | class FlaxRobertaPreLayerNormForQuestionAnswering(FlaxRobertaPreLayerNor... class FlaxRobertaPreLayerNormForCausalLMModule (line 1405) | class FlaxRobertaPreLayerNormForCausalLMModule(nn.Module): method setup (line 1410) | def setup(self): method __call__ (line 1419) | def __call__( class FlaxRobertaPreLayerNormForCausalLM (line 1480) | class FlaxRobertaPreLayerNormForCausalLM(FlaxRobertaPreLayerNormPreTrain... method prepare_inputs_for_generation (line 1483) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1504) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py class RobertaPreLayerNormEmbeddings (line 56) | class RobertaPreLayerNormEmbeddings(nn.Module): method __init__ (line 62) | def __init__(self, config): method forward (line 87) | def forward( method create_position_ids_from_inputs_embeds (line 127) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class RobertaPreLayerNormSelfAttention (line 146) | class RobertaPreLayerNormSelfAttention(nn.Module): method __init__ (line 147) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 173) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 178) | def forward( class RobertaPreLayerNormSelfOutput (line 280) | class RobertaPreLayerNormSelfOutput(nn.Module): method __init__ (line 281) | def __init__(self, config): method forward (line 286) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaPreLayerNormAttention (line 293) | class RobertaPreLayerNormAttention(nn.Module): method __init__ (line 294) | 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 RobertaPreLayerNormIntermediate (line 345) | class RobertaPreLayerNormIntermediate(nn.Module): method __init__ (line 346) | def __init__(self, config): method forward (line 355) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaPreLayerNormOutput (line 362) | class RobertaPreLayerNormOutput(nn.Module): method __init__ (line 363) | def __init__(self, config): method forward (line 368) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaPreLayerNormLayer (line 376) | class RobertaPreLayerNormLayer(nn.Module): method __init__ (line 377) | def __init__(self, config): method forward (line 391) | def forward( method feed_forward_chunk (line 456) | def feed_forward_chunk(self, attention_output): class RobertaPreLayerNormEncoder (line 463) | class RobertaPreLayerNormEncoder(nn.Module): method __init__ (line 464) | def __init__(self, config): method forward (line 470) | def forward( class RobertaPreLayerNormPooler (line 557) | class RobertaPreLayerNormPooler(nn.Module): method __init__ (line 558) | def __init__(self, config): method forward (line 563) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaPreLayerNormPreTrainedModel (line 573) | class RobertaPreLayerNormPreTrainedModel(PreTrainedModel): method _init_weights (line 585) | def _init_weights(self, module): class RobertaPreLayerNormModel (line 673) | class RobertaPreLayerNormModel(RobertaPreLayerNormPreTrainedModel): method __init__ (line 689) | 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 722) | def forward( class RobertaPreLayerNormForCausalLM (line 859) | class RobertaPreLayerNormForCausalLM(RobertaPreLayerNormPreTrainedModel): method __init__ (line 862) | def __init__(self, config): method get_output_embeddings (line 876) | def get_output_embeddings(self): method set_output_embeddings (line 879) | def set_output_embeddings(self, new_embeddings): method forward (line 884) | def forward( method prepare_inputs_for_generation (line 990) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1011) | def _reorder_cache(self, past_key_values, beam_idx): class RobertaPreLayerNormForMaskedLM (line 1023) | class RobertaPreLayerNormForMaskedLM(RobertaPreLayerNormPreTrainedModel): method __init__ (line 1027) | def __init__(self, config): method get_output_embeddings (line 1042) | def get_output_embeddings(self): method set_output_embeddings (line 1045) | def set_output_embeddings(self, new_embeddings): method forward (line 1058) | def forward( class RobertaPreLayerNormLMHead (line 1119) | class RobertaPreLayerNormLMHead(nn.Module): method __init__ (line 1122) | def __init__(self, config): method forward (line 1131) | def forward(self, features, **kwargs): method _tie_weights (line 1141) | def _tie_weights(self): class RobertaPreLayerNormForSequenceClassification (line 1157) | class RobertaPreLayerNormForSequenceClassification(RobertaPreLayerNormPr... method __init__ (line 1158) | def __init__(self, config): method forward (line 1176) | def forward( class RobertaPreLayerNormForMultipleChoice (line 1256) | class RobertaPreLayerNormForMultipleChoice(RobertaPreLayerNormPreTrained... method __init__ (line 1257) | def __init__(self, config): method forward (line 1275) | def forward( class RobertaPreLayerNormForTokenClassification (line 1350) | class RobertaPreLayerNormForTokenClassification(RobertaPreLayerNormPreTr... method __init__ (line 1351) | def __init__(self, config): method forward (line 1372) | def forward( class RobertaPreLayerNormClassificationHead (line 1428) | class RobertaPreLayerNormClassificationHead(nn.Module): method __init__ (line 1431) | def __init__(self, config): method forward (line 1440) | def forward(self, features, **kwargs): class RobertaPreLayerNormForQuestionAnswering (line 1457) | class RobertaPreLayerNormForQuestionAnswering(RobertaPreLayerNormPreTrai... method __init__ (line 1458) | def __init__(self, config): method forward (line 1475) | def forward( function create_position_ids_from_input_ids (line 1550) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py class TFRobertaPreLayerNormEmbeddings (line 69) | class TFRobertaPreLayerNormEmbeddings(keras.layers.Layer): method __init__ (line 74) | def __init__(self, config, **kwargs): method build (line 85) | def build(self, input_shape=None): method create_position_ids_from_input_ids (line 114) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 128) | def call( class TFRobertaPreLayerNormPooler (line 175) | class TFRobertaPreLayerNormPooler(keras.layers.Layer): method __init__ (line 176) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 187) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 195) | def build(self, input_shape=None): class TFRobertaPreLayerNormSelfAttention (line 205) | class TFRobertaPreLayerNormSelfAttention(keras.layers.Layer): method __init__ (line 206) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method transpose_for_scores (line 234) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 241) | def call( method build (line 322) | def build(self, input_shape=None): class TFRobertaPreLayerNormSelfOutput (line 337) | class TFRobertaPreLayerNormSelfOutput(keras.layers.Layer): method __init__ (line 338) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 347) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 354) | def build(self, input_shape=None): class TFRobertaPreLayerNormAttention (line 363) | class TFRobertaPreLayerNormAttention(keras.layers.Layer): method __init__ (line 364) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method prune_heads (line 373) | def prune_heads(self, heads): method call (line 376) | def call( method build (line 406) | def build(self, input_shape=None): class TFRobertaPreLayerNormIntermediate (line 421) | class TFRobertaPreLayerNormIntermediate(keras.layers.Layer): method __init__ (line 422) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 436) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 443) | def build(self, input_shape=None): class TFRobertaPreLayerNormOutput (line 455) | class TFRobertaPreLayerNormOutput(keras.layers.Layer): method __init__ (line 456) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 465) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 472) | def build(self, input_shape=None): class TFRobertaPreLayerNormLayer (line 482) | class TFRobertaPreLayerNormLayer(keras.layers.Layer): method __init__ (line 483) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 496) | def call( method build (line 567) | def build(self, input_shape=None): class TFRobertaPreLayerNormEncoder (line 586) | class TFRobertaPreLayerNormEncoder(keras.layers.Layer): method __init__ (line 587) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 592) | def call( method build (line 654) | def build(self, input_shape=None): class TFRobertaPreLayerNormMainLayer (line 665) | class TFRobertaPreLayerNormMainLayer(keras.layers.Layer): method __init__ (line 668) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 685) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 688) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 692) | def _prune_heads(self, heads_to_prune): method call (line 700) | def call( method build (line 856) | def build(self, input_shape=None): class TFRobertaPreLayerNormPreTrainedModel (line 875) | class TFRobertaPreLayerNormPreTrainedModel(TFPreTrainedModel): class TFRobertaPreLayerNormModel (line 988) | class TFRobertaPreLayerNormModel(TFRobertaPreLayerNormPreTrainedModel): method __init__ (line 989) | def __init__(self, config, *inputs, **kwargs): method call (line 1000) | def call( method build (line 1056) | def build(self, input_shape=None): class TFRobertaPreLayerNormLMHead (line 1066) | class TFRobertaPreLayerNormLMHead(keras.layers.Layer): method __init__ (line 1069) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1084) | def build(self, input_shape=None): method get_output_embeddings (line 1097) | def get_output_embeddings(self): method set_output_embeddings (line 1100) | def set_output_embeddings(self, value): method get_bias (line 1104) | def get_bias(self): method set_bias (line 1107) | def set_bias(self, value): method call (line 1111) | def call(self, hidden_states): class TFRobertaPreLayerNormForMaskedLM (line 1129) | class TFRobertaPreLayerNormForMaskedLM(TFRobertaPreLayerNormPreTrainedMo... method __init__ (line 1134) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1142) | def get_lm_head(self): method get_prefix_bias_name (line 1145) | def get_prefix_bias_name(self): method call (line 1160) | def call( method build (line 1209) | def build(self, input_shape=None): class TFRobertaPreLayerNormForCausalLM (line 1222) | class TFRobertaPreLayerNormForCausalLM(TFRobertaPreLayerNormPreTrainedMo... method __init__ (line 1226) | def __init__(self, config: RobertaPreLayerNormConfig, *inputs, **kwargs): method get_lm_head (line 1241) | def get_lm_head(self): method get_prefix_bias_name (line 1244) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1249) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1268) | def call( method build (line 1349) | def build(self, input_shape=None): class TFRobertaPreLayerNormClassificationHead (line 1362) | class TFRobertaPreLayerNormClassificationHead(keras.layers.Layer): method __init__ (line 1365) | def __init__(self, config, **kwargs): method call (line 1382) | def call(self, features, training=False): method build (line 1390) | def build(self, input_shape=None): class TFRobertaPreLayerNormForSequenceClassification (line 1409) | class TFRobertaPreLayerNormForSequenceClassification( method __init__ (line 1415) | def __init__(self, config, *inputs, **kwargs): method call (line 1432) | def call( method build (line 1480) | def build(self, input_shape=None): class TFRobertaPreLayerNormForMultipleChoice (line 1500) | class TFRobertaPreLayerNormForMultipleChoice(TFRobertaPreLayerNormPreTra... method __init__ (line 1505) | def __init__(self, config, *inputs, **kwargs): method call (line 1524) | def call( method build (line 1585) | def build(self, input_shape=None): class TFRobertaPreLayerNormForTokenClassification (line 1604) | class TFRobertaPreLayerNormForTokenClassification(TFRobertaPreLayerNormP... method __init__ (line 1609) | def __init__(self, config, *inputs, **kwargs): method call (line 1633) | def call( method build (line 1681) | def build(self, input_shape=None): class TFRobertaPreLayerNormForQuestionAnswering (line 1700) | class TFRobertaPreLayerNormForQuestionAnswering(TFRobertaPreLayerNormPre... method __init__ (line 1704) | def __init__(self, config, *inputs, **kwargs): method call (line 1724) | def call( method build (line 1786) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/roc_bert/configuration_roc_bert.py class RoCBertConfig (line 24) | class RoCBertConfig(PretrainedConfig): method __init__ (line 111) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/roc_bert/modeling_roc_bert.py function load_tf_weights_in_roc_bert (line 78) | def load_tf_weights_in_roc_bert(model, config, tf_checkpoint_path): class RoCBertEmbeddings (line 151) | class RoCBertEmbeddings(nn.Module): method __init__ (line 154) | def __init__(self, config): method forward (line 197) | def forward( class RoCBertSelfAttention (line 283) | class RoCBertSelfAttention(nn.Module): method __init__ (line 284) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 310) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 315) | def forward( class RoCBertSelfOutput (line 418) | class RoCBertSelfOutput(nn.Module): method __init__ (line 419) | def __init__(self, config): method forward (line 425) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoCBertAttention (line 438) | class RoCBertAttention(nn.Module): method __init__ (line 439) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 447) | def prune_heads(self, heads): method forward (line 465) | def forward( class RoCBertIntermediate (line 490) | class RoCBertIntermediate(nn.Module): method __init__ (line 491) | def __init__(self, config): method forward (line 499) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RoCBertOutput (line 506) | class RoCBertOutput(nn.Module): method __init__ (line 507) | def __init__(self, config): method forward (line 513) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoCBertLayer (line 521) | class RoCBertLayer(nn.Module): method __init__ (line 522) | def __init__(self, config): method forward (line 536) | def forward( method feed_forward_chunk (line 601) | def feed_forward_chunk(self, attention_output): class RoCBertEncoder (line 608) | class RoCBertEncoder(nn.Module): method __init__ (line 609) | def __init__(self, config): method forward (line 615) | def forward( class RoCBertPooler (line 702) | class RoCBertPooler(nn.Module): method __init__ (line 703) | def __init__(self, config): method forward (line 708) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RoCBertPredictionHeadTransform (line 718) | class RoCBertPredictionHeadTransform(nn.Module): method __init__ (line 719) | def __init__(self, config): method forward (line 728) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RoCBertLMPredictionHead (line 736) | class RoCBertLMPredictionHead(nn.Module): method __init__ (line 737) | def __init__(self, config): method _tie_weights (line 750) | def _tie_weights(self): method forward (line 753) | def forward(self, hidden_states): class RoCBertOnlyMLMHead (line 760) | class RoCBertOnlyMLMHead(nn.Module): method __init__ (line 761) | def __init__(self, config): method forward (line 765) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class RoCBertPreTrainedModel (line 770) | class RoCBertPreTrainedModel(PreTrainedModel): method _init_weights (line 781) | def _init_weights(self, module): class RoCBertModel (line 877) | class RoCBertModel(RoCBertPreTrainedModel): method __init__ (line 891) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 904) | def get_input_embeddings(self): method set_input_embeddings (line 908) | def set_input_embeddings(self, value): method get_pronunciation_embeddings (line 911) | def get_pronunciation_embeddings(self): method set_pronunciation_embeddings (line 914) | def set_pronunciation_embeddings(self, value): method get_shape_embeddings (line 917) | def get_shape_embeddings(self): method set_shape_embeddings (line 920) | def set_shape_embeddings(self, value): method _prune_heads (line 924) | def _prune_heads(self, heads_to_prune): method forward (line 939) | def forward( class RoCBertForPreTraining (line 1079) | class RoCBertForPreTraining(RoCBertPreTrainedModel): method __init__ (line 1082) | def __init__(self, config): method get_output_embeddings (line 1092) | def get_output_embeddings(self): method set_output_embeddings (line 1096) | def set_output_embeddings(self, new_embeddings): method forward (line 1102) | def forward( class RoCBertForMaskedLM (line 1265) | class RoCBertForMaskedLM(RoCBertPreTrainedModel): method __init__ (line 1269) | def __init__(self, config): method get_output_embeddings (line 1285) | def get_output_embeddings(self): method set_output_embeddings (line 1289) | def set_output_embeddings(self, new_embeddings): method forward (line 1294) | def forward( method prepare_inputs_for_generation (line 1375) | def prepare_inputs_for_generation( class RoCBertForCausalLM (line 1406) | class RoCBertForCausalLM(RoCBertPreTrainedModel): method __init__ (line 1410) | def __init__(self, config): method get_output_embeddings (line 1423) | def get_output_embeddings(self): method set_output_embeddings (line 1427) | def set_output_embeddings(self, new_embeddings): method forward (line 1433) | def forward( method prepare_inputs_for_generation (line 1545) | def prepare_inputs_for_generation( method _reorder_cache (line 1586) | def _reorder_cache(self, past_key_values, beam_idx): class RoCBertForSequenceClassification (line 1600) | class RoCBertForSequenceClassification(RoCBertPreTrainedModel): method __init__ (line 1602) | def __init__(self, config): method forward (line 1625) | def forward( class RoCBertForMultipleChoice (line 1706) | class RoCBertForMultipleChoice(RoCBertPreTrainedModel): method __init__ (line 1708) | def __init__(self, config): method forward (line 1729) | def forward( class RoCBertForTokenClassification (line 1811) | class RoCBertForTokenClassification(RoCBertPreTrainedModel): method __init__ (line 1813) | def __init__(self, config): method forward (line 1835) | def forward( class RoCBertForQuestionAnswering (line 1897) | class RoCBertForQuestionAnswering(RoCBertPreTrainedModel): method __init__ (line 1899) | def __init__(self, config): method forward (line 1919) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/roc_bert/tokenization_roc_bert.py function load_vocab (line 52) | def load_vocab(vocab_file): function whitespace_tokenize (line 64) | def whitespace_tokenize(text): class RoCBertTokenizer (line 73) | class RoCBertTokenizer(PreTrainedTokenizer): method __init__ (line 117) | def __init__( method do_lower_case (line 175) | def do_lower_case(self): method vocab_size (line 179) | def vocab_size(self): method get_vocab (line 183) | def get_vocab(self): method _tokenize (line 187) | def _tokenize(self, text, split_special_tokens=False): method _encode_plus (line 202) | def _encode_plus( method prepare_for_model (line 297) | def prepare_for_model( method _pad (line 477) | def _pad( method _batch_encode_plus (line 537) | def _batch_encode_plus( method _batch_prepare_for_model (line 642) | def _batch_prepare_for_model( method _convert_token_to_id (line 717) | def _convert_token_to_id(self, token): method _convert_token_to_shape_id (line 721) | def _convert_token_to_shape_id(self, token): method convert_tokens_to_shape_ids (line 725) | def convert_tokens_to_shape_ids(self, tokens: Union[str, List[str]]) -... method _convert_token_to_pronunciation_id (line 734) | def _convert_token_to_pronunciation_id(self, token): method convert_tokens_to_pronunciation_ids (line 738) | def convert_tokens_to_pronunciation_ids(self, tokens: Union[str, List[... method _convert_id_to_token (line 748) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 753) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 758) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 788) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 817) | def create_token_type_ids_from_sequences( method save_vocabulary (line 846) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class RoCBertBasicTokenizer (line 892) | class RoCBertBasicTokenizer: method __init__ (line 915) | def __init__( method tokenize (line 931) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 969) | def _run_strip_accents(self, text): method _run_split_on_punc (line 980) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 1002) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 1015) | def _is_chinese_char(self, cp): method _clean_text (line 1039) | def _clean_text(self, text): class RoCBertWordpieceTokenizer (line 1054) | class RoCBertWordpieceTokenizer: method __init__ (line 1057) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 1062) | def tokenize(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/roformer/configuration_roformer.py class RoFormerConfig (line 28) | class RoFormerConfig(PretrainedConfig): method __init__ (line 94) | def __init__( class RoFormerOnnxConfig (line 133) | class RoFormerOnnxConfig(OnnxConfig): method inputs (line 135) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/roformer/convert_roformer_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 28) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_fil... FILE: mplsandbox_for_rl/transformers/src/transformers/models/roformer/modeling_flax_roformer.py function create_sinusoidal_positions (line 121) | def create_sinusoidal_positions(n_pos, dim): class FlaxRoFormerEmbeddings (line 131) | class FlaxRoFormerEmbeddings(nn.Module): method setup (line 137) | def setup(self): method __call__ (line 151) | def __call__(self, input_ids, token_type_ids, attention_mask, determin... class FlaxRoFormerSelfAttention (line 165) | class FlaxRoFormerSelfAttention(nn.Module): method setup (line 169) | def setup(self) -> None: method __call__ (line 194) | def __call__( method apply_rotary_position_embeddings (line 264) | def apply_rotary_position_embeddings(sinusoidal_pos, query_layer, key_... class FlaxRoFormerSelfOutput (line 284) | class FlaxRoFormerSelfOutput(nn.Module): method setup (line 288) | def setup(self): method __call__ (line 297) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxRoFormerAttention (line 304) | class FlaxRoFormerAttention(nn.Module): method setup (line 308) | def setup(self): method __call__ (line 312) | def __call__( class FlaxRoFormerIntermediate (line 344) | class FlaxRoFormerIntermediate(nn.Module): method setup (line 348) | def setup(self): method __call__ (line 356) | def __call__(self, hidden_states): class FlaxRoFormerOutput (line 363) | class FlaxRoFormerOutput(nn.Module): method setup (line 367) | def setup(self): method __call__ (line 376) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxRoFormerLayer (line 383) | class FlaxRoFormerLayer(nn.Module): method setup (line 387) | def setup(self): method __call__ (line 392) | def __call__( class FlaxRoFormerLayerCollection (line 421) | class FlaxRoFormerLayerCollection(nn.Module): method setup (line 425) | def setup(self): method __call__ (line 430) | def __call__( class FlaxRoFormerEncoder (line 483) | class FlaxRoFormerEncoder(nn.Module): method setup (line 487) | def setup(self): method __call__ (line 493) | def __call__( class FlaxRoFormerPredictionHeadTransform (line 518) | class FlaxRoFormerPredictionHeadTransform(nn.Module): method setup (line 522) | def setup(self): method __call__ (line 527) | def __call__(self, hidden_states): class FlaxRoFormerLMPredictionHead (line 534) | class FlaxRoFormerLMPredictionHead(nn.Module): method setup (line 539) | def setup(self): method __call__ (line 544) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRoFormerOnlyMLMHead (line 558) | class FlaxRoFormerOnlyMLMHead(nn.Module): method setup (line 562) | def setup(self): method __call__ (line 565) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRoFormerClassificationHead (line 570) | class FlaxRoFormerClassificationHead(nn.Module): method setup (line 574) | def setup(self): method __call__ (line 588) | def __call__(self, hidden_states, deterministic=True): class FlaxRoFormerPreTrainedModel (line 598) | class FlaxRoFormerPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 608) | def __init__( method init_weights (line 620) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 645) | def __call__( class FlaxRoFormerModule (line 693) | class FlaxRoFormerModule(nn.Module): method setup (line 697) | def setup(self): method __call__ (line 701) | def __call__( class FlaxRoFormerModel (line 738) | class FlaxRoFormerModel(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForMaskedLMModule (line 745) | class FlaxRoFormerForMaskedLMModule(nn.Module): method setup (line 749) | def setup(self): method __call__ (line 753) | def __call__( class FlaxRoFormerForMaskedLM (line 796) | class FlaxRoFormerForMaskedLM(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForSequenceClassificationModule (line 809) | class FlaxRoFormerForSequenceClassificationModule(nn.Module): method setup (line 813) | def setup(self): method __call__ (line 817) | def __call__( class FlaxRoFormerForSequenceClassification (line 860) | class FlaxRoFormerForSequenceClassification(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForMultipleChoiceModule (line 872) | class FlaxRoFormerForMultipleChoiceModule(nn.Module): method setup (line 876) | def setup(self): method __call__ (line 881) | def __call__( class FlaxRoFormerForMultipleChoice (line 935) | class FlaxRoFormerForMultipleChoice(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForTokenClassificationModule (line 950) | class FlaxRoFormerForTokenClassificationModule(nn.Module): method setup (line 954) | def setup(self): method __call__ (line 959) | def __call__( class FlaxRoFormerForTokenClassification (line 1003) | class FlaxRoFormerForTokenClassification(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForQuestionAnsweringModule (line 1015) | class FlaxRoFormerForQuestionAnsweringModule(nn.Module): method setup (line 1019) | def setup(self): method __call__ (line 1023) | def __call__( class FlaxRoFormerForQuestionAnswering (line 1071) | class FlaxRoFormerForQuestionAnswering(FlaxRoFormerPreTrainedModel): FILE: mplsandbox_for_rl/transformers/src/transformers/models/roformer/modeling_roformer.py class RoFormerSinusoidalPositionalEmbedding (line 56) | class RoFormerSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 59) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 64) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 81) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... function load_tf_weights_in_roformer (line 90) | def load_tf_weights_in_roformer(model, config, tf_checkpoint_path): class RoFormerEmbeddings (line 163) | class RoFormerEmbeddings(nn.Module): method __init__ (line 166) | def __init__(self, config): method forward (line 176) | def forward(self, input_ids=None, token_type_ids=None, inputs_embeds=N... class RoFormerSelfAttention (line 197) | class RoFormerSelfAttention(nn.Module): method __init__ (line 198) | def __init__(self, config): method transpose_for_scores (line 219) | def transpose_for_scores(self, x): method forward (line 224) | def forward( method apply_rotary_position_embeddings (line 308) | def apply_rotary_position_embeddings(sinusoidal_pos, query_layer, key_... class RoFormerSelfOutput (line 336) | class RoFormerSelfOutput(nn.Module): method __init__ (line 337) | def __init__(self, config): method forward (line 343) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoFormerAttention (line 350) | class RoFormerAttention(nn.Module): method __init__ (line 351) | def __init__(self, config): method prune_heads (line 358) | def prune_heads(self, heads): method forward (line 377) | def forward( class RoFormerIntermediate (line 404) | class RoFormerIntermediate(nn.Module): method __init__ (line 405) | def __init__(self, config): method forward (line 413) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RoFormerOutput (line 420) | class RoFormerOutput(nn.Module): method __init__ (line 421) | def __init__(self, config): method forward (line 427) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoFormerLayer (line 434) | class RoFormerLayer(nn.Module): method __init__ (line 435) | def __init__(self, config): method forward (line 449) | def forward( method feed_forward_chunk (line 517) | def feed_forward_chunk(self, attention_output): class RoFormerEncoder (line 523) | class RoFormerEncoder(nn.Module): method __init__ (line 524) | def __init__(self, config): method forward (line 533) | def forward( class RoFormerPredictionHeadTransform (line 625) | class RoFormerPredictionHeadTransform(nn.Module): method __init__ (line 626) | def __init__(self, config): method forward (line 635) | def forward(self, hidden_states): class RoFormerLMPredictionHead (line 642) | class RoFormerLMPredictionHead(nn.Module): method __init__ (line 643) | def __init__(self, config): method _tie_weights (line 656) | def _tie_weights(self) -> None: method forward (line 659) | def forward(self, hidden_states): class RoFormerOnlyMLMHead (line 666) | class RoFormerOnlyMLMHead(nn.Module): method __init__ (line 667) | def __init__(self, config): method forward (line 671) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class RoFormerPreTrainedModel (line 676) | class RoFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 687) | def _init_weights(self, module): class RoFormerModel (line 766) | class RoFormerModel(RoFormerPreTrainedModel): method __init__ (line 779) | def __init__(self, config): method get_input_embeddings (line 792) | def get_input_embeddings(self): method set_input_embeddings (line 795) | def set_input_embeddings(self, value): method _prune_heads (line 798) | def _prune_heads(self, heads_to_prune): method forward (line 812) | def forward( class RoFormerForMaskedLM (line 933) | class RoFormerForMaskedLM(RoFormerPreTrainedModel): method __init__ (line 936) | def __init__(self, config): method get_output_embeddings (line 951) | def get_output_embeddings(self): method set_output_embeddings (line 954) | def set_output_embeddings(self, new_embeddings): method forward (line 964) | def forward( method prepare_inputs_for_generation (line 1018) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class RoFormerForCausalLM (line 1036) | class RoFormerForCausalLM(RoFormerPreTrainedModel): method __init__ (line 1039) | 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 1060) | def forward( method prepare_inputs_for_generation (line 1159) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1181) | def _reorder_cache(self, past_key_values, beam_idx): class RoFormerClassificationHead (line 1191) | class RoFormerClassificationHead(nn.Module): method __init__ (line 1194) | def __init__(self, config): method forward (line 1202) | def forward(self, features, **kwargs): class RoFormerForSequenceClassification (line 1219) | class RoFormerForSequenceClassification(RoFormerPreTrainedModel): method __init__ (line 1220) | def __init__(self, config): method forward (line 1235) | def forward( class RoFormerForMultipleChoice (line 1310) | class RoFormerForMultipleChoice(RoFormerPreTrainedModel): method __init__ (line 1311) | def __init__(self, config): method forward (line 1329) | def forward( class RoFormerForTokenClassification (line 1401) | class RoFormerForTokenClassification(RoFormerPreTrainedModel): method __init__ (line 1402) | def __init__(self, config): method forward (line 1419) | def forward( class RoFormerForQuestionAnswering (line 1477) | class RoFormerForQuestionAnswering(RoFormerPreTrainedModel): method __init__ (line 1478) | def __init__(self, config): method forward (line 1496) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/roformer/modeling_tf_roformer.py class TFRoFormerSinusoidalPositionalEmbedding (line 67) | class TFRoFormerSinusoidalPositionalEmbedding(keras.layers.Layer): method __init__ (line 70) | def __init__(self, num_positions: int, embedding_dim: int, **kwargs): method build (line 79) | def build(self, input_shape: tf.TensorShape): method _init_weight (line 98) | def _init_weight(n_pos: int, dim: int): method call (line 115) | def call(self, input_shape: tf.TensorShape, past_key_values_length: in... class TFRoFormerEmbeddings (line 123) | class TFRoFormerEmbeddings(keras.layers.Layer): method __init__ (line 126) | def __init__(self, config: RoFormerConfig, **kwargs): method build (line 135) | def build(self, input_shape=None): method call (line 157) | def call( class TFRoFormerSelfAttention (line 190) | class TFRoFormerSelfAttention(keras.layers.Layer): method __init__ (line 191) | def __init__(self, config: RoFormerConfig, **kwargs): method transpose_for_scores (line 218) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 225) | def call( method apply_rotary_position_embeddings (line 281) | def apply_rotary_position_embeddings(sinusoidal_pos, query_layer, key_... method build (line 306) | def build(self, input_shape=None): class TFRoFormerSelfOutput (line 322) | class TFRoFormerSelfOutput(keras.layers.Layer): method __init__ (line 323) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 333) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 340) | def build(self, input_shape=None): class TFRoFormerAttention (line 352) | class TFRoFormerAttention(keras.layers.Layer): method __init__ (line 353) | def __init__(self, config: RoFormerConfig, **kwargs): method prune_heads (line 359) | def prune_heads(self, heads): method call (line 362) | def call( method build (line 386) | def build(self, input_shape=None): class TFRoFormerIntermediate (line 399) | class TFRoFormerIntermediate(keras.layers.Layer): method __init__ (line 400) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 413) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 419) | def build(self, input_shape=None): class TFRoFormerOutput (line 429) | class TFRoFormerOutput(keras.layers.Layer): method __init__ (line 430) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 440) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 447) | def build(self, input_shape=None): class TFRoFormerLayer (line 459) | class TFRoFormerLayer(keras.layers.Layer): method __init__ (line 460) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 467) | def call( method build (line 493) | def build(self, input_shape=None): class TFRoFormerEncoder (line 508) | class TFRoFormerEncoder(keras.layers.Layer): method __init__ (line 509) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 518) | def call( method build (line 562) | def build(self, input_shape=None): class TFRoFormerPredictionHeadTransform (line 575) | class TFRoFormerPredictionHeadTransform(keras.layers.Layer): method __init__ (line 576) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 593) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 600) | def build(self, input_shape=None): class TFRoFormerLMPredictionHead (line 612) | class TFRoFormerLMPredictionHead(keras.layers.Layer): method __init__ (line 613) | def __init__(self, config: RoFormerConfig, input_embeddings: keras.lay... method build (line 625) | def build(self, input_shape=None): method get_output_embeddings (line 635) | def get_output_embeddings(self) -> keras.layers.Layer: method set_output_embeddings (line 638) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 642) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 645) | def set_bias(self, value: tf.Variable): method call (line 649) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRoFormerMLMHead (line 661) | class TFRoFormerMLMHead(keras.layers.Layer): method __init__ (line 662) | def __init__(self, config: RoFormerConfig, input_embeddings: keras.lay... method call (line 667) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: method build (line 672) | def build(self, input_shape=None): class TFRoFormerMainLayer (line 682) | class TFRoFormerMainLayer(keras.layers.Layer): method __init__ (line 685) | def __init__(self, config: RoFormerConfig, add_pooling_layer: bool = T... method get_input_embeddings (line 696) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 699) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 703) | def _prune_heads(self, heads_to_prune): method call (line 711) | def call( method build (line 795) | def build(self, input_shape=None): class TFRoFormerPreTrainedModel (line 810) | class TFRoFormerPreTrainedModel(TFPreTrainedModel): class TFRoFormerModel (line 917) | class TFRoFormerModel(TFRoFormerPreTrainedModel): method __init__ (line 918) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 930) | def call( method build (line 956) | def build(self, input_shape=None): class TFRoFormerForMaskedLM (line 966) | class TFRoFormerForMaskedLM(TFRoFormerPreTrainedModel, TFMaskedLanguageM... method __init__ (line 967) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method get_lm_head (line 979) | def get_lm_head(self) -> keras.layers.Layer: method call (line 989) | def call( method build (line 1034) | def build(self, input_shape=None): class TFRoFormerForCausalLM (line 1049) | class TFRoFormerForCausalLM(TFRoFormerPreTrainedModel, TFCausalLanguageM... method __init__ (line 1050) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method get_lm_head (line 1059) | def get_lm_head(self) -> keras.layers.Layer: method call (line 1068) | def call( method build (line 1118) | def build(self, input_shape=None): class TFRoFormerClassificationHead (line 1130) | class TFRoFormerClassificationHead(keras.layers.Layer): method __init__ (line 1133) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1150) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 1160) | def build(self, input_shape=None): class TFRoFormerForSequenceClassification (line 1178) | class TFRoFormerForSequenceClassification(TFRoFormerPreTrainedModel, TFS... method __init__ (line 1179) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1194) | def call( method build (line 1239) | def build(self, input_shape=None): class TFRoFormerForMultipleChoice (line 1258) | class TFRoFormerForMultipleChoice(TFRoFormerPreTrainedModel, TFMultipleC... method __init__ (line 1259) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1278) | def call( method build (line 1343) | def build(self, input_shape=None): class TFRoFormerForTokenClassification (line 1365) | class TFRoFormerForTokenClassification(TFRoFormerPreTrainedModel, TFToke... method __init__ (line 1366) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1385) | def call( method build (line 1429) | def build(self, input_shape=None): class TFRoFormerForQuestionAnswering (line 1448) | class TFRoFormerForQuestionAnswering(TFRoFormerPreTrainedModel, TFQuesti... method __init__ (line 1449) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1467) | def call( method build (line 1525) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/roformer/tokenization_roformer.py function load_vocab (line 32) | def load_vocab(vocab_file): function whitespace_tokenize (line 44) | def whitespace_tokenize(text): class BasicTokenizer (line 54) | class BasicTokenizer: method __init__ (line 77) | def __init__( method tokenize (line 93) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 131) | def _run_strip_accents(self, text): method _run_split_on_punc (line 142) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 164) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 177) | def _is_chinese_char(self, cp): method _clean_text (line 201) | def _clean_text(self, text): class WordpieceTokenizer (line 216) | class WordpieceTokenizer: method __init__ (line 219) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 224) | def tokenize(self, text): class RoFormerTokenizer (line 273) | class RoFormerTokenizer(PreTrainedTokenizer): method __init__ (line 326) | def __init__( method do_lower_case (line 381) | def do_lower_case(self): method vocab_size (line 385) | def vocab_size(self): method __getstate__ (line 388) | def __getstate__(self): method __setstate__ (line 393) | def __setstate__(self, d): method get_vocab (line 399) | def get_vocab(self): method _tokenize (line 402) | def _tokenize(self, text, use_jieba=True): method _convert_token_to_id (line 424) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 428) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 432) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 437) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 462) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 490) | def create_token_type_ids_from_sequences( method save_vocabulary (line 519) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/roformer/tokenization_roformer_fast.py class RoFormerTokenizerFast (line 34) | class RoFormerTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 57) | def __init__( method __getstate__ (line 101) | def __getstate__(self): method __setstate__ (line 106) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 111) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 135) | def create_token_type_ids_from_sequences( method save_vocabulary (line 164) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method save_pretrained (line 168) | def save_pretrained( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/rt_detr/configuration_rt_detr.py class RTDetrConfig (line 27) | class RTDetrConfig(PretrainedConfig): method __init__ (line 184) | def __init__( method num_attention_heads (line 339) | def num_attention_heads(self) -> int: method hidden_size (line 343) | def hidden_size(self) -> int: method from_backbone_configs (line 347) | def from_backbone_configs(cls, backbone_config: PretrainedConfig, **kw... FILE: mplsandbox_for_rl/transformers/src/transformers/models/rt_detr/configuration_rt_detr_resnet.py class RTDetrResNetConfig (line 25) | class RTDetrResNetConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 83) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/rt_detr/convert_rt_detr_original_pytorch_checkpoint_to_hf.py function get_rt_detr_config (line 35) | def get_rt_detr_config(model_name: str) -> RTDetrConfig: function create_rename_keys (line 87) | def create_rename_keys(config): function rename_key (line 492) | def rename_key(state_dict, old, new): function read_in_q_k_v (line 500) | def read_in_q_k_v(state_dict, config): function prepare_img (line 539) | def prepare_img(): function convert_rt_detr_checkpoint (line 547) | def convert_rt_detr_checkpoint(model_name, pytorch_dump_folder_path, pus... FILE: mplsandbox_for_rl/transformers/src/transformers/models/rt_detr/image_processing_rt_detr.py function get_size_with_aspect_ratio (line 74) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_resize_output_image_size (line 114) | def get_resize_output_image_size( function get_image_size_for_max_height_width (line 143) | def get_image_size_for_max_height_width( function get_numpy_to_framework_fn (line 177) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 202) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 216) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 231) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 239) | def get_max_height_width( function make_pixel_mask (line 258) | def make_pixel_mask( function prepare_coco_detection_annotation (line 276) | def prepare_coco_detection_annotation( function resize_annotation (line 332) | def resize_annotation( class RTDetrImageProcessor (line 383) | class RTDetrImageProcessor(BaseImageProcessor): method __init__ (line 439) | def __init__( method prepare_annotation (line 475) | def prepare_annotation( method resize (line 499) | def resize( method resize_annotation (line 568) | def resize_annotation( method rescale (line 582) | def rescale( method normalize_annotation (line 611) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method _update_annotation_for_padded_image (line 619) | def _update_annotation_for_padded_image( method _pad_image (line 663) | def _pad_image( method pad (line 697) | def pad( method preprocess (line 783) | def preprocess( method post_process_object_detection (line 1029) | def post_process_object_detection( FILE: mplsandbox_for_rl/transformers/src/transformers/models/rt_detr/modeling_rt_detr.py function load_cuda_kernels (line 59) | def load_cuda_kernels(): class MultiScaleDeformableAttentionFunction (line 90) | class MultiScaleDeformableAttentionFunction(Function): method forward (line 92) | def forward( method backward (line 117) | def backward(context, grad_output): class RTDetrDecoderOutput (line 146) | class RTDetrDecoderOutput(ModelOutput): class RTDetrModelOutput (line 186) | class RTDetrModelOutput(ModelOutput): class RTDetrObjectDetectionOutput (line 258) | class RTDetrObjectDetectionOutput(ModelOutput): function _get_clones (line 349) | def _get_clones(partial_module, N): function inverse_sigmoid (line 354) | def inverse_sigmoid(x, eps=1e-5): class RTDetrFrozenBatchNorm2d (line 362) | class RTDetrFrozenBatchNorm2d(nn.Module): method __init__ (line 370) | def __init__(self, n): method _load_from_state_dict (line 377) | def _load_from_state_dict( method forward (line 388) | def forward(self, x): function replace_batch_norm (line 402) | def replace_batch_norm(model): function get_contrastive_denoising_training_group (line 426) | def get_contrastive_denoising_training_group( class RTDetrConvEncoder (line 549) | class RTDetrConvEncoder(nn.Module): method __init__ (line 557) | def __init__(self, config): method forward (line 569) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class RTDetrConvNormLayer (line 581) | class RTDetrConvNormLayer(nn.Module): method __init__ (line 582) | def __init__(self, config, in_channels, out_channels, kernel_size, str... method forward (line 595) | def forward(self, hidden_state): class RTDetrEncoderLayer (line 602) | class RTDetrEncoderLayer(nn.Module): method __init__ (line 603) | def __init__(self, config: RTDetrConfig): method forward (line 621) | def forward( class RTDetrRepVggBlock (line 685) | class RTDetrRepVggBlock(nn.Module): method __init__ (line 690) | def __init__(self, config: RTDetrConfig): method forward (line 699) | def forward(self, x): class RTDetrCSPRepLayer (line 704) | class RTDetrCSPRepLayer(nn.Module): method __init__ (line 709) | def __init__(self, config: RTDetrConfig): method forward (line 726) | def forward(self, hidden_state): function multi_scale_deformable_attention (line 735) | def multi_scale_deformable_attention( class RTDetrMultiscaleDeformableAttention (line 775) | class RTDetrMultiscaleDeformableAttention(nn.Module): method __init__ (line 780) | def __init__(self, config: RTDetrConfig, num_heads: int, n_points: int): method _reset_parameters (line 819) | def _reset_parameters(self): method with_pos_embed (line 840) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 843) | def forward( class RTDetrMultiheadAttention (line 918) | class RTDetrMultiheadAttention(nn.Module): method __init__ (line 925) | def __init__( method _reshape (line 949) | def _reshape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 952) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 955) | def forward( class RTDetrDecoderLayer (line 1035) | class RTDetrDecoderLayer(nn.Module): method __init__ (line 1036) | def __init__(self, config: RTDetrConfig): method forward (line 1061) | def forward( class RTDetrPreTrainedModel (line 1143) | class RTDetrPreTrainedModel(PreTrainedModel): method _init_weights (line 1149) | def _init_weights(self, module): class RTDetrEncoder (line 1237) | class RTDetrEncoder(nn.Module): method __init__ (line 1238) | def __init__(self, config: RTDetrConfig): method forward (line 1243) | def forward(self, src, src_mask=None, pos_embed=None, output_attention... class RTDetrHybridEncoder (line 1255) | class RTDetrHybridEncoder(nn.Module): method __init__ (line 1264) | def __init__(self, config: RTDetrConfig): method build_2d_sincos_position_embedding (line 1302) | def build_2d_sincos_position_embedding(width, height, embed_dim=256, t... method forward (line 1317) | def forward( class RTDetrDecoder (line 1421) | class RTDetrDecoder(RTDetrPreTrainedModel): method __init__ (line 1422) | def __init__(self, config: RTDetrConfig): method forward (line 1436) | def forward( class RTDetrModel (line 1584) | class RTDetrModel(RTDetrPreTrainedModel): method __init__ (line 1585) | def __init__(self, config: RTDetrConfig): method get_encoder (line 1658) | def get_encoder(self): method get_decoder (line 1661) | def get_decoder(self): method freeze_backbone (line 1664) | def freeze_backbone(self): method unfreeze_backbone (line 1668) | def unfreeze_backbone(self): method generate_anchors (line 1673) | def generate_anchors(self, spatial_shapes=None, grid_size=0.05): method forward (line 1704) | def forward( function dice_loss (line 1914) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 1934) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class RTDetrLoss (line 1965) | class RTDetrLoss(nn.Module): method __init__ (line 1989) | def __init__(self, config): method loss_labels_vfl (line 2007) | def loss_labels_vfl(self, outputs, targets, indices, num_boxes, log=Tr... method loss_labels (line 2038) | def loss_labels(self, outputs, targets, indices, num_boxes, log=True): method loss_cardinality (line 2059) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2073) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 2096) | def loss_masks(self, outputs, targets, indices, num_boxes): method loss_labels_bce (line 2127) | def loss_labels_bce(self, outputs, targets, indices, num_boxes, log=Tr... method _get_source_permutation_idx (line 2141) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2147) | def _get_target_permutation_idx(self, indices): method loss_labels_focal (line 2153) | def loss_labels_focal(self, outputs, targets, indices, num_boxes, log=... method get_loss (line 2171) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method get_cdn_matched_indices (line 2186) | def get_cdn_matched_indices(dn_meta, targets): method forward (line 2208) | def forward(self, outputs, targets): class RTDetrMLPPredictionHead (line 2274) | class RTDetrMLPPredictionHead(nn.Module): method __init__ (line 2284) | def __init__(self, config, input_dim, d_model, output_dim, num_layers): method forward (line 2290) | def forward(self, x): class RTDetrHungarianMatcher (line 2296) | class RTDetrHungarianMatcher(nn.Module): method __init__ (line 2307) | def __init__(self, config): method forward (line 2323) | def forward(self, outputs, targets): function _upcast (line 2378) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2387) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2404) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2421) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 2446) | def _max_by_axis(the_list): class NestedTensor (line 2456) | class NestedTensor: method __init__ (line 2457) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2461) | def to(self, device): method decompose (line 2470) | def decompose(self): method __repr__ (line 2473) | def __repr__(self): function nested_tensor_from_tensor_list (line 2478) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): class RTDetrForObjectDetection (line 2502) | class RTDetrForObjectDetection(RTDetrPreTrainedModel): method __init__ (line 2508) | def __init__(self, config: RTDetrConfig): method _set_aux_loss (line 2535) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 2543) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/rt_detr/modeling_rt_detr_resnet.py class RTDetrResNetConvLayer (line 52) | class RTDetrResNetConvLayer(nn.Module): method __init__ (line 53) | def __init__( method forward (line 63) | def forward(self, input: Tensor) -> Tensor: class RTDetrResNetEmbeddings (line 70) | class RTDetrResNetEmbeddings(nn.Module): method __init__ (line 75) | def __init__(self, config: RTDetrResNetConfig): method forward (line 105) | def forward(self, pixel_values: Tensor) -> Tensor: class RTDetrResNetShortCut (line 117) | class RTDetrResNetShortCut(nn.Module): method __init__ (line 123) | def __init__(self, in_channels: int, out_channels: int, stride: int = 2): method forward (line 128) | def forward(self, input: Tensor) -> Tensor: class RTDetrResNetBasicLayer (line 134) | class RTDetrResNetBasicLayer(nn.Module): method __init__ (line 140) | def __init__( method forward (line 169) | def forward(self, hidden_state): class RTDetrResNetBottleNeckLayer (line 178) | class RTDetrResNetBottleNeckLayer(nn.Module): method __init__ (line 187) | def __init__( method forward (line 224) | def forward(self, hidden_state): class RTDetrResNetStage (line 233) | class RTDetrResNetStage(nn.Module): method __init__ (line 238) | def __init__( method forward (line 263) | def forward(self, input: Tensor) -> Tensor: class RTDetrResNetEncoder (line 271) | class RTDetrResNetEncoder(nn.Module): method __init__ (line 272) | def __init__(self, config: RTDetrResNetConfig): method forward (line 289) | def forward( class RTDetrResNetPreTrainedModel (line 313) | class RTDetrResNetPreTrainedModel(PreTrainedModel): method _init_weights (line 324) | def _init_weights(self, module): class RTDetrResNetBackbone (line 370) | class RTDetrResNetBackbone(RTDetrResNetPreTrainedModel, BackboneMixin): method __init__ (line 371) | def __init__(self, config): method forward (line 384) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/rwkv/configuration_rwkv.py class RwkvConfig (line 25) | class RwkvConfig(PretrainedConfig): method __init__ (line 86) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/rwkv/convert_rwkv_checkpoint_to_hf.py function convert_state_dict (line 49) | def convert_state_dict(state_dict): function convert_rmkv_checkpoint_to_hf_format (line 80) | def convert_rmkv_checkpoint_to_hf_format( FILE: mplsandbox_for_rl/transformers/src/transformers/models/rwkv/modeling_rwkv.py function load_wkv_cuda_kernel (line 51) | def load_wkv_cuda_kernel(context_length): class RwkvLinearAttention (line 83) | class RwkvLinearAttention(torch.autograd.Function): method forward (line 85) | def forward(ctx, time_decay, time_first, key, value, state=None, retur... method backward (line 149) | def backward(ctx, g_output, g_state=None): function rwkv_linear_attention_cpu (line 189) | def rwkv_linear_attention_cpu(time_decay, time_first, key, value, state=... function rwkv_linear_attention (line 233) | def rwkv_linear_attention(time_decay, time_first, key, value, state=None... class RwkvSelfAttention (line 244) | class RwkvSelfAttention(nn.Module): method __init__ (line 245) | def __init__(self, config, layer_id=0): method extract_key_value (line 275) | def extract_key_value(self, hidden, state=None): method forward (line 294) | def forward(self, hidden, state=None, use_cache=False): class RwkvFeedForward (line 314) | class RwkvFeedForward(nn.Module): method __init__ (line 315) | def __init__(self, config, layer_id=0): method forward (line 332) | def forward(self, hidden, state=None): class RwkvBlock (line 352) | class RwkvBlock(nn.Module): method __init__ (line 353) | def __init__(self, config, layer_id): method forward (line 367) | def forward(self, hidden, state=None, use_cache=False, output_attentio... class RwkvPreTrainedModel (line 386) | class RwkvPreTrainedModel(PreTrainedModel): method _init_weights (line 399) | def _init_weights(self, module): class RwkvOutput (line 458) | class RwkvOutput(ModelOutput): class RwkvCausalLMOutput (line 488) | class RwkvCausalLMOutput(ModelOutput): class RwkvModel (line 583) | class RwkvModel(RwkvPreTrainedModel): method __init__ (line 584) | def __init__(self, config): method get_input_embeddings (line 598) | def get_input_embeddings(self): method set_input_embeddings (line 601) | def set_input_embeddings(self, new_embeddings): method forward (line 610) | def forward( method _rescale_layers (line 701) | def _rescale_layers(self): method _bnb_4bit_dequantize_and_rescale (line 725) | def _bnb_4bit_dequantize_and_rescale(self, target_layer, block_id): class RwkvForCausalLM (line 754) | class RwkvForCausalLM(RwkvPreTrainedModel): method __init__ (line 757) | def __init__(self, config): method get_output_embeddings (line 765) | def get_output_embeddings(self): method set_output_embeddings (line 768) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 771) | def prepare_inputs_for_generation(self, input_ids, state=None, inputs_... method forward (line 791) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/sam/configuration_sam.py class SamPromptEncoderConfig (line 24) | class SamPromptEncoderConfig(PretrainedConfig): method __init__ (line 49) | def __init__( class SamMaskDecoderConfig (line 71) | class SamMaskDecoderConfig(PretrainedConfig): method __init__ (line 105) | def __init__( class SamVisionConfig (line 132) | class SamVisionConfig(PretrainedConfig): method __init__ (line 184) | def __init__( class SamConfig (line 230) | class SamConfig(PretrainedConfig): method __init__ (line 282) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/sam/convert_sam_to_hf.py function get_config (line 41) | def get_config(model_name): function replace_keys (line 107) | def replace_keys(state_dict): function convert_sam_checkpoint (line 137) | def convert_sam_checkpoint(model_name, checkpoint_path, pytorch_dump_fol... FILE: mplsandbox_for_rl/transformers/src/transformers/models/sam/image_processing_sam.py class SamImageProcessor (line 67) | class SamImageProcessor(BaseImageProcessor): method __init__ (line 118) | def __init__( method pad_image (line 166) | def pad_image( method _get_preprocess_shape (line 203) | def _get_preprocess_shape(self, old_shape: Tuple[int, int], longest_ed... method resize (line 214) | def resize( method _preprocess (line 263) | def _preprocess( method _preprocess_image (line 293) | def _preprocess_image( method _preprocess_mask (line 350) | def _preprocess_mask( method preprocess (line 393) | def preprocess( method post_process_masks (line 576) | def post_process_masks( method _post_process_masks_pt (line 631) | def _post_process_masks_pt( method _post_process_masks_tf (line 678) | def _post_process_masks_tf( method post_process_for_mask_generation (line 720) | def post_process_for_mask_generation( method generate_crop_boxes (line 743) | def generate_crop_boxes( method filter_masks (line 808) | def filter_masks( method _filter_masks_pt (line 869) | def _filter_masks_pt( method _filter_masks_tf (line 949) | def _filter_masks_tf( function _compute_stability_score_pt (line 1027) | def _compute_stability_score_pt(masks: "torch.Tensor", mask_threshold: f... function _compute_stability_score_tf (line 1038) | def _compute_stability_score_tf(masks: "tf.Tensor", mask_threshold: floa... function _build_point_grid (line 1049) | def _build_point_grid(n_per_side: int) -> np.ndarray: function _normalize_coordinates (line 1059) | def _normalize_coordinates( function _generate_crop_boxes (line 1087) | def _generate_crop_boxes( function _generate_per_layer_crops (line 1143) | def _generate_per_layer_crops(crop_n_layers, overlap_ratio, original_size): function _generate_crop_images (line 1177) | def _generate_crop_images( function _pad_masks (line 1207) | def _pad_masks(masks, crop_box: List[int], orig_height: int, orig_width:... function _pad_masks_tf (line 1217) | def _pad_masks_tf(masks, crop_box: List[int], orig_height: int, orig_wid... function _is_box_near_crop_edge (line 1227) | def _is_box_near_crop_edge(boxes, crop_box, orig_box, atol=20.0): function _is_box_near_crop_edge_tf (line 1245) | def _is_box_near_crop_edge_tf(boxes, crop_box, orig_box, atol=20.0): function _batched_mask_to_box (line 1263) | def _batched_mask_to_box(masks: "torch.Tensor"): function _batched_mask_to_box_tf (line 1312) | def _batched_mask_to_box_tf(masks: "tf.Tensor"): function _mask_to_rle_pytorch (line 1360) | def _mask_to_rle_pytorch(input_mask: "torch.Tensor"): function _mask_to_rle_tf (line 1383) | def _mask_to_rle_tf(input_mask: "tf.Tensor"): function _rle_to_mask (line 1406) | def _rle_to_mask(rle: Dict[str, Any]) -> np.ndarray: function _postprocess_for_mg (line 1420) | def _postprocess_for_mg(rle_masks, iou_scores, mask_boxes, amg_crops_nms... function _postprocess_for_mg_tf (line 1449) | def _postprocess_for_mg_tf(rle_masks, iou_scores, mask_boxes, amg_crops_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/sam/modeling_sam.py class SamVisionEncoderOutput (line 41) | class SamVisionEncoderOutput(ModelOutput): class SamImageSegmentationOutput (line 71) | class SamImageSegmentationOutput(ModelOutput): class SamPatchEmbeddings (line 106) | class SamPatchEmbeddings(nn.Module): method __init__ (line 113) | def __init__(self, config): method forward (line 127) | def forward(self, pixel_values): class SamMLPBlock (line 141) | class SamMLPBlock(nn.Module): method __init__ (line 142) | def __init__(self, config): method forward (line 148) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SamLayerNorm (line 156) | class SamLayerNorm(nn.Module): method __init__ (line 162) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 172) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SamAttention (line 186) | class SamAttention(nn.Module): method __init__ (line 192) | def __init__(self, config, downsample_rate=None): method _separate_heads (line 208) | def _separate_heads(self, hidden_states: Tensor, num_attention_heads: ... method _recombine_heads (line 214) | def _recombine_heads(self, hidden_states: Tensor, point_batch_size: in... method forward (line 219) | def forward(self, query: Tensor, key: Tensor, value: Tensor, attention... class SamTwoWayAttentionBlock (line 249) | class SamTwoWayAttentionBlock(nn.Module): method __init__ (line 250) | def __init__(self, config, attention_downsample_rate: int = 2, skip_fi... method forward (line 283) | def forward( class SamTwoWayTransformer (line 336) | class SamTwoWayTransformer(nn.Module): method __init__ (line 337) | def __init__(self, config: SamMaskDecoderConfig): method forward (line 350) | def forward( class SamFeedForward (line 407) | class SamFeedForward(nn.Module): method __init__ (line 408) | def __init__( method forward (line 419) | def forward(self, hidden_states): class SamMaskDecoder (line 431) | class SamMaskDecoder(nn.Module): method __init__ (line 432) | def __init__(self, config: SamMaskDecoderConfig): method forward (line 460) | def forward( class SamPositionalEmbedding (line 557) | class SamPositionalEmbedding(nn.Module): method __init__ (line 558) | def __init__(self, config): method forward (line 563) | def forward(self, input_coords, input_shape=None): class SamMaskEmbedding (line 580) | class SamMaskEmbedding(nn.Module): method __init__ (line 581) | def __init__(self, config: SamPromptEncoderConfig): method forward (line 595) | def forward(self, masks): class SamPromptEncoder (line 607) | class SamPromptEncoder(nn.Module): method __init__ (line 608) | def __init__(self, config: SamPromptEncoderConfig, shared_patch_embedd... method _embed_points (line 623) | def _embed_points(self, points: torch.Tensor, labels: torch.Tensor, pa... method _embed_boxes (line 661) | def _embed_boxes(self, boxes: torch.Tensor) -> torch.Tensor: method forward (line 672) | def forward( class SamVisionAttention (line 719) | class SamVisionAttention(nn.Module): method __init__ (line 722) | def __init__(self, config, window_size): method get_rel_pos (line 747) | def get_rel_pos(self, q_size: int, k_size: int, rel_pos: torch.Tensor)... method add_decomposed_rel_pos (line 779) | def add_decomposed_rel_pos( method forward (line 824) | def forward(self, hidden_states: torch.Tensor, output_attentions=False... class SamVisionLayer (line 859) | class SamVisionLayer(nn.Module): method __init__ (line 860) | def __init__(self, config, window_size): method window_partition (line 868) | def window_partition(self, hidden_states: torch.Tensor, window_size: i... method window_unpartition (line 892) | def window_unpartition( method forward (line 922) | def forward( class SamVisionNeck (line 954) | class SamVisionNeck(nn.Module): method __init__ (line 955) | def __init__(self, config: SamVisionConfig): method forward (line 964) | def forward(self, hidden_states): class SamVisionEncoder (line 974) | class SamVisionEncoder(nn.Module): method __init__ (line 975) | def __init__(self, config: SamVisionConfig): method get_input_embeddings (line 1006) | def get_input_embeddings(self): method forward (line 1009) | def forward( class SamPreTrainedModel (line 1069) | class SamPreTrainedModel(PreTrainedModel): method _init_weights (line 1075) | def _init_weights(self, module): class SamModel (line 1178) | class SamModel(SamPreTrainedModel): method __init__ (line 1181) | def __init__(self, config): method get_input_embeddings (line 1191) | def get_input_embeddings(self): method get_image_wide_positional_embeddings (line 1194) | def get_image_wide_positional_embeddings(self): method get_image_embeddings (line 1208) | def get_image_embeddings( method get_prompt_embeddings (line 1239) | def get_prompt_embeddings( method forward (line 1272) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/sam/modeling_tf_sam.py class TFSamVisionEncoderOutput (line 44) | class TFSamVisionEncoderOutput(ModelOutput): class TFSamImageSegmentationOutput (line 74) | class TFSamImageSegmentationOutput(ModelOutput): class TFSamPatchEmbeddings (line 109) | class TFSamPatchEmbeddings(keras.layers.Layer): method __init__ (line 116) | def __init__(self, config, **kwargs): method call (line 132) | def call(self, pixel_values): method build (line 145) | def build(self, input_shape=None): class TFSamMLPBlock (line 154) | class TFSamMLPBlock(keras.layers.Layer): method __init__ (line 155) | def __init__(self, config, **kwargs): method call (line 162) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 168) | def build(self, input_shape=None): class TFSamLayerNorm (line 180) | class TFSamLayerNorm(keras.layers.Layer): method __init__ (line 186) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method build (line 194) | def build(self, input_shape): method call (line 199) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFSamAttention (line 207) | class TFSamAttention(keras.layers.Layer): method __init__ (line 213) | def __init__(self, config, downsample_rate=None, **kwargs): method _separate_heads (line 229) | def _separate_heads(self, hidden_states: tf.Tensor, num_attention_head... method _recombine_heads (line 237) | def _recombine_heads(self, hidden_states: tf.Tensor, point_batch_size:... method call (line 245) | def call(self, query: tf.Tensor, key: tf.Tensor, value: tf.Tensor) -> ... method build (line 272) | def build(self, input_shape=None): class TFSamTwoWayAttentionBlock (line 290) | class TFSamTwoWayAttentionBlock(keras.layers.Layer): method __init__ (line 291) | def __init__(self, config, attention_downsample_rate: int = 2, skip_fi... method call (line 328) | def call( method build (line 377) | def build(self, input_shape=None): class TFSamTwoWayTransformer (line 407) | class TFSamTwoWayTransformer(keras.layers.Layer): method __init__ (line 408) | def __init__(self, config: SamMaskDecoderConfig, **kwargs): method call (line 423) | def call( method build (line 473) | def build(self, input_shape=None): class TFSamFeedForward (line 488) | class TFSamFeedForward(keras.layers.Layer): method __init__ (line 489) | def __init__( method call (line 505) | def call(self, hidden_states): method build (line 516) | def build(self, input_shape=None): class TFSamMaskDecoder (line 532) | class TFSamMaskDecoder(keras.layers.Layer): method __init__ (line 533) | def __init__(self, config: SamMaskDecoderConfig, **kwargs): method build (line 575) | def build(self, input_shape=None): method call (line 603) | def call( class TFSamPositionalEmbedding (line 680) | class TFSamPositionalEmbedding(keras.layers.Layer): method __init__ (line 681) | def __init__(self, config, **kwargs): method build (line 686) | def build(self, input_shape): method call (line 696) | def call(self, input_coords, input_shape=None): class TFSamMaskEmbedding (line 718) | class TFSamMaskEmbedding(keras.layers.Layer): method __init__ (line 719) | def __init__(self, config: SamPromptEncoderConfig, **kwargs): method call (line 730) | def call(self, masks): method build (line 743) | def build(self, input_shape=None): class TFSamPromptEncoder (line 760) | class TFSamPromptEncoder(keras.layers.Layer): method __init__ (line 761) | def __init__(self, config: SamPromptEncoderConfig, shared_patch_embedd... method build (line 775) | def build(self, input_shape=None): method _embed_points (line 810) | def _embed_points(self, points: tf.Tensor, labels: tf.Tensor, pad: boo... method _embed_boxes (line 838) | def _embed_boxes(self, boxes: tf.Tensor) -> tf.Tensor: method call (line 852) | def call( class TFSamVisionAttention (line 902) | class TFSamVisionAttention(keras.layers.Layer): method __init__ (line 905) | def __init__(self, config, window_size, **kwargs): method build (line 929) | def build(self, input_shape=None): method get_rel_pos (line 949) | def get_rel_pos(self, q_size: int, k_size: int, rel_pos: tf.Tensor) ->... method add_decomposed_rel_pos (line 985) | def add_decomposed_rel_pos( method call (line 1030) | def call(self, hidden_states: tf.Tensor, output_attentions=False, trai... class TFSamVisionLayer (line 1067) | class TFSamVisionLayer(keras.layers.Layer): method __init__ (line 1068) | def __init__(self, config, window_size, **kwargs): method window_partition (line 1077) | def window_partition(self, hidden_states: tf.Tensor, window_size: int)... method window_unpartition (line 1095) | def window_unpartition( method call (line 1112) | def call( method build (line 1143) | def build(self, input_shape=None): class TFSamVisionNeck (line 1161) | class TFSamVisionNeck(keras.layers.Layer): method __init__ (line 1162) | def __init__(self, config: SamVisionConfig, **kwargs): method call (line 1182) | def call(self, hidden_states): method build (line 1191) | def build(self, input_shape=None): class TFSamVisionEncoder (line 1209) | class TFSamVisionEncoder(keras.layers.Layer): method __init__ (line 1210) | def __init__(self, config: SamVisionConfig, **kwargs): method build (line 1230) | def build(self, input_shape=None): method get_input_embeddings (line 1258) | def get_input_embeddings(self): method call (line 1261) | def call( class TFSamPreTrainedModel (line 1316) | class TFSamPreTrainedModel(TFPreTrainedModel): class TFSamModel (line 1407) | class TFSamModel(TFSamPreTrainedModel): method __init__ (line 1410) | def __init__(self, config, **kwargs): method get_input_embeddings (line 1421) | def get_input_embeddings(self): method get_image_wide_positional_embeddings (line 1424) | def get_image_wide_positional_embeddings(self): method get_image_embeddings (line 1435) | def get_image_embeddings( method get_prompt_embeddings (line 1465) | def get_prompt_embeddings( method call (line 1499) | def call( method serving_output (line 1625) | def serving_output(self, output: TFSamImageSegmentationOutput) -> TFSa... method build (line 1637) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/sam/processing_sam.py class SamProcessor (line 36) | class SamProcessor(ProcessorMixin): method __init__ (line 52) | def __init__(self, image_processor): method __call__ (line 58) | def __call__( method _normalize_and_convert (line 102) | def _normalize_and_convert( method _pad_points_and_labels (line 177) | def _pad_points_and_labels(self, input_points, input_labels): method _normalize_coordinates (line 193) | def _normalize_coordinates( method _check_and_preprocess_points (line 214) | def _check_and_preprocess_points( method model_input_names (line 262) | def model_input_names(self): method post_process_masks (line 266) | def post_process_masks(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t/configuration_seamless_m4t.py class SeamlessM4TConfig (line 24) | class SeamlessM4TConfig(PretrainedConfig): method __init__ (line 240) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t/convert_fairseq2_to_hf.py function assert_param_count (line 41) | def assert_param_count(model_1, model_2): function param_count (line 47) | def param_count(model): function _grab_best_device (line 51) | def _grab_best_device(use_gpu=True): function _load_hf_config (line 136) | def _load_hf_config(model_type="medium"): function _convert_model (line 156) | def _convert_model( function load_model (line 218) | def load_model(save_dir, model_type, repo_id): FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t/feature_extraction_seamless_m4t.py class SeamlessM4TFeatureExtractor (line 38) | class SeamlessM4TFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 63) | def __init__( method zero_mean_unit_var_norm (line 94) | def zero_mean_unit_var_norm( method _extract_fbank_features (line 115) | def _extract_fbank_features( method __call__ (line 144) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py class SeamlessM4TGenerationOutput (line 54) | class SeamlessM4TGenerationOutput(ModelOutput): function create_position_ids_from_input_ids (line 207) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... function shift_tokens_right (line 224) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _compute_new_attention_mask (line 240) | def _compute_new_attention_mask(hidden_states: torch.Tensor, seq_lens: t... function format_speech_generation_kwargs (line 267) | def format_speech_generation_kwargs(kwargs): class SeamlessM4TConformerPositionalConvEmbedding (line 308) | class SeamlessM4TConformerPositionalConvEmbedding(nn.Module): method __init__ (line 309) | def __init__(self, config): method forward (line 342) | def forward(self, hidden_states): class SeamlessM4TConformerRotaryPositionalEmbedding (line 354) | class SeamlessM4TConformerRotaryPositionalEmbedding(nn.Module): method __init__ (line 359) | def __init__(self, config): method forward (line 369) | def forward(self, hidden_states): class SeamlessM4TConformerRelPositionalEmbedding (line 389) | class SeamlessM4TConformerRelPositionalEmbedding(nn.Module): method __init__ (line 392) | def __init__(self, config): method extend_pe (line 399) | def extend_pe(self, x): method forward (line 430) | def forward(self, hidden_states: torch.Tensor): class SeamlessM4TConformerSamePadLayer (line 440) | class SeamlessM4TConformerSamePadLayer(nn.Module): method __init__ (line 441) | def __init__(self, num_conv_pos_embeddings): method forward (line 445) | def forward(self, hidden_states): class SeamlessM4TConformerFeatureProjection (line 451) | class SeamlessM4TConformerFeatureProjection(nn.Module): method __init__ (line 452) | def __init__(self, config): method forward (line 458) | def forward(self, hidden_states): class SeamlessM4TConformerFeedForward (line 466) | class SeamlessM4TConformerFeedForward(nn.Module): method __init__ (line 467) | def __init__(self, config, act_fn=None, dropout=None): method forward (line 479) | def forward(self, hidden_states): class SeamlessM4TConformerConvolutionModule (line 489) | class SeamlessM4TConformerConvolutionModule(nn.Module): method __init__ (line 492) | def __init__(self, config): method forward (line 527) | def forward(self, hidden_states, attention_mask=None): class SeamlessM4TConformerSelfAttention (line 555) | class SeamlessM4TConformerSelfAttention(nn.Module): method __init__ (line 560) | def __init__(self, config, use_position_embeddings=True): method forward (line 583) | def forward( method _apply_rotary_embedding (line 646) | def _apply_rotary_embedding(self, hidden_states, relative_position_emb... method _apply_relative_embeddings (line 666) | def _apply_relative_embeddings(self, query, key, relative_position_emb... class SeamlessM4TConformerEncoderLayer (line 706) | class SeamlessM4TConformerEncoderLayer(nn.Module): method __init__ (line 710) | def __init__(self, config): method forward (line 732) | def forward( class SeamlessM4TConformerEncoder (line 775) | class SeamlessM4TConformerEncoder(nn.Module): method __init__ (line 776) | def __init__(self, config): method forward (line 796) | def forward( class SeamlessM4TConformerAdapterLayer (line 877) | class SeamlessM4TConformerAdapterLayer(nn.Module): method __init__ (line 878) | def __init__(self, config): method _compute_sub_sample_lengths_from_attention_mask (line 913) | def _compute_sub_sample_lengths_from_attention_mask(self, attention_ma... method forward (line 921) | def forward( class SeamlessM4TConformerAdapter (line 975) | class SeamlessM4TConformerAdapter(nn.Module): method __init__ (line 976) | def __init__(self, config): method forward (line 981) | def forward(self, hidden_states, attention_mask): class SeamlessM4TScaledWordEmbedding (line 994) | class SeamlessM4TScaledWordEmbedding(nn.Embedding): method __init__ (line 999) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 1003) | def forward(self, input_ids: torch.Tensor): class SeamlessM4TSinusoidalPositionalEmbedding (line 1008) | class SeamlessM4TSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 1011) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 1018) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 1027) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 1048) | def forward( method create_position_ids_from_inputs_embeds (line 1068) | def create_position_ids_from_inputs_embeds(self, inputs_embeds, past_k... class SeamlessM4TAttention (line 1086) | class SeamlessM4TAttention(nn.Module): method __init__ (line 1090) | def __init__( method _shape (line 1121) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 1124) | def forward( class SeamlessM4TFeedForwardNetwork (line 1236) | class SeamlessM4TFeedForwardNetwork(nn.Module): method __init__ (line 1237) | def __init__(self, config: SeamlessM4TConfig, ffn_dim: int): method forward (line 1244) | def forward(self, hidden_states): class SeamlessM4TEncoderLayer (line 1258) | class SeamlessM4TEncoderLayer(nn.Module): method __init__ (line 1259) | def __init__(self, config: SeamlessM4TConfig, encoder_ffn_dim=None, en... method forward (line 1280) | def forward( class SeamlessM4TDecoderLayer (line 1321) | class SeamlessM4TDecoderLayer(nn.Module): method __init__ (line 1322) | def __init__(self, config: SeamlessM4TConfig, decoder_ffn_dim=None, de... method forward (line 1351) | def forward( class SeamlessM4TPreTrainedModel (line 1439) | class SeamlessM4TPreTrainedModel(PreTrainedModel): method _init_weights (line 1450) | def _init_weights(self, module): method _compute_sub_sample_lengths_from_attention_mask (line 1486) | def _compute_sub_sample_lengths_from_attention_mask(self, attention_ma... method compute_last_hidden_states_per_sample (line 1495) | def compute_last_hidden_states_per_sample( class SeamlessM4TSpeechEncoder (line 1554) | class SeamlessM4TSpeechEncoder(SeamlessM4TPreTrainedModel): method __init__ (line 1557) | def __init__(self, config: SeamlessM4TConfig): method forward (line 1569) | def forward( class SeamlessM4TEncoder (line 1631) | class SeamlessM4TEncoder(SeamlessM4TPreTrainedModel): method __init__ (line 1632) | def __init__( method forward (line 1682) | def forward( class SeamlessM4TDecoder (line 1817) | class SeamlessM4TDecoder(SeamlessM4TPreTrainedModel): method __init__ (line 1818) | def __init__( method get_input_embeddings (line 1864) | def get_input_embeddings(self): method set_input_embeddings (line 1867) | def set_input_embeddings(self, value): method forward (line 1870) | def forward( class SeamlessM4TTextToUnitModel (line 2064) | class SeamlessM4TTextToUnitModel(SeamlessM4TPreTrainedModel): method __init__ (line 2065) | def __init__( method forward (line 2078) | def forward( class SeamlessM4TTextToUnitForConditionalGeneration (line 2153) | class SeamlessM4TTextToUnitForConditionalGeneration(SeamlessM4TPreTraine... method __init__ (line 2162) | def __init__( method get_encoder (line 2181) | def get_encoder(self): method get_decoder (line 2184) | def get_decoder(self): method get_output_embeddings (line 2187) | def get_output_embeddings(self): method set_output_embeddings (line 2190) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 2193) | def get_input_embeddings(self): method set_input_embeddings (line 2196) | def set_input_embeddings(self, value): method forward (line 2200) | def forward( method prepare_inputs_for_generation (line 2265) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2287) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2291) | def _reorder_cache(past_key_values, beam_idx): method _tie_weights (line 2300) | def _tie_weights(self) -> None: class HifiGanResidualBlock (line 2328) | class HifiGanResidualBlock(nn.Module): method __init__ (line 2329) | def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5), leaky_... method get_padding (line 2360) | def get_padding(self, kernel_size, dilation=1): method apply_weight_norm (line 2363) | def apply_weight_norm(self): method remove_weight_norm (line 2369) | def remove_weight_norm(self): method forward (line 2375) | def forward(self, hidden_states): class SeamlessM4TVariancePredictor (line 2386) | class SeamlessM4TVariancePredictor(nn.Module): method __init__ (line 2387) | def __init__(self, config): method forward (line 2412) | def forward(self, hidden_states: Tensor) -> Tensor: class SeamlessM4THifiGan (line 2423) | class SeamlessM4THifiGan(nn.Module): method __init__ (line 2424) | def __init__(self, config: SeamlessM4TConfig): method forward (line 2458) | def forward(self, input_embeds: torch.FloatTensor) -> torch.FloatTensor: class SeamlessM4TCodeHifiGan (line 2499) | class SeamlessM4TCodeHifiGan(PreTrainedModel): method __init__ (line 2504) | def __init__(self, config): method _get_dur_output_lengths (line 2519) | def _get_dur_output_lengths(self, input_ids, dur_out): method _get_output_hifigan_lengths (line 2533) | def _get_output_hifigan_lengths(self, input_lengths: Union[torch.LongT... method forward (line 2575) | def forward( method _init_weights (line 2624) | def _init_weights(self, module): method apply_weight_norm (line 2635) | def apply_weight_norm(self): method remove_weight_norm (line 2643) | def remove_weight_norm(self): class SeamlessM4TForTextToText (line 2659) | class SeamlessM4TForTextToText(SeamlessM4TPreTrainedModel): method __init__ (line 2669) | def __init__(self, config: SeamlessM4TConfig): method get_encoder (line 2681) | def get_encoder(self): method get_decoder (line 2684) | def get_decoder(self): method get_output_embeddings (line 2687) | def get_output_embeddings(self): method set_output_embeddings (line 2690) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 2693) | def get_input_embeddings(self): method set_input_embeddings (line 2696) | def set_input_embeddings(self, value): method _tie_weights (line 2701) | def _tie_weights(self): method forward (line 2708) | def forward( method generate (line 2799) | def generate( method prepare_inputs_for_generation (line 2909) | def prepare_inputs_for_generation( method _reorder_cache (line 2932) | def _reorder_cache(past_key_values, beam_idx): class SeamlessM4TForSpeechToText (line 2946) | class SeamlessM4TForSpeechToText(SeamlessM4TPreTrainedModel): method __init__ (line 2955) | def __init__(self, config: SeamlessM4TConfig): method get_encoder (line 2966) | def get_encoder(self): method get_decoder (line 2969) | def get_decoder(self): method get_output_embeddings (line 2972) | def get_output_embeddings(self): method set_output_embeddings (line 2975) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 2978) | def get_input_embeddings(self): method set_input_embeddings (line 2981) | def set_input_embeddings(self, value): method _tie_weights (line 2984) | def _tie_weights(self): method forward (line 2990) | def forward( method generate (line 3088) | def generate( method prepare_inputs_for_generation (line 3200) | def prepare_inputs_for_generation( method _reorder_cache (line 3223) | def _reorder_cache(past_key_values, beam_idx): class SeamlessM4TForTextToSpeech (line 3237) | class SeamlessM4TForTextToSpeech(SeamlessM4TPreTrainedModel): method __init__ (line 3247) | def __init__(self, config: SeamlessM4TConfig): method get_encoder (line 3262) | def get_encoder(self): method get_decoder (line 3265) | def get_decoder(self): method get_output_embeddings (line 3268) | def get_output_embeddings(self): method set_output_embeddings (line 3271) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 3274) | def get_input_embeddings(self): method set_input_embeddings (line 3277) | def set_input_embeddings(self, value): method _tie_weights (line 3282) | def _tie_weights(self): method forward (line 3289) | def forward( method generate (line 3386) | def generate( method prepare_inputs_for_generation (line 3551) | def prepare_inputs_for_generation( method _reorder_cache (line 3574) | def _reorder_cache(past_key_values, beam_idx): class SeamlessM4TForSpeechToSpeech (line 3588) | class SeamlessM4TForSpeechToSpeech(SeamlessM4TPreTrainedModel): method __init__ (line 3597) | def __init__(self, config): method get_encoder (line 3611) | def get_encoder(self): method get_decoder (line 3614) | def get_decoder(self): method get_output_embeddings (line 3617) | def get_output_embeddings(self): method set_output_embeddings (line 3620) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 3623) | def get_input_embeddings(self): method set_input_embeddings (line 3626) | def set_input_embeddings(self, value): method _tie_weights (line 3629) | def _tie_weights(self): method forward (line 3635) | def forward( method generate (line 3740) | def generate( method _reorder_cache (line 3913) | def _reorder_cache(past_key_values, beam_idx): method prepare_inputs_for_generation (line 3922) | def prepare_inputs_for_generation( class SeamlessM4TModel (line 3953) | class SeamlessM4TModel(SeamlessM4TPreTrainedModel): method __init__ (line 3960) | def __init__(self, config, current_modality="text"): method set_modality (line 3981) | def set_modality(self, modality="text"): method get_encoder (line 3991) | def get_encoder(self): method get_output_embeddings (line 3997) | def get_output_embeddings(self): method set_output_embeddings (line 4000) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 4003) | def get_input_embeddings(self): method set_input_embeddings (line 4006) | def set_input_embeddings(self, value): method _tie_weights (line 4011) | def _tie_weights(self): method forward (line 4018) | def forward( method generate (line 4160) | def generate( method prepare_inputs_for_generation (line 4376) | def prepare_inputs_for_generation( method _reorder_cache (line 4399) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t/processing_seamless_m4t.py class SeamlessM4TProcessor (line 22) | class SeamlessM4TProcessor(ProcessorMixin): method __init__ (line 41) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 44) | def __call__(self, text=None, audios=None, src_lang=None, tgt_lang=Non... method batch_decode (line 99) | def batch_decode(self, *args, **kwargs): method decode (line 106) | def decode(self, *args, **kwargs): method model_input_names (line 114) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py class SeamlessM4TTokenizer (line 43) | class SeamlessM4TTokenizer(PreTrainedTokenizer): method __init__ (line 123) | def __init__( method __getstate__ (line 189) | def __getstate__(self): method __setstate__ (line 196) | def __setstate__(self, d): method vocab_size (line 207) | def vocab_size(self): method __call__ (line 210) | def __call__( method src_lang (line 285) | def src_lang(self) -> str: method src_lang (line 289) | def src_lang(self, new_src_lang: str) -> None: method tgt_lang (line 297) | def tgt_lang(self) -> str: method tgt_lang (line 301) | def tgt_lang(self, new_tgt_lang: str) -> None: method get_special_tokens_mask (line 309) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 340) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 368) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 393) | def _build_translation_inputs( method get_vocab (line 407) | def get_vocab(self): method unk_token_length (line 415) | def unk_token_length(self): method get_spm_processor (line 419) | def get_spm_processor(self, from_slow=False): method tokenize (line 437) | def tokenize(self, text: "TextInput", **kwargs) -> List[str]: method _tokenize (line 456) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 474) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 481) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 485) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 495) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 513) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 526) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 530) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 533) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 549) | def set_tgt_lang_special_tokens(self, lang: str) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py class SeamlessM4TTokenizerFast (line 42) | class SeamlessM4TTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 118) | def __init__( method can_save_slow_tokenizer (line 155) | def can_save_slow_tokenizer(self) -> bool: method src_lang (line 160) | def src_lang(self) -> str: method src_lang (line 164) | def src_lang(self, new_src_lang: str) -> None: method tgt_lang (line 172) | def tgt_lang(self) -> str: method tgt_lang (line 176) | def tgt_lang(self, new_tgt_lang: str) -> None: method build_inputs_with_special_tokens (line 183) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 213) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 238) | def _build_translation_inputs( method prepare_seq2seq_batch (line 253) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 266) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 270) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 273) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 298) | def set_tgt_lang_special_tokens(self, lang: str) -> None: method save_vocabulary (line 324) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _from_pretrained (line 344) | def _from_pretrained( method __call__ (line 376) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t_v2/configuration_seamless_m4t_v2.py class SeamlessM4Tv2Config (line 24) | class SeamlessM4Tv2Config(PretrainedConfig): method __init__ (line 243) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t_v2/convert_fairseq2_to_hf.py function assert_param_count (line 48) | def assert_param_count(model_1, model_2): function param_count (line 54) | def param_count(model): function _grab_best_device (line 58) | def _grab_best_device(use_gpu=True): function _load_hf_config (line 153) | def _load_hf_config(): function _convert_model (line 157) | def _convert_model( function load_model (line 219) | def load_model(save_dir, model_type, repo_id): FILE: mplsandbox_for_rl/transformers/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py class SeamlessM4Tv2GenerationOutput (line 55) | class SeamlessM4Tv2GenerationOutput(ModelOutput): class SeamlessM4Tv2TextToUnitDecoderOutput (line 82) | class SeamlessM4Tv2TextToUnitDecoderOutput(ModelOutput): class SeamlessM4Tv2TextToUnitOutput (line 112) | class SeamlessM4Tv2TextToUnitOutput(ModelOutput): function create_position_ids_from_input_ids (line 334) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... function shift_tokens_right (line 351) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _compute_new_attention_mask (line 367) | def _compute_new_attention_mask(hidden_states: torch.Tensor, seq_lens: t... function format_speech_generation_kwargs (line 395) | def format_speech_generation_kwargs(kwargs): class SeamlessM4Tv2ConformerFeatureProjection (line 435) | class SeamlessM4Tv2ConformerFeatureProjection(nn.Module): method __init__ (line 437) | def __init__(self, config): method forward (line 443) | def forward(self, hidden_states): class SeamlessM4Tv2ConformerFeedForward (line 452) | class SeamlessM4Tv2ConformerFeedForward(nn.Module): method __init__ (line 453) | def __init__(self, config, act_fn=None, dropout=None): method forward (line 465) | def forward(self, hidden_states): class SeamlessM4Tv2ConformerConvolutionModule (line 475) | class SeamlessM4Tv2ConformerConvolutionModule(nn.Module): method __init__ (line 479) | def __init__(self, config): method forward (line 514) | def forward(self, hidden_states, attention_mask=None): class SeamlessM4Tv2ConformerSelfAttention (line 545) | class SeamlessM4Tv2ConformerSelfAttention(nn.Module): method __init__ (line 550) | def __init__(self, config, use_position_embeddings=True): method forward (line 570) | def forward( class SeamlessM4Tv2ConformerEncoderLayer (line 630) | class SeamlessM4Tv2ConformerEncoderLayer(nn.Module): method __init__ (line 634) | def __init__(self, config): method forward (line 656) | def forward( class SeamlessM4Tv2ConformerEncoder (line 697) | class SeamlessM4Tv2ConformerEncoder(nn.Module): method __init__ (line 698) | def __init__(self, config): method _apply_chunk_attention (line 711) | def _apply_chunk_attention(self, attention_mask, hidden_states): method forward (line 743) | def forward( class SeamlessM4Tv2ConformerAdapterLayer (line 823) | class SeamlessM4Tv2ConformerAdapterLayer(nn.Module): method __init__ (line 824) | def __init__(self, config): method _compute_sub_sample_lengths_from_attention_mask (line 859) | def _compute_sub_sample_lengths_from_attention_mask(self, attention_ma... method forward (line 867) | def forward( class SeamlessM4Tv2ConformerAdapter (line 922) | class SeamlessM4Tv2ConformerAdapter(nn.Module): method __init__ (line 923) | def __init__(self, config): method forward (line 930) | def forward(self, hidden_states, attention_mask): class SeamlessM4Tv2ScaledWordEmbedding (line 943) | class SeamlessM4Tv2ScaledWordEmbedding(nn.Embedding): method __init__ (line 948) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 952) | def forward(self, input_ids: torch.Tensor): class SeamlessM4Tv2SinusoidalPositionalEmbedding (line 957) | class SeamlessM4Tv2SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 960) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 967) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 976) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 997) | def forward( method create_position_ids_from_inputs_embeds (line 1017) | def create_position_ids_from_inputs_embeds(self, inputs_embeds, past_k... class SeamlessM4Tv2Attention (line 1035) | class SeamlessM4Tv2Attention(nn.Module): method __init__ (line 1039) | def __init__( method _shape (line 1070) | def _shape(self, projection: torch.Tensor) -> torch.Tensor: method forward (line 1076) | def forward( class SeamlessM4Tv2FeedForwardNetwork (line 1138) | class SeamlessM4Tv2FeedForwardNetwork(nn.Module): method __init__ (line 1139) | def __init__(self, config: SeamlessM4Tv2Config, ffn_dim: int): method forward (line 1146) | def forward(self, hidden_states): class SeamlessM4Tv2EncoderLayer (line 1161) | class SeamlessM4Tv2EncoderLayer(nn.Module): method __init__ (line 1162) | def __init__(self, config: SeamlessM4Tv2Config, encoder_ffn_dim=None, ... method forward (line 1183) | def forward( class SeamlessM4Tv2DecoderLayer (line 1225) | class SeamlessM4Tv2DecoderLayer(nn.Module): method __init__ (line 1226) | def __init__(self, config: SeamlessM4Tv2Config, decoder_ffn_dim=None, ... method forward (line 1255) | def forward( class SeamlessM4Tv2TextToUnitDecoderLayer (line 1340) | class SeamlessM4Tv2TextToUnitDecoderLayer(nn.Module): method __init__ (line 1341) | def __init__(self, config: SeamlessM4Tv2Config, decoder_ffn_dim=None, ... method forward (line 1365) | def forward( class SeamlessM4Tv2PreTrainedModel (line 1426) | class SeamlessM4Tv2PreTrainedModel(PreTrainedModel): method _init_weights (line 1442) | def _init_weights(self, module): method _compute_sub_sample_lengths_from_attention_mask (line 1472) | def _compute_sub_sample_lengths_from_attention_mask(self, attention_ma... method _indices_to_subwords (line 1481) | def _indices_to_subwords(self, input_ids): method _count_character_length_in_subword (line 1501) | def _count_character_length_in_subword( method _get_char_input_ids (line 1585) | def _get_char_input_ids(self, input_ids, subwords_batch, char_count_pe... method _hard_upsample (line 1632) | def _hard_upsample(self, hidden_states, durations): class SeamlessM4Tv2SpeechEncoder (line 1667) | class SeamlessM4Tv2SpeechEncoder(SeamlessM4Tv2PreTrainedModel): method __init__ (line 1670) | def __init__(self, config: SeamlessM4Tv2Config): method forward (line 1682) | def forward( class SeamlessM4Tv2Encoder (line 1745) | class SeamlessM4Tv2Encoder(SeamlessM4Tv2PreTrainedModel): method __init__ (line 1746) | def __init__( method forward (line 1796) | def forward( class SeamlessM4Tv2Decoder (line 1932) | class SeamlessM4Tv2Decoder(SeamlessM4Tv2PreTrainedModel): method __init__ (line 1933) | def __init__( method get_input_embeddings (line 1979) | def get_input_embeddings(self): method set_input_embeddings (line 1982) | def set_input_embeddings(self, value): method forward (line 1985) | def forward( class SeamlessM4Tv2TextToUnitDecoder (line 2180) | class SeamlessM4Tv2TextToUnitDecoder(SeamlessM4Tv2PreTrainedModel): method __init__ (line 2181) | def __init__( method get_input_embeddings (line 2239) | def get_input_embeddings(self): method set_input_embeddings (line 2242) | def set_input_embeddings(self, value): method forward (line 2245) | def forward( class SeamlessM4Tv2TextToUnitModel (line 2361) | class SeamlessM4Tv2TextToUnitModel(SeamlessM4Tv2PreTrainedModel): method __init__ (line 2363) | def __init__( method forward (line 2376) | def forward( class SeamlessM4Tv2TextToUnitForConditionalGeneration (line 2442) | class SeamlessM4Tv2TextToUnitForConditionalGeneration(SeamlessM4Tv2PreTr... method __init__ (line 2452) | def __init__( method get_encoder (line 2472) | def get_encoder(self): method get_decoder (line 2476) | def get_decoder(self): method get_output_embeddings (line 2480) | def get_output_embeddings(self): method set_output_embeddings (line 2484) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 2488) | def get_input_embeddings(self): method set_input_embeddings (line 2492) | def set_input_embeddings(self, value): method forward (line 2496) | def forward( method _tie_weights (line 2547) | def _tie_weights(self) -> None: class HifiGanResidualBlock (line 2575) | class HifiGanResidualBlock(nn.Module): method __init__ (line 2576) | def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5), leaky_... method get_padding (line 2607) | def get_padding(self, kernel_size, dilation=1): method apply_weight_norm (line 2610) | def apply_weight_norm(self): method remove_weight_norm (line 2616) | def remove_weight_norm(self): method forward (line 2622) | def forward(self, hidden_states): class SeamlessM4Tv2VariancePredictor (line 2633) | class SeamlessM4Tv2VariancePredictor(nn.Module): method __init__ (line 2634) | def __init__(self, embed_dim, hidden_dim, kernel_size, var_pred_dropout): method forward (line 2655) | def forward(self, hidden_states: Tensor, padding_mask: Tensor = None) ... class SeamlessM4Tv2HifiGan (line 2671) | class SeamlessM4Tv2HifiGan(nn.Module): method __init__ (line 2672) | def __init__(self, config: SeamlessM4Tv2Config): method forward (line 2706) | def forward(self, input_embeds: torch.FloatTensor) -> torch.FloatTensor: class SeamlessM4Tv2CodeHifiGan (line 2747) | class SeamlessM4Tv2CodeHifiGan(PreTrainedModel): method __init__ (line 2752) | def __init__(self, config): method _get_dur_output_lengths (line 2771) | def _get_dur_output_lengths(self, input_ids, dur_out): method _get_output_hifigan_lengths (line 2786) | def _get_output_hifigan_lengths(self, input_lengths: Union[torch.LongT... method forward (line 2829) | def forward( method _init_weights (line 2879) | def _init_weights(self, module): method apply_weight_norm (line 2891) | def apply_weight_norm(self): method remove_weight_norm (line 2900) | def remove_weight_norm(self): class SeamlessM4Tv2ForTextToText (line 2917) | class SeamlessM4Tv2ForTextToText(SeamlessM4Tv2PreTrainedModel): method __init__ (line 2927) | def __init__(self, config: SeamlessM4Tv2Config): method get_encoder (line 2939) | def get_encoder(self): method get_decoder (line 2942) | def get_decoder(self): method get_output_embeddings (line 2945) | def get_output_embeddings(self): method set_output_embeddings (line 2948) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 2951) | def get_input_embeddings(self): method set_input_embeddings (line 2954) | def set_input_embeddings(self, value): method _tie_weights (line 2959) | def _tie_weights(self): method forward (line 2966) | def forward( method generate (line 3057) | def generate( method prepare_inputs_for_generation (line 3167) | def prepare_inputs_for_generation( method _reorder_cache (line 3190) | def _reorder_cache(past_key_values, beam_idx): class SeamlessM4Tv2ForSpeechToText (line 3204) | class SeamlessM4Tv2ForSpeechToText(SeamlessM4Tv2PreTrainedModel): method __init__ (line 3214) | def __init__(self, config: SeamlessM4Tv2Config): method get_encoder (line 3226) | def get_encoder(self): method get_decoder (line 3230) | def get_decoder(self): method get_output_embeddings (line 3234) | def get_output_embeddings(self): method set_output_embeddings (line 3238) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 3242) | def get_input_embeddings(self): method set_input_embeddings (line 3246) | def set_input_embeddings(self, value): method _tie_weights (line 3250) | def _tie_weights(self): method forward (line 3257) | def forward( method generate (line 3356) | def generate( method prepare_inputs_for_generation (line 3469) | def prepare_inputs_for_generation( method _reorder_cache (line 3493) | def _reorder_cache(past_key_values, beam_idx): class SeamlessM4Tv2ForTextToSpeech (line 3507) | class SeamlessM4Tv2ForTextToSpeech(SeamlessM4Tv2PreTrainedModel): method __init__ (line 3518) | def __init__(self, config: SeamlessM4Tv2Config): method get_encoder (line 3534) | def get_encoder(self): method get_decoder (line 3538) | def get_decoder(self): method get_output_embeddings (line 3542) | def get_output_embeddings(self): method set_output_embeddings (line 3546) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 3550) | def get_input_embeddings(self): method set_input_embeddings (line 3554) | def set_input_embeddings(self, value): method _tie_weights (line 3560) | def _tie_weights(self): method forward (line 3568) | def forward( method generate (line 3665) | def generate( method prepare_inputs_for_generation (line 3863) | def prepare_inputs_for_generation( method _reorder_cache (line 3887) | def _reorder_cache(past_key_values, beam_idx): class SeamlessM4Tv2ForSpeechToSpeech (line 3901) | class SeamlessM4Tv2ForSpeechToSpeech(SeamlessM4Tv2PreTrainedModel): method __init__ (line 3911) | def __init__(self, config): method get_encoder (line 3926) | def get_encoder(self): method get_decoder (line 3930) | def get_decoder(self): method get_output_embeddings (line 3934) | def get_output_embeddings(self): method set_output_embeddings (line 3938) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 3942) | def get_input_embeddings(self): method set_input_embeddings (line 3946) | def set_input_embeddings(self, value): method _tie_weights (line 3950) | def _tie_weights(self): method forward (line 3957) | def forward( method generate (line 4062) | def generate( method _reorder_cache (line 4267) | def _reorder_cache(past_key_values, beam_idx): method prepare_inputs_for_generation (line 4277) | def prepare_inputs_for_generation( class SeamlessM4Tv2Model (line 4309) | class SeamlessM4Tv2Model(SeamlessM4Tv2PreTrainedModel): method __init__ (line 4317) | def __init__(self, config, current_modality="text"): method set_modality (line 4339) | def set_modality(self, modality="text"): method get_encoder (line 4350) | def get_encoder(self): method get_output_embeddings (line 4357) | def get_output_embeddings(self): method set_output_embeddings (line 4361) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 4365) | def get_input_embeddings(self): method set_input_embeddings (line 4369) | def set_input_embeddings(self, value): method _tie_weights (line 4375) | def _tie_weights(self): method forward (line 4383) | def forward( method generate (line 4525) | def generate( method prepare_inputs_for_generation (line 4778) | def prepare_inputs_for_generation( method _reorder_cache (line 4802) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/segformer/configuration_segformer.py class SegformerConfig (line 31) | class SegformerConfig(PretrainedConfig): method __init__ (line 99) | def __init__( class SegformerOnnxConfig (line 151) | class SegformerOnnxConfig(OnnxConfig): method inputs (line 155) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 163) | def atol_for_validation(self) -> float: method default_onnx_opset (line 167) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/segformer/convert_segformer_original_to_pytorch.py function rename_keys (line 40) | def rename_keys(state_dict, encoder_only=False): function read_in_k_v (line 91) | def read_in_k_v(state_dict, config): function prepare_img (line 112) | def prepare_img(): function convert_segformer_checkpoint (line 120) | def convert_segformer_checkpoint(model_name, checkpoint_path, pytorch_du... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/segformer/image_processing_segformer.py class SegformerImageProcessor (line 57) | class SegformerImageProcessor(BaseImageProcessor): method __init__ (line 97) | def __init__( method from_dict (line 124) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method resize (line 134) | def resize( method reduce_label (line 183) | def reduce_label(self, label: ImageInput) -> np.ndarray: method _preprocess (line 191) | def _preprocess( method _preprocess_image (line 219) | def _preprocess_image( method _preprocess_mask (line 260) | def _preprocess_mask( method __call__ (line 296) | def __call__(self, images, segmentation_maps=None, **kwargs): method preprocess (line 307) | def preprocess( method post_process_semantic_segmentation (line 438) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: mplsandbox_for_rl/transformers/src/transformers/models/segformer/modeling_segformer.py class SegFormerImageClassifierOutput (line 54) | class SegFormerImageClassifierOutput(ImageClassifierOutput): function drop_path (line 82) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class SegformerDropPath (line 103) | class SegformerDropPath(nn.Module): method __init__ (line 106) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 110) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 113) | def extra_repr(self) -> str: class SegformerOverlapPatchEmbeddings (line 117) | class SegformerOverlapPatchEmbeddings(nn.Module): method __init__ (line 120) | def __init__(self, patch_size, stride, num_channels, hidden_size): method forward (line 132) | def forward(self, pixel_values): class SegformerEfficientSelfAttention (line 142) | class SegformerEfficientSelfAttention(nn.Module): method __init__ (line 146) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method transpose_for_scores (line 173) | def transpose_for_scores(self, hidden_states): method forward (line 178) | def forward( class SegformerSelfOutput (line 223) | class SegformerSelfOutput(nn.Module): method __init__ (line 224) | def __init__(self, config, hidden_size): method forward (line 229) | def forward(self, hidden_states, input_tensor): class SegformerAttention (line 235) | class SegformerAttention(nn.Module): method __init__ (line 236) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method prune_heads (line 247) | def prune_heads(self, heads): method forward (line 265) | def forward(self, hidden_states, height, width, output_attentions=False): class SegformerDWConv (line 273) | class SegformerDWConv(nn.Module): method __init__ (line 274) | def __init__(self, dim=768): method forward (line 278) | def forward(self, hidden_states, height, width): class SegformerMixFFN (line 287) | class SegformerMixFFN(nn.Module): method __init__ (line 288) | def __init__(self, config, in_features, hidden_features=None, out_feat... method forward (line 300) | def forward(self, hidden_states, height, width): class SegformerLayer (line 310) | class SegformerLayer(nn.Module): method __init__ (line 313) | def __init__(self, config, hidden_size, num_attention_heads, drop_path... method forward (line 327) | def forward(self, hidden_states, height, width, output_attentions=False): class SegformerEncoder (line 353) | class SegformerEncoder(nn.Module): method __init__ (line 354) | def __init__(self, config): method forward (line 402) | def forward( class SegformerPreTrainedModel (line 444) | class SegformerPreTrainedModel(PreTrainedModel): method _init_weights (line 454) | def _init_weights(self, module): class SegformerModel (line 504) | class SegformerModel(SegformerPreTrainedModel): method __init__ (line 505) | def __init__(self, config): method _prune_heads (line 515) | def _prune_heads(self, heads_to_prune): method forward (line 531) | def forward( class SegformerForImageClassification (line 569) | class SegformerForImageClassification(SegformerPreTrainedModel): method __init__ (line 570) | def __init__(self, config): method forward (line 589) | def forward( class SegformerMLP (line 660) | class SegformerMLP(nn.Module): method __init__ (line 665) | def __init__(self, config: SegformerConfig, input_dim): method forward (line 669) | def forward(self, hidden_states: torch.Tensor): class SegformerDecodeHead (line 675) | class SegformerDecodeHead(SegformerPreTrainedModel): method __init__ (line 676) | def __init__(self, config): method forward (line 700) | def forward(self, encoder_hidden_states: torch.FloatTensor) -> torch.T... class SegformerForSemanticSegmentation (line 737) | class SegformerForSemanticSegmentation(SegformerPreTrainedModel): method __init__ (line 738) | def __init__(self, config): method forward (line 748) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/segformer/modeling_tf_segformer.py class TFSegformerDropPath (line 59) | class TFSegformerDropPath(keras.layers.Layer): method __init__ (line 65) | def __init__(self, drop_path: float, **kwargs): method call (line 69) | def call(self, x: tf.Tensor, training=None): class TFSegformerOverlapPatchEmbeddings (line 79) | class TFSegformerOverlapPatchEmbeddings(keras.layers.Layer): method __init__ (line 82) | def __init__(self, patch_size, stride, num_channels, hidden_size, **kw... method call (line 93) | def call(self, pixel_values: tf.Tensor) -> Tuple[tf.Tensor, int, int]: method build (line 104) | def build(self, input_shape=None): class TFSegformerEfficientSelfAttention (line 116) | class TFSegformerEfficientSelfAttention(keras.layers.Layer): method __init__ (line 120) | def __init__( method transpose_for_scores (line 155) | def transpose_for_scores(self, tensor: tf.Tensor) -> tf.Tensor: method call (line 165) | def call( method build (line 212) | def build(self, input_shape=None): class TFSegformerSelfOutput (line 233) | class TFSegformerSelfOutput(keras.layers.Layer): method __init__ (line 234) | def __init__(self, config: SegformerConfig, hidden_size: int, **kwargs): method call (line 240) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 245) | def build(self, input_shape=None): class TFSegformerAttention (line 254) | class TFSegformerAttention(keras.layers.Layer): method __init__ (line 255) | def __init__( method call (line 273) | def call( method build (line 282) | def build(self, input_shape=None): class TFSegformerDWConv (line 294) | class TFSegformerDWConv(keras.layers.Layer): method __init__ (line 295) | def __init__(self, dim: int = 768, **kwargs): method call (line 302) | def call(self, hidden_states: tf.Tensor, height: int, width: int) -> t... method build (line 314) | def build(self, input_shape=None): class TFSegformerMixFFN (line 323) | class TFSegformerMixFFN(keras.layers.Layer): method __init__ (line 324) | def __init__( method call (line 345) | def call(self, hidden_states: tf.Tensor, height: int, width: int, trai... method build (line 354) | def build(self, input_shape=None): class TFSegformerLayer (line 369) | class TFSegformerLayer(keras.layers.Layer): method __init__ (line 372) | def __init__( method call (line 397) | def call( method build (line 429) | def build(self, input_shape=None): class TFSegformerEncoder (line 447) | class TFSegformerEncoder(keras.layers.Layer): method __init__ (line 448) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 499) | def call( method build (line 549) | def build(self, input_shape=None): class TFSegformerMainLayer (line 569) | class TFSegformerMainLayer(keras.layers.Layer): method __init__ (line 572) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 580) | def call( method build (line 627) | def build(self, input_shape=None): class TFSegformerPreTrainedModel (line 636) | class TFSegformerPreTrainedModel(TFPreTrainedModel): method input_signature (line 647) | def input_signature(self): class TFSegformerModel (line 697) | class TFSegformerModel(TFSegformerPreTrainedModel): method __init__ (line 698) | def __init__(self, config: SegformerConfig, *inputs, **kwargs): method call (line 714) | def call( method build (line 731) | def build(self, input_shape=None): class TFSegformerForImageClassification (line 747) | class TFSegformerForImageClassification(TFSegformerPreTrainedModel, TFSe... method __init__ (line 748) | def __init__(self, config: SegformerConfig, *inputs, **kwargs): method call (line 766) | def call( method build (line 803) | def build(self, input_shape=None): class TFSegformerMLP (line 815) | class TFSegformerMLP(keras.layers.Layer): method __init__ (line 820) | def __init__(self, input_dim: int, config: SegformerConfig, **kwargs): method call (line 825) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 833) | def build(self, input_shape=None): class TFSegformerDecodeHead (line 842) | class TFSegformerDecodeHead(TFSegformerPreTrainedModel): method __init__ (line 843) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 864) | def call(self, encoder_hidden_states: tf.Tensor, training: bool = Fals... method build (line 896) | def build(self, input_shape=None): class TFSegformerForSemanticSegmentation (line 921) | class TFSegformerForSemanticSegmentation(TFSegformerPreTrainedModel): method __init__ (line 922) | def __init__(self, config: SegformerConfig, **kwargs): method hf_compute_loss (line 927) | def hf_compute_loss(self, logits, labels): method call (line 950) | def call( method build (line 1027) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/seggpt/configuration_seggpt.py class SegGptConfig (line 24) | class SegGptConfig(PretrainedConfig): method __init__ (line 93) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/seggpt/convert_seggpt_to_hf.py function create_rename_keys (line 35) | def create_rename_keys(config): function rename_key (line 86) | def rename_key(dct, old, new): function prepare_input (line 92) | def prepare_input(): function convert_seggpt_checkpoint (line 111) | def convert_seggpt_checkpoint(args): FILE: mplsandbox_for_rl/transformers/src/transformers/models/seggpt/image_processing_seggpt.py function build_palette (line 50) | def build_palette(num_labels: int) -> List[Tuple[int, int]]: function mask_to_rgb (line 70) | def mask_to_rgb( class SegGptImageProcessor (line 98) | class SegGptImageProcessor(BaseImageProcessor): method __init__ (line 134) | def __init__( method get_palette (line 160) | def get_palette(self, num_labels: int) -> List[Tuple[int, int]]: method mask_to_rgb (line 172) | def mask_to_rgb( method resize (line 198) | def resize( method _preprocess_step (line 246) | def _preprocess_step( method preprocess (line 391) | def preprocess( method post_process_semantic_segmentation (line 542) | def post_process_semantic_segmentation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/seggpt/modeling_seggpt.py class SegGptEncoderOutput (line 50) | class SegGptEncoderOutput(ModelOutput): class SegGptImageSegmentationOutput (line 75) | class SegGptImageSegmentationOutput(ModelOutput): class SegGptPatchEmbeddings (line 99) | class SegGptPatchEmbeddings(nn.Module): method __init__ (line 106) | def __init__(self, config): method forward (line 120) | def forward(self, pixel_values): class SegGptEmbeddings (line 134) | class SegGptEmbeddings(nn.Module): method __init__ (line 139) | def __init__(self, config: SegGptConfig) -> None: method interpolate_pos_encoding (line 155) | def interpolate_pos_encoding(self, height: int, width: int) -> torch.T... method forward (line 172) | def forward( class SegGptAttention (line 218) | class SegGptAttention(nn.Module): method __init__ (line 221) | def __init__(self, config): method get_rel_pos (line 245) | def get_rel_pos(self, q_size: int, k_size: int, rel_pos: torch.Tensor)... method add_decomposed_rel_pos (line 277) | def add_decomposed_rel_pos( method forward (line 322) | def forward(self, hidden_states: torch.Tensor, output_attentions=False... class SegGptMlp (line 361) | class SegGptMlp(nn.Module): method __init__ (line 362) | def __init__(self, config): method forward (line 368) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: function drop_path (line 376) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class SegGptDropPath (line 397) | class SegGptDropPath(nn.Module): method __init__ (line 400) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 404) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 407) | def extra_repr(self) -> str: class SegGptLayer (line 411) | class SegGptLayer(nn.Module): method __init__ (line 412) | def __init__(self, config: SegGptConfig, drop_path_rate: float) -> None: method forward (line 420) | def forward( class SegGptEncoder (line 458) | class SegGptEncoder(nn.Module): method __init__ (line 459) | def __init__(self, config: SegGptConfig) -> None: method forward (line 467) | def forward( class SegGptLayerNorm (line 528) | class SegGptLayerNorm(nn.Module): method __init__ (line 534) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 544) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SegGptDecoderHead (line 558) | class SegGptDecoderHead(nn.Module): method __init__ (line 559) | def __init__(self, config): method forward (line 573) | def forward(self, hidden_states: torch.FloatTensor): class SegGptDecoder (line 582) | class SegGptDecoder(nn.Module): method __init__ (line 583) | def __init__(self, config): method _reshape_hidden_states (line 595) | def _reshape_hidden_states(self, hidden_states: torch.FloatTensor) -> ... method forward (line 607) | def forward(self, hidden_states: torch.FloatTensor): class SegGptPreTrainedModel (line 615) | class SegGptPreTrainedModel(PreTrainedModel): method _init_weights (line 627) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class SegGptModel (line 720) | class SegGptModel(SegGptPreTrainedModel): method __init__ (line 721) | def __init__(self, config: SegGptConfig): method get_input_embeddings (line 731) | def get_input_embeddings(self) -> SegGptPatchEmbeddings: method _prune_heads (line 734) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 744) | def forward( function patchify (line 838) | def patchify(tensor: torch.Tensor, patch_size: int) -> torch.Tensor: function unpatchify (line 850) | def unpatchify(tensor: torch.Tensor, patch_height: int, patch_width: int... class SegGptLoss (line 865) | class SegGptLoss(nn.Module): method __init__ (line 866) | def __init__(self, config): method forward (line 871) | def forward( class SegGptForImageSegmentation (line 911) | class SegGptForImageSegmentation(SegGptPreTrainedModel): method __init__ (line 912) | def __init__(self, config: SegGptConfig): method forward (line 924) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/sew/configuration_sew.py class SEWConfig (line 27) | class SEWConfig(PretrainedConfig): method __init__ (line 155) | def __init__( method inputs_to_logits_ratio (line 252) | def inputs_to_logits_ratio(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/sew/convert_sew_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 61) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 89) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 133) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_config (line 173) | def convert_config(model, is_finetuned): function convert_sew_checkpoint (line 223) | def convert_sew_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/sew/modeling_sew.py function _compute_mask_indices (line 71) | def _compute_mask_indices( class SEWNoLayerNormConvLayer (line 191) | class SEWNoLayerNormConvLayer(nn.Module): method __init__ (line 192) | def __init__(self, config, layer_id=0): method forward (line 206) | def forward(self, hidden_states): class SEWLayerNormConvLayer (line 213) | class SEWLayerNormConvLayer(nn.Module): method __init__ (line 214) | def __init__(self, config, layer_id=0): method forward (line 229) | def forward(self, hidden_states): class SEWGroupNormConvLayer (line 241) | class SEWGroupNormConvLayer(nn.Module): method __init__ (line 242) | def __init__(self, config, layer_id=0): method forward (line 258) | def forward(self, hidden_states): class SEWPositionalConvEmbedding (line 265) | class SEWPositionalConvEmbedding(nn.Module): method __init__ (line 266) | def __init__(self, config): method forward (line 296) | def forward(self, hidden_states): class SEWSamePadLayer (line 305) | class SEWSamePadLayer(nn.Module): method __init__ (line 306) | def __init__(self, num_conv_pos_embeddings): method forward (line 310) | def forward(self, hidden_states): class SEWUpsampling (line 316) | class SEWUpsampling(nn.Module): method __init__ (line 317) | def __init__(self, config): method forward (line 323) | def forward(self, hidden_states): class SEWFeatureEncoder (line 339) | class SEWFeatureEncoder(nn.Module): method __init__ (line 342) | def __init__(self, config): method _freeze_parameters (line 359) | def _freeze_parameters(self): method forward (line 364) | def forward(self, input_values): class SEWFeatureExtractor (line 383) | class SEWFeatureExtractor(SEWFeatureEncoder): method __init__ (line 384) | def __init__(self, config): class SEWAttention (line 395) | class SEWAttention(nn.Module): method __init__ (line 398) | def __init__( method _shape (line 429) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 432) | def forward( class SEWFlashAttention2 (line 554) | class SEWFlashAttention2(SEWAttention): method __init__ (line 562) | def __init__(self, *args, **kwargs): method _reshape (line 570) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 573) | def forward( class SEWSdpaAttention (line 681) | class SEWSdpaAttention(SEWAttention): method forward (line 683) | def forward( class SEWFeedForward (line 796) | class SEWFeedForward(nn.Module): method __init__ (line 797) | def __init__(self, config): method forward (line 810) | def forward(self, hidden_states): class SEWEncoderLayer (line 821) | class SEWEncoderLayer(nn.Module): method __init__ (line 822) | def __init__(self, config): method forward (line 836) | def forward(self, hidden_states, attention_mask=None, output_attention... class SEWEncoder (line 856) | class SEWEncoder(nn.Module): method __init__ (line 857) | def __init__(self, config): method forward (line 869) | def forward( class SEWPreTrainedModel (line 967) | class SEWPreTrainedModel(PreTrainedModel): method _init_weights (line 980) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1012) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1027) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... class SEWModel (line 1090) | class SEWModel(SEWPreTrainedModel): method __init__ (line 1091) | def __init__(self, config: SEWConfig): method _mask_hidden_states (line 1111) | def _mask_hidden_states( method forward (line 1165) | def forward( class SEWForCTC (line 1219) | class SEWForCTC(SEWPreTrainedModel): method __init__ (line 1220) | def __init__(self, config, target_lang: Optional[str] = None): method tie_weights (line 1243) | def tie_weights(self): method freeze_feature_extractor (line 1264) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1276) | def freeze_feature_encoder(self): method freeze_base_model (line 1283) | def freeze_base_model(self): method forward (line 1299) | def forward( class SEWForSequenceClassification (line 1378) | class SEWForSequenceClassification(SEWPreTrainedModel): method __init__ (line 1379) | def __init__(self, config): method freeze_feature_extractor (line 1396) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1408) | def freeze_feature_encoder(self): method freeze_base_model (line 1415) | def freeze_base_model(self): method forward (line 1432) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/sew_d/configuration_sew_d.py class SEWDConfig (line 27) | class SEWDConfig(PretrainedConfig): method __init__ (line 170) | def __init__( method inputs_to_logits_ratio (line 279) | def inputs_to_logits_ratio(self): method to_dict (line 282) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/sew_d/convert_sew_d_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 63) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 91) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 137) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_config (line 177) | def convert_config(model, is_finetuned): function convert_sew_checkpoint (line 235) | def convert_sew_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/sew_d/modeling_sew_d.py function _compute_mask_indices (line 60) | def _compute_mask_indices( function make_log_bucket_position (line 180) | def make_log_bucket_position(relative_pos, bucket_size, max_position): function build_relative_position (line 196) | def build_relative_position(query_size, key_size, bucket_size=-1, max_po... function c2p_dynamic_expand (line 228) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 234) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 240) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): function get_mask (line 245) | def get_mask(input, local_context): class SEWDNoLayerNormConvLayer (line 265) | class SEWDNoLayerNormConvLayer(nn.Module): method __init__ (line 266) | def __init__(self, config, layer_id=0): method forward (line 280) | def forward(self, hidden_states): class SEWDLayerNormConvLayer (line 287) | class SEWDLayerNormConvLayer(nn.Module): method __init__ (line 288) | def __init__(self, config, layer_id=0): method forward (line 303) | def forward(self, hidden_states): class SEWDGroupNormConvLayer (line 315) | class SEWDGroupNormConvLayer(nn.Module): method __init__ (line 316) | def __init__(self, config, layer_id=0): method forward (line 332) | def forward(self, hidden_states): class SEWDPositionalConvEmbedding (line 340) | class SEWDPositionalConvEmbedding(nn.Module): method __init__ (line 341) | def __init__(self, config): method forward (line 371) | def forward(self, hidden_states): class SEWDSamePadLayer (line 380) | class SEWDSamePadLayer(nn.Module): method __init__ (line 381) | def __init__(self, num_conv_pos_embeddings): method forward (line 385) | def forward(self, hidden_states): class SEWDUpsampling (line 392) | class SEWDUpsampling(nn.Module): method __init__ (line 393) | def __init__(self, config): method forward (line 399) | def forward(self, hidden_states): class SEWDFeatureEncoder (line 415) | class SEWDFeatureEncoder(nn.Module): method __init__ (line 418) | def __init__(self, config): method _freeze_parameters (line 435) | def _freeze_parameters(self): method forward (line 440) | def forward(self, input_values): class SEWDFeatureExtractor (line 459) | class SEWDFeatureExtractor(SEWDFeatureEncoder): method __init__ (line 460) | def __init__(self, config): class ContextPooler (line 471) | class ContextPooler(nn.Module): method __init__ (line 472) | def __init__(self, config): method forward (line 478) | def forward(self, hidden_states): method output_dim (line 489) | def output_dim(self): class XSoftmax (line 494) | class XSoftmax(torch.autograd.Function): method forward (line 523) | def forward(ctx, input, mask, dim): method backward (line 534) | def backward(ctx, grad_output): method symbolic (line 540) | def symbolic(g, self, mask, dim): class DropoutContext (line 558) | class DropoutContext: method __init__ (line 559) | def __init__(self): class XDropout (line 567) | class XDropout(torch.autograd.Function): method forward (line 571) | def forward(ctx, input, local_ctx): method backward (line 581) | def backward(ctx, grad_output): method symbolic (line 589) | def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Unio... class StableDropout (line 607) | class StableDropout(nn.Module): method __init__ (line 615) | def __init__(self, drop_prob): method forward (line 621) | def forward(self, x): method clear_context (line 632) | def clear_context(self): method init_context (line 636) | def init_context(self, reuse_mask=True, scale=1): method get_context (line 644) | def get_context(self): class SEWDSelfOutput (line 657) | class SEWDSelfOutput(nn.Module): method __init__ (line 658) | def __init__(self, config): method forward (line 664) | def forward(self, hidden_states, input_tensor): class DisentangledSelfAttention (line 672) | class DisentangledSelfAttention(nn.Module): method __init__ (line 683) | def __init__(self, config): method transpose_for_scores (line 721) | def transpose_for_scores(self, x, attention_heads): method forward (line 726) | def forward( method disentangled_attention_bias (line 810) | def disentangled_attention_bias(self, query_layer, key_layer, relative... class SEWDAttention (line 890) | class SEWDAttention(nn.Module): method __init__ (line 891) | def __init__(self, config): method forward (line 897) | def forward( class SEWDIntermediate (line 927) | class SEWDIntermediate(nn.Module): method __init__ (line 928) | def __init__(self, config): method forward (line 936) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SEWDOutput (line 943) | class SEWDOutput(nn.Module): method __init__ (line 944) | def __init__(self, config): method forward (line 951) | def forward(self, hidden_states, input_tensor): class SEWDLayer (line 959) | class SEWDLayer(nn.Module): method __init__ (line 960) | def __init__(self, config): method forward (line 966) | def forward( class ConvLayer (line 994) | class ConvLayer(nn.Module): method __init__ (line 995) | def __init__(self, config): method forward (line 1007) | def forward(self, hidden_states, residual_states, input_mask): class SEWDTransformerEncoder (line 1031) | class SEWDTransformerEncoder(nn.Module): method __init__ (line 1034) | def __init__(self, config): method get_rel_embedding (line 1061) | def get_rel_embedding(self): method get_attention_mask (line 1067) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 1076) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method forward (line 1088) | def forward( class SEWDEncoder (line 1164) | class SEWDEncoder(nn.Module): method __init__ (line 1165) | def __init__(self, config): method forward (line 1174) | def forward( class SEWDPreTrainedModel (line 1227) | class SEWDPreTrainedModel(PreTrainedModel): method _init_weights (line 1238) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1274) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1289) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... class SEWDModel (line 1353) | class SEWDModel(SEWDPreTrainedModel): method __init__ (line 1354) | def __init__(self, config: SEWDConfig): method _mask_hidden_states (line 1374) | def _mask_hidden_states( method forward (line 1428) | def forward( class SEWDForCTC (line 1482) | class SEWDForCTC(SEWDPreTrainedModel): method __init__ (line 1483) | def __init__(self, config, target_lang: Optional[str] = None): method tie_weights (line 1506) | def tie_weights(self): method freeze_feature_extractor (line 1527) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1539) | def freeze_feature_encoder(self): method freeze_base_model (line 1546) | def freeze_base_model(self): method forward (line 1562) | def forward( class SEWDForSequenceClassification (line 1641) | class SEWDForSequenceClassification(SEWDPreTrainedModel): method __init__ (line 1642) | def __init__(self, config): method freeze_feature_extractor (line 1659) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1671) | def freeze_feature_encoder(self): method freeze_base_model (line 1678) | def freeze_base_model(self): method forward (line 1695) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/siglip/configuration_siglip.py class SiglipTextConfig (line 27) | class SiglipTextConfig(PretrainedConfig): method __init__ (line 83) | def __init__( method from_pretrained (line 114) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class SiglipVisionConfig (line 132) | class SiglipVisionConfig(PretrainedConfig): method __init__ (line 182) | def __init__( method from_pretrained (line 210) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class SiglipConfig (line 228) | class SiglipConfig(PretrainedConfig): method __init__ (line 272) | def __init__(self, text_config=None, vision_config=None, **kwargs): method from_text_vision_configs (line 289) | def from_text_vision_configs(cls, text_config: SiglipTextConfig, visio... FILE: mplsandbox_for_rl/transformers/src/transformers/models/siglip/convert_siglip_to_hf.py function get_siglip_config (line 66) | def get_siglip_config(model_name): function create_rename_keys (line 104) | def create_rename_keys(config): function rename_key (line 181) | def rename_key(dct, old, new, config): function read_in_q_k_v_head (line 205) | def read_in_q_k_v_head(state_dict, config): function prepare_img (line 236) | def prepare_img(): function flatten_nested_dict (line 242) | def flatten_nested_dict(params, parent_key="", sep="/"): function convert_siglip_checkpoint (line 256) | def convert_siglip_checkpoint(model_name, pytorch_dump_folder_path, veri... FILE: mplsandbox_for_rl/transformers/src/transformers/models/siglip/image_processing_siglip.py class SiglipImageProcessor (line 48) | class SiglipImageProcessor(BaseImageProcessor): method __init__ (line 82) | def __init__( method preprocess (line 111) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/siglip/modeling_siglip.py function _trunc_normal_ (line 56) | def _trunc_normal_(tensor, mean, std, a, b): function trunc_normal_tf_ (line 92) | def trunc_normal_tf_( function variance_scaling_ (line 118) | def variance_scaling_(tensor, scale=1.0, mode="fan_in", distribution="no... function lecun_normal_ (line 143) | def lecun_normal_(tensor): function default_flax_embed_init (line 147) | def default_flax_embed_init(tensor): class SiglipVisionModelOutput (line 153) | class SiglipVisionModelOutput(ModelOutput): class SiglipTextModelOutput (line 183) | class SiglipTextModelOutput(ModelOutput): class SiglipOutput (line 213) | class SiglipOutput(ModelOutput): method to_tuple (line 242) | def to_tuple(self) -> Tuple[Any]: class SiglipVisionEmbeddings (line 249) | class SiglipVisionEmbeddings(nn.Module): method __init__ (line 250) | def __init__(self, config: SiglipVisionConfig): method interpolate_pos_encoding (line 270) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 308) | def forward(self, pixel_values: torch.FloatTensor, interpolate_pos_enc... class SiglipTextEmbeddings (line 321) | class SiglipTextEmbeddings(nn.Module): method __init__ (line 322) | def __init__(self, config: SiglipTextConfig): method forward (line 334) | def forward( class SiglipAttention (line 354) | class SiglipAttention(nn.Module): method __init__ (line 358) | def __init__(self, config): method forward (line 377) | def forward( class SiglipFlashAttention2 (line 430) | class SiglipFlashAttention2(SiglipAttention): method __init__ (line 440) | def __init__(self, *args, **kwargs): method forward (line 449) | def forward( class SiglipSdpaAttention (line 524) | class SiglipSdpaAttention(SiglipAttention): method forward (line 534) | def forward( class SiglipMLP (line 598) | class SiglipMLP(nn.Module): method __init__ (line 599) | def __init__(self, config): method forward (line 606) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SiglipEncoderLayer (line 613) | class SiglipEncoderLayer(nn.Module): method __init__ (line 614) | def __init__(self, config: SiglipConfig): method forward (line 623) | def forward( class SiglipPreTrainedModel (line 662) | class SiglipPreTrainedModel(PreTrainedModel): method _init_weights (line 681) | def _init_weights(self, module): class SiglipEncoder (line 833) | class SiglipEncoder(nn.Module): method __init__ (line 842) | def __init__(self, config: SiglipConfig): method forward (line 849) | def forward( class SiglipTextTransformer (line 921) | class SiglipTextTransformer(nn.Module): method __init__ (line 922) | def __init__(self, config: SiglipTextConfig): method forward (line 935) | def forward( class SiglipTextModel (line 998) | class SiglipTextModel(SiglipPreTrainedModel): method __init__ (line 1001) | def __init__(self, config: SiglipTextConfig): method get_input_embeddings (line 1007) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1010) | def set_input_embeddings(self, value): method forward (line 1015) | def forward( class SiglipVisionTransformer (line 1054) | class SiglipVisionTransformer(nn.Module): method __init__ (line 1055) | def __init__(self, config: SiglipVisionConfig): method forward (line 1069) | def forward( class SiglipMultiheadAttentionPoolingHead (line 1111) | class SiglipMultiheadAttentionPoolingHead(nn.Module): method __init__ (line 1114) | def __init__(self, config: SiglipVisionConfig): method forward (line 1122) | def forward(self, hidden_state): class SiglipVisionModel (line 1139) | class SiglipVisionModel(SiglipPreTrainedModel): method __init__ (line 1143) | def __init__(self, config: SiglipVisionConfig): method get_input_embeddings (line 1151) | def get_input_embeddings(self) -> nn.Module: method forward (line 1156) | def forward( class SiglipModel (line 1198) | class SiglipModel(SiglipPreTrainedModel): method __init__ (line 1201) | def __init__(self, config: SiglipConfig): method get_text_features (line 1234) | def get_text_features( method get_image_features (line 1283) | def get_image_features( method forward (line 1336) | def forward( class SiglipForImageClassification (line 1446) | class SiglipForImageClassification(SiglipPreTrainedModel): method __init__ (line 1449) | def __init__(self, config: SiglipConfig) -> None: method forward (line 1471) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/siglip/processing_siglip.py class SiglipProcessor (line 28) | class SiglipProcessor(ProcessorMixin): method __init__ (line 46) | def __init__(self, image_processor, tokenizer): method __call__ (line 49) | def __call__( method decode (line 123) | def decode(self, *args, **kwargs): method batch_decode (line 130) | def batch_decode(self, *args, **kwargs): method model_input_names (line 139) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/siglip/tokenization_siglip.py class SiglipTokenizer (line 44) | class SiglipTokenizer(PreTrainedTokenizer): method __init__ (line 88) | def __init__( method get_spm_processor (line 137) | def get_spm_processor(self): method vocab_size (line 152) | def vocab_size(self): method get_vocab (line 156) | def get_vocab(self): method get_special_tokens_mask (line 162) | def get_special_tokens_mask( method _add_eos_if_not_present (line 191) | def _add_eos_if_not_present(self, token_ids: List[int]) -> List[int]: method create_token_type_ids_from_sequences (line 203) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 226) | def build_inputs_with_special_tokens( method __getstate__ (line 253) | def __getstate__(self): method __setstate__ (line 259) | def __setstate__(self, d): method remove_punctuation (line 269) | def remove_punctuation(self, text: str) -> str: method canonicalize_text (line 273) | def canonicalize_text(self, text, *, keep_punctuation_exact_string=None): method tokenize (line 294) | def tokenize(self, text: "TextInput", add_special_tokens=False, **kwar... method unk_token_length (line 306) | def unk_token_length(self): method _tokenize (line 309) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 330) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 335) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 340) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 360) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/speech_encoder_decoder/configuration_speech_encoder_decoder.py class SpeechEncoderDecoderConfig (line 26) | class SpeechEncoderDecoderConfig(PretrainedConfig): method __init__ (line 76) | def __init__(self, **kwargs): method from_encoder_decoder_configs (line 94) | def from_encoder_decoder_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/models/speech_encoder_decoder/convert_mbart_wav2vec2_seq2seq_original_to_pytorch.py function set_recursively (line 68) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights_wav2vec2 (line 96) | def recursively_load_weights_wav2vec2(fairseq_model, hf_model): function load_conv_layer (line 142) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function load_adapter (line 182) | def load_adapter(full_name, value, adapter, unused_weights): function make_linear_from_emb (line 236) | def make_linear_from_emb(emb): function convert_wav2vec2_checkpoint (line 244) | def convert_wav2vec2_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/speech_encoder_decoder/convert_speech_to_text_wav2vec2_seq2seq_original_to_pytorch.py function set_recursively (line 70) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights_wav2vec2 (line 98) | def recursively_load_weights_wav2vec2(fairseq_model, hf_model): function load_conv_layer (line 148) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function make_linear_from_emb (line 188) | def make_linear_from_emb(emb): function create_vocab_dict (line 195) | def create_vocab_dict(dict_path): function convert_wav2vec2_checkpoint (line 214) | def convert_wav2vec2_checkpoint( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/speech_encoder_decoder/modeling_speech_encoder_decoder.py function shift_tokens_right (line 153) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class SpeechEncoderDecoderModel (line 172) | class SpeechEncoderDecoderModel(PreTrainedModel): method __init__ (line 186) | def __init__( method get_encoder (line 253) | def get_encoder(self): method get_decoder (line 256) | def get_decoder(self): method get_output_embeddings (line 259) | def get_output_embeddings(self): method set_output_embeddings (line 262) | def set_output_embeddings(self, new_embeddings): method freeze_feature_encoder (line 265) | def freeze_feature_encoder(self): method from_pretrained (line 273) | def from_pretrained(cls, *args, **kwargs): method from_encoder_decoder_pretrained (line 284) | def from_encoder_decoder_pretrained( method forward (line 436) | def forward( method prepare_decoder_input_ids_from_labels (line 574) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method prepare_inputs_for_generation (line 577) | def prepare_inputs_for_generation( method resize_token_embeddings (line 592) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 598) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/speech_to_text/configuration_speech_to_text.py class Speech2TextConfig (line 24) | class Speech2TextConfig(PretrainedConfig): method __init__ (line 122) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/speech_to_text/feature_extraction_speech_to_text.py class Speech2TextFeatureExtractor (line 36) | class Speech2TextFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 65) | def __init__( method _extract_fbank_features (line 98) | def _extract_fbank_features( method utterance_cmvn (line 130) | def utterance_cmvn( method normalize (line 153) | def normalize( method __call__ (line 162) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/speech_to_text/modeling_speech_to_text.py function shift_tokens_right (line 48) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class Conv1dSubsampler (line 64) | class Conv1dSubsampler(nn.Module): method __init__ (line 70) | def __init__(self, config): method forward (line 90) | def forward(self, input_features): class Speech2TextSinusoidalPositionalEmbedding (line 99) | class Speech2TextSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 102) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 109) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 120) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 138) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 152) | def create_position_ids_from_input_ids( class Speech2TextAttention (line 170) | class Speech2TextAttention(nn.Module): method __init__ (line 173) | def __init__( method _shape (line 204) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 207) | def forward( class Speech2TextEncoderLayer (line 332) | class Speech2TextEncoderLayer(nn.Module): method __init__ (line 333) | def __init__(self, config: Speech2TextConfig): method forward (line 351) | def forward( class Speech2TextDecoderLayer (line 403) | class Speech2TextDecoderLayer(nn.Module): method __init__ (line 404) | def __init__(self, config: Speech2TextConfig): method forward (line 433) | def forward( class Speech2TextPreTrainedModel (line 523) | class Speech2TextPreTrainedModel(PreTrainedModel): method _init_weights (line 529) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 540) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... method _get_feature_vector_attention_mask (line 549) | def _get_feature_vector_attention_mask(self, feature_vector_length, at... class Speech2TextEncoder (line 670) | class Speech2TextEncoder(Speech2TextPreTrainedModel): method __init__ (line 680) | def __init__(self, config: Speech2TextConfig): method forward (line 705) | def forward( class Speech2TextDecoder (line 825) | class Speech2TextDecoder(Speech2TextPreTrainedModel): method __init__ (line 834) | def __init__(self, config: Speech2TextConfig): method get_input_embeddings (line 858) | def get_input_embeddings(self): method set_input_embeddings (line 861) | def set_input_embeddings(self, value): method forward (line 864) | def forward( class Speech2TextModel (line 1079) | class Speech2TextModel(Speech2TextPreTrainedModel): method __init__ (line 1080) | def __init__(self, config: Speech2TextConfig): method get_input_embeddings (line 1089) | def get_input_embeddings(self): method set_input_embeddings (line 1092) | def set_input_embeddings(self, value): method get_encoder (line 1095) | def get_encoder(self): method get_decoder (line 1098) | def get_decoder(self): method forward (line 1103) | def forward( class Speech2TextForConditionalGeneration (line 1210) | class Speech2TextForConditionalGeneration(Speech2TextPreTrainedModel): method __init__ (line 1214) | def __init__(self, config: Speech2TextConfig): method get_encoder (line 1222) | def get_encoder(self): method get_decoder (line 1225) | def get_decoder(self): method get_output_embeddings (line 1228) | def get_output_embeddings(self): method set_output_embeddings (line 1231) | def set_output_embeddings(self, new_embeddings): method forward (line 1236) | def forward( method prepare_inputs_for_generation (line 1333) | def prepare_inputs_for_generation( method _reorder_cache (line 1361) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py function shift_tokens_right (line 62) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 87) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 105) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFConv1dSubsampler (line 118) | class TFConv1dSubsampler(keras.layers.Layer): method __init__ (line 124) | def __init__(self, config: Speech2TextConfig, **kwargs): method call (line 143) | def call(self, input_features: tf.Tensor) -> tf.Tensor: method build (line 163) | def build(self, input_shape=None): class TFSpeech2TextSinusoidalPositionalEmbedding (line 173) | class TFSpeech2TextSinusoidalPositionalEmbedding(keras.layers.Layer): method __init__ (line 176) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _get_embedding (line 184) | def _get_embedding(num_embeddings: int, embedding_dim: int, padding_id... method call (line 201) | def call(self, input_ids: tf.Tensor, past_key_values_length: int = 0) ... method create_position_ids_from_input_ids (line 216) | def create_position_ids_from_input_ids( class TFSpeech2TextAttention (line 233) | class TFSpeech2TextAttention(keras.layers.Layer): method __init__ (line 236) | def __init__( method _shape (line 264) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 267) | def call( method build (line 385) | def build(self, input_shape=None): class TFSpeech2TextEncoderLayer (line 403) | class TFSpeech2TextEncoderLayer(keras.layers.Layer): method __init__ (line 404) | def __init__(self, config: Speech2TextConfig, **kwargs): method call (line 419) | def call( method build (line 458) | def build(self, input_shape=None): class TFSpeech2TextDecoderLayer (line 479) | class TFSpeech2TextDecoderLayer(keras.layers.Layer): method __init__ (line 480) | def __init__(self, config: Speech2TextConfig, **kwargs): method call (line 509) | def call( method build (line 591) | def build(self, input_shape=None): class TFSpeech2TextPreTrainedModel (line 618) | class TFSpeech2TextPreTrainedModel(TFPreTrainedModel): method _get_feat_extract_output_lengths (line 624) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method input_signature (line 634) | def input_signature(self): class TFSpeech2TextEncoder (line 774) | class TFSpeech2TextEncoder(keras.layers.Layer): method __init__ (line 784) | def __init__(self, config: Speech2TextConfig, **kwargs): method _get_feat_extract_output_lengths (line 807) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method _get_feature_vector_attention_mask (line 816) | def _get_feature_vector_attention_mask(self, feature_vector_length, at... method call (line 836) | def call( method build (line 941) | def build(self, input_shape=None): class TFSpeech2TextDecoder (line 961) | class TFSpeech2TextDecoder(keras.layers.Layer): method __init__ (line 970) | def __init__(self, config: Speech2TextConfig, **kwargs): method get_embed_tokens (line 992) | def get_embed_tokens(self): method set_embed_tokens (line 995) | def set_embed_tokens(self, embed_tokens): method call (line 999) | def call( method build (line 1181) | def build(self, input_shape=None): class TFSpeech2TextMainLayer (line 1201) | class TFSpeech2TextMainLayer(keras.layers.Layer): method __init__ (line 1204) | def __init__(self, config: Speech2TextConfig, **kwargs): method get_input_embeddings (line 1211) | def get_input_embeddings(self): method set_input_embeddings (line 1214) | def set_input_embeddings(self, new_embeddings): method call (line 1218) | def call( method build (line 1304) | def build(self, input_shape=None): class TFSpeech2TextModel (line 1320) | class TFSpeech2TextModel(TFSpeech2TextPreTrainedModel): method __init__ (line 1321) | def __init__(self, config: Speech2TextConfig, *inputs, **kwargs): method get_encoder (line 1326) | def get_encoder(self): method get_decoder (line 1329) | def get_decoder(self): method call (line 1339) | def call( method serving_output (line 1378) | def serving_output(self, output): method build (line 1397) | def build(self, input_shape=None): class TFSpeech2TextForConditionalGeneration (line 1410) | class TFSpeech2TextForConditionalGeneration(TFSpeech2TextPreTrainedModel... method __init__ (line 1411) | def __init__(self, config: Speech2TextConfig): method get_encoder (line 1419) | def get_encoder(self): method get_decoder (line 1422) | def get_decoder(self): method resize_token_embeddings (line 1425) | def resize_token_embeddings(self, new_num_tokens: int) -> tf.Variable: method get_output_embeddings (line 1429) | def get_output_embeddings(self): method set_output_embeddings (line 1432) | def set_output_embeddings(self, new_embeddings): method call (line 1438) | def call( method serving_output (line 1541) | def serving_output(self, output): method prepare_inputs_for_generation (line 1560) | def prepare_inputs_for_generation( method build (line 1588) | def build(self, input_shape=None): method tf_to_pt_weight_rename (line 1599) | def tf_to_pt_weight_rename(self, tf_weight): FILE: mplsandbox_for_rl/transformers/src/transformers/models/speech_to_text/processing_speech_to_text.py class Speech2TextProcessor (line 25) | class Speech2TextProcessor(ProcessorMixin): method __init__ (line 44) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 49) | def __call__(self, *args, **kwargs): method batch_decode (line 88) | def batch_decode(self, *args, **kwargs): method decode (line 95) | def decode(self, *args, **kwargs): method as_target_processor (line 103) | def as_target_processor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/speech_to_text/tokenization_speech_to_text.py class Speech2TextTokenizer (line 48) | class Speech2TextTokenizer(PreTrainedTokenizer): method __init__ (line 100) | def __init__( method vocab_size (line 156) | def vocab_size(self) -> int: method get_vocab (line 159) | def get_vocab(self) -> Dict: method tgt_lang (line 165) | def tgt_lang(self) -> str: method tgt_lang (line 169) | def tgt_lang(self, new_tgt_lang) -> None: method set_tgt_lang_special_tokens (line 173) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: method _tokenize (line 178) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 181) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 184) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 188) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method build_inputs_with_special_tokens (line 204) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 211) | def get_special_tokens_mask( method __getstate__ (line 241) | def __getstate__(self) -> Dict: method __setstate__ (line 246) | def __setstate__(self, d: Dict) -> None: method save_vocabulary (line 255) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... function load_spm (line 277) | def load_spm(path: str, sp_model_kwargs: Dict[str, Any]) -> sentencepiec... function load_json (line 283) | def load_json(path: str) -> Union[Dict, List]: function save_json (line 288) | def save_json(data, path: str) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/speecht5/configuration_speecht5.py class SpeechT5Config (line 27) | class SpeechT5Config(PretrainedConfig): method __init__ (line 191) | def __init__( method inputs_to_logits_ratio (line 336) | def inputs_to_logits_ratio(self): class SpeechT5HifiGanConfig (line 340) | class SpeechT5HifiGanConfig(PretrainedConfig): method __init__ (line 395) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/speecht5/feature_extraction_speecht5.py class SpeechT5FeatureExtractor (line 31) | class SpeechT5FeatureExtractor(SequenceFeatureExtractor): method __init__ (line 78) | def __init__( method zero_mean_unit_var_norm (line 140) | def zero_mean_unit_var_norm( method _extract_mel_features (line 161) | def _extract_mel_features( method __call__ (line 180) | def __call__( method _process_audio (line 297) | def _process_audio( method to_dict (line 384) | def to_dict(self) -> Dict[str, Any]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/speecht5/modeling_speecht5.py function shift_tokens_right (line 51) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function shift_spectrograms_right (line 67) | def shift_spectrograms_right( function _compute_mask_indices (line 89) | def _compute_mask_indices( class SpeechT5NoLayerNormConvLayer (line 209) | class SpeechT5NoLayerNormConvLayer(nn.Module): method __init__ (line 210) | def __init__(self, config, layer_id=0): method forward (line 224) | def forward(self, hidden_states): class SpeechT5LayerNormConvLayer (line 231) | class SpeechT5LayerNormConvLayer(nn.Module): method __init__ (line 232) | def __init__(self, config, layer_id=0): method forward (line 247) | def forward(self, hidden_states): class SpeechT5GroupNormConvLayer (line 259) | class SpeechT5GroupNormConvLayer(nn.Module): method __init__ (line 260) | def __init__(self, config, layer_id=0): method forward (line 276) | def forward(self, hidden_states): class SpeechT5SinusoidalPositionalEmbedding (line 284) | class SpeechT5SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 287) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 294) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 305) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 323) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 337) | def create_position_ids_from_input_ids( class SpeechT5PositionalConvEmbedding (line 355) | class SpeechT5PositionalConvEmbedding(nn.Module): method __init__ (line 356) | def __init__(self, config): method forward (line 389) | def forward(self, hidden_states): class SpeechT5ScaledPositionalEncoding (line 400) | class SpeechT5ScaledPositionalEncoding(nn.Module): method __init__ (line 405) | def __init__(self, dropout, dim, max_len=5000): method forward (line 418) | def forward(self, emb): class SpeechT5RelativePositionalEncoding (line 424) | class SpeechT5RelativePositionalEncoding(torch.nn.Module): method __init__ (line 425) | def __init__(self, dim, max_length=1000): method forward (line 431) | def forward(self, hidden_states): class SpeechT5SamePadLayer (line 444) | class SpeechT5SamePadLayer(nn.Module): method __init__ (line 445) | def __init__(self, num_conv_pos_embeddings): method forward (line 449) | def forward(self, hidden_states): class SpeechT5FeatureEncoder (line 456) | class SpeechT5FeatureEncoder(nn.Module): method __init__ (line 459) | def __init__(self, config): method _freeze_parameters (line 478) | def _freeze_parameters(self): method forward (line 483) | def forward(self, input_values): class SpeechT5FeatureProjection (line 503) | class SpeechT5FeatureProjection(nn.Module): method __init__ (line 504) | def __init__(self, config): method forward (line 510) | def forward(self, hidden_states): class SpeechT5SpeechEncoderPrenet (line 518) | class SpeechT5SpeechEncoderPrenet(nn.Module): method __init__ (line 519) | def __init__(self, config): method freeze_feature_encoder (line 536) | def freeze_feature_encoder(self): method forward (line 539) | def forward( method _get_feature_vector_attention_mask (line 574) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... method _get_feat_extract_output_lengths (line 590) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _mask_hidden_states (line 606) | def _mask_hidden_states( class SpeechT5SpeechDecoderPrenet (line 653) | class SpeechT5SpeechDecoderPrenet(nn.Module): method __init__ (line 654) | def __init__(self, config): method _consistent_dropout (line 676) | def _consistent_dropout(self, inputs_embeds, p): method forward (line 681) | def forward( class SpeechT5BatchNormConvLayer (line 705) | class SpeechT5BatchNormConvLayer(nn.Module): method __init__ (line 706) | def __init__(self, config, layer_id=0): method forward (line 736) | def forward(self, hidden_states): class SpeechT5SpeechDecoderPostnet (line 745) | class SpeechT5SpeechDecoderPostnet(nn.Module): method __init__ (line 746) | def __init__(self, config): method forward (line 757) | def forward(self, hidden_states: torch.Tensor): method postnet (line 763) | def postnet(self, hidden_states: torch.Tensor): class SpeechT5TextEncoderPrenet (line 770) | class SpeechT5TextEncoderPrenet(nn.Module): method __init__ (line 771) | def __init__(self, config): method get_input_embeddings (line 781) | def get_input_embeddings(self): method set_input_embeddings (line 784) | def set_input_embeddings(self, value): method forward (line 787) | def forward(self, input_ids: torch.Tensor): class SpeechT5TextDecoderPrenet (line 793) | class SpeechT5TextDecoderPrenet(nn.Module): method __init__ (line 794) | def __init__(self, config): method get_input_embeddings (line 808) | def get_input_embeddings(self): method set_input_embeddings (line 811) | def set_input_embeddings(self, value): method forward (line 814) | def forward( class SpeechT5TextDecoderPostnet (line 836) | class SpeechT5TextDecoderPostnet(nn.Module): method __init__ (line 837) | def __init__(self, config): method forward (line 842) | def forward(self, hidden_states: torch.Tensor): method get_output_embeddings (line 845) | def get_output_embeddings(self): method set_output_embeddings (line 848) | def set_output_embeddings(self, new_embeddings): class SpeechT5Attention (line 852) | class SpeechT5Attention(nn.Module): method __init__ (line 858) | def __init__( method _shape (line 885) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 888) | def forward( class SpeechT5FeedForward (line 1012) | class SpeechT5FeedForward(nn.Module): method __init__ (line 1013) | def __init__(self, config, intermediate_size): method forward (line 1026) | def forward(self, hidden_states): class SpeechT5EncoderLayer (line 1036) | class SpeechT5EncoderLayer(nn.Module): method __init__ (line 1037) | def __init__(self, config: SpeechT5Config): method forward (line 1050) | def forward( class SpeechT5DecoderLayer (line 1097) | class SpeechT5DecoderLayer(nn.Module): method __init__ (line 1098) | def __init__(self, config: SpeechT5Config): method forward (line 1120) | def forward( class SpeechT5PreTrainedModel (line 1205) | class SpeechT5PreTrainedModel(PreTrainedModel): method _init_weights (line 1216) | def _init_weights(self, module): class SpeechT5Encoder (line 1247) | class SpeechT5Encoder(SpeechT5PreTrainedModel): method __init__ (line 1252) | def __init__(self, config: SpeechT5Config): method forward (line 1269) | def forward( class SpeechT5EncoderWithSpeechPrenet (line 1384) | class SpeechT5EncoderWithSpeechPrenet(SpeechT5PreTrainedModel): method __init__ (line 1390) | def __init__(self, config: SpeechT5Config): method forward (line 1398) | def forward( class SpeechT5EncoderWithTextPrenet (line 1421) | class SpeechT5EncoderWithTextPrenet(SpeechT5PreTrainedModel): method __init__ (line 1426) | def __init__(self, config: SpeechT5Config): method get_input_embeddings (line 1434) | def get_input_embeddings(self): method set_input_embeddings (line 1437) | def set_input_embeddings(self, value): method forward (line 1440) | def forward( class SpeechT5EncoderWithoutPrenet (line 1463) | class SpeechT5EncoderWithoutPrenet(SpeechT5PreTrainedModel): method __init__ (line 1469) | def __init__(self, config: SpeechT5Config): method forward (line 1476) | def forward( class SpeechT5Decoder (line 1495) | class SpeechT5Decoder(SpeechT5PreTrainedModel): method __init__ (line 1500) | def __init__(self, config: SpeechT5Config): method forward (line 1511) | def forward( class SpeechT5DecoderWithSpeechPrenet (line 1702) | class SpeechT5DecoderWithSpeechPrenet(SpeechT5PreTrainedModel): method __init__ (line 1708) | def __init__(self, config: SpeechT5Config): method forward (line 1716) | def forward( class SpeechT5DecoderWithTextPrenet (line 1750) | class SpeechT5DecoderWithTextPrenet(SpeechT5PreTrainedModel): method __init__ (line 1755) | def __init__(self, config: SpeechT5Config): method get_input_embeddings (line 1763) | def get_input_embeddings(self): method set_input_embeddings (line 1766) | def set_input_embeddings(self, value): method forward (line 1769) | def forward( class SpeechT5DecoderWithoutPrenet (line 1802) | class SpeechT5DecoderWithoutPrenet(SpeechT5PreTrainedModel): method __init__ (line 1808) | def __init__(self, config: SpeechT5Config): method forward (line 1815) | def forward( class SpeechT5GuidedMultiheadAttentionLoss (line 1845) | class SpeechT5GuidedMultiheadAttentionLoss(nn.Module): method __init__ (line 1851) | def __init__(self, config: SpeechT5Config): method forward (line 1856) | def forward( method _make_guided_attention_masks (line 1881) | def _make_guided_attention_masks(self, input_masks, output_masks, devi... method _make_guided_attention_mask (line 1893) | def _make_guided_attention_mask(input_length, output_length, sigma, de... class SpeechT5SpectrogramLoss (line 1904) | class SpeechT5SpectrogramLoss(nn.Module): method __init__ (line 1909) | def __init__(self, config: SpeechT5Config): method forward (line 1921) | def forward( class SpeechT5Model (line 2096) | class SpeechT5Model(SpeechT5PreTrainedModel): method __init__ (line 2097) | def __init__( method get_input_embeddings (line 2111) | def get_input_embeddings(self): method set_input_embeddings (line 2118) | def set_input_embeddings(self, value): method get_encoder (line 2124) | def get_encoder(self): method get_decoder (line 2127) | def get_decoder(self): method freeze_feature_encoder (line 2130) | def freeze_feature_encoder(self): method forward (line 2140) | def forward( class SpeechT5ForSpeechToText (line 2244) | class SpeechT5ForSpeechToText(SpeechT5PreTrainedModel): method __init__ (line 2247) | def __init__(self, config: SpeechT5Config): method get_encoder (line 2267) | def get_encoder(self): method get_decoder (line 2270) | def get_decoder(self): method freeze_feature_encoder (line 2273) | def freeze_feature_encoder(self): method get_output_embeddings (line 2280) | def get_output_embeddings(self): method set_output_embeddings (line 2283) | def set_output_embeddings(self, new_embeddings): method forward (line 2288) | def forward( method prepare_inputs_for_generation (line 2415) | def prepare_inputs_for_generation( method _reorder_cache (line 2452) | def _reorder_cache(past_key_values, beam_idx): function _generate_speech (line 2461) | def _generate_speech( class SpeechT5ForTextToSpeech (line 2608) | class SpeechT5ForTextToSpeech(SpeechT5PreTrainedModel): method __init__ (line 2611) | def __init__(self, config: SpeechT5Config): method get_encoder (line 2631) | def get_encoder(self): method get_decoder (line 2634) | def get_decoder(self): method forward (line 2639) | def forward( method generate (line 2760) | def generate( method generate_speech (line 2852) | def generate_speech( class SpeechT5ForSpeechToSpeech (line 2952) | class SpeechT5ForSpeechToSpeech(SpeechT5PreTrainedModel): method __init__ (line 2953) | def __init__(self, config: SpeechT5Config): method get_encoder (line 2965) | def get_encoder(self): method get_decoder (line 2968) | def get_decoder(self): method freeze_feature_encoder (line 2971) | def freeze_feature_encoder(self): method forward (line 2980) | def forward( method generate_speech (line 3095) | def generate_speech( class HifiGanResidualBlock (line 3201) | class HifiGanResidualBlock(nn.Module): method __init__ (line 3202) | def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5), leaky_... method get_padding (line 3233) | def get_padding(self, kernel_size, dilation=1): method apply_weight_norm (line 3236) | def apply_weight_norm(self): method remove_weight_norm (line 3242) | def remove_weight_norm(self): method forward (line 3248) | def forward(self, hidden_states): class SpeechT5HifiGan (line 3263) | class SpeechT5HifiGan(PreTrainedModel): method __init__ (line 3267) | def __init__(self, config: SpeechT5HifiGanConfig): method _init_weights (line 3305) | def _init_weights(self, module): method apply_weight_norm (line 3312) | def apply_weight_norm(self): method remove_weight_norm (line 3320) | def remove_weight_norm(self): method forward (line 3328) | def forward(self, spectrogram: torch.FloatTensor) -> torch.FloatTensor: FILE: mplsandbox_for_rl/transformers/src/transformers/models/speecht5/number_normalizer.py class EnglishNumberNormalizer (line 20) | class EnglishNumberNormalizer: method __init__ (line 21) | def __init__(self): method spell_number (line 76) | def spell_number(self, num): method convert (line 110) | def convert(self, number): method __call__ (line 178) | def __call__(self, text): FILE: mplsandbox_for_rl/transformers/src/transformers/models/speecht5/processing_speecht5.py class SpeechT5Processor (line 20) | class SpeechT5Processor(ProcessorMixin): method __init__ (line 37) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 40) | def __call__(self, *args, **kwargs): method pad (line 111) | def pad(self, *args, **kwargs): method batch_decode (line 171) | def batch_decode(self, *args, **kwargs): method decode (line 178) | def decode(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/speecht5/tokenization_speecht5.py class SpeechT5Tokenizer (line 33) | class SpeechT5Tokenizer(PreTrainedTokenizer): method __init__ (line 79) | def __init__( method prepare_for_tokenization (line 108) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method vocab_size (line 117) | def vocab_size(self): method normalizer (line 121) | def normalizer(self): method normalizer (line 127) | def normalizer(self, value): method get_vocab (line 130) | def get_vocab(self): method __getstate__ (line 135) | def __getstate__(self): method __setstate__ (line 140) | def __setstate__(self, d): method _tokenize (line 150) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 154) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 158) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 164) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 183) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 190) | def get_special_tokens_mask( method save_vocabulary (line 203) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/splinter/configuration_splinter.py class SplinterConfig (line 24) | class SplinterConfig(PretrainedConfig): method __init__ (line 86) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/splinter/modeling_splinter.py class SplinterEmbeddings (line 40) | class SplinterEmbeddings(nn.Module): method __init__ (line 43) | def __init__(self, config): method forward (line 60) | def forward( class SplinterSelfAttention (line 95) | class SplinterSelfAttention(nn.Module): method __init__ (line 96) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 122) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 127) | def forward( class SplinterSelfOutput (line 230) | class SplinterSelfOutput(nn.Module): method __init__ (line 231) | def __init__(self, config): method forward (line 237) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class SplinterAttention (line 250) | class SplinterAttention(nn.Module): method __init__ (line 251) | 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 513) | class SplinterPreTrainedModel(PreTrainedModel): method _init_weights (line 524) | def _init_weights(self, module): class SplinterModel (line 606) | class SplinterModel(SplinterPreTrainedModel): method __init__ (line 613) | def __init__(self, config): method get_input_embeddings (line 623) | def get_input_embeddings(self): method set_input_embeddings (line 626) | def set_input_embeddings(self, value): method _prune_heads (line 629) | def _prune_heads(self, heads_to_prune): method forward (line 643) | def forward( class SplinterFullyConnectedLayer (line 765) | class SplinterFullyConnectedLayer(nn.Module): method __init__ (line 766) | def __init__(self, input_dim, output_dim, hidden_act="gelu"): method forward (line 776) | def forward(self, inputs: torch.Tensor) -> torch.Tensor: class QuestionAwareSpanSelectionHead (line 783) | class QuestionAwareSpanSelectionHead(nn.Module): method __init__ (line 789) | def __init__(self, config): method forward (line 800) | def forward(self, inputs, positions): class SplinterForQuestionAnswering (line 828) | class SplinterForQuestionAnswering(SplinterPreTrainedModel): method __init__ (line 829) | def __init__(self, config): method forward (line 845) | def forward( class SplinterForPreTrainingOutput (line 943) | class SplinterForPreTrainingOutput(ModelOutput): class SplinterForPreTraining (line 982) | class SplinterForPreTraining(SplinterPreTrainedModel): method __init__ (line 983) | def __init__(self, config): method forward (line 996) | def forward( method _prepare_question_positions (line 1096) | def _prepare_question_positions(self, input_ids: torch.Tensor) -> torc... FILE: mplsandbox_for_rl/transformers/src/transformers/models/splinter/tokenization_splinter.py function load_vocab (line 32) | def load_vocab(vocab_file): function whitespace_tokenize (line 43) | def whitespace_tokenize(text): class SplinterTokenizer (line 52) | class SplinterTokenizer(PreTrainedTokenizer): method __init__ (line 98) | def __init__( method question_token_id (line 146) | def question_token_id(self): method do_lower_case (line 154) | def do_lower_case(self): method vocab_size (line 158) | def vocab_size(self): method get_vocab (line 161) | def get_vocab(self): method _tokenize (line 164) | def _tokenize(self, text): method _convert_token_to_id (line 177) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 181) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 185) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 190) | 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 300) | class BasicTokenizer: method __init__ (line 320) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 328) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 365) | def _run_strip_accents(self, text): method _run_split_on_punc (line 376) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 398) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 411) | def _is_chinese_char(self, cp): method _clean_text (line 435) | def _clean_text(self, text): class WordpieceTokenizer (line 449) | class WordpieceTokenizer: 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: mplsandbox_for_rl/transformers/src/transformers/models/splinter/tokenization_splinter_fast.py class SplinterTokenizerFast (line 32) | class SplinterTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 77) | def __init__( method question_token_id (line 120) | def question_token_id(self): method build_inputs_with_special_tokens (line 127) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 159) | def create_token_type_ids_from_sequences( method save_vocabulary (line 188) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/squeezebert/configuration_squeezebert.py class SqueezeBertConfig (line 28) | class SqueezeBertConfig(PretrainedConfig): method __init__ (line 103) | def __init__( class SqueezeBertOnnxConfig (line 151) | class SqueezeBertOnnxConfig(OnnxConfig): method inputs (line 153) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/squeezebert/modeling_squeezebert.py class SqueezeBertEmbeddings (line 45) | class SqueezeBertEmbeddings(nn.Module): method __init__ (line 48) | def __init__(self, config): method forward (line 64) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class MatMulWrapper (line 89) | class MatMulWrapper(nn.Module): method __init__ (line 95) | def __init__(self): method forward (line 98) | def forward(self, mat1, mat2): class SqueezeBertLayerNorm (line 109) | class SqueezeBertLayerNorm(nn.LayerNorm): method __init__ (line 116) | def __init__(self, hidden_size, eps=1e-12): method forward (line 119) | def forward(self, x): class ConvDropoutLayerNorm (line 125) | class ConvDropoutLayerNorm(nn.Module): method __init__ (line 130) | def __init__(self, cin, cout, groups, dropout_prob): method forward (line 137) | def forward(self, hidden_states, input_tensor): class ConvActivation (line 145) | class ConvActivation(nn.Module): method __init__ (line 150) | def __init__(self, cin, cout, groups, act): method forward (line 155) | def forward(self, x): class SqueezeBertSelfAttention (line 160) | class SqueezeBertSelfAttention(nn.Module): method __init__ (line 161) | def __init__(self, config, cin, q_groups=1, k_groups=1, v_groups=1): method transpose_for_scores (line 185) | def transpose_for_scores(self, x): method transpose_key_for_scores (line 194) | def transpose_key_for_scores(self, x): method transpose_output (line 204) | def transpose_output(self, x): method forward (line 214) | def forward(self, hidden_states, attention_mask, output_attentions): class SqueezeBertModule (line 250) | class SqueezeBertModule(nn.Module): method __init__ (line 251) | def __init__(self, config): method forward (line 277) | def forward(self, hidden_states, attention_mask, output_attentions): class SqueezeBertEncoder (line 292) | class SqueezeBertEncoder(nn.Module): method __init__ (line 293) | def __init__(self, config): method forward (line 304) | def forward( class SqueezeBertPooler (line 353) | class SqueezeBertPooler(nn.Module): method __init__ (line 354) | def __init__(self, config): method forward (line 359) | def forward(self, hidden_states): class SqueezeBertPredictionHeadTransform (line 368) | class SqueezeBertPredictionHeadTransform(nn.Module): method __init__ (line 369) | def __init__(self, config): method forward (line 378) | def forward(self, hidden_states): class SqueezeBertLMPredictionHead (line 385) | class SqueezeBertLMPredictionHead(nn.Module): method __init__ (line 386) | def __init__(self, config): method _tie_weights (line 399) | def _tie_weights(self) -> None: method forward (line 402) | def forward(self, hidden_states): class SqueezeBertOnlyMLMHead (line 408) | class SqueezeBertOnlyMLMHead(nn.Module): method __init__ (line 409) | def __init__(self, config): method forward (line 413) | def forward(self, sequence_output): class SqueezeBertPreTrainedModel (line 418) | class SqueezeBertPreTrainedModel(PreTrainedModel): method _init_weights (line 427) | def _init_weights(self, module): class SqueezeBertModel (line 543) | class SqueezeBertModel(SqueezeBertPreTrainedModel): method __init__ (line 544) | def __init__(self, config): method get_input_embeddings (line 554) | def get_input_embeddings(self): method set_input_embeddings (line 557) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 560) | def _prune_heads(self, heads_to_prune): method forward (line 574) | def forward( class SqueezeBertForMaskedLM (line 643) | class SqueezeBertForMaskedLM(SqueezeBertPreTrainedModel): method __init__ (line 646) | def __init__(self, config): method get_output_embeddings (line 655) | def get_output_embeddings(self): method set_output_embeddings (line 658) | def set_output_embeddings(self, new_embeddings): method forward (line 668) | def forward( class SqueezeBertForSequenceClassification (line 728) | class SqueezeBertForSequenceClassification(SqueezeBertPreTrainedModel): method __init__ (line 729) | def __init__(self, config): method forward (line 747) | def forward( class SqueezeBertForMultipleChoice (line 827) | class SqueezeBertForMultipleChoice(SqueezeBertPreTrainedModel): method __init__ (line 828) | def __init__(self, config): method forward (line 846) | def forward( class SqueezeBertForTokenClassification (line 920) | class SqueezeBertForTokenClassification(SqueezeBertPreTrainedModel): method __init__ (line 921) | def __init__(self, config): method forward (line 938) | def forward( class SqueezeBertForQuestionAnswering (line 998) | class SqueezeBertForQuestionAnswering(SqueezeBertPreTrainedModel): method __init__ (line 999) | def __init__(self, config): method forward (line 1015) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/squeezebert/tokenization_squeezebert.py function load_vocab (line 32) | def load_vocab(vocab_file): function whitespace_tokenize (line 44) | def whitespace_tokenize(text): class SqueezeBertTokenizer (line 54) | class SqueezeBertTokenizer(PreTrainedTokenizer): method __init__ (line 98) | def __init__( method do_lower_case (line 146) | def do_lower_case(self): method vocab_size (line 150) | def vocab_size(self): method get_vocab (line 153) | def get_vocab(self): method _tokenize (line 156) | def _tokenize(self, text, split_special_tokens=False): method _convert_token_to_id (line 171) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 175) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 179) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 184) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 209) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 237) | def create_token_type_ids_from_sequences( method save_vocabulary (line 266) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 288) | class BasicTokenizer: method __init__ (line 311) | def __init__( method tokenize (line 327) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 365) | def _run_strip_accents(self, text): method _run_split_on_punc (line 376) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 398) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 411) | def _is_chinese_char(self, cp): method _clean_text (line 435) | def _clean_text(self, text): class WordpieceTokenizer (line 449) | class WordpieceTokenizer: 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: mplsandbox_for_rl/transformers/src/transformers/models/squeezebert/tokenization_squeezebert_fast.py class SqueezeBertTokenizerFast (line 33) | class SqueezeBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 76) | def __init__( method build_inputs_with_special_tokens (line 118) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 142) | def create_token_type_ids_from_sequences( method save_vocabulary (line 171) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/stablelm/configuration_stablelm.py class StableLmConfig (line 24) | class StableLmConfig(PretrainedConfig): method __init__ (line 111) | def __init__( method _rope_scaling_validation (line 167) | def _rope_scaling_validation(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/stablelm/modeling_stablelm.py function _prepare_4d_causal_attention_mask_with_cache_position (line 61) | def _prepare_4d_causal_attention_mask_with_cache_position( class StableLmRotaryEmbedding (line 115) | class StableLmRotaryEmbedding(nn.Module): method __init__ (line 116) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 130) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 140) | def forward(self, x, seq_len=None): class StableLmLinearScalingRotaryEmbedding (line 152) | class StableLmLinearScalingRotaryEmbedding(StableLmRotaryEmbedding): method __init__ (line 155) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 159) | def _set_cos_sin_cache(self, seq_len, device, dtype): class StableLmDynamicNTKScalingRotaryEmbedding (line 172) | class StableLmDynamicNTKScalingRotaryEmbedding(StableLmRotaryEmbedding): method __init__ (line 175) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 179) | def _set_cos_sin_cache(self, seq_len, device, dtype): function rotate_half (line 199) | def rotate_half(x): function apply_rotary_pos_emb (line 207) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class StableLmMLP (line 236) | class StableLmMLP(nn.Module): method __init__ (line 237) | def __init__(self, config): method forward (line 246) | def forward(self, hidden_state): class StableLmLayerNormPerHead (line 250) | class StableLmLayerNormPerHead(nn.Module): method __init__ (line 251) | def __init__(self, dim, num_heads, eps=1e-5, bias=False): method forward (line 257) | def forward(self, hidden_states: torch.Tensor): function repeat_kv (line 266) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class StableLmAttention (line 278) | class StableLmAttention(nn.Module): method __init__ (line 281) | def __init__(self, config: StableLmConfig, layer_idx: Optional[int] = ... method _init_rope (line 323) | def _init_rope(self): method forward (line 350) | def forward( class StableLmSdpaAttention (line 450) | class StableLmSdpaAttention(StableLmAttention): method forward (line 451) | def forward( class StableLmFlashAttention2 (line 564) | class StableLmFlashAttention2(StableLmAttention): method __init__ (line 572) | def __init__(self, *args, **kwargs): method forward (line 580) | def forward( class StableLmDecoderLayer (line 683) | class StableLmDecoderLayer(nn.Module): method __init__ (line 684) | def __init__(self, config: StableLmConfig, layer_idx: int): method forward (line 696) | def forward( class StableLmPreTrainedModel (line 791) | class StableLmPreTrainedModel(PreTrainedModel): method _init_weights (line 802) | def _init_weights(self, module): class StableLmModel (line 892) | class StableLmModel(StableLmPreTrainedModel): method __init__ (line 900) | def __init__(self, config: StableLmConfig): method get_input_embeddings (line 916) | def get_input_embeddings(self): method set_input_embeddings (line 919) | def set_input_embeddings(self, value): method forward (line 923) | def forward( method _update_causal_mask (line 1041) | def _update_causal_mask( class StableLmForCausalLM (line 1114) | class StableLmForCausalLM(StableLmPreTrainedModel): method __init__ (line 1118) | def __init__(self, config): method get_input_embeddings (line 1128) | def get_input_embeddings(self): method set_input_embeddings (line 1132) | def set_input_embeddings(self, value): method get_output_embeddings (line 1136) | def get_output_embeddings(self): method set_output_embeddings (line 1140) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1144) | def set_decoder(self, decoder): method get_decoder (line 1148) | def get_decoder(self): method forward (line 1154) | def forward( method prepare_inputs_for_generation (line 1242) | def prepare_inputs_for_generation( class StableLmForSequenceClassification (line 1329) | class StableLmForSequenceClassification(StableLmPreTrainedModel): method __init__ (line 1330) | def __init__(self, config): method get_input_embeddings (line 1339) | def get_input_embeddings(self): method set_input_embeddings (line 1342) | def set_input_embeddings(self, value): method forward (line 1346) | def forward( class StableLmForTokenClassification (line 1445) | class StableLmForTokenClassification(StableLmPreTrainedModel): method __init__ (line 1446) | def __init__(self, config): method get_input_embeddings (line 1462) | def get_input_embeddings(self): method set_input_embeddings (line 1465) | def set_input_embeddings(self, value): method forward (line 1469) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/starcoder2/configuration_starcoder2.py class Starcoder2Config (line 24) | class Starcoder2Config(PretrainedConfig): method __init__ (line 100) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/starcoder2/modeling_starcoder2.py function _prepare_4d_causal_attention_mask_with_cache_position (line 61) | def _prepare_4d_causal_attention_mask_with_cache_position( class Starcoder2RotaryEmbedding (line 115) | class Starcoder2RotaryEmbedding(nn.Module): method __init__ (line 116) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 130) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 140) | def forward(self, x, seq_len=None): function rotate_half (line 152) | def rotate_half(x): function apply_rotary_pos_emb (line 160) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): class Starcoder2MLP (line 188) | class Starcoder2MLP(nn.Module): method __init__ (line 189) | def __init__(self, config: Starcoder2Config): method forward (line 197) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... function repeat_kv (line 206) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class Starcoder2Attention (line 218) | class Starcoder2Attention(nn.Module): method __init__ (line 224) | def __init__(self, config: Starcoder2Config, layer_idx: Optional[int] ... method forward (line 263) | def forward( class Starcoder2FlashAttention2 (line 338) | class Starcoder2FlashAttention2(Starcoder2Attention): method __init__ (line 346) | def __init__(self, *args, **kwargs): method forward (line 355) | def forward( class Starcoder2SdpaAttention (line 480) | class Starcoder2SdpaAttention(Starcoder2Attention): method forward (line 488) | def forward( class Starcoder2DecoderLayer (line 579) | class Starcoder2DecoderLayer(nn.Module): method __init__ (line 580) | def __init__(self, config: Starcoder2Config, layer_idx: int): method forward (line 592) | def forward( class Starcoder2PreTrainedModel (line 677) | class Starcoder2PreTrainedModel(PreTrainedModel): method _init_weights (line 687) | def _init_weights(self, module): class Starcoder2Model (line 777) | class Starcoder2Model(Starcoder2PreTrainedModel): method __init__ (line 785) | def __init__(self, config: Starcoder2Config): method get_input_embeddings (line 801) | def get_input_embeddings(self): method set_input_embeddings (line 804) | def set_input_embeddings(self, value): method forward (line 808) | def forward( method _update_causal_mask (line 927) | def _update_causal_mask( class Starcoder2ForCausalLM (line 1000) | class Starcoder2ForCausalLM(Starcoder2PreTrainedModel): method __init__ (line 1003) | def __init__(self, config): method get_input_embeddings (line 1012) | def get_input_embeddings(self): method set_input_embeddings (line 1015) | def set_input_embeddings(self, value): method get_output_embeddings (line 1018) | def get_output_embeddings(self): method set_output_embeddings (line 1021) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1024) | def set_decoder(self, decoder): method get_decoder (line 1027) | def get_decoder(self): method forward (line 1033) | def forward( method prepare_inputs_for_generation (line 1123) | def prepare_inputs_for_generation( class Starcoder2ForSequenceClassification (line 1210) | class Starcoder2ForSequenceClassification(Starcoder2PreTrainedModel): method __init__ (line 1211) | def __init__(self, config): method get_input_embeddings (line 1220) | def get_input_embeddings(self): method set_input_embeddings (line 1223) | def set_input_embeddings(self, value): method forward (line 1227) | def forward( class Starcoder2ForTokenClassification (line 1326) | class Starcoder2ForTokenClassification(Starcoder2PreTrainedModel): method __init__ (line 1327) | def __init__(self, config): method get_input_embeddings (line 1343) | def get_input_embeddings(self): method set_input_embeddings (line 1346) | def set_input_embeddings(self, value): method forward (line 1350) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/superpoint/configuration_superpoint.py class SuperPointConfig (line 23) | class SuperPointConfig(PretrainedConfig): method __init__ (line 64) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/superpoint/convert_superpoint_to_pytorch.py function get_superpoint_config (line 24) | def get_superpoint_config(): function create_rename_keys (line 40) | def create_rename_keys(config, state_dict): function rename_key (line 76) | def rename_key(dct, old, new): function prepare_imgs (line 81) | def prepare_imgs(): function convert_superpoint_checkpoint (line 90) | def convert_superpoint_checkpoint(checkpoint_url, pytorch_dump_folder_pa... FILE: mplsandbox_for_rl/transformers/src/transformers/models/superpoint/image_processing_superpoint.py function is_grayscale (line 41) | def is_grayscale( function convert_to_grayscale (line 51) | def convert_to_grayscale( class SuperPointImageProcessor (line 87) | class SuperPointImageProcessor(BaseImageProcessor): method __init__ (line 108) | def __init__( method resize (line 125) | def resize( method preprocess (line 164) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/superpoint/modeling_superpoint.py function remove_keypoints_from_borders (line 44) | def remove_keypoints_from_borders( function top_k_keypoints (line 54) | def top_k_keypoints(keypoints: torch.Tensor, scores: torch.Tensor, k: in... function simple_nms (line 62) | def simple_nms(scores: torch.Tensor, nms_radius: int) -> torch.Tensor: class SuperPointKeypointDescriptionOutput (line 81) | class SuperPointKeypointDescriptionOutput(ModelOutput): class SuperPointConvBlock (line 115) | class SuperPointConvBlock(nn.Module): method __init__ (line 116) | def __init__( method forward (line 137) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SuperPointEncoder (line 145) | class SuperPointEncoder(nn.Module): method __init__ (line 151) | def __init__(self, config: SuperPointConfig) -> None: method forward (line 173) | def forward( class SuperPointInterestPointDecoder (line 195) | class SuperPointInterestPointDecoder(nn.Module): method __init__ (line 204) | def __init__(self, config: SuperPointConfig) -> None: method forward (line 224) | def forward(self, encoded: torch.Tensor) -> Tuple[torch.Tensor, torch.... method _get_pixel_scores (line 230) | def _get_pixel_scores(self, encoded: torch.Tensor) -> torch.Tensor: method _extract_keypoints (line 241) | def _extract_keypoints(self, scores: torch.Tensor) -> Tuple[torch.Tens... class SuperPointDescriptorDecoder (line 264) | class SuperPointDescriptorDecoder(nn.Module): method __init__ (line 273) | def __init__(self, config: SuperPointConfig) -> None: method forward (line 293) | def forward(self, encoded: torch.Tensor, keypoints: torch.Tensor) -> t... method _sample_descriptors (line 306) | def _sample_descriptors(keypoints, descriptors, scale: int = 8) -> tor... class SuperPointPreTrainedModel (line 324) | class SuperPointPreTrainedModel(PreTrainedModel): method _init_weights (line 335) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method extract_one_channel_pixel_values (line 347) | def extract_one_channel_pixel_values(self, pixel_values: torch.FloatTe... class SuperPointForKeypointDetection (line 392) | class SuperPointForKeypointDetection(SuperPointPreTrainedModel): method __init__ (line 402) | def __init__(self, config: SuperPointConfig) -> None: method forward (line 414) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/swiftformer/configuration_swiftformer.py class SwiftFormerConfig (line 30) | class SwiftFormerConfig(PretrainedConfig): method __init__ (line 93) | def __init__( class SwiftFormerOnnxConfig (line 132) | class SwiftFormerOnnxConfig(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: mplsandbox_for_rl/transformers/src/transformers/models/swiftformer/convert_swiftformer_original_to_hf.py function prepare_img (line 41) | def prepare_img(): function get_expected_output (line 47) | def get_expected_output(swiftformer_name): function rename_key (line 61) | def rename_key(dct, old, new): function create_rename_keys (line 66) | def create_rename_keys(state_dict): function convert_swiftformer_checkpoint (line 89) | def convert_swiftformer_checkpoint(swiftformer_name, pytorch_dump_folder... FILE: mplsandbox_for_rl/transformers/src/transformers/models/swiftformer/modeling_swiftformer.py class SwiftFormerPatchEmbedding (line 54) | class SwiftFormerPatchEmbedding(nn.Module): method __init__ (line 63) | def __init__(self, config: SwiftFormerConfig): method forward (line 77) | def forward(self, x): function drop_path (line 82) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class SwiftFormerDropPath (line 102) | class SwiftFormerDropPath(nn.Module): method __init__ (line 105) | def __init__(self, config: SwiftFormerConfig) -> 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 SwiftFormerEmbeddings (line 116) | class SwiftFormerEmbeddings(nn.Module): method __init__ (line 125) | def __init__(self, config: SwiftFormerConfig, index: int): method forward (line 143) | def forward(self, x): class SwiftFormerConvEncoder (line 149) | class SwiftFormerConvEncoder(nn.Module): method __init__ (line 158) | def __init__(self, config: SwiftFormerConfig, dim: int): method forward (line 170) | def forward(self, x): class SwiftFormerMlp (line 181) | class SwiftFormerMlp(nn.Module): method __init__ (line 190) | def __init__(self, config: SwiftFormerConfig, in_features: int): method forward (line 200) | def forward(self, x): class SwiftFormerEfficientAdditiveAttention (line 210) | class SwiftFormerEfficientAdditiveAttention(nn.Module): method __init__ (line 219) | def __init__(self, config: SwiftFormerConfig, dim: int = 512): method forward (line 230) | def forward(self, x): class SwiftFormerLocalRepresentation (line 250) | class SwiftFormerLocalRepresentation(nn.Module): method __init__ (line 259) | def __init__(self, config: SwiftFormerConfig, dim: int): method forward (line 270) | def forward(self, x): class SwiftFormerEncoderBlock (line 281) | class SwiftFormerEncoderBlock(nn.Module): method __init__ (line 291) | def __init__(self, config: SwiftFormerConfig, dim: int, drop_path: flo... method forward (line 310) | def forward(self, x): class SwiftFormerStage (line 324) | class SwiftFormerStage(nn.Module): method __init__ (line 334) | def __init__(self, config: SwiftFormerConfig, index: int) -> None: method forward (line 352) | def forward(self, input): class SwiftFormerEncoder (line 358) | class SwiftFormerEncoder(nn.Module): method __init__ (line 359) | def __init__(self, config: SwiftFormerConfig) -> None: method forward (line 381) | def forward( class SwiftFormerPreTrainedModel (line 408) | class SwiftFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 420) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class SwiftFormerModel (line 460) | class SwiftFormerModel(SwiftFormerPreTrainedModel): method __init__ (line 461) | def __init__(self, config: SwiftFormerConfig): method forward (line 479) | def forward( class SwiftFormerForImageClassification (line 517) | class SwiftFormerForImageClassification(SwiftFormerPreTrainedModel): method __init__ (line 518) | def __init__(self, config: SwiftFormerConfig) -> None: method forward (line 541) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/swiftformer/modeling_tf_swiftformer.py class TFSwiftFormerPatchEmbeddingSequential (line 50) | class TFSwiftFormerPatchEmbeddingSequential(keras.layers.Layer): method __init__ (line 59) | def __init__(self, config: SwiftFormerConfig, **kwargs): method call (line 70) | def call(self, x: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 81) | def build(self, input_shape=None): class TFSwiftFormerPatchEmbedding (line 99) | class TFSwiftFormerPatchEmbedding(keras.layers.Layer): method __init__ (line 108) | def __init__(self, config: SwiftFormerConfig, **kwargs): method call (line 112) | def call(self, x: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 115) | def build(self, input_shape=None): class TFSwiftFormerDropPath (line 124) | class TFSwiftFormerDropPath(keras.layers.Layer): method __init__ (line 127) | def __init__(self, config: SwiftFormerConfig, **kwargs) -> None: method call (line 131) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFSwiftFormerEmbeddings (line 135) | class TFSwiftFormerEmbeddings(keras.layers.Layer): method __init__ (line 144) | def __init__(self, config: SwiftFormerConfig, index: int, **kwargs): method call (line 163) | def call(self, x: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 169) | def build(self, input_shape=None): class TFSwiftFormerConvEncoder (line 181) | class TFSwiftFormerConvEncoder(keras.layers.Layer): method __init__ (line 190) | def __init__(self, config: SwiftFormerConfig, dim: int, **kwargs): method build (line 204) | def build(self, input_shape=None): method call (line 231) | def call(self, x: tf.Tensor, training: bool = False) -> tf.Tensor: class TFSwiftFormerMlp (line 243) | class TFSwiftFormerMlp(keras.layers.Layer): method __init__ (line 252) | def __init__(self, config: SwiftFormerConfig, in_features: int, **kwar... method call (line 265) | def call(self, x: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 274) | def build(self, input_shape=None): class TFSwiftFormerEfficientAdditiveAttention (line 289) | class TFSwiftFormerEfficientAdditiveAttention(keras.layers.Layer): method __init__ (line 298) | def __init__(self, config: SwiftFormerConfig, dim: int = 512, **kwargs): method build (line 310) | def build(self, input_shape=None): method call (line 334) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFSwiftFormerLocalRepresentation (line 354) | class TFSwiftFormerLocalRepresentation(keras.layers.Layer): method __init__ (line 363) | def __init__(self, config: SwiftFormerConfig, dim: int, **kwargs): method build (line 376) | def build(self, input_shape=None): method call (line 402) | def call(self, x: tf.Tensor, training: bool = False) -> tf.Tensor: class TFSwiftFormerEncoderBlock (line 414) | class TFSwiftFormerEncoderBlock(keras.layers.Layer): method __init__ (line 424) | def __init__(self, config: SwiftFormerConfig, dim: int, drop_path: flo... method build (line 439) | def build(self, input_shape=None): method call (line 466) | def call(self, x: tf.Tensor, training: bool = False): class TFSwiftFormerStage (line 482) | class TFSwiftFormerStage(keras.layers.Layer): method __init__ (line 492) | def __init__(self, config: SwiftFormerConfig, index: int, **kwargs) ->... method call (line 510) | def call(self, input: tf.Tensor, training: bool = False) -> tf.Tensor: method build (line 515) | def build(self, input_shape=None): class TFSwiftFormerEncoder (line 521) | class TFSwiftFormerEncoder(keras.layers.Layer): method __init__ (line 522) | def __init__(self, config: SwiftFormerConfig, **kwargs) -> None: method call (line 546) | def call( method build (line 577) | def build(self, input_shape=None): class TFSwiftFormerPreTrainedModel (line 583) | class TFSwiftFormerPreTrainedModel(TFPreTrainedModel): class TFSwiftFormerMainLayer (line 642) | class TFSwiftFormerMainLayer(keras.layers.Layer): method __init__ (line 645) | def __init__(self, config: SwiftFormerConfig, **kwargs): method call (line 653) | def call( method build (line 691) | def build(self, input_shape=None): class TFSwiftFormerModel (line 707) | class TFSwiftFormerModel(TFSwiftFormerPreTrainedModel): method __init__ (line 708) | def __init__(self, config: SwiftFormerConfig, *inputs, **kwargs): method call (line 715) | def call( method build (line 730) | def build(self, input_shape=None): class TFSwiftFormerForImageClassification (line 745) | class TFSwiftFormerForImageClassification(TFSwiftFormerPreTrainedModel): method __init__ (line 746) | def __init__(self, config: SwiftFormerConfig, **kwargs) -> None: method hf_compute_loss (line 765) | def hf_compute_loss(self, labels, logits): method call (line 798) | def call( method build (line 848) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/swin/configuration_swin.py class SwinConfig (line 31) | class SwinConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 111) | def __init__( class SwinOnnxConfig (line 163) | class SwinOnnxConfig(OnnxConfig): method inputs (line 167) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 175) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/swin/modeling_swin.py class SwinEncoderOutput (line 63) | class SwinEncoderOutput(ModelOutput): class SwinModelOutput (line 96) | class SwinModelOutput(ModelOutput): class SwinMaskedImageModelingOutput (line 132) | class SwinMaskedImageModelingOutput(ModelOutput): method logits (line 167) | def logits(self): class SwinImageClassifierOutput (line 177) | class SwinImageClassifierOutput(ModelOutput): function window_partition (line 212) | def window_partition(input_feature, window_size): function window_reverse (line 224) | def window_reverse(windows, window_size, height, width): class SwinEmbeddings (line 234) | class SwinEmbeddings(nn.Module): method __init__ (line 239) | def __init__(self, config, use_mask_token=False): method interpolate_pos_encoding (line 255) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 287) | def forward( class SwinPatchEmbeddings (line 315) | class SwinPatchEmbeddings(nn.Module): method __init__ (line 322) | def __init__(self, config): method maybe_pad (line 337) | def maybe_pad(self, pixel_values, height, width): method forward (line 346) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class SwinPatchMerging (line 358) | class SwinPatchMerging(nn.Module): method __init__ (line 371) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 378) | def maybe_pad(self, input_feature, height, width): method forward (line 386) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... function drop_path (line 413) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class SwinDropPath (line 434) | class SwinDropPath(nn.Module): method __init__ (line 437) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 441) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 444) | def extra_repr(self) -> str: class SwinSelfAttention (line 448) | class SwinSelfAttention(nn.Module): method __init__ (line 449) | def __init__(self, config, dim, num_heads, window_size): method transpose_for_scores (line 486) | def transpose_for_scores(self, x): method forward (line 491) | def forward( class SwinSelfOutput (line 548) | class SwinSelfOutput(nn.Module): method __init__ (line 549) | def __init__(self, config, dim): method forward (line 554) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class SwinAttention (line 561) | class SwinAttention(nn.Module): method __init__ (line 562) | def __init__(self, config, dim, num_heads, window_size): method prune_heads (line 568) | def prune_heads(self, heads): method forward (line 586) | def forward( class SwinIntermediate (line 599) | class SwinIntermediate(nn.Module): method __init__ (line 600) | def __init__(self, config, dim): method forward (line 608) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SwinOutput (line 614) | class SwinOutput(nn.Module): method __init__ (line 615) | def __init__(self, config, dim): method forward (line 620) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SwinLayer (line 626) | class SwinLayer(nn.Module): method __init__ (line 627) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 640) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 648) | def get_attn_mask(self, height, width, dtype, device): method maybe_pad (line 676) | def maybe_pad(self, hidden_states, height, width): method forward (line 683) | def forward( class SwinStage (line 751) | class SwinStage(nn.Module): method __init__ (line 752) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 777) | def forward( class SwinEncoder (line 810) | class SwinEncoder(nn.Module): method __init__ (line 811) | def __init__(self, config, grid_size): method forward (line 833) | def forward( class SwinPreTrainedModel (line 911) | class SwinPreTrainedModel(PreTrainedModel): method _init_weights (line 923) | def _init_weights(self, module): class SwinModel (line 981) | class SwinModel(SwinPreTrainedModel): method __init__ (line 982) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 997) | def get_input_embeddings(self): method _prune_heads (line 1000) | def _prune_heads(self, heads_to_prune): method forward (line 1016) | def forward( class SwinForMaskedImageModeling (line 1093) | class SwinForMaskedImageModeling(SwinPreTrainedModel): method __init__ (line 1094) | def __init__(self, config): method forward (line 1112) | def forward( class SwinForImageClassification (line 1214) | class SwinForImageClassification(SwinPreTrainedModel): method __init__ (line 1215) | def __init__(self, config): method forward (line 1236) | def forward( class SwinBackbone (line 1309) | class SwinBackbone(SwinPreTrainedModel, BackboneMixin): method __init__ (line 1310) | def __init__(self, config: SwinConfig): method get_input_embeddings (line 1327) | def get_input_embeddings(self): method forward (line 1330) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/swin/modeling_tf_swin.py class TFSwinEncoderOutput (line 68) | class TFSwinEncoderOutput(ModelOutput): class TFSwinModelOutput (line 101) | class TFSwinModelOutput(ModelOutput): class TFSwinMaskedImageModelingOutput (line 137) | class TFSwinMaskedImageModelingOutput(ModelOutput): method logits (line 172) | def logits(self): class TFSwinImageClassifierOutput (line 182) | class TFSwinImageClassifierOutput(ModelOutput): function window_partition (line 217) | def window_partition(input_feature: tf.Tensor, window_size: int) -> tf.T... function window_reverse (line 231) | def window_reverse(windows: tf.Tensor, window_size: int, height: int, wi... function drop_path (line 246) | def drop_path( class TFSwinEmbeddings (line 265) | class TFSwinEmbeddings(keras.layers.Layer): method __init__ (line 270) | def __init__(self, config: SwinConfig, use_mask_token: bool = False, *... method build (line 283) | def build(self, input_shape: tf.TensorShape) -> None: method call (line 309) | def call( class TFSwinPatchEmbeddings (line 333) | class TFSwinPatchEmbeddings(keras.layers.Layer): method __init__ (line 338) | def __init__(self, config, **kwargs): method maybe_pad (line 359) | def maybe_pad(self, pixel_values: tf.Tensor, height: int, width: int) ... method call (line 368) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> Tup... method build (line 392) | def build(self, input_shape=None): class TFSwinPatchMerging (line 401) | class TFSwinPatchMerging(keras.layers.Layer): method __init__ (line 414) | def __init__( method maybe_pad (line 427) | def maybe_pad(self, input_feature: tf.Tensor, height: int, width: int)... method call (line 435) | def call(self, input_feature: tf.Tensor, input_dimensions: Tuple[int, ... method build (line 462) | def build(self, input_shape=None): class TFSwinDropPath (line 474) | class TFSwinDropPath(keras.layers.Layer): method __init__ (line 477) | def __init__(self, drop_prob: float = None, scale_by_keep: bool = True... method call (line 482) | def call(self, input: tf.Tensor, training: bool = False) -> tf.Tensor: class TFSwinSelfAttention (line 486) | class TFSwinSelfAttention(keras.layers.Layer): method __init__ (line 487) | def __init__(self, config: SwinConfig, dim: int, num_heads: int, **kwa... method build (line 523) | def build(self, input_shape: tf.TensorShape) -> None: method transpose_for_scores (line 565) | def transpose_for_scores(self, x: tf.Tensor) -> tf.Tensor: method call (line 570) | def call( class TFSwinSelfOutput (line 634) | class TFSwinSelfOutput(keras.layers.Layer): method __init__ (line 635) | def __init__(self, config: SwinConfig, dim: int, **kwargs) -> None: method call (line 641) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 646) | def build(self, input_shape=None): class TFSwinAttention (line 658) | class TFSwinAttention(keras.layers.Layer): method __init__ (line 659) | def __init__(self, config: SwinConfig, dim: int, num_heads: int, **kwa... method prune_heads (line 665) | def prune_heads(self, heads): method call (line 672) | def call( method build (line 685) | def build(self, input_shape=None): class TFSwinIntermediate (line 697) | class TFSwinIntermediate(keras.layers.Layer): method __init__ (line 698) | def __init__(self, config: SwinConfig, dim: int, **kwargs) -> None: method call (line 707) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 712) | def build(self, input_shape=None): class TFSwinOutput (line 721) | class TFSwinOutput(keras.layers.Layer): method __init__ (line 722) | def __init__(self, config: SwinConfig, dim: int, **kwargs) -> None: method call (line 729) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 734) | def build(self, input_shape=None): class TFSwinLayer (line 743) | class TFSwinLayer(keras.layers.Layer): method __init__ (line 744) | def __init__( method get_attn_mask (line 766) | def get_attn_mask(self, height: int, width: int, window_size: int, shi... method maybe_pad (line 794) | def maybe_pad( method call (line 804) | def call( method build (line 870) | def build(self, input_shape=None): class TFSwinStage (line 894) | class TFSwinStage(keras.layers.Layer): method __init__ (line 895) | def __init__( method call (line 934) | def call( method build (line 965) | def build(self, input_shape=None): class TFSwinEncoder (line 978) | class TFSwinEncoder(keras.layers.Layer): method __init__ (line 979) | def __init__(self, config: SwinConfig, grid_size: Tuple[int, int], **k... method call (line 1000) | def call( method build (line 1057) | def build(self, input_shape=None): class TFSwinPreTrainedModel (line 1067) | class TFSwinPreTrainedModel(TFPreTrainedModel): function normalize_data_format (line 1112) | def normalize_data_format(value: str) -> str: class AdaptiveAveragePooling1D (line 1127) | class AdaptiveAveragePooling1D(keras.layers.Layer): method __init__ (line 1149) | def __init__( method call (line 1161) | def call(self, inputs: tf.Tensor, *args) -> None: method compute_output_shape (line 1173) | def compute_output_shape(self, input_shape: Iterable[int]) -> tf.Tenso... method get_config (line 1181) | def get_config(self) -> Dict[str, Any]: class TFSwinMainLayer (line 1191) | class TFSwinMainLayer(keras.layers.Layer): method __init__ (line 1194) | def __init__( method get_input_embeddings (line 1208) | def get_input_embeddings(self) -> TFSwinPatchEmbeddings: method _prune_heads (line 1211) | def _prune_heads(self, heads_to_prune: Dict[int, List]): method get_head_mask (line 1219) | def get_head_mask(self, head_mask: Optional[Any]) -> List: method call (line 1225) | def call( method build (line 1285) | def build(self, input_shape=None): class TFSwinModel (line 1304) | class TFSwinModel(TFSwinPreTrainedModel): method __init__ (line 1305) | def __init__( method call (line 1321) | def call( method build (line 1356) | def build(self, input_shape=None): class TFSwinPixelShuffle (line 1365) | class TFSwinPixelShuffle(keras.layers.Layer): method __init__ (line 1368) | def __init__(self, upscale_factor: int, **kwargs) -> None: method call (line 1374) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFSwinDecoder (line 1391) | class TFSwinDecoder(keras.layers.Layer): method __init__ (line 1392) | def __init__(self, config: SwinConfig, **kwargs): method call (line 1400) | def call(self, x: tf.Tensor) -> tf.Tensor: method build (line 1410) | def build(self, input_shape=None): class TFSwinForMaskedImageModeling (line 1427) | class TFSwinForMaskedImageModeling(TFSwinPreTrainedModel): method __init__ (line 1428) | def __init__(self, config: SwinConfig): method call (line 1438) | def call( method build (line 1531) | def build(self, input_shape=None): class TFSwinForImageClassification (line 1550) | class TFSwinForImageClassification(TFSwinPreTrainedModel, TFSequenceClas... method __init__ (line 1551) | def __init__(self, config: SwinConfig): method call (line 1572) | def call( method build (line 1617) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/swin2sr/configuration_swin2sr.py class Swin2SRConfig (line 24) | class Swin2SRConfig(PretrainedConfig): method __init__ (line 103) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/swin2sr/image_processing_swin2sr.py class Swin2SRImageProcessor (line 39) | class Swin2SRImageProcessor(BaseImageProcessor): method __init__ (line 54) | def __init__( method pad (line 69) | def pad( method preprocess (line 111) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/swin2sr/modeling_swin2sr.py class Swin2SREncoderOutput (line 52) | class Swin2SREncoderOutput(ModelOutput): function window_partition (line 78) | def window_partition(input_feature, window_size): function window_reverse (line 91) | def window_reverse(windows, window_size, height, width): function drop_path (line 102) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class Swin2SRDropPath (line 123) | class Swin2SRDropPath(nn.Module): method __init__ (line 126) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 130) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 133) | def extra_repr(self) -> str: class Swin2SREmbeddings (line 137) | class Swin2SREmbeddings(nn.Module): method __init__ (line 142) | def __init__(self, config): method forward (line 156) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class Swin2SRPatchEmbeddings (line 167) | class Swin2SRPatchEmbeddings(nn.Module): method __init__ (line 168) | def __init__(self, config, normalize_patches=True): method forward (line 182) | def forward(self, embeddings: Optional[torch.FloatTensor]) -> Tuple[to... class Swin2SRPatchUnEmbeddings (line 194) | class Swin2SRPatchUnEmbeddings(nn.Module): method __init__ (line 197) | def __init__(self, config): method forward (line 202) | def forward(self, embeddings, x_size): class Swin2SRPatchMerging (line 209) | class Swin2SRPatchMerging(nn.Module): method __init__ (line 222) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 229) | def maybe_pad(self, input_feature, height, width): method forward (line 237) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... class Swin2SRSelfAttention (line 264) | class Swin2SRSelfAttention(nn.Module): method __init__ (line 265) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method transpose_for_scores (line 326) | def transpose_for_scores(self, x): method forward (line 331) | def forward( class Swin2SRSelfOutput (line 394) | class Swin2SRSelfOutput(nn.Module): method __init__ (line 395) | def __init__(self, config, dim): method forward (line 400) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Swin2SRAttention (line 408) | class Swin2SRAttention(nn.Module): method __init__ (line 409) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method prune_heads (line 423) | def prune_heads(self, heads): method forward (line 441) | def forward( class Swin2SRIntermediate (line 455) | class Swin2SRIntermediate(nn.Module): method __init__ (line 456) | def __init__(self, config, dim): method forward (line 464) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swin2SROutput (line 471) | class Swin2SROutput(nn.Module): method __init__ (line 472) | def __init__(self, config, dim): method forward (line 477) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swin2SRLayer (line 484) | class Swin2SRLayer(nn.Module): method __init__ (line 485) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method _compute_window_shift (line 508) | def _compute_window_shift(self, target_window_size, target_shift_size)... method get_attn_mask (line 513) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 541) | def maybe_pad(self, hidden_states, height, width): method forward (line 548) | def forward( class Swin2SRStage (line 607) | class Swin2SRStage(nn.Module): method __init__ (line 612) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 646) | def forward( class Swin2SREncoder (line 678) | class Swin2SREncoder(nn.Module): method __init__ (line 679) | def __init__(self, config, grid_size): method forward (line 701) | def forward( class Swin2SRPreTrainedModel (line 749) | class Swin2SRPreTrainedModel(PreTrainedModel): method _init_weights (line 760) | def _init_weights(self, module): class Swin2SRModel (line 808) | class Swin2SRModel(Swin2SRPreTrainedModel): method __init__ (line 809) | def __init__(self, config): method get_input_embeddings (line 831) | def get_input_embeddings(self): method _prune_heads (line 834) | def _prune_heads(self, heads_to_prune): method pad_and_normalize (line 842) | def pad_and_normalize(self, pixel_values): method forward (line 865) | def forward( class Upsample (line 921) | class Upsample(nn.Module): method __init__ (line 931) | def __init__(self, scale, num_features): method forward (line 946) | def forward(self, hidden_state): class UpsampleOneStep (line 959) | class UpsampleOneStep(nn.Module): method __init__ (line 973) | def __init__(self, scale, in_channels, out_channels): method forward (line 979) | def forward(self, x): class PixelShuffleUpsampler (line 986) | class PixelShuffleUpsampler(nn.Module): method __init__ (line 987) | def __init__(self, config, num_features): method forward (line 994) | def forward(self, sequence_output): class NearestConvUpsampler (line 1003) | class NearestConvUpsampler(nn.Module): method __init__ (line 1004) | def __init__(self, config, num_features): method forward (line 1017) | def forward(self, sequence_output): class PixelShuffleAuxUpsampler (line 1030) | class PixelShuffleAuxUpsampler(nn.Module): method __init__ (line 1031) | def __init__(self, config, num_features): method forward (line 1043) | def forward(self, sequence_output, bicubic, height, width): class Swin2SRForImageSuperResolution (line 1064) | class Swin2SRForImageSuperResolution(Swin2SRPreTrainedModel): method __init__ (line 1065) | def __init__(self, config): method forward (line 1093) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/swinv2/configuration_swinv2.py class Swinv2Config (line 25) | class Swinv2Config(BackboneConfigMixin, PretrainedConfig): method __init__ (line 105) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/swinv2/modeling_swinv2.py class Swinv2EncoderOutput (line 63) | class Swinv2EncoderOutput(ModelOutput): class Swinv2ModelOutput (line 97) | class Swinv2ModelOutput(ModelOutput): class Swinv2MaskedImageModelingOutput (line 134) | class Swinv2MaskedImageModelingOutput(ModelOutput): method logits (line 169) | def logits(self): class Swinv2ImageClassifierOutput (line 180) | class Swinv2ImageClassifierOutput(ModelOutput): function window_partition (line 216) | def window_partition(input_feature, window_size): function window_reverse (line 229) | def window_reverse(windows, window_size, height, width): function drop_path (line 240) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class Swinv2DropPath (line 261) | class Swinv2DropPath(nn.Module): method __init__ (line 264) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 268) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 271) | def extra_repr(self) -> str: class Swinv2Embeddings (line 276) | class Swinv2Embeddings(nn.Module): method __init__ (line 281) | def __init__(self, config, use_mask_token=False): method interpolate_pos_encoding (line 297) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 329) | def forward( class Swinv2PatchEmbeddings (line 358) | class Swinv2PatchEmbeddings(nn.Module): method __init__ (line 365) | def __init__(self, config): method maybe_pad (line 380) | def maybe_pad(self, pixel_values, height, width): method forward (line 389) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class Swinv2PatchMerging (line 401) | class Swinv2PatchMerging(nn.Module): method __init__ (line 414) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 421) | def maybe_pad(self, input_feature, height, width): method forward (line 429) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... class Swinv2SelfAttention (line 455) | class Swinv2SelfAttention(nn.Module): method __init__ (line 456) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method transpose_for_scores (line 517) | def transpose_for_scores(self, x): method forward (line 522) | def forward( class Swinv2SelfOutput (line 585) | class Swinv2SelfOutput(nn.Module): method __init__ (line 586) | def __init__(self, config, dim): method forward (line 591) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Swinv2Attention (line 598) | class Swinv2Attention(nn.Module): method __init__ (line 599) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method prune_heads (line 613) | def prune_heads(self, heads): method forward (line 631) | def forward( class Swinv2Intermediate (line 645) | class Swinv2Intermediate(nn.Module): method __init__ (line 646) | def __init__(self, config, dim): method forward (line 654) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swinv2Output (line 661) | class Swinv2Output(nn.Module): method __init__ (line 662) | def __init__(self, config, dim): method forward (line 667) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swinv2Layer (line 673) | class Swinv2Layer(nn.Module): method __init__ (line 674) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method _compute_window_shift (line 697) | def _compute_window_shift(self, target_window_size, target_shift_size)... method get_attn_mask (line 702) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 730) | def maybe_pad(self, hidden_states, height, width): method forward (line 737) | def forward( class Swinv2Stage (line 796) | class Swinv2Stage(nn.Module): method __init__ (line 797) | def __init__( method forward (line 824) | def forward( class Swinv2Encoder (line 859) | class Swinv2Encoder(nn.Module): method __init__ (line 860) | def __init__(self, config, grid_size, pretrained_window_sizes=(0, 0, 0... method forward (line 885) | def forward( class Swinv2PreTrainedModel (line 965) | class Swinv2PreTrainedModel(PreTrainedModel): method _init_weights (line 977) | def _init_weights(self, module): class Swinv2Model (line 1030) | class Swinv2Model(Swinv2PreTrainedModel): method __init__ (line 1031) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 1046) | def get_input_embeddings(self): method _prune_heads (line 1049) | def _prune_heads(self, heads_to_prune): method forward (line 1065) | def forward( class Swinv2ForMaskedImageModeling (line 1144) | class Swinv2ForMaskedImageModeling(Swinv2PreTrainedModel): method __init__ (line 1145) | def __init__(self, config): method forward (line 1163) | def forward( class Swinv2ForImageClassification (line 1266) | class Swinv2ForImageClassification(Swinv2PreTrainedModel): method __init__ (line 1267) | def __init__(self, config): method forward (line 1288) | def forward( class Swinv2Backbone (line 1361) | class Swinv2Backbone(Swinv2PreTrainedModel, BackboneMixin): method __init__ (line 1362) | def __init__(self, config): method get_input_embeddings (line 1373) | def get_input_embeddings(self): method forward (line 1378) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/switch_transformers/configuration_switch_transformers.py class SwitchTransformersConfig (line 24) | class SwitchTransformersConfig(PretrainedConfig): method __init__ (line 97) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/switch_transformers/modeling_switch_transformers.py function router_z_loss_func (line 58) | def router_z_loss_func(router_logits: torch.Tensor) -> float: function load_balancing_loss_func (line 78) | def load_balancing_loss_func(router_probs: torch.Tensor, expert_indices:... class SwitchTransformersTop1Router (line 117) | class SwitchTransformersTop1Router(nn.Module): method __init__ (line 128) | def __init__(self, config: SwitchTransformersConfig): method _compute_router_probabilities (line 137) | def _compute_router_probabilities(self, hidden_states: torch.Tensor) -... method _cast_classifier (line 170) | def _cast_classifier(self): method forward (line 178) | def forward(self, hidden_states: torch.Tensor) -> Tuple: class SwitchTransformersLayerNorm (line 211) | class SwitchTransformersLayerNorm(nn.Module): method __init__ (line 212) | def __init__(self, hidden_size, eps=1e-6): method forward (line 220) | def forward(self, hidden_states): class SwitchTransformersDenseActDense (line 240) | class SwitchTransformersDenseActDense(nn.Module): method __init__ (line 241) | def __init__(self, config: SwitchTransformersConfig): method forward (line 248) | def forward(self, hidden_states): class SwitchTransformersSparseMLP (line 262) | class SwitchTransformersSparseMLP(nn.Module): method __init__ (line 267) | def __init__(self, config: SwitchTransformersConfig, expert_class: nn.... method forward (line 277) | def forward(self, hidden_states): class SwitchTransformersLayerFF (line 313) | class SwitchTransformersLayerFF(nn.Module): method __init__ (line 325) | def __init__(self, config: SwitchTransformersConfig, is_sparse=False): method forward (line 338) | def forward(self, hidden_states, output_router_logits): class SwitchTransformersAttention (line 356) | class SwitchTransformersAttention(nn.Module): method __init__ (line 357) | def __init__(self, config: SwitchTransformersConfig, has_relative_atte... method prune_heads (line 380) | def prune_heads(self, heads): method _relative_position_bucket (line 397) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 444) | def compute_bias(self, query_length, key_length, device=None): method forward (line 461) | def forward( class SwitchTransformersLayerSelfAttention (line 592) | class SwitchTransformersLayerSelfAttention(nn.Module): method __init__ (line 593) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 601) | def forward( class SwitchTransformersLayerCrossAttention (line 627) | class SwitchTransformersLayerCrossAttention(nn.Module): method __init__ (line 628) | def __init__(self, config): method forward (line 634) | def forward( class SwitchTransformersBlock (line 663) | class SwitchTransformersBlock(nn.Module): method __init__ (line 664) | def __init__(self, config, has_relative_attention_bias=False, is_spars... method forward (line 677) | def forward( class SwitchTransformersPreTrainedModel (line 784) | class SwitchTransformersPreTrainedModel(PreTrainedModel): method dummy_inputs (line 796) | def dummy_inputs(self): method _init_weights (line 806) | def _init_weights(self, module): method _shift_right (line 853) | def _shift_right(self, input_ids): class SwitchTransformersStack (line 881) | class SwitchTransformersStack(SwitchTransformersPreTrainedModel): method __init__ (line 882) | def __init__(self, config, embed_tokens=None): 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 SwitchTransformersModel (line 1286) | class SwitchTransformersModel(SwitchTransformersPreTrainedModel): method __init__ (line 1289) | def __init__(self, config: SwitchTransformersConfig): method get_input_embeddings (line 1310) | def get_input_embeddings(self): method set_input_embeddings (line 1313) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1318) | def _tie_weights(self): method get_encoder (line 1323) | def get_encoder(self): method get_decoder (line 1326) | def get_decoder(self): method _prune_heads (line 1329) | def _prune_heads(self, heads_to_prune): method forward (line 1339) | def forward( class SwitchTransformersForConditionalGeneration (line 1459) | class SwitchTransformersForConditionalGeneration(SwitchTransformersPreTr... method __init__ (line 1462) | def __init__(self, config: SwitchTransformersConfig): method get_input_embeddings (line 1491) | def get_input_embeddings(self): method set_input_embeddings (line 1494) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1499) | def _tie_weights(self): method set_output_embeddings (line 1504) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1507) | def get_output_embeddings(self): method get_encoder (line 1510) | def get_encoder(self): method get_decoder (line 1513) | def get_decoder(self): method forward (line 1518) | def forward( method _unpack_router_logits (line 1694) | def _unpack_router_logits(self, router_outputs): method prepare_inputs_for_generation (line 1704) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1743) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1746) | def _reorder_cache(self, past_key_values, beam_idx): class SwitchTransformersEncoderModel (line 1784) | class SwitchTransformersEncoderModel(SwitchTransformersPreTrainedModel): method __init__ (line 1787) | def __init__(self, config: SwitchTransformersConfig): method get_input_embeddings (line 1802) | def get_input_embeddings(self): method set_input_embeddings (line 1805) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1809) | def _tie_weights(self): method get_encoder (line 1813) | def get_encoder(self): method _prune_heads (line 1816) | def _prune_heads(self, heads_to_prune): method forward (line 1826) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/t5/configuration_t5.py class T5Config (line 27) | class T5Config(PretrainedConfig): method __init__ (line 78) | def __init__( class T5OnnxConfig (line 141) | class T5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 143) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 162) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/t5/convert_t5_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 26) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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, num_deco... 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 190) | def convert_t5x_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/transformers/models/t5/modeling_flax_t5.py function shift_tokens_right (line 58) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... class FlaxT5LayerNorm (line 70) | class FlaxT5LayerNorm(nn.Module): method setup (line 76) | def setup(self): method __call__ (line 79) | def __call__(self, hidden_states): class FlaxT5DenseActDense (line 90) | class FlaxT5DenseActDense(nn.Module): method setup (line 94) | def setup(self): method __call__ (line 113) | def __call__(self, hidden_states, deterministic=True): class FlaxT5DenseGatedActDense (line 121) | class FlaxT5DenseGatedActDense(nn.Module): method setup (line 125) | def setup(self): method __call__ (line 150) | def __call__(self, hidden_states, deterministic): class FlaxT5LayerFF (line 159) | class FlaxT5LayerFF(nn.Module): method setup (line 163) | def setup(self): method __call__ (line 172) | def __call__(self, hidden_states, deterministic=True): class FlaxT5Attention (line 179) | class FlaxT5Attention(nn.Module): method setup (line 185) | def setup(self): method _relative_position_bucket (line 232) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 267) | def compute_bias(self, query_length, key_length): method _split_heads (line 284) | def _split_heads(self, hidden_states): method _merge_heads (line 287) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 291) | def _concatenate_to_cache(self, key, value, query, attention_mask): method _create_position_bias (line 323) | def _create_position_bias( method __call__ (line 347) | def __call__( class FlaxT5LayerSelfAttention (line 463) | class FlaxT5LayerSelfAttention(nn.Module): method setup (line 468) | def setup(self): method __call__ (line 478) | def __call__( class FlaxT5LayerCrossAttention (line 501) | class FlaxT5LayerCrossAttention(nn.Module): method setup (line 505) | def setup(self): method __call__ (line 512) | def __call__( class FlaxT5Block (line 534) | class FlaxT5Block(nn.Module): method setup (line 539) | def setup(self): method __call__ (line 556) | def __call__( class FlaxT5LayerCollection (line 607) | class FlaxT5LayerCollection(nn.Module): method setup (line 612) | def setup(self): method __call__ (line 617) | def __call__( class FlaxT5BlockCollection (line 642) | class FlaxT5BlockCollection(nn.Module): method setup (line 647) | def setup(self): method __call__ (line 671) | def __call__( class FlaxT5Stack (line 728) | class FlaxT5Stack(nn.Module): method setup (line 734) | def setup(self): method __call__ (line 745) | def __call__( class FlaxT5PreTrainedModel (line 926) | class FlaxT5PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 936) | def __init__( method enable_gradient_checkpointing (line 949) | def enable_gradient_checkpointing(self): method init_weights (line 956) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 986) | def __call__( method init_cache (line 1035) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 1073) | def encode( method decode (line 1131) | def decode( class FlaxT5Module (line 1277) | class FlaxT5Module(nn.Module): method _get_encoder_module (line 1282) | def _get_encoder_module(self): method _get_decoder_module (line 1285) | def _get_decoder_module(self): method setup (line 1288) | def setup(self): method __call__ (line 1315) | def __call__( class FlaxT5Model (line 1366) | class FlaxT5Model(FlaxT5PreTrainedModel): class FlaxT5EncoderModule (line 1407) | class FlaxT5EncoderModule(nn.Module): method setup (line 1412) | def setup(self): method __call__ (line 1431) | def __call__( class FlaxT5EncoderModel (line 1453) | class FlaxT5EncoderModel(FlaxT5PreTrainedModel): method __call__ (line 1457) | def __call__( class FlaxT5ForConditionalGenerationModule (line 1494) | class FlaxT5ForConditionalGenerationModule(nn.Module): method _get_encoder_module (line 1499) | def _get_encoder_module(self): method _get_decoder_module (line 1502) | def _get_decoder_module(self): method setup (line 1505) | def setup(self): method __call__ (line 1538) | def __call__( class FlaxT5ForConditionalGeneration (line 1604) | class FlaxT5ForConditionalGeneration(FlaxT5PreTrainedModel): method decode (line 1609) | def decode( method prepare_inputs_for_generation (line 1738) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1767) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/t5/modeling_t5.py function load_tf_weights_in_t5 (line 67) | def load_tf_weights_in_t5(model, config, tf_checkpoint_path): class T5LayerNorm (line 230) | class T5LayerNorm(nn.Module): method __init__ (line 231) | def __init__(self, hidden_size, eps=1e-6): method forward (line 239) | def forward(self, hidden_states): class T5DenseActDense (line 271) | class T5DenseActDense(nn.Module): method __init__ (line 272) | def __init__(self, config: T5Config): method forward (line 279) | def forward(self, hidden_states): class T5DenseGatedActDense (line 293) | class T5DenseGatedActDense(nn.Module): method __init__ (line 294) | def __init__(self, config: T5Config): method forward (line 302) | def forward(self, hidden_states): class T5LayerFF (line 322) | class T5LayerFF(nn.Module): method __init__ (line 323) | def __init__(self, config: T5Config): method forward (line 333) | def forward(self, hidden_states): class T5Attention (line 340) | class T5Attention(nn.Module): method __init__ (line 341) | def __init__(self, config: T5Config, has_relative_attention_bias=False): method prune_heads (line 364) | def prune_heads(self, heads): method _relative_position_bucket (line 381) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 428) | def compute_bias(self, query_length, key_length, device=None): method forward (line 445) | def forward( class T5LayerSelfAttention (line 575) | class T5LayerSelfAttention(nn.Module): method __init__ (line 576) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 582) | def forward( class T5LayerCrossAttention (line 607) | class T5LayerCrossAttention(nn.Module): method __init__ (line 608) | def __init__(self, config): method forward (line 614) | def forward( class T5Block (line 643) | class T5Block(nn.Module): method __init__ (line 644) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 654) | def forward( class T5ClassificationHead (line 767) | class T5ClassificationHead(nn.Module): method __init__ (line 770) | def __init__(self, config: T5Config): method forward (line 776) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class T5PreTrainedModel (line 785) | class T5PreTrainedModel(PreTrainedModel): method dummy_inputs (line 800) | def dummy_inputs(self): method _init_weights (line 810) | def _init_weights(self, module): method _shift_right (line 871) | def _shift_right(self, input_ids): class T5Stack (line 899) | class T5Stack(T5PreTrainedModel): method __init__ (line 900) | def __init__(self, config, embed_tokens=None): method parallelize (line 920) | def parallelize(self, device_map=None): method deparallelize (line 948) | def deparallelize(self): method get_input_embeddings (line 963) | def get_input_embeddings(self): method set_input_embeddings (line 966) | def set_input_embeddings(self, new_embeddings): method forward (line 969) | def forward( class T5Model (line 1340) | class T5Model(T5PreTrainedModel): method __init__ (line 1346) | def __init__(self, config: T5Config): method parallelize (line 1370) | def parallelize(self, device_map=None): method deparallelize (line 1389) | def deparallelize(self): method get_input_embeddings (line 1402) | def get_input_embeddings(self): method set_input_embeddings (line 1405) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1410) | def _tie_weights(self): method get_encoder (line 1415) | def get_encoder(self): method get_decoder (line 1418) | def get_decoder(self): method _prune_heads (line 1421) | def _prune_heads(self, heads_to_prune): method forward (line 1431) | def forward( class T5ForConditionalGeneration (line 1545) | class T5ForConditionalGeneration(T5PreTrainedModel): method __init__ (line 1551) | def __init__(self, config: T5Config): method parallelize (line 1579) | def parallelize(self, device_map=None): method deparallelize (line 1599) | def deparallelize(self): method get_input_embeddings (line 1613) | def get_input_embeddings(self): method set_input_embeddings (line 1616) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1621) | def _tie_weights(self): method set_output_embeddings (line 1626) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1629) | def get_output_embeddings(self): method get_encoder (line 1632) | def get_encoder(self): method get_decoder (line 1635) | def get_decoder(self): method forward (line 1640) | def forward( method prepare_inputs_for_generation (line 1793) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1831) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1834) | def _reorder_cache(self, past_key_values, beam_idx): class T5EncoderModel (line 1869) | class T5EncoderModel(T5PreTrainedModel): method __init__ (line 1873) | def __init__(self, config: T5Config): method parallelize (line 1890) | def parallelize(self, device_map=None): method deparallelize (line 1908) | def deparallelize(self): method get_input_embeddings (line 1919) | def get_input_embeddings(self): method set_input_embeddings (line 1922) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1926) | def _tie_weights(self): method get_encoder (line 1930) | def get_encoder(self): method _prune_heads (line 1933) | def _prune_heads(self, heads_to_prune): method forward (line 1943) | def forward( class T5ForSequenceClassification (line 1991) | class T5ForSequenceClassification(T5PreTrainedModel): method __init__ (line 1995) | def __init__(self, config: T5Config): method forward (line 2007) | def forward( class T5ForTokenClassification (line 2124) | class T5ForTokenClassification(T5PreTrainedModel): method __init__ (line 2127) | def __init__(self, config: T5Config): method forward (line 2140) | def forward( class T5ForQuestionAnswering (line 2196) | class T5ForQuestionAnswering(T5PreTrainedModel): method __init__ (line 2200) | def __init__(self, config: T5Config): method get_input_embeddings (line 2226) | def get_input_embeddings(self): method set_input_embeddings (line 2229) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 2234) | def _tie_weights(self): method get_encoder (line 2239) | def get_encoder(self): method get_decoder (line 2242) | def get_decoder(self): method forward (line 2247) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/t5/modeling_tf_t5.py class TFT5LayerNorm (line 68) | class TFT5LayerNorm(keras.layers.Layer): method __init__ (line 69) | def __init__(self, hidden_size, epsilon=1e-6, **kwargs): method build (line 77) | def build(self, input_shape): method call (line 82) | def call(self, hidden_states): class TFT5DenseActDense (line 88) | class TFT5DenseActDense(keras.layers.Layer): method __init__ (line 89) | def __init__(self, config, **kwargs): method call (line 107) | def call(self, hidden_states, training=False): method build (line 114) | def build(self, input_shape=None): class TFT5DenseGatedActDense (line 126) | class TFT5DenseGatedActDense(keras.layers.Layer): method __init__ (line 127) | def __init__(self, config, **kwargs): method call (line 148) | def call(self, hidden_states, training=False): method build (line 156) | def build(self, input_shape=None): class TFT5LayerFF (line 171) | class TFT5LayerFF(keras.layers.Layer): method __init__ (line 172) | def __init__(self, config, **kwargs): method call (line 182) | def call(self, hidden_states, training=False): method build (line 188) | def build(self, input_shape=None): class TFT5Attention (line 200) | class TFT5Attention(keras.layers.Layer): method __init__ (line 203) | def __init__(self, config, has_relative_attention_bias=False, **kwargs): method build (line 251) | def build(self, input_shape=None): method prune_heads (line 275) | def prune_heads(self, heads): method _relative_position_bucket (line 279) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 323) | def compute_bias(self, query_length, key_length): method call (line 342) | def call( class TFT5LayerSelfAttention (line 477) | class TFT5LayerSelfAttention(keras.layers.Layer): method __init__ (line 478) | def __init__(self, config, has_relative_attention_bias=False, **kwargs): method call (line 488) | def call( method build (line 514) | def build(self, input_shape=None): class TFT5LayerCrossAttention (line 526) | class TFT5LayerCrossAttention(keras.layers.Layer): method __init__ (line 527) | def __init__(self, config, **kwargs): method call (line 537) | def call( method build (line 567) | def build(self, input_shape=None): class TFT5Block (line 579) | class TFT5Block(keras.layers.Layer): method __init__ (line 580) | def __init__(self, config, has_relative_attention_bias=False, **kwargs): method call (line 601) | def call( method build (line 681) | def build(self, input_shape=None): class TFT5MainLayer (line 696) | class TFT5MainLayer(keras.layers.Layer): method __init__ (line 699) | def __init__(self, config, embed_tokens=None, **kwargs): method _prune_heads (line 722) | def _prune_heads(self, heads_to_prune): method call (line 726) | def call( method build (line 917) | def build(self, input_shape=None): class TFT5PreTrainedModel (line 937) | class TFT5PreTrainedModel(TFPreTrainedModel): method get_input_embeddings (line 948) | def get_input_embeddings(self): method set_input_embeddings (line 951) | def set_input_embeddings(self, value): method _shift_right (line 957) | def _shift_right(self, input_ids): class TFT5Model (line 1173) | class TFT5Model(TFT5PreTrainedModel): method __init__ (line 1174) | def __init__(self, config, *inputs, **kwargs): method get_encoder (line 1195) | def get_encoder(self): method get_decoder (line 1198) | def get_decoder(self): method call (line 1204) | def call( method build (line 1304) | def build(self, input_shape=None): class TFT5ForConditionalGeneration (line 1322) | class TFT5ForConditionalGeneration(TFT5PreTrainedModel, TFCausalLanguage... method __init__ (line 1323) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 1351) | def get_output_embeddings(self): method set_output_embeddings (line 1359) | def set_output_embeddings(self, value): method get_encoder (line 1372) | def get_encoder(self): method get_decoder (line 1375) | def get_decoder(self): method call (line 1381) | def call( method serving_output (line 1521) | def serving_output(self, output): method prepare_inputs_for_generation (line 1540) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1568) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method build (line 1571) | def build(self, input_shape=None): class TFT5EncoderModel (line 1595) | class TFT5EncoderModel(TFT5PreTrainedModel): method __init__ (line 1596) | def __init__(self, config, *inputs, **kwargs): method get_encoder (line 1611) | def get_encoder(self): method call (line 1617) | def call( method build (line 1669) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/t5/tokenization_t5.py class T5Tokenizer (line 45) | class T5Tokenizer(PreTrainedTokenizer): method __init__ (line 127) | def __init__( method get_spm_processor (line 202) | def get_spm_processor(self, from_slow=False): method _eventually_correct_t5_max_length (line 220) | def _eventually_correct_t5_max_length(pretrained_model_name_or_path, m... method vocab_size (line 242) | def vocab_size(self): method get_vocab (line 245) | def get_vocab(self): method get_special_tokens_mask (line 250) | def get_special_tokens_mask( method get_sentinel_tokens (line 278) | def get_sentinel_tokens(self): method get_sentinel_token_ids (line 283) | def get_sentinel_token_ids(self): method _add_eos_if_not_present (line 286) | def _add_eos_if_not_present(self, token_ids: List[int]) -> List[int]: method create_token_type_ids_from_sequences (line 297) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 319) | def build_inputs_with_special_tokens( method __getstate__ (line 345) | def __getstate__(self): method __setstate__ (line 350) | def __setstate__(self, d): method tokenize (line 360) | def tokenize(self, text: "TextInput", **kwargs) -> List[str]: method unk_token_length (line 379) | def unk_token_length(self): method _tokenize (line 382) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 400) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 404) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 409) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 432) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/t5/tokenization_t5_fast.py class T5TokenizerFast (line 41) | class T5TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 86) | def __init__( method can_save_slow_tokenizer (line 134) | def can_save_slow_tokenizer(self) -> bool: method _eventually_correct_t5_max_length (line 138) | def _eventually_correct_t5_max_length(pretrained_model_name_or_path, m... method save_vocabulary (line 159) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 179) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 205) | def create_token_type_ids_from_sequences( method get_sentinel_tokens (line 227) | def get_sentinel_tokens(self): method get_sentinel_token_ids (line 232) | def get_sentinel_token_ids(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/table_transformer/configuration_table_transformer.py class TableTransformerConfig (line 32) | class TableTransformerConfig(PretrainedConfig): method __init__ (line 143) | def __init__( method num_attention_heads (line 249) | def num_attention_heads(self) -> int: method hidden_size (line 253) | def hidden_size(self) -> int: class TableTransformerOnnxConfig (line 258) | class TableTransformerOnnxConfig(OnnxConfig): method inputs (line 262) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 271) | def atol_for_validation(self) -> float: method default_onnx_opset (line 275) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/table_transformer/convert_table_transformer_to_hf.py function rename_key (line 114) | def rename_key(state_dict, old, new): function rename_backbone_keys (line 119) | def rename_backbone_keys(state_dict): function read_in_q_k_v (line 131) | def read_in_q_k_v(state_dict): function resize (line 172) | def resize(image, checkpoint_url): function normalize (line 182) | def normalize(image): function convert_table_transformer_checkpoint (line 189) | def convert_table_transformer_checkpoint(checkpoint_url, pytorch_dump_fo... FILE: mplsandbox_for_rl/transformers/src/transformers/models/table_transformer/convert_table_transformer_to_hf_no_timm.py function create_rename_keys (line 36) | def create_rename_keys(config): function rename_key (line 237) | def rename_key(state_dict, old, new): function read_in_q_k_v (line 242) | def read_in_q_k_v(state_dict, is_panoptic=False): function resize (line 285) | def resize(image, checkpoint_url): function normalize (line 295) | def normalize(image): function convert_table_transformer_checkpoint (line 302) | def convert_table_transformer_checkpoint(checkpoint_url, pytorch_dump_fo... FILE: mplsandbox_for_rl/transformers/src/transformers/models/table_transformer/modeling_table_transformer.py class TableTransformerDecoderOutput (line 65) | class TableTransformerDecoderOutput(BaseModelOutputWithCrossAttentions): class TableTransformerModelOutput (line 96) | class TableTransformerModelOutput(Seq2SeqModelOutput): class TableTransformerObjectDetectionOutput (line 137) | class TableTransformerObjectDetectionOutput(ModelOutput): class TableTransformerFrozenBatchNorm2d (line 200) | class TableTransformerFrozenBatchNorm2d(nn.Module): method __init__ (line 208) | def __init__(self, n): method _load_from_state_dict (line 215) | def _load_from_state_dict( method forward (line 226) | def forward(self, x): function replace_batch_norm (line 240) | def replace_batch_norm(model): class TableTransformerConvEncoder (line 265) | class TableTransformerConvEncoder(nn.Module): method __init__ (line 273) | def __init__(self, config): method forward (line 325) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class TableTransformerConvModel (line 338) | class TableTransformerConvModel(nn.Module): method __init__ (line 343) | def __init__(self, conv_encoder, position_embedding): method forward (line 348) | def forward(self, pixel_values, pixel_mask): class TableTransformerSinePositionEmbedding (line 360) | class TableTransformerSinePositionEmbedding(nn.Module): method __init__ (line 366) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 377) | def forward(self, pixel_values, pixel_mask): class TableTransformerLearnedPositionEmbedding (line 398) | class TableTransformerLearnedPositionEmbedding(nn.Module): method __init__ (line 403) | def __init__(self, embedding_dim=256): method forward (line 408) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 422) | def build_position_encoding(config): class TableTransformerAttention (line 436) | class TableTransformerAttention(nn.Module): method __init__ (line 443) | def __init__( method _shape (line 467) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 470) | def with_pos_embed(self, tensor: torch.Tensor, object_queries: Optiona... method forward (line 473) | def forward( class TableTransformerEncoderLayer (line 565) | class TableTransformerEncoderLayer(nn.Module): method __init__ (line 567) | def __init__(self, config: TableTransformerConfig): method forward (line 583) | def forward( class TableTransformerDecoderLayer (line 638) | class TableTransformerDecoderLayer(nn.Module): method __init__ (line 640) | def __init__(self, config: TableTransformerConfig): method forward (line 664) | def forward( class TableTransformerPreTrainedModel (line 745) | class TableTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 755) | def _init_weights(self, module): class TableTransformerEncoder (line 827) | class TableTransformerEncoder(TableTransformerPreTrainedModel): method __init__ (line 842) | def __init__(self, config: TableTransformerConfig): method forward (line 855) | def forward( class TableTransformerDecoder (line 944) | class TableTransformerDecoder(TableTransformerPreTrainedModel): method __init__ (line 959) | def __init__(self, config: TableTransformerConfig): method forward (line 972) | def forward( class TableTransformerModel (line 1127) | class TableTransformerModel(TableTransformerPreTrainedModel): method __init__ (line 1129) | def __init__(self, config: TableTransformerConfig): method get_encoder (line 1148) | def get_encoder(self): method get_decoder (line 1151) | def get_decoder(self): method freeze_backbone (line 1154) | def freeze_backbone(self): method unfreeze_backbone (line 1158) | def unfreeze_backbone(self): method forward (line 1164) | def forward( class TableTransformerForObjectDetection (line 1296) | class TableTransformerForObjectDetection(TableTransformerPreTrainedModel): method __init__ (line 1298) | def __init__(self, config: TableTransformerConfig): method _set_aux_loss (line 1317) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1325) | def forward( function dice_loss (line 1460) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 1480) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class TableTransformerLoss (line 1512) | class TableTransformerLoss(nn.Module): method __init__ (line 1537) | def __init__(self, matcher, num_classes, eos_coef, losses): method loss_labels (line 1548) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 1570) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 1585) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 1609) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 1642) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 1648) | def _get_target_permutation_idx(self, indices): method get_loss (line 1654) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 1665) | def forward(self, outputs, targets): class TableTransformerMLPPredictionHead (line 1712) | class TableTransformerMLPPredictionHead(nn.Module): method __init__ (line 1721) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 1727) | def forward(self, x): class TableTransformerHungarianMatcher (line 1734) | class TableTransformerHungarianMatcher(nn.Module): method __init__ (line 1751) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 1762) | def forward(self, outputs, targets): function _upcast (line 1813) | def _upcast(t: Tensor) -> Tensor: function box_area (line 1822) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 1839) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 1856) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 1881) | def _max_by_axis(the_list): class NestedTensor (line 1891) | class NestedTensor: method __init__ (line 1892) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 1896) | def to(self, device): method decompose (line 1905) | def decompose(self): method __repr__ (line 1908) | def __repr__(self): function nested_tensor_from_tensor_list (line 1913) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: mplsandbox_for_rl/transformers/src/transformers/models/tapas/configuration_tapas.py class TapasConfig (line 28) | class TapasConfig(PretrainedConfig): method __init__ (line 140) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/tapas/convert_tapas_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 34) | def convert_tf_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/transformers/models/tapas/modeling_tapas.py class TableQuestionAnsweringOutput (line 64) | class TableQuestionAnsweringOutput(ModelOutput): function load_tf_weights_in_tapas (line 93) | def load_tf_weights_in_tapas(model, config, tf_checkpoint_path): class TapasEmbeddings (line 227) | class TapasEmbeddings(nn.Module): method __init__ (line 233) | def __init__(self, config): method forward (line 254) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class TapasSelfAttention (line 306) | class TapasSelfAttention(nn.Module): method __init__ (line 307) | def __init__(self, config): method transpose_for_scores (line 326) | def transpose_for_scores(self, x): method forward (line 331) | def forward( class TapasSelfOutput (line 402) | class TapasSelfOutput(nn.Module): method __init__ (line 403) | def __init__(self, config): method forward (line 409) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TapasAttention (line 416) | class TapasAttention(nn.Module): method __init__ (line 417) | def __init__(self, config): method prune_heads (line 424) | def prune_heads(self, heads): method forward (line 443) | def forward( class TapasIntermediate (line 468) | class TapasIntermediate(nn.Module): method __init__ (line 469) | def __init__(self, config): method forward (line 477) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TapasOutput (line 484) | class TapasOutput(nn.Module): method __init__ (line 485) | def __init__(self, config): method forward (line 491) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TapasLayer (line 498) | class TapasLayer(nn.Module): method __init__ (line 499) | def __init__(self, config): method forward (line 514) | def forward( method feed_forward_chunk (line 580) | def feed_forward_chunk(self, attention_output): class TapasEncoder (line 586) | class TapasEncoder(nn.Module): method __init__ (line 587) | def __init__(self, config): method forward (line 593) | def forward( class TapasPooler (line 650) | class TapasPooler(nn.Module): method __init__ (line 651) | def __init__(self, config): method forward (line 656) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TapasPredictionHeadTransform (line 666) | class TapasPredictionHeadTransform(nn.Module): method __init__ (line 667) | def __init__(self, config): method forward (line 676) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TapasLMPredictionHead (line 684) | class TapasLMPredictionHead(nn.Module): method __init__ (line 685) | def __init__(self, config): method _tie_weights (line 698) | def _tie_weights(self): method forward (line 701) | def forward(self, hidden_states): class TapasOnlyMLMHead (line 708) | class TapasOnlyMLMHead(nn.Module): method __init__ (line 709) | def __init__(self, config): method forward (line 713) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class TapasPreTrainedModel (line 718) | class TapasPreTrainedModel(PreTrainedModel): method _init_weights (line 730) | def _init_weights(self, module): class TapasModel (line 809) | class TapasModel(TapasPreTrainedModel): method __init__ (line 820) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 832) | def get_input_embeddings(self): method set_input_embeddings (line 835) | def set_input_embeddings(self, value): method _prune_heads (line 838) | def _prune_heads(self, heads_to_prune): method forward (line 848) | def forward( class TapasForMaskedLM (line 962) | class TapasForMaskedLM(TapasPreTrainedModel): method __init__ (line 967) | def __init__(self, config): method get_output_embeddings (line 976) | def get_output_embeddings(self): method set_output_embeddings (line 979) | def set_output_embeddings(self, new_embeddings): method forward (line 985) | def forward( class TapasForQuestionAnswering (line 1079) | class TapasForQuestionAnswering(TapasPreTrainedModel): method __init__ (line 1080) | def __init__(self, config: TapasConfig): method forward (line 1116) | def forward( class TapasForSequenceClassification (line 1424) | class TapasForSequenceClassification(TapasPreTrainedModel): method __init__ (line 1425) | def __init__(self, config): method forward (line 1438) | def forward( class AverageApproximationFunction (line 1544) | class AverageApproximationFunction(str, enum.Enum): class IndexMap (line 1553) | class IndexMap: method __init__ (line 1556) | def __init__(self, indices, num_segments, batch_dims=0): method batch_shape (line 1575) | def batch_shape(self): class ProductIndexMap (line 1579) | class ProductIndexMap(IndexMap): method __init__ (line 1582) | def __init__(self, outer_index, inner_index): method project_outer (line 1607) | def project_outer(self, index): method project_inner (line 1612) | def project_inner(self, index): function gather (line 1624) | def gather(values, index, name="segmented_gather"): function flatten (line 1657) | def flatten(index, name="segmented_flatten"): function range_index_map (line 1686) | def range_index_map(batch_shape, num_segments, name="range_index_map"): function _segment_reduce (line 1727) | def _segment_reduce(values, index, segment_reduce_fn, name): function reduce_sum (line 1775) | def reduce_sum(values, index, name="segmented_reduce_sum"): function reduce_mean (line 1802) | def reduce_mean(values, index, name="segmented_reduce_mean"): function reduce_max (line 1831) | def reduce_max(values, index, name="segmented_reduce_max"): function reduce_min (line 1858) | def reduce_min(values, index, name="segmented_reduce_min"): function compute_column_logits (line 1888) | def compute_column_logits( function _single_column_cell_selection_loss (line 1940) | def _single_column_cell_selection_loss(token_logits, column_logits, labe... function compute_token_logits (line 2047) | def compute_token_logits(sequence_output, temperature, output_weights, o... function _calculate_aggregate_mask (line 2069) | def _calculate_aggregate_mask(answer, pooled_output, cell_selection_pref... function _calculate_aggregation_loss_known (line 2120) | def _calculate_aggregation_loss_known( function _calculate_aggregation_loss_unknown (line 2166) | def _calculate_aggregation_loss_unknown(logits_aggregation, aggregate_ma... function _calculate_aggregation_loss (line 2190) | def _calculate_aggregation_loss( function _calculate_expected_result (line 2228) | def _calculate_expected_result( function huber_loss (line 2316) | def huber_loss(input, target, delta: float = 1.0): function _calculate_regression_loss (line 2321) | def _calculate_regression_loss( FILE: mplsandbox_for_rl/transformers/src/transformers/models/tapas/modeling_tf_tapas.py class TFTableQuestionAnsweringOutput (line 91) | class TFTableQuestionAnsweringOutput(ModelOutput): class TFTapasEmbeddings (line 120) | class TFTapasEmbeddings(keras.layers.Layer): method __init__ (line 126) | def __init__(self, config: TapasConfig, **kwargs): method build (line 138) | def build(self, input_shape=None): method call (line 171) | def call( class TFTapasSelfAttention (line 235) | class TFTapasSelfAttention(keras.layers.Layer): method __init__ (line 236) | def __init__(self, config: TapasConfig, **kwargs): method transpose_for_scores (line 264) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 271) | def call( method build (line 352) | def build(self, input_shape=None): class TFTapasSelfOutput (line 368) | class TFTapasSelfOutput(keras.layers.Layer): method __init__ (line 369) | def __init__(self, config: TapasConfig, **kwargs): method call (line 379) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 386) | def build(self, input_shape=None): class TFTapasAttention (line 399) | class TFTapasAttention(keras.layers.Layer): method __init__ (line 400) | def __init__(self, config: TapasConfig, **kwargs): method prune_heads (line 406) | def prune_heads(self, heads): method call (line 409) | def call( method build (line 438) | def build(self, input_shape=None): class TFTapasIntermediate (line 451) | class TFTapasIntermediate(keras.layers.Layer): method __init__ (line 452) | def __init__(self, config: TapasConfig, **kwargs): method call (line 465) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 471) | def build(self, input_shape=None): class TFTapasOutput (line 481) | class TFTapasOutput(keras.layers.Layer): method __init__ (line 482) | def __init__(self, config: TapasConfig, **kwargs): method call (line 492) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 499) | def build(self, input_shape=None): class TFTapasLayer (line 512) | class TFTapasLayer(keras.layers.Layer): method __init__ (line 513) | def __init__(self, config: TapasConfig, **kwargs): method call (line 526) | def call( method build (line 597) | def build(self, input_shape=None): class TFTapasEncoder (line 616) | class TFTapasEncoder(keras.layers.Layer): method __init__ (line 617) | def __init__(self, config: TapasConfig, **kwargs): method call (line 622) | def call( method build (line 684) | def build(self, input_shape=None): class TFTapasPooler (line 695) | class TFTapasPooler(keras.layers.Layer): method __init__ (line 696) | def __init__(self, config: TapasConfig, **kwargs): method call (line 707) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 715) | def build(self, input_shape=None): class TFTapasPredictionHeadTransform (line 725) | class TFTapasPredictionHeadTransform(keras.layers.Layer): method __init__ (line 726) | def __init__(self, config: TapasConfig, **kwargs): method call (line 743) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 750) | def build(self, input_shape=None): class TFTapasLMPredictionHead (line 763) | class TFTapasLMPredictionHead(keras.layers.Layer): method __init__ (line 764) | def __init__(self, config: TapasConfig, input_embeddings: keras.layers... method build (line 776) | def build(self, input_shape=None): method get_output_embeddings (line 786) | def get_output_embeddings(self) -> keras.layers.Layer: method set_output_embeddings (line 789) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 793) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 796) | def set_bias(self, value: tf.Variable): method call (line 800) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFTapasMLMHead (line 812) | class TFTapasMLMHead(keras.layers.Layer): method __init__ (line 813) | def __init__(self, config: TapasConfig, input_embeddings: keras.layers... method call (line 818) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: method build (line 823) | def build(self, input_shape=None): class TFTapasMainLayer (line 833) | class TFTapasMainLayer(keras.layers.Layer): method __init__ (line 836) | def __init__(self, config: TapasConfig, add_pooling_layer: bool = True... method get_input_embeddings (line 845) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 848) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 852) | def _prune_heads(self, heads_to_prune): method call (line 860) | def call( method build (line 953) | def build(self, input_shape=None): class TFTapasPreTrainedModel (line 968) | class TFTapasPreTrainedModel(TFPreTrainedModel): method input_signature (line 978) | def input_signature(self): class TFTapasModel (line 1086) | class TFTapasModel(TFTapasPreTrainedModel): method __init__ (line 1087) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method call (line 1095) | def call( method build (line 1148) | def build(self, input_shape=None): class TFTapasForMaskedLM (line 1158) | class TFTapasForMaskedLM(TFTapasPreTrainedModel, TFMaskedLanguageModelin... method __init__ (line 1159) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method get_lm_head (line 1171) | def get_lm_head(self) -> keras.layers.Layer: method call (line 1177) | def call( method build (line 1252) | def build(self, input_shape=None): class TFTapasComputeTokenLogits (line 1264) | class TFTapasComputeTokenLogits(keras.layers.Layer): method __init__ (line 1265) | def __init__(self, config: TapasConfig, **kwargs): method call (line 1284) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFTapasComputeColumnLogits (line 1300) | class TFTapasComputeColumnLogits(keras.layers.Layer): method __init__ (line 1301) | def __init__(self, config: TapasConfig, **kwargs): method call (line 1318) | def call(self, sequence_output, cell_index, cell_mask, allow_empty_col... class TFTapasForQuestionAnswering (line 1369) | class TFTapasForQuestionAnswering(TFTapasPreTrainedModel): method __init__ (line 1370) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method call (line 1394) | def call( method build (line 1686) | def build(self, input_shape=None): class TFTapasForSequenceClassification (line 1711) | class TFTapasForSequenceClassification(TFTapasPreTrainedModel, TFSequenc... method __init__ (line 1712) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method call (line 1726) | def call( method build (line 1806) | def build(self, input_shape=None): class AverageApproximationFunction (line 1824) | class AverageApproximationFunction(str, enum.Enum): class IndexMap (line 1833) | class IndexMap: method __init__ (line 1836) | def __init__(self, indices, num_segments, batch_dims=0): method batch_shape (line 1852) | def batch_shape(self): class ProductIndexMap (line 1856) | class ProductIndexMap(IndexMap): method __init__ (line 1859) | def __init__(self, outer_index, inner_index): method project_outer (line 1885) | def project_outer(self, index): method project_inner (line 1893) | def project_inner(self, index): function gather (line 1902) | def gather(values, index, name="segmented_gather"): function flatten (line 1918) | def flatten(index, name="segmented_flatten"): function range_index_map (line 1941) | def range_index_map(batch_shape, num_segments, name="range_index_map"): function _segment_reduce (line 1969) | def _segment_reduce(values, index, segment_reduce_fn, name): function reduce_mean (line 2004) | def reduce_mean(values, index, name="segmented_reduce_mean"): function reduce_sum (line 2027) | def reduce_sum(values, index, name="segmented_reduce_sum"): function reduce_max (line 2050) | def reduce_max(values, index, name="segmented_reduce_max"): function reduce_min (line 2072) | def reduce_min(values, index, name="segmented_reduce_min"): function _single_column_cell_selection_loss (line 2077) | def _single_column_cell_selection_loss(token_logits, column_logits, labe... function _calculate_aggregate_mask (line 2150) | def _calculate_aggregate_mask(answer, pooled_output, cell_selection_pref... function _calculate_aggregation_loss_known (line 2194) | def _calculate_aggregation_loss_known( function _calculate_aggregation_loss_unknown (line 2240) | def _calculate_aggregation_loss_unknown(logits_aggregation, aggregate_ma... function _calculate_aggregation_loss (line 2264) | def _calculate_aggregation_loss( function _calculate_expected_result (line 2302) | def _calculate_expected_result( function _calculate_regression_loss (line 2381) | def _calculate_regression_loss( FILE: mplsandbox_for_rl/transformers/src/transformers/models/tapas/tokenization_tapas.py class TapasTruncationStrategy (line 51) | class TapasTruncationStrategy(ExplicitEnum): class TokenCoordinates (line 64) | class TokenCoordinates: class TokenizedTable (line 71) | class TokenizedTable: class SerializedExample (line 77) | class SerializedExample: function _is_inner_wordpiece (line 84) | def _is_inner_wordpiece(token: str): function load_vocab (line 88) | def load_vocab(vocab_file): function whitespace_tokenize (line 99) | def whitespace_tokenize(text): class TapasTokenizer (line 150) | class TapasTokenizer(PreTrainedTokenizer): method __init__ (line 232) | def __init__( method do_lower_case (line 329) | def do_lower_case(self): method vocab_size (line 333) | def vocab_size(self): method get_vocab (line 336) | def get_vocab(self): method _tokenize (line 339) | def _tokenize(self, text): method _convert_token_to_id (line 354) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 358) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 362) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 367) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method create_attention_mask_from_sequences (line 387) | def create_attention_mask_from_sequences(self, query_ids: List[int], t... method create_segment_token_type_ids_from_sequences (line 401) | def create_segment_token_type_ids_from_sequences( method create_column_token_type_ids_from_sequences (line 418) | def create_column_token_type_ids_from_sequences( method create_row_token_type_ids_from_sequences (line 435) | def create_row_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 452) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 471) | def get_special_tokens_mask( method __call__ (line 500) | def __call__( method batch_encode_plus (line 617) | def batch_encode_plus( method _get_question_tokens (line 713) | def _get_question_tokens(self, query): method _batch_encode_plus (line 726) | def _batch_encode_plus( method _batch_prepare_for_model (line 783) | def _batch_prepare_for_model( method encode (line 855) | def encode( method encode_plus (line 898) | def encode_plus( method _encode_plus (line 981) | def _encode_plus( method prepare_for_model (line 1037) | def prepare_for_model( method _get_truncated_table_rows (line 1229) | def _get_truncated_table_rows( method _tokenize_table (line 1286) | def _tokenize_table( method _question_encoding_cost (line 1331) | def _question_encoding_cost(self, question_tokens): method _get_token_budget (line 1335) | def _get_token_budget(self, question_tokens, max_length=None): method _get_table_values (line 1349) | def _get_table_values(self, table, num_columns, num_rows, num_tokens) ... method _get_table_boundaries (line 1368) | def _get_table_boundaries(self, table): method _get_table_cost (line 1381) | def _get_table_cost(self, table, num_columns, num_rows, num_tokens): method _get_max_num_tokens (line 1384) | def _get_max_num_tokens(self, question_tokens, tokenized_table, num_co... method _get_num_columns (line 1403) | def _get_num_columns(self, table): method _get_num_rows (line 1409) | def _get_num_rows(self, table, drop_rows_to_fit): method _serialize_text (line 1418) | def _serialize_text(self, question_tokens): method _serialize (line 1439) | def _serialize( method _get_column_values (line 1469) | def _get_column_values(self, table, col_index): method _get_cell_token_indexes (line 1477) | def _get_cell_token_indexes(self, column_ids, row_ids, column_id, row_... method _get_numeric_column_ranks (line 1482) | def _get_numeric_column_ranks(self, column_ids, row_ids, table): method _get_numeric_sort_key_fn (line 1517) | def _get_numeric_sort_key_fn(self, table_numeric_values, value): method _get_numeric_relations (line 1538) | def _get_numeric_relations(self, question, column_ids, row_ids, table): method _get_numeric_values (line 1579) | def _get_numeric_values(self, table, column_ids, row_ids): method _get_numeric_values_scale (line 1602) | def _get_numeric_values_scale(self, table, column_ids, row_ids): method _pad_to_seq_length (line 1623) | def _pad_to_seq_length(self, inputs): method _get_all_answer_ids_from_coordinates (line 1629) | def _get_all_answer_ids_from_coordinates( method _get_all_answer_ids (line 1649) | def _get_all_answer_ids(self, column_ids, row_ids, answer_coordinates): method _find_tokens (line 1664) | def _find_tokens(self, text, segment): method _find_answer_coordinates_from_answer_text (line 1675) | def _find_answer_coordinates_from_answer_text( method _find_answer_ids_from_answer_texts (line 1695) | def _find_answer_ids_from_answer_texts( method _get_answer_ids (line 1733) | def _get_answer_ids(self, column_ids, row_ids, answer_coordinates): method get_answer_ids (line 1741) | def get_answer_ids(self, column_ids, row_ids, tokenized_table, answer_... method _pad (line 1751) | def _pad( method _get_cell_token_probs (line 1845) | def _get_cell_token_probs(self, probabilities, segment_ids, row_ids, c... method _get_mean_cell_probs (line 1853) | def _get_mean_cell_probs(self, probabilities, segment_ids, row_ids, co... method convert_logits_to_predictions (line 1862) | def convert_logits_to_predictions(self, data, logits, logits_agg=None,... class BasicTokenizer (line 1964) | class BasicTokenizer: method __init__ (line 1987) | def __init__( method tokenize (line 2003) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 2041) | def _run_strip_accents(self, text): method _run_split_on_punc (line 2052) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 2074) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 2087) | def _is_chinese_char(self, cp): method _clean_text (line 2111) | def _clean_text(self, text): class WordpieceTokenizer (line 2126) | class WordpieceTokenizer: method __init__ (line 2129) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 2134) | def tokenize(self, text): class Relation (line 2192) | class Relation(enum.Enum): class Date (line 2205) | class Date: class NumericValue (line 2212) | class NumericValue: class NumericValueSpan (line 2218) | class NumericValueSpan: class Cell (line 2225) | class Cell: class Question (line 2231) | class Question: function _process_date_pattern (line 2290) | def _process_date_pattern(dp): function _process_date_patterns (line 2304) | def _process_date_patterns(): function _get_numeric_value_from_date (line 2358) | def _get_numeric_value_from_date(date, mask): function _get_span_length_key (line 2373) | def _get_span_length_key(span): function _get_numeric_value_from_float (line 2378) | def _get_numeric_value_from_float(value): function _parse_date (line 2384) | def _parse_date(text): function _parse_number (line 2401) | def _parse_number(text): function get_all_spans (line 2419) | def get_all_spans(text, max_ngram_length): function normalize_for_match (line 2440) | def normalize_for_match(text): function format_text (line 2444) | def format_text(text): function parse_text (line 2458) | def parse_text(text): function _get_value_type (line 2532) | def _get_value_type(numeric_value): function _get_value_as_primitive_value (line 2540) | def _get_value_as_primitive_value(numeric_value): function _get_all_types (line 2558) | def _get_all_types(numeric_values): function get_numeric_sort_key_fn (line 2562) | def get_numeric_sort_key_fn(numeric_values): function _consolidate_numeric_values (line 2609) | def _consolidate_numeric_values(row_index_to_values, min_consolidation_f... function _get_numeric_values (line 2656) | def _get_numeric_values(text): function _get_column_values (line 2662) | def _get_column_values(table, col_index): function get_numeric_relation (line 2678) | def get_numeric_relation(value, other_value, sort_key_fn): function add_numeric_values_to_question (line 2691) | def add_numeric_values_to_question(question): function filter_invalid_unicode (line 2699) | def filter_invalid_unicode(text): function filter_invalid_unicode_from_table (line 2704) | def filter_invalid_unicode_from_table(table): function add_numeric_table_values (line 2730) | def add_numeric_table_values(table, min_consolidation_fraction=0.7, debu... FILE: mplsandbox_for_rl/transformers/src/transformers/models/time_series_transformer/configuration_time_series_transformer.py class TimeSeriesTransformerConfig (line 26) | class TimeSeriesTransformerConfig(PretrainedConfig): method __init__ (line 131) | def __init__( method _number_of_features (line 219) | def _number_of_features(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/time_series_transformer/modeling_time_series_transformer.py class TimeSeriesFeatureEmbedder (line 49) | class TimeSeriesFeatureEmbedder(nn.Module): method __init__ (line 60) | def __init__(self, cardinalities: List[int], embedding_dims: List[int]... method forward (line 66) | def forward(self, features: torch.Tensor) -> torch.Tensor: class TimeSeriesStdScaler (line 83) | class TimeSeriesStdScaler(nn.Module): method __init__ (line 89) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 95) | def forward( class TimeSeriesMeanScaler (line 118) | class TimeSeriesMeanScaler(nn.Module): method __init__ (line 124) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 131) | def forward( class TimeSeriesNOPScaler (line 172) | class TimeSeriesNOPScaler(nn.Module): method __init__ (line 177) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 182) | def forward( function nll (line 199) | def nll(input: torch.distributions.Distribution, target: torch.Tensor) -... function weighted_average (line 206) | def weighted_average(input_tensor: torch.Tensor, weights: Optional[torch... class TimeSeriesSinusoidalPositionalEmbedding (line 231) | class TimeSeriesSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 234) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 239) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 256) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class TimeSeriesValueEmbedding (line 265) | class TimeSeriesValueEmbedding(nn.Module): method __init__ (line 266) | def __init__(self, feature_size, d_model): method forward (line 270) | def forward(self, x): class TimeSeriesTransformerAttention (line 275) | class TimeSeriesTransformerAttention(nn.Module): method __init__ (line 278) | def __init__( method _shape (line 309) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 312) | def forward( class TimeSeriesTransformerEncoderLayer (line 434) | class TimeSeriesTransformerEncoderLayer(nn.Module): method __init__ (line 435) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 453) | def forward( class TimeSeriesTransformerDecoderLayer (line 511) | class TimeSeriesTransformerDecoderLayer(nn.Module): method __init__ (line 512) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 541) | def forward( class TimeSeriesTransformerPreTrainedModel (line 631) | class TimeSeriesTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 637) | def _init_weights(self, module): class TimeSeriesTransformerEncoder (line 822) | class TimeSeriesTransformerEncoder(TimeSeriesTransformerPreTrainedModel): method __init__ (line 831) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 850) | def forward( class TimeSeriesTransformerDecoder (line 959) | class TimeSeriesTransformerDecoder(TimeSeriesTransformerPreTrainedModel): method __init__ (line 968) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 986) | def forward( class TimeSeriesTransformerModel (line 1180) | class TimeSeriesTransformerModel(TimeSeriesTransformerPreTrainedModel): method __init__ (line 1181) | def __init__(self, config: TimeSeriesTransformerConfig): method _past_length (line 1205) | def _past_length(self) -> int: method get_lagged_subsequences (line 1208) | def get_lagged_subsequences( method create_network_inputs (line 1240) | def create_network_inputs( method get_encoder (line 1312) | def get_encoder(self): method get_decoder (line 1315) | def get_decoder(self): method forward (line 1320) | def forward( class TimeSeriesTransformerForPrediction (line 1441) | class TimeSeriesTransformerForPrediction(TimeSeriesTransformerPreTrained... method __init__ (line 1442) | def __init__(self, config: TimeSeriesTransformerConfig): method output_params (line 1465) | def output_params(self, dec_output): method get_encoder (line 1468) | def get_encoder(self): method get_decoder (line 1471) | def get_decoder(self): method output_distribution (line 1475) | def output_distribution(self, params, loc=None, scale=None, trailing_n... method forward (line 1483) | def forward( method generate (line 1616) | def generate( FILE: mplsandbox_for_rl/transformers/src/transformers/models/timesformer/configuration_timesformer.py class TimesformerConfig (line 24) | class TimesformerConfig(PretrainedConfig): method __init__ (line 87) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/timesformer/modeling_timesformer.py class TimesformerPatchEmbeddings (line 40) | class TimesformerPatchEmbeddings(nn.Module): method __init__ (line 43) | def __init__(self, config): method forward (line 59) | def forward(self, pixel_values): class TimesformerEmbeddings (line 69) | class TimesformerEmbeddings(nn.Module): method __init__ (line 74) | def __init__(self, config): method forward (line 94) | def forward(self, pixel_values): function drop_path (line 150) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class TimeSformerDropPath (line 171) | class TimeSformerDropPath(nn.Module): method __init__ (line 174) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 178) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 181) | def extra_repr(self) -> str: class TimesformerSelfAttention (line 186) | class TimesformerSelfAttention(nn.Module): method __init__ (line 187) | def __init__(self, config: TimesformerConfig): method forward (line 200) | def forward(self, hidden_states, output_attentions: bool = False): class TimesformerSelfOutput (line 220) | class TimesformerSelfOutput(nn.Module): method __init__ (line 226) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 231) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TimeSformerAttention (line 238) | class TimeSformerAttention(nn.Module): method __init__ (line 239) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 244) | def forward( class TimesformerIntermediate (line 258) | class TimesformerIntermediate(nn.Module): method __init__ (line 259) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 269) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TimesformerOutput (line 277) | class TimesformerOutput(nn.Module): method __init__ (line 278) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 283) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TimesformerLayer (line 291) | class TimesformerLayer(nn.Module): method __init__ (line 292) | def __init__(self, config: TimesformerConfig, layer_index: int) -> None: method forward (line 320) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class TimesformerEncoder (line 414) | class TimesformerEncoder(nn.Module): method __init__ (line 415) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 421) | def forward( class TimesformerPreTrainedModel (line 461) | class TimesformerPreTrainedModel(PreTrainedModel): method _init_weights (line 473) | def _init_weights(self, module): class TimesformerModel (line 519) | class TimesformerModel(TimesformerPreTrainedModel): method __init__ (line 520) | def __init__(self, config): method get_input_embeddings (line 532) | def get_input_embeddings(self): method _prune_heads (line 535) | def _prune_heads(self, heads_to_prune): method forward (line 545) | def forward( class TimesformerForVideoClassification (line 661) | class TimesformerForVideoClassification(TimesformerPreTrainedModel): method __init__ (line 662) | def __init__(self, config): method forward (line 676) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/timm_backbone/configuration_timm_backbone.py class TimmBackboneConfig (line 25) | class TimmBackboneConfig(PretrainedConfig): method __init__ (line 66) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/timm_backbone/modeling_timm_backbone.py class TimmBackbone (line 35) | class TimmBackbone(PreTrainedModel, BackboneMixin): method __init__ (line 45) | def __init__(self, config, **kwargs): method from_pretrained (line 92) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method freeze_batch_norm_2d (line 115) | def freeze_batch_norm_2d(self): method unfreeze_batch_norm_2d (line 118) | def unfreeze_batch_norm_2d(self): method _init_weights (line 121) | def _init_weights(self, module): method forward (line 127) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/trocr/configuration_trocr.py class TrOCRConfig (line 24) | class TrOCRConfig(PretrainedConfig): method __init__ (line 96) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/trocr/convert_trocr_unilm_to_pytorch.py function create_rename_keys (line 42) | def create_rename_keys(encoder_config, decoder_config): function read_in_q_k_v (line 87) | def read_in_q_k_v(state_dict, encoder_config): function rename_key (line 103) | def rename_key(dct, old, new): function prepare_img (line 109) | def prepare_img(checkpoint_url): function convert_tr_ocr_checkpoint (line 123) | def convert_tr_ocr_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: mplsandbox_for_rl/transformers/src/transformers/models/trocr/modeling_trocr.py class TrOCRLearnedPositionalEmbedding (line 40) | class TrOCRLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 45) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 51) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class TrOCRScaledWordEmbedding (line 63) | class TrOCRScaledWordEmbedding(nn.Embedding): method __init__ (line 68) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 72) | def forward(self, input_ids: torch.Tensor): class TrOCRSinusoidalPositionalEmbedding (line 76) | class TrOCRSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 79) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method get_embedding (line 88) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 107) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 125) | def create_position_ids_from_input_ids( class TrOCRAttention (line 138) | class TrOCRAttention(nn.Module): method __init__ (line 141) | def __init__( method _shape (line 174) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 177) | def forward( class TrOCRDecoderLayer (line 287) | class TrOCRDecoderLayer(nn.Module): method __init__ (line 288) | def __init__(self, config: TrOCRConfig): method forward (line 322) | def forward( class TrOCRPreTrainedModel (line 416) | class TrOCRPreTrainedModel(PreTrainedModel): method _init_weights (line 422) | def _init_weights(self, module): class TrOCRDecoder (line 451) | class TrOCRDecoder(TrOCRPreTrainedModel): method __init__ (line 459) | def __init__(self, config: TrOCRConfig): method get_input_embeddings (line 490) | def get_input_embeddings(self): method set_input_embeddings (line 493) | def set_input_embeddings(self, value): method forward (line 496) | def forward( class TrOCRDecoderWrapper (line 720) | class TrOCRDecoderWrapper(TrOCRPreTrainedModel): method __init__ (line 726) | def __init__(self, config): method forward (line 730) | def forward(self, *args, **kwargs): class TrOCRForCausalLM (line 739) | class TrOCRForCausalLM(TrOCRPreTrainedModel): method __init__ (line 742) | def __init__(self, config): method get_input_embeddings (line 754) | def get_input_embeddings(self): method set_input_embeddings (line 757) | def set_input_embeddings(self, value): method get_output_embeddings (line 760) | def get_output_embeddings(self): method set_output_embeddings (line 763) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 766) | def set_decoder(self, decoder): method get_decoder (line 769) | def get_decoder(self): method forward (line 773) | def forward( method prepare_inputs_for_generation (line 947) | def prepare_inputs_for_generation( method _reorder_cache (line 974) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/trocr/processing_trocr.py class TrOCRProcessor (line 25) | class TrOCRProcessor(ProcessorMixin): method __init__ (line 44) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 64) | def __call__(self, *args, **kwargs): method batch_decode (line 97) | def batch_decode(self, *args, **kwargs): method decode (line 104) | def decode(self, *args, **kwargs): method as_target_processor (line 112) | def as_target_processor(self): method feature_extractor_class (line 128) | def feature_extractor_class(self): method feature_extractor (line 136) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/tvp/configuration_tvp.py class TvpConfig (line 28) | class TvpConfig(PretrainedConfig): method __init__ (line 103) | def __init__( method from_backbone_config (line 176) | def from_backbone_config(cls, backbone_config: PretrainedConfig, **kwa... method to_dict (line 187) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/tvp/image_processing_tvp.py function make_batched (line 52) | def make_batched(videos) -> List[List[ImageInput]]: function get_resize_output_image_size (line 65) | def get_resize_output_image_size( class TvpImageProcessor (line 84) | class TvpImageProcessor(BaseImageProcessor): method __init__ (line 136) | def __init__( method resize (line 176) | def resize( method pad_image (line 219) | def pad_image( method _preprocess_image (line 266) | def _preprocess_image( method preprocess (line 340) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/tvp/modeling_tvp.py class TvpVideoGroundingOutput (line 39) | class TvpVideoGroundingOutput(ModelOutput): class TvpLoss (line 62) | class TvpLoss(nn.Module): method __init__ (line 73) | def __init__(self, losses): method loss_iou (line 86) | def loss_iou(self, start_time, end_time, candidates_start_time, candid... method loss_distance (line 96) | def loss_distance(self, start_time, end_time, candidates_start_time, c... method loss_duration (line 108) | def loss_duration(self, start_time, end_time, candidates_start_time, c... method forward (line 119) | def forward(self, logits, labels): class TvpVisionModel (line 142) | class TvpVisionModel(nn.Module): method __init__ (line 143) | def __init__(self, config): method forward (line 166) | def forward(self, pixel_values): class TvpVisualInputEmbedding (line 182) | class TvpVisualInputEmbedding(nn.Module): method __init__ (line 187) | def __init__(self, config): method interpolate_pos_encoding (line 199) | def interpolate_pos_encoding(self, embedding: torch.Tensor, height: in... method add_2d_positional_embeddings (line 222) | def add_2d_positional_embeddings(self, grid, interpolate_pos_encoding:... method forward (line 263) | def forward(self, grid, interpolate_pos_encoding: bool = False): class TvpTextInputEmbeddings (line 295) | class TvpTextInputEmbeddings(nn.Module): method __init__ (line 298) | def __init__(self, config): method forward (line 306) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class TvpAttention (line 331) | class TvpAttention(nn.Module): method __init__ (line 332) | def __init__(self, config): method prune_heads (line 353) | def prune_heads(self, heads): method _reshape (line 376) | def _reshape(self, tensor: torch.Tensor, sequence_length: int, batch_s... method forward (line 383) | def forward( class TvpIntermediate (line 430) | class TvpIntermediate(nn.Module): method __init__ (line 431) | def __init__(self, config): method forward (line 439) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TvpOutputLayer (line 445) | class TvpOutputLayer(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 TvpEncodeLayer (line 459) | class TvpEncodeLayer(nn.Module): method __init__ (line 460) | def __init__(self, config): method forward (line 466) | def forward( class TvpEncoder (line 487) | class TvpEncoder(nn.Module): method __init__ (line 488) | def __init__(self, config): method forward (line 494) | def forward( class TvpPooler (line 550) | class TvpPooler(nn.Module): method __init__ (line 551) | def __init__(self, config): method forward (line 556) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TvpPreTrainedModel (line 565) | class TvpPreTrainedModel(PreTrainedModel): method _init_weights (line 574) | def _init_weights(self, module): class TvpFrameDownPadPrompter (line 642) | class TvpFrameDownPadPrompter(nn.Module): method __init__ (line 647) | def __init__(self, config): method forward (line 661) | def forward(self, pixel_values): class TvpFramePadPrompter (line 679) | class TvpFramePadPrompter(nn.Module): method __init__ (line 684) | def __init__(self, config): method interpolate_pad_encoding (line 722) | def interpolate_pad_encoding(self, prompt: torch.Tensor, height: int, ... method forward (line 746) | def forward(self, pixel_values, interpolate_pad_encoding: bool = False): class TvpModel (line 779) | class TvpModel(TvpPreTrainedModel): method __init__ (line 780) | def __init__(self, config): method get_input_embeddings (line 796) | def get_input_embeddings(self): method set_input_embeddings (line 799) | def set_input_embeddings(self, value): method _prune_heads (line 802) | def _prune_heads(self, heads_to_prune): method forward (line 811) | def forward( class TvpVideoGroundingHead (line 886) | class TvpVideoGroundingHead(nn.Module): method __init__ (line 887) | def __init__(self, config): method forward (line 894) | def forward(self, pooler_output): class TvpForVideoGrounding (line 906) | class TvpForVideoGrounding(TvpPreTrainedModel): method __init__ (line 907) | def __init__(self, config): method forward (line 917) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/tvp/processing_tvp.py class TvpProcessor (line 23) | class TvpProcessor(ProcessorMixin): method __init__ (line 41) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 49) | def __call__(self, text=None, videos=None, return_tensors=None, **kwar... method batch_decode (line 111) | def batch_decode(self, *args, **kwargs): method decode (line 118) | def decode(self, *args, **kwargs): method post_process_video_grounding (line 125) | def post_process_video_grounding(self, logits, video_durations): method model_input_names (line 150) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/udop/configuration_udop.py class UdopConfig (line 24) | class UdopConfig(PretrainedConfig): method __init__ (line 89) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/udop/convert_udop_to_hf.py function original_transform (line 34) | def original_transform(image, image_size=224): function get_image (line 47) | def get_image(): function prepare_dummy_inputs (line 56) | def prepare_dummy_inputs(tokenizer, image_processor): function convert_udop_checkpoint (line 91) | def convert_udop_checkpoint(model_name, pytorch_dump_folder_path=None, p... FILE: mplsandbox_for_rl/transformers/src/transformers/models/udop/modeling_udop.py class BaseModelOutputWithAttentionMask (line 216) | class BaseModelOutputWithAttentionMask(ModelOutput): function get_visual_bbox (line 258) | def get_visual_bbox(image_size=224, patch_size=16): function pad_sequence (line 281) | def pad_sequence(seq, target_len, pad_value=0): function combine_image_text_embeddings (line 294) | def combine_image_text_embeddings( class UdopPatchEmbeddings (line 374) | class UdopPatchEmbeddings(nn.Module): method __init__ (line 377) | def __init__(self, config): method forward (line 392) | def forward(self, pixel_values): class UdopPreTrainedModel (line 404) | class UdopPreTrainedModel(PreTrainedModel): method _init_weights (line 415) | def _init_weights(self, module): method _shift_right (line 477) | def _shift_right(self, input_ids): class UdopLayerNorm (line 501) | class UdopLayerNorm(nn.Module): method __init__ (line 502) | def __init__(self, hidden_size, eps=1e-6): method forward (line 510) | def forward(self, hidden_states): class UdopDenseActDense (line 527) | class UdopDenseActDense(nn.Module): method __init__ (line 528) | def __init__(self, config: UdopConfig): method forward (line 535) | def forward(self, hidden_states): class UdopDenseGatedActDense (line 550) | class UdopDenseGatedActDense(nn.Module): method __init__ (line 551) | def __init__(self, config: UdopConfig): method forward (line 559) | def forward(self, hidden_states): class UdopLayerFF (line 580) | class UdopLayerFF(nn.Module): method __init__ (line 581) | def __init__(self, config: UdopConfig): method forward (line 591) | def forward(self, hidden_states): class UdopAttention (line 599) | class UdopAttention(nn.Module): method __init__ (line 600) | def __init__(self, config: UdopConfig, has_relative_attention_bias=Fal... method prune_heads (line 623) | def prune_heads(self, heads): method _relative_position_bucket (line 640) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 687) | def compute_bias(self, query_length, key_length, device=None): method forward (line 704) | def forward( class UdopLayerSelfAttention (line 835) | class UdopLayerSelfAttention(nn.Module): method __init__ (line 836) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 842) | def forward( class UdopLayerCrossAttention (line 868) | class UdopLayerCrossAttention(nn.Module): method __init__ (line 869) | def __init__(self, config): method forward (line 875) | def forward( class UdopBlock (line 905) | class UdopBlock(nn.Module): method __init__ (line 906) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 916) | def forward( class UdopCellEmbeddings (line 1029) | class UdopCellEmbeddings(nn.Module): method __init__ (line 1030) | def __init__(self, max_2d_position_embeddings=501, hidden_size=1024): method forward (line 1037) | def forward(self, bbox): class RelativePositionBiasBase (line 1061) | class RelativePositionBiasBase(nn.Module, ABC): method __init__ (line 1083) | def __init__( method prepare_input (line 1109) | def prepare_input( method get_bucket (line 1116) | def get_bucket(self, attention_mask: Optional[Tensor] = None, bbox: Op... method get_relative_position (line 1126) | def get_relative_position(self, positions): method forward (line 1136) | def forward(self, attention_mask: Optional[Tensor] = None, bbox: Optio... class RelativePositionBias1D (line 1165) | class RelativePositionBias1D(RelativePositionBiasBase): method __init__ (line 1166) | def __init__(self, scaling_factor=1, max_distance=128, **kwargs): method prepare_input (line 1173) | def prepare_input(self, attention_mask: Optional[Tensor] = None, bbox:... class RelativePositionBiasHorizontal (line 1183) | class RelativePositionBiasHorizontal(RelativePositionBiasBase): method __init__ (line 1184) | def __init__(self, scaling_factor=100, max_distance=100, **kwargs): method prepare_input (line 1191) | def prepare_input(self, attention_mask: Optional[Tensor] = None, bbox:... class RelativePositionBiasVertical (line 1202) | class RelativePositionBiasVertical(RelativePositionBiasBase): method __init__ (line 1203) | def __init__(self, scaling_factor=100, max_distance=100, **kwargs): method prepare_input (line 1210) | def prepare_input(self, attention_mask: Optional[Tensor] = None, bbox:... class RelativePositionBiasAggregated (line 1221) | class RelativePositionBiasAggregated(nn.Module): method __init__ (line 1222) | def __init__(self, modules: Sequence[RelativePositionBiasBase]): method forward (line 1233) | def forward( function create_relative_bias (line 1250) | def create_relative_bias(config: UdopConfig) -> Sequence[RelativePositio... class UdopStack (line 1272) | class UdopStack(UdopPreTrainedModel): method __init__ (line 1278) | def __init__(self, config, embed_tokens=None, embed_patches=None): method _tie_weights (line 1300) | def _tie_weights(self): method _get_relative_bias (line 1308) | def _get_relative_bias(config: UdopConfig) -> RelativePositionBiasAggr... method get_input_embeddings (line 1312) | def get_input_embeddings(self): method get_output_embeddings (line 1315) | def get_output_embeddings(self): method set_input_embeddings (line 1318) | def set_input_embeddings(self, new_embeddings): method forward (line 1321) | def forward( class UdopModel (line 1518) | class UdopModel(UdopPreTrainedModel): method __init__ (line 1528) | def __init__(self, config): method get_input_embeddings (line 1550) | def get_input_embeddings(self): method set_input_embeddings (line 1553) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1558) | def get_encoder(self): method get_decoder (line 1561) | def get_decoder(self): method forward (line 1566) | def forward( class UdopForConditionalGeneration (line 1682) | class UdopForConditionalGeneration(UdopPreTrainedModel): method __init__ (line 1693) | def __init__(self, config): method get_input_embeddings (line 1718) | def get_input_embeddings(self): method set_input_embeddings (line 1721) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1726) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1729) | def get_output_embeddings(self): method get_encoder (line 1732) | def get_encoder(self): method get_decoder (line 1735) | def get_decoder(self): method forward (line 1740) | def forward( method prepare_inputs_for_generation (line 1871) | def prepare_inputs_for_generation( method _reorder_cache (line 1902) | def _reorder_cache(self, past_key_values, beam_idx): class UdopEncoderModel (line 1937) | class UdopEncoderModel(UdopPreTrainedModel): method __init__ (line 1945) | def __init__(self, config: UdopConfig): method get_input_embeddings (line 1961) | def get_input_embeddings(self): method set_input_embeddings (line 1964) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1968) | def get_encoder(self): method _prune_heads (line 1971) | def _prune_heads(self, heads_to_prune): method forward (line 1981) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/udop/processing_udop.py class UdopProcessor (line 27) | class UdopProcessor(ProcessorMixin): method __init__ (line 53) | def __init__(self, image_processor, tokenizer): method __call__ (line 56) | def __call__( method get_overflowing_images (line 171) | def get_overflowing_images(self, images, overflow_to_sample_mapping): method batch_decode (line 186) | def batch_decode(self, *args, **kwargs): method decode (line 194) | def decode(self, *args, **kwargs): method model_input_names (line 203) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/udop/tokenization_udop.py class UdopTokenizer (line 150) | class UdopTokenizer(PreTrainedTokenizer): method __init__ (line 244) | def __init__( method vocab_size (line 298) | def vocab_size(self): method get_vocab (line 302) | def get_vocab(self): method get_special_tokens_mask (line 308) | def get_special_tokens_mask( method get_sentinel_tokens (line 337) | def get_sentinel_tokens(self): method get_sentinel_token_ids (line 343) | def get_sentinel_token_ids(self): method _add_eos_if_not_present (line 347) | def _add_eos_if_not_present(self, token_ids: List[int]) -> List[int]: method create_token_type_ids_from_sequences (line 359) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 382) | def build_inputs_with_special_tokens( method __getstate__ (line 409) | def __getstate__(self): method __setstate__ (line 414) | def __setstate__(self, d): method tokenize (line 420) | def tokenize(self, text: "TextInput", **kwargs) -> List[str]: method _tokenize (line 439) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 457) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 461) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 466) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 490) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 508) | def __call__( method call_boxes (line 542) | def call_boxes( method batch_encode_plus_boxes (line 690) | def batch_encode_plus_boxes( method encode_boxes (line 760) | def encode_boxes( method encode_plus_boxes (line 803) | def encode_plus_boxes( method _batch_encode_plus_boxes (line 879) | def _batch_encode_plus_boxes( method _batch_prepare_for_model_boxes (line 935) | def _batch_prepare_for_model_boxes( method _encode_plus_boxes (line 1005) | def _encode_plus_boxes( method prepare_for_model_boxes (line 1058) | def prepare_for_model_boxes( method truncate_sequences (line 1256) | def truncate_sequences( method _pad (line 1382) | def _pad( FILE: mplsandbox_for_rl/transformers/src/transformers/models/udop/tokenization_udop_fast.py class UdopTokenizerFast (line 148) | class UdopTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 199) | def __init__( method can_save_slow_tokenizer (line 238) | def can_save_slow_tokenizer(self) -> bool: method __call__ (line 242) | def __call__( method call_boxes (line 277) | def call_boxes( method tokenize (line 426) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method batch_encode_plus_boxes (line 439) | def batch_encode_plus_boxes( method _batch_encode_plus_boxes (line 515) | def _batch_encode_plus_boxes( method _encode_plus_boxes (line 675) | def _encode_plus_boxes( method encode_boxes (line 741) | def encode_boxes( method encode_plus_boxes (line 784) | def encode_plus_boxes( method _pad (line 861) | def _pad( method build_inputs_with_special_tokens (line 945) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 970) | def create_token_type_ids_from_sequences( method save_vocabulary (line 995) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/umt5/configuration_umt5.py class UMT5Config (line 27) | class UMT5Config(PretrainedConfig): method __init__ (line 77) | def __init__( class UMT5OnnxConfig (line 145) | class UMT5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 148) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 168) | def default_onnx_opset(self) -> int: method atol_for_validation (line 172) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/umt5/convert_umt5_checkpoint_to_pytorch.py function t5x_relpos_bias_lookup (line 46) | def t5x_relpos_bias_lookup(params, i, prefix): function t5x_attention_lookup (line 51) | def t5x_attention_lookup(params, i, prefix, layer_name="attention"): function t5x_mlp_lookup (line 64) | def t5x_mlp_lookup(params, i, prefix, split_mlp_wi=False): function t5x_layer_norm_lookup (line 77) | def t5x_layer_norm_lookup(params, i, prefix, layer_name): function convert_t5x_to_pytorch (line 82) | def convert_t5x_to_pytorch( function make_state_dict (line 182) | def make_state_dict(converted_params, is_encoder_only: bool): function load_t5x_weights_in_t5 (line 202) | def load_t5x_weights_in_t5(model, config, t5x_checkpoint_path, is_encode... function convert_t5x_checkpoint_to_pytorch (line 212) | def convert_t5x_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/transformers/models/umt5/modeling_umt5.py class UMT5LayerNorm (line 55) | class UMT5LayerNorm(nn.Module): method __init__ (line 56) | def __init__(self, hidden_size, eps=1e-6): method forward (line 64) | def forward(self, hidden_states): class UMT5DenseActDense (line 81) | class UMT5DenseActDense(nn.Module): method __init__ (line 82) | def __init__(self, config: UMT5Config): method forward (line 89) | def forward(self, hidden_states): class UMT5DenseGatedActDense (line 104) | class UMT5DenseGatedActDense(nn.Module): method __init__ (line 105) | def __init__(self, config: UMT5Config): method forward (line 113) | def forward(self, hidden_states): class UMT5LayerFF (line 134) | class UMT5LayerFF(nn.Module): method __init__ (line 135) | def __init__(self, config: UMT5Config): method forward (line 145) | def forward(self, hidden_states): class UMT5Attention (line 152) | class UMT5Attention(nn.Module): method __init__ (line 157) | def __init__(self, config, has_relative_attention_bias=False): method _shape (line 179) | def _shape(self, projection: torch.Tensor) -> torch.Tensor: method _relative_position_bucket (line 185) | def _relative_position_bucket(self, relative_position): method compute_bias (line 232) | def compute_bias(self, query_length, key_length, device=None): method forward (line 244) | def forward( class UMT5LayerSelfAttention (line 319) | class UMT5LayerSelfAttention(nn.Module): method __init__ (line 320) | def __init__(self, config): method forward (line 326) | def forward( class UMT5LayerCrossAttention (line 345) | class UMT5LayerCrossAttention(nn.Module): method __init__ (line 346) | def __init__(self, config): method forward (line 352) | def forward( class UMT5Block (line 373) | class UMT5Block(nn.Module): method __init__ (line 374) | def __init__(self, config): method forward (line 384) | def forward( class UMT5ClassificationHead (line 456) | class UMT5ClassificationHead(nn.Module): method __init__ (line 459) | def __init__(self, config: UMT5Config): method forward (line 465) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class UMT5PreTrainedModel (line 474) | class UMT5PreTrainedModel(PreTrainedModel): method dummy_inputs (line 487) | def dummy_inputs(self): method _init_weights (line 497) | def _init_weights(self, module): method _shift_right (line 563) | def _shift_right(self, input_ids): class UMT5Stack (line 591) | class UMT5Stack(UMT5PreTrainedModel): method __init__ (line 592) | def __init__(self, config, embed_tokens=None): method get_input_embeddings (line 604) | def get_input_embeddings(self): method set_input_embeddings (line 607) | def set_input_embeddings(self, new_embeddings): method forward (line 610) | def forward( class UMT5Model (line 931) | class UMT5Model(UMT5PreTrainedModel): method __init__ (line 953) | def __init__(self, config): method get_input_embeddings (line 973) | def get_input_embeddings(self): method set_input_embeddings (line 977) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 983) | def _tie_weights(self): method get_encoder (line 989) | def get_encoder(self): method get_decoder (line 993) | def get_decoder(self): method _prune_heads (line 997) | def _prune_heads(self, heads_to_prune): method forward (line 1007) | def forward( class UMT5ForConditionalGeneration (line 1104) | class UMT5ForConditionalGeneration(UMT5PreTrainedModel): method __init__ (line 1124) | def __init__(self, config): method get_input_embeddings (line 1148) | def get_input_embeddings(self): method set_input_embeddings (line 1152) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1158) | def _tie_weights(self): method set_output_embeddings (line 1164) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1168) | def get_output_embeddings(self): method get_encoder (line 1172) | def get_encoder(self): method get_decoder (line 1176) | def get_decoder(self): method forward (line 1181) | def forward( method prepare_inputs_for_generation (line 1305) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1344) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1348) | def _reorder_cache(past_key_values, beam_idx): class UMT5EncoderModel (line 1361) | class UMT5EncoderModel(UMT5PreTrainedModel): method __init__ (line 1380) | def __init__(self, config): method get_input_embeddings (line 1393) | def get_input_embeddings(self): method set_input_embeddings (line 1397) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1402) | def _tie_weights(self): method get_encoder (line 1407) | def get_encoder(self): method _prune_heads (line 1411) | def _prune_heads(self, heads_to_prune): method forward (line 1422) | def forward( class UMT5ForSequenceClassification (line 1470) | class UMT5ForSequenceClassification(UMT5PreTrainedModel): method __init__ (line 1475) | def __init__(self, config: UMT5Config): method forward (line 1487) | def forward( class UMT5ForTokenClassification (line 1604) | class UMT5ForTokenClassification(UMT5PreTrainedModel): method __init__ (line 1609) | def __init__(self, config: UMT5Config): method forward (line 1623) | def forward( class UMT5ForQuestionAnswering (line 1679) | class UMT5ForQuestionAnswering(UMT5PreTrainedModel): method __init__ (line 1682) | def __init__(self, config): method get_input_embeddings (line 1707) | def get_input_embeddings(self): method set_input_embeddings (line 1711) | def set_input_embeddings(self, new_embeddings): method _tie_weights (line 1717) | def _tie_weights(self): method get_encoder (line 1723) | def get_encoder(self): method get_decoder (line 1727) | def get_decoder(self): method forward (line 1732) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/unispeech/configuration_unispeech.py class UniSpeechConfig (line 27) | class UniSpeechConfig(PretrainedConfig): method __init__ (line 186) | def __init__( method inputs_to_logits_ratio (line 305) | def inputs_to_logits_ratio(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/unispeech/convert_unispeech_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 68) | def set_recursively(hf_pointer, key, value, full_name, weight_type, is_f... function recursively_load_weights (line 105) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 149) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_unispeech_checkpoint (line 190) | def convert_unispeech_checkpoint( FILE: mplsandbox_for_rl/transformers/src/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 332) | def forward(self, hidden_states): class UniSpeechSamePadLayer (line 344) | class UniSpeechSamePadLayer(nn.Module): method __init__ (line 345) | def __init__(self, num_conv_pos_embeddings): method forward (line 349) | def forward(self, hidden_states): class UniSpeechFeatureEncoder (line 356) | class UniSpeechFeatureEncoder(nn.Module): method __init__ (line 359) | def __init__(self, config): method _freeze_parameters (line 379) | def _freeze_parameters(self): method forward (line 384) | def forward(self, input_values): class UniSpeechFeatureExtractor (line 403) | class UniSpeechFeatureExtractor(UniSpeechFeatureEncoder): method __init__ (line 404) | def __init__(self, config): class UniSpeechFeatureProjection (line 415) | class UniSpeechFeatureProjection(nn.Module): method __init__ (line 416) | def __init__(self, config): method forward (line 422) | def forward(self, hidden_states): class UniSpeechAttention (line 431) | class UniSpeechAttention(nn.Module): method __init__ (line 434) | def __init__( method _shape (line 465) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 468) | def forward( class UniSpeechFlashAttention2 (line 590) | class UniSpeechFlashAttention2(UniSpeechAttention): method __init__ (line 598) | def __init__(self, *args, **kwargs): method _reshape (line 606) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 609) | def forward( class UniSpeechSdpaAttention (line 717) | class UniSpeechSdpaAttention(UniSpeechAttention): method forward (line 719) | def forward( class UniSpeechFeedForward (line 832) | class UniSpeechFeedForward(nn.Module): method __init__ (line 833) | def __init__(self, config): method forward (line 846) | def forward(self, hidden_states): class UniSpeechEncoderLayer (line 857) | class UniSpeechEncoderLayer(nn.Module): method __init__ (line 858) | def __init__(self, config): method forward (line 872) | def forward(self, hidden_states, attention_mask=None, output_attention... class UniSpeechAttnAdapterLayer (line 893) | class UniSpeechAttnAdapterLayer(nn.Module): method __init__ (line 894) | def __init__(self, config): method forward (line 908) | def forward(self, hidden_states: torch.FloatTensor): class UniSpeechEncoderLayerStableLayerNorm (line 919) | class UniSpeechEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 920) | def __init__(self, config): method forward (line 938) | def forward( class UniSpeechEncoder (line 965) | class UniSpeechEncoder(nn.Module): method __init__ (line 966) | def __init__(self, config): method forward (line 976) | def forward( class UniSpeechEncoderStableLayerNorm (line 1051) | class UniSpeechEncoderStableLayerNorm(nn.Module): method __init__ (line 1052) | def __init__(self, config): method forward (line 1064) | def forward( class UniSpeechGumbelVectorQuantizer (line 1140) | class UniSpeechGumbelVectorQuantizer(nn.Module): method __init__ (line 1146) | def __init__(self, config): method _compute_perplexity (line 1167) | def _compute_perplexity(probs): method forward (line 1172) | def forward(self, hidden_states): class UniSpeechPreTrainedModel (line 1210) | class UniSpeechPreTrainedModel(PreTrainedModel): method _init_weights (line 1223) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1256) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1271) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... class UniSpeechModel (line 1347) | class UniSpeechModel(UniSpeechPreTrainedModel): method __init__ (line 1348) | def __init__(self, config: UniSpeechConfig): method _mask_hidden_states (line 1366) | def _mask_hidden_states( method forward (line 1420) | def forward( class UniSpeechForPreTraining (line 1471) | class UniSpeechForPreTraining(UniSpeechPreTrainedModel): method __init__ (line 1472) | def __init__(self, config: UniSpeechConfig): method set_gumbel_temperature (line 1487) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_extractor (line 1493) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1505) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1513) | def compute_contrastive_logits( method forward (line 1534) | def forward( class UniSpeechForCTC (line 1625) | class UniSpeechForCTC(UniSpeechPreTrainedModel): method __init__ (line 1626) | def __init__(self, config, target_lang: Optional[str] = None): method tie_weights (line 1649) | def tie_weights(self): method freeze_feature_extractor (line 1670) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1682) | def freeze_feature_encoder(self): method freeze_base_model (line 1689) | def freeze_base_model(self): method forward (line 1705) | def forward( class UniSpeechForSequenceClassification (line 1783) | class UniSpeechForSequenceClassification(UniSpeechPreTrainedModel): method __init__ (line 1784) | def __init__(self, config): method freeze_feature_extractor (line 1802) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1815) | def freeze_feature_encoder(self): method freeze_base_model (line 1823) | def freeze_base_model(self): method forward (line 1839) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/unispeech_sat/configuration_unispeech_sat.py class UniSpeechSatConfig (line 27) | class UniSpeechSatConfig(PretrainedConfig): method __init__ (line 196) | def __init__( method inputs_to_logits_ratio (line 323) | def inputs_to_logits_ratio(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/unispeech_sat/convert_unispeech_original_s3prl_checkpoint_to_pytorch.py function convert_classification (line 35) | def convert_classification(base_model_name, hf_config, downstream_dict): function convert_diarization (line 44) | def convert_diarization(base_model_name, hf_config, downstream_dict): function convert_xvector (line 51) | def convert_xvector(base_model_name, hf_config, downstream_dict): function convert_s3prl_checkpoint (line 70) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: mplsandbox_for_rl/transformers/src/transformers/models/unispeech_sat/convert_unispeech_sat_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 63) | 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): function load_conv_layer (line 139) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_unispeech_sat_checkpoint (line 184) | def convert_unispeech_sat_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/unispeech_sat/modeling_unispeech_sat.py class UniSpeechSatForPreTrainingOutput (line 83) | class UniSpeechSatForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 120) | def _compute_mask_indices( class UniSpeechSatNoLayerNormConvLayer (line 240) | class UniSpeechSatNoLayerNormConvLayer(nn.Module): method __init__ (line 241) | def __init__(self, config, layer_id=0): method forward (line 255) | def forward(self, hidden_states): class UniSpeechSatLayerNormConvLayer (line 262) | class UniSpeechSatLayerNormConvLayer(nn.Module): method __init__ (line 263) | def __init__(self, config, layer_id=0): method forward (line 278) | def forward(self, hidden_states): class UniSpeechSatGroupNormConvLayer (line 290) | class UniSpeechSatGroupNormConvLayer(nn.Module): method __init__ (line 291) | def __init__(self, config, layer_id=0): method forward (line 307) | def forward(self, hidden_states): class UniSpeechSatPositionalConvEmbedding (line 315) | class UniSpeechSatPositionalConvEmbedding(nn.Module): method __init__ (line 316) | def __init__(self, config): method forward (line 349) | def forward(self, hidden_states): class UniSpeechSatSamePadLayer (line 361) | class UniSpeechSatSamePadLayer(nn.Module): method __init__ (line 362) | def __init__(self, num_conv_pos_embeddings): method forward (line 366) | def forward(self, hidden_states): class UniSpeechSatFeatureEncoder (line 373) | class UniSpeechSatFeatureEncoder(nn.Module): method __init__ (line 376) | def __init__(self, config): method _freeze_parameters (line 396) | def _freeze_parameters(self): method forward (line 401) | def forward(self, input_values): class UniSpeechSatFeatureExtractor (line 420) | class UniSpeechSatFeatureExtractor(UniSpeechSatFeatureEncoder): method __init__ (line 421) | def __init__(self, config): class UniSpeechSatFeatureProjection (line 432) | class UniSpeechSatFeatureProjection(nn.Module): method __init__ (line 433) | def __init__(self, config): method forward (line 439) | def forward(self, hidden_states): class UniSpeechSatAttention (line 448) | class UniSpeechSatAttention(nn.Module): method __init__ (line 451) | def __init__( method _shape (line 482) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 485) | def forward( class UniSpeechSatFlashAttention2 (line 607) | class UniSpeechSatFlashAttention2(UniSpeechSatAttention): method __init__ (line 615) | def __init__(self, *args, **kwargs): method _reshape (line 623) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 626) | def forward( class UniSpeechSatSdpaAttention (line 734) | class UniSpeechSatSdpaAttention(UniSpeechSatAttention): method forward (line 736) | def forward( class UniSpeechSatFeedForward (line 849) | class UniSpeechSatFeedForward(nn.Module): method __init__ (line 850) | def __init__(self, config): method forward (line 863) | def forward(self, hidden_states): class UniSpeechSatEncoderLayer (line 874) | class UniSpeechSatEncoderLayer(nn.Module): method __init__ (line 875) | def __init__(self, config): method forward (line 889) | def forward(self, hidden_states, attention_mask=None, output_attention... class UniSpeechSatAttnAdapterLayer (line 910) | class UniSpeechSatAttnAdapterLayer(nn.Module): method __init__ (line 911) | def __init__(self, config): method forward (line 925) | def forward(self, hidden_states: torch.FloatTensor): class UniSpeechSatEncoderLayerStableLayerNorm (line 936) | class UniSpeechSatEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 937) | def __init__(self, config): method forward (line 955) | def forward( class UniSpeechSatEncoder (line 982) | class UniSpeechSatEncoder(nn.Module): method __init__ (line 983) | def __init__(self, config): method forward (line 993) | def forward( class UniSpeechSatEncoderStableLayerNorm (line 1068) | class UniSpeechSatEncoderStableLayerNorm(nn.Module): method __init__ (line 1069) | def __init__(self, config): method forward (line 1081) | def forward( class UniSpeechSatGumbelVectorQuantizer (line 1157) | class UniSpeechSatGumbelVectorQuantizer(nn.Module): method __init__ (line 1163) | def __init__(self, config): method _compute_perplexity (line 1184) | def _compute_perplexity(probs, mask=None): method forward (line 1189) | def forward(self, hidden_states): class UniSpeechSatPreTrainedModel (line 1227) | class UniSpeechSatPreTrainedModel(PreTrainedModel): method _init_weights (line 1240) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1273) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1288) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... class UniSpeechSatModel (line 1366) | class UniSpeechSatModel(UniSpeechSatPreTrainedModel): method __init__ (line 1367) | def __init__(self, config: UniSpeechSatConfig): method _mask_hidden_states (line 1384) | def _mask_hidden_states( method forward (line 1438) | def forward( class UniSpeechSatForPreTraining (line 1487) | class UniSpeechSatForPreTraining(UniSpeechSatPreTrainedModel): method __init__ (line 1488) | def __init__(self, config: UniSpeechSatConfig): method set_gumbel_temperature (line 1510) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_extractor (line 1516) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1528) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1536) | def compute_contrastive_logits( method forward (line 1557) | def forward( class UniSpeechSatForCTC (line 1635) | class UniSpeechSatForCTC(UniSpeechSatPreTrainedModel): method __init__ (line 1636) | def __init__(self, config, target_lang: Optional[str] = None): method tie_weights (line 1659) | def tie_weights(self): method freeze_feature_extractor (line 1680) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1692) | def freeze_feature_encoder(self): method freeze_base_model (line 1699) | def freeze_base_model(self): method forward (line 1715) | def forward( class UniSpeechSatForSequenceClassification (line 1793) | class UniSpeechSatForSequenceClassification(UniSpeechSatPreTrainedModel): method __init__ (line 1794) | def __init__(self, config): method freeze_feature_extractor (line 1812) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1825) | def freeze_feature_encoder(self): method freeze_base_model (line 1833) | def freeze_base_model(self): method forward (line 1849) | def forward( class UniSpeechSatForAudioFrameClassification (line 1918) | class UniSpeechSatForAudioFrameClassification(UniSpeechSatPreTrainedModel): method __init__ (line 1919) | def __init__(self, config): method freeze_feature_extractor (line 1935) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1947) | def freeze_feature_encoder(self): method freeze_base_model (line 1954) | def freeze_base_model(self): method forward (line 1970) | def forward( class AMSoftmaxLoss (line 2025) | class AMSoftmaxLoss(nn.Module): method __init__ (line 2026) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 2034) | def forward(self, hidden_states, labels): class TDNNLayer (line 2049) | class TDNNLayer(nn.Module): method __init__ (line 2050) | def __init__(self, config, layer_id=0): method forward (line 2060) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class UniSpeechSatForXVector (line 2087) | class UniSpeechSatForXVector(UniSpeechSatPreTrainedModel): method __init__ (line 2088) | def __init__(self, config): method freeze_feature_extractor (line 2107) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 2119) | def freeze_feature_encoder(self): method freeze_base_model (line 2126) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 2134) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 2157) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/univnet/configuration_univnet.py class UnivNetConfig (line 23) | class UnivNetConfig(PretrainedConfig): method __init__ (line 88) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/univnet/convert_univnet.py function get_kernel_predictor_key_mapping (line 26) | def get_kernel_predictor_key_mapping(config: UnivNetConfig, old_prefix: ... function get_key_mapping (line 56) | def get_key_mapping(config: UnivNetConfig): function rename_state_dict (line 88) | def rename_state_dict(state_dict, keys_to_modify, keys_to_remove): function convert_univnet_checkpoint (line 102) | def convert_univnet_checkpoint( function main (line 136) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/univnet/feature_extraction_univnet.py class UnivNetFeatureExtractor (line 29) | class UnivNetFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 101) | def __init__( method normalize (line 177) | def normalize(self, spectrogram): method denormalize (line 180) | def denormalize(self, spectrogram): method mel_spectrogram (line 183) | def mel_spectrogram(self, waveform: np.ndarray) -> np.ndarray: method generate_noise (line 231) | def generate_noise( method batch_decode (line 263) | def batch_decode(self, waveforms, waveform_lengths=None) -> List[np.nd... method __call__ (line 286) | def __call__( method to_dict (line 447) | def to_dict(self) -> Dict[str, Any]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/univnet/modeling_univnet.py class UnivNetModelOutput (line 37) | class UnivNetModelOutput(ModelOutput): class UnivNetKernelPredictorResidualBlock (line 53) | class UnivNetKernelPredictorResidualBlock(nn.Module): method __init__ (line 63) | def __init__( method forward (line 79) | def forward(self, hidden_states: torch.FloatTensor): method apply_weight_norm (line 89) | def apply_weight_norm(self): method remove_weight_norm (line 93) | def remove_weight_norm(self): class UnivNetKernelPredictor (line 98) | class UnivNetKernelPredictor(nn.Module): method __init__ (line 115) | def __init__( method forward (line 153) | def forward(self, spectrogram: torch.FloatTensor): method apply_weight_norm (line 199) | def apply_weight_norm(self): method remove_weight_norm (line 206) | def remove_weight_norm(self): class UnivNetLvcResidualBlock (line 214) | class UnivNetLvcResidualBlock(nn.Module): method __init__ (line 227) | def __init__( method forward (line 249) | def forward(self, hidden_states, kernel, bias, hop_size=256): method location_variable_convolution (line 265) | def location_variable_convolution( method apply_weight_norm (line 330) | def apply_weight_norm(self): method remove_weight_norm (line 333) | def remove_weight_norm(self): class UnivNetLvcBlock (line 337) | class UnivNetLvcBlock(nn.Module): method __init__ (line 355) | def __init__( method forward (line 385) | def forward(self, hidden_states: torch.FloatTensor, spectrogram: torch... method apply_weight_norm (line 400) | def apply_weight_norm(self): method remove_weight_norm (line 406) | def remove_weight_norm(self): class UnivNetModel (line 463) | class UnivNetModel(PreTrainedModel): method __init__ (line 467) | def __init__(self, config: UnivNetConfig): method forward (line 508) | def forward( method _init_weights (line 614) | def _init_weights(self, module): method apply_weight_norm (line 621) | def apply_weight_norm(self): method remove_weight_norm (line 627) | def remove_weight_norm(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/upernet/configuration_upernet.py class UperNetConfig (line 26) | class UperNetConfig(PretrainedConfig): method __init__ (line 87) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/upernet/modeling_upernet.py class UperNetConvModule (line 34) | class UperNetConvModule(nn.Module): method __init__ (line 40) | def __init__( method forward (line 61) | def forward(self, input: torch.Tensor) -> torch.Tensor: class UperNetPyramidPoolingBlock (line 69) | class UperNetPyramidPoolingBlock(nn.Module): method __init__ (line 70) | def __init__(self, pool_scale: int, in_channels: int, channels: int) -... method forward (line 79) | def forward(self, input: torch.Tensor) -> torch.Tensor: class UperNetPyramidPoolingModule (line 86) | class UperNetPyramidPoolingModule(nn.Module): method __init__ (line 101) | def __init__(self, pool_scales: Tuple[int, ...], in_channels: int, cha... method forward (line 113) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]: class UperNetHead (line 124) | class UperNetHead(nn.Module): method __init__ (line 130) | def __init__(self, config, in_channels): method init_weights (line 169) | def init_weights(self): method _init_weights (line 172) | def _init_weights(self, module): method psp_forward (line 178) | def psp_forward(self, inputs): method forward (line 187) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class UperNetFCNHead (line 217) | class UperNetFCNHead(nn.Module): method __init__ (line 233) | def __init__( method init_weights (line 269) | def init_weights(self): method _init_weights (line 272) | def _init_weights(self, module): method forward (line 278) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class UperNetPreTrainedModel (line 288) | class UperNetPreTrainedModel(PreTrainedModel): method _init_weights (line 298) | def _init_weights(self, module): method init_weights (line 305) | def init_weights(self): class UperNetForSemanticSegmentation (line 343) | class UperNetForSemanticSegmentation(UperNetPreTrainedModel): method __init__ (line 344) | def __init__(self, config): method forward (line 358) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/video_llava/configuration_video_llava.py class VideoLlavaConfig (line 24) | class VideoLlavaConfig(PretrainedConfig): method __init__ (line 83) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/video_llava/convert_video_llava_weights_to_hf.py function convert_state_dict_to_hf (line 62) | def convert_state_dict_to_hf(state_dict): function convert_video_llava_llama_to_hf (line 75) | def convert_video_llava_llama_to_hf(text_model_id, vision_model_id, outp... function main (line 131) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/video_llava/image_processing_video_llava.py function make_batched_videos (line 53) | def make_batched_videos(videos) -> List[VideoInput]: class VideoLlavaImageProcessor (line 69) | class VideoLlavaImageProcessor(BaseImageProcessor): method __init__ (line 110) | def __init__( method resize (line 143) | def resize( method preprocess (line 193) | def preprocess( method _preprocess_image (line 343) | def _preprocess_image( FILE: mplsandbox_for_rl/transformers/src/transformers/models/video_llava/modeling_video_llava.py class VideoLlavaCausalLMOutputWithPast (line 44) | class VideoLlavaCausalLMOutputWithPast(ModelOutput): class VideoLlavaMultiModalProjector (line 86) | class VideoLlavaMultiModalProjector(nn.Module): method __init__ (line 87) | def __init__(self, config: VideoLlavaConfig): method forward (line 94) | def forward(self, image_features): class VideoLlavaPreTrainedModel (line 121) | class VideoLlavaPreTrainedModel(PreTrainedModel): method _init_weights (line 130) | def _init_weights(self, module): method _supports_sdpa (line 150) | def _supports_sdpa(self): class VideoLlavaForConditionalGeneration (line 241) | class VideoLlavaForConditionalGeneration(VideoLlavaPreTrainedModel): method __init__ (line 242) | def __init__(self, config: VideoLlavaConfig): method get_input_embeddings (line 255) | def get_input_embeddings(self): method set_input_embeddings (line 258) | def set_input_embeddings(self, value): method get_output_embeddings (line 261) | def get_output_embeddings(self): method set_output_embeddings (line 264) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 267) | def set_decoder(self, decoder): method get_decoder (line 270) | def get_decoder(self): method tie_weights (line 273) | def tie_weights(self): method resize_token_embeddings (line 276) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _merge_input_ids_with_visual_features (line 284) | def _merge_input_ids_with_visual_features( method _get_vision_features (line 365) | def _get_vision_features( method forward (line 403) | def forward( method prepare_inputs_for_generation (line 662) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/video_llava/processing_video_llava.py class VideoLlavaProcessor (line 31) | class VideoLlavaProcessor(ProcessorMixin): method __init__ (line 61) | def __init__( method __call__ (line 78) | def __call__( method batch_decode (line 189) | def batch_decode(self, *args, **kwargs): method decode (line 197) | def decode(self, *args, **kwargs): method model_input_names (line 206) | def model_input_names(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/videomae/configuration_videomae.py class VideoMAEConfig (line 24) | class VideoMAEConfig(PretrainedConfig): method __init__ (line 96) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 _preprocess_image (line 178) | def _preprocess_image( method preprocess (line 236) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/videomae/modeling_videomae.py class VideoMAEDecoderOutput (line 51) | class VideoMAEDecoderOutput(ModelOutput): class VideoMAEForPreTrainingOutput (line 74) | class VideoMAEForPreTrainingOutput(ModelOutput): function get_sinusoid_encoding_table (line 101) | def get_sinusoid_encoding_table(n_position, d_hid): class VideoMAEEmbeddings (line 115) | class VideoMAEEmbeddings(nn.Module): method __init__ (line 121) | def __init__(self, config): method forward (line 130) | def forward(self, pixel_values, bool_masked_pos): class VideoMAEPatchEmbeddings (line 146) | class VideoMAEPatchEmbeddings(nn.Module): method __init__ (line 156) | def __init__(self, config): method forward (line 183) | def forward(self, pixel_values): class VideoMAESelfAttention (line 199) | class VideoMAESelfAttention(nn.Module): method __init__ (line 200) | def __init__(self, config: VideoMAEConfig) -> None: method transpose_for_scores (line 225) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 230) | def forward( class VideoMAESdpaSelfAttention (line 269) | class VideoMAESdpaSelfAttention(VideoMAESelfAttention): method __init__ (line 270) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 274) | def forward( class VideoMAESelfOutput (line 304) | class VideoMAESelfOutput(nn.Module): method __init__ (line 310) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 315) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VideoMAEAttention (line 323) | class VideoMAEAttention(nn.Module): method __init__ (line 324) | def __init__(self, config: VideoMAEConfig) -> None: method prune_heads (line 330) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 348) | def forward( class VideoMAESdpaAttention (line 363) | class VideoMAESdpaAttention(VideoMAEAttention): method __init__ (line 364) | def __init__(self, config: VideoMAEConfig) -> None: class VideoMAEIntermediate (line 370) | class VideoMAEIntermediate(nn.Module): method __init__ (line 371) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 379) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VideoMAEOutput (line 387) | class VideoMAEOutput(nn.Module): method __init__ (line 388) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 393) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VideoMAELayer (line 406) | class VideoMAELayer(nn.Module): method __init__ (line 409) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 419) | def forward( class VideoMAEEncoder (line 449) | class VideoMAEEncoder(nn.Module): method __init__ (line 450) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 456) | def forward( class VideoMAEPreTrainedModel (line 500) | class VideoMAEPreTrainedModel(PreTrainedModel): method _init_weights (line 512) | def _init_weights(self, module): class VideoMAEModel (line 563) | class VideoMAEModel(VideoMAEPreTrainedModel): method __init__ (line 564) | def __init__(self, config): method get_input_embeddings (line 579) | def get_input_embeddings(self): method _prune_heads (line 582) | def _prune_heads(self, heads_to_prune): method forward (line 592) | def forward( class VideoMAEDecoder (line 718) | class VideoMAEDecoder(nn.Module): method __init__ (line 719) | def __init__(self, config, num_patches): method forward (line 741) | def forward( class VideoMAEForPreTraining (line 790) | class VideoMAEForPreTraining(VideoMAEPreTrainedModel): method __init__ (line 791) | def __init__(self, config): method forward (line 810) | def forward( class VideoMAEForVideoClassification (line 975) | class VideoMAEForVideoClassification(VideoMAEPreTrainedModel): method __init__ (line 976) | def __init__(self, config): method forward (line 991) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vilt/configuration_vilt.py class ViltConfig (line 24) | class ViltConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vilt/convert_vilt_original_to_pytorch.py function create_rename_keys (line 44) | def create_rename_keys(config, vqa_model=False, nlvr_model=False, irtr_m... function read_in_q_k_v (line 133) | def read_in_q_k_v(state_dict, config): function remove_classification_head_ (line 156) | def remove_classification_head_(state_dict): function rename_key (line 162) | def rename_key(dct, old, new): function convert_vilt_checkpoint (line 168) | def convert_vilt_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/vilt/image_processing_vilt.py function max_across_indices (line 47) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function make_pixel_mask (line 54) | def make_pixel_mask( function get_max_height_width (line 72) | def get_max_height_width( function get_resize_output_image_size (line 90) | def get_resize_output_image_size( class ViltImageProcessor (line 121) | class ViltImageProcessor(BaseImageProcessor): method __init__ (line 163) | def __init__( method from_dict (line 196) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method resize (line 207) | def resize( method _pad_image (line 255) | def _pad_image( method pad (line 282) | def pad( method preprocess (line 338) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vilt/modeling_vilt.py class ViltForImagesAndTextClassificationOutput (line 53) | class ViltForImagesAndTextClassificationOutput(ModelOutput): class ViltEmbeddings (line 78) | class ViltEmbeddings(nn.Module): method __init__ (line 87) | def __init__(self, config): method visual_embed (line 102) | def visual_embed(self, pixel_values, pixel_mask, max_image_length=200): method forward (line 190) | def forward( class TextEmbeddings (line 232) | class TextEmbeddings(nn.Module): method __init__ (line 235) | def __init__(self, config): method forward (line 254) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class ViltPatchEmbeddings (line 289) | class ViltPatchEmbeddings(nn.Module): method __init__ (line 294) | def __init__(self, config): method forward (line 309) | def forward(self, pixel_values): class ViltSelfAttention (line 320) | class ViltSelfAttention(nn.Module): method __init__ (line 321) | def __init__(self, config): method transpose_for_scores (line 339) | def transpose_for_scores(self, x): method forward (line 344) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class ViltSelfOutput (line 381) | class ViltSelfOutput(nn.Module): method __init__ (line 387) | def __init__(self, config: ViltConfig) -> None: method forward (line 392) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViltAttention (line 399) | class ViltAttention(nn.Module): method __init__ (line 400) | def __init__(self, config): method prune_heads (line 406) | def prune_heads(self, heads): method forward (line 424) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class ViltIntermediate (line 434) | class ViltIntermediate(nn.Module): method __init__ (line 435) | def __init__(self, config: ViltConfig) -> None: method forward (line 443) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViltOutput (line 451) | class ViltOutput(nn.Module): method __init__ (line 452) | def __init__(self, config: ViltConfig) -> None: method forward (line 457) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViltLayer (line 466) | class ViltLayer(nn.Module): method __init__ (line 469) | def __init__(self, config): method forward (line 479) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class ViltEncoder (line 504) | class ViltEncoder(nn.Module): method __init__ (line 505) | def __init__(self, config): method forward (line 511) | def forward( class ViltPreTrainedModel (line 557) | class ViltPreTrainedModel(PreTrainedModel): method _init_weights (line 568) | def _init_weights(self, module): class ViltModel (line 711) | class ViltModel(ViltPreTrainedModel): method __init__ (line 712) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 725) | def get_input_embeddings(self): method set_input_embeddings (line 728) | def set_input_embeddings(self, value): method _prune_heads (line 731) | def _prune_heads(self, heads_to_prune): method forward (line 741) | def forward( class ViltPooler (line 856) | class ViltPooler(nn.Module): method __init__ (line 857) | def __init__(self, config): method forward (line 862) | def forward(self, hidden_states): class ViltForMaskedLM (line 877) | class ViltForMaskedLM(ViltPreTrainedModel): method __init__ (line 880) | def __init__(self, config): method get_output_embeddings (line 889) | def get_output_embeddings(self): method set_output_embeddings (line 892) | def set_output_embeddings(self, new_embeddings): method forward (line 898) | def forward( class ViltPredictionHeadTransform (line 1011) | class ViltPredictionHeadTransform(nn.Module): method __init__ (line 1012) | def __init__(self, config): method forward (line 1021) | def forward(self, hidden_states): class ViltMLMHead (line 1028) | class ViltMLMHead(nn.Module): method __init__ (line 1029) | def __init__(self, config, weight=None): method _tie_weights (line 1041) | def _tie_weights(self): method forward (line 1044) | def forward(self, x): class ViltForQuestionAnswering (line 1057) | class ViltForQuestionAnswering(ViltPreTrainedModel): method __init__ (line 1058) | def __init__(self, config): method forward (line 1077) | def forward( class ViltForImageAndTextRetrieval (line 1170) | class ViltForImageAndTextRetrieval(ViltPreTrainedModel): method __init__ (line 1171) | def __init__(self, config): method forward (line 1184) | def forward( class ViltForImagesAndTextClassification (line 1269) | class ViltForImagesAndTextClassification(ViltPreTrainedModel): method __init__ (line 1270) | def __init__(self, config): method forward (line 1290) | def forward( class ViltForTokenClassification (line 1411) | class ViltForTokenClassification(ViltPreTrainedModel): method __init__ (line 1412) | def __init__(self, config): method forward (line 1426) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vilt/processing_vilt.py class ViltProcessor (line 27) | class ViltProcessor(ProcessorMixin): method __init__ (line 45) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 64) | def __call__( 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): method feature_extractor (line 143) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vipllava/configuration_vipllava.py class VipLlavaConfig (line 24) | class VipLlavaConfig(PretrainedConfig): method __init__ (line 77) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vipllava/convert_vipllava_weights_to_hf.py function convert_state_dict_to_hf (line 46) | def convert_state_dict_to_hf(state_dict): function convert_vipllava_llama_to_hf (line 58) | def convert_vipllava_llama_to_hf(text_model_id, vision_model_id, output_... function main (line 107) | def main(): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vipllava/modeling_vipllava.py class VipLlavaCausalLMOutputWithPast (line 44) | class VipLlavaCausalLMOutputWithPast(ModelOutput): class VipLlavaMultiModalProjector (line 85) | class VipLlavaMultiModalProjector(nn.Module): method __init__ (line 86) | def __init__(self, config: VipLlavaConfig): method forward (line 100) | def forward(self, hidden_states): class VipLlavaPreTrainedModel (line 130) | class VipLlavaPreTrainedModel(PreTrainedModel): method _init_weights (line 139) | def _init_weights(self, module): method _supports_sdpa (line 162) | def _supports_sdpa(self): class VipLlavaForConditionalGeneration (line 245) | class VipLlavaForConditionalGeneration(VipLlavaPreTrainedModel): method __init__ (line 246) | def __init__(self, config: VipLlavaConfig): method get_input_embeddings (line 258) | def get_input_embeddings(self): method set_input_embeddings (line 261) | def set_input_embeddings(self, value): method get_output_embeddings (line 264) | def get_output_embeddings(self): method set_output_embeddings (line 267) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 270) | def set_decoder(self, decoder): method get_decoder (line 273) | def get_decoder(self): method tie_weights (line 276) | def tie_weights(self): method resize_token_embeddings (line 279) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _merge_input_ids_with_image_features (line 286) | def _merge_input_ids_with_image_features(self, image_features, inputs_... method forward (line 367) | def forward( method prepare_inputs_for_generation (line 547) | def prepare_inputs_for_generation( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vision_encoder_decoder/configuration_vision_encoder_decoder.py class VisionEncoderDecoderConfig (line 33) | class VisionEncoderDecoderConfig(PretrainedConfig): method __init__ (line 83) | def __init__(self, **kwargs): method from_encoder_decoder_configs (line 101) | def from_encoder_decoder_configs( class VisionEncoderDecoderEncoderOnnxConfig (line 118) | class VisionEncoderDecoderEncoderOnnxConfig(OnnxConfig): method inputs (line 122) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 130) | def atol_for_validation(self) -> float: method outputs (line 134) | def outputs(self) -> Mapping[str, Mapping[int, str]]: class VisionEncoderDecoderDecoderOnnxConfig (line 138) | class VisionEncoderDecoderDecoderOnnxConfig(OnnxConfig): method inputs (line 140) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 148) | def generate_dummy_inputs( class VisionEncoderDecoderOnnxConfig (line 173) | class VisionEncoderDecoderOnnxConfig(OnnxConfig): method inputs (line 175) | def inputs(self) -> None: method get_encoder_config (line 178) | def get_encoder_config(self, encoder_config: PretrainedConfig) -> Onnx... method get_decoder_config (line 191) | def get_decoder_config( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vision_encoder_decoder/modeling_flax_vision_encoder_decoder.py class FlaxVisionEncoderDecoderModule (line 169) | class FlaxVisionEncoderDecoderModule(nn.Module): method setup (line 173) | def setup(self): method _get_encoder_module (line 199) | def _get_encoder_module(self): method _get_projection_module (line 202) | def _get_projection_module(self): method _get_decoder_module (line 205) | def _get_decoder_module(self): method __call__ (line 208) | def __call__( class FlaxVisionEncoderDecoderModel (line 267) | 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: mplsandbox_for_rl/transformers/src/transformers/models/vision_encoder_decoder/modeling_tf_vision_encoder_decoder.py function shift_tokens_right (line 148) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... class TFVisionEncoderDecoderModel (line 175) | 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 tf_to_pt_weight_rename (line 292) | def tf_to_pt_weight_rename(self, tf_weight): method from_encoder_decoder_pretrained (line 310) | def from_encoder_decoder_pretrained( method call (line 460) | def call( method serving_output (line 631) | def serving_output(self, output): method prepare_inputs_for_generation (line 658) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 676) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method resize_token_embeddings (line 679) | def resize_token_embeddings(self, *args, **kwargs): method build (line 685) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vision_encoder_decoder/modeling_vision_encoder_decoder.py function shift_tokens_right (line 36) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class VisionEncoderDecoderModel (line 150) | class VisionEncoderDecoderModel(PreTrainedModel): method __init__ (line 164) | def __init__( method get_encoder (line 229) | def get_encoder(self): method get_decoder (line 232) | def get_decoder(self): method get_output_embeddings (line 235) | def get_output_embeddings(self): method set_output_embeddings (line 238) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 242) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 374) | def from_encoder_decoder_pretrained( method forward (line 527) | def forward( method prepare_decoder_input_ids_from_labels (line 654) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method prepare_inputs_for_generation (line 657) | def prepare_inputs_for_generation( method resize_token_embeddings (line 672) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 678) | def _reorder_cache(self, past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vision_text_dual_encoder/configuration_vision_text_dual_encoder.py class VisionTextDualEncoderConfig (line 34) | class VisionTextDualEncoderConfig(PretrainedConfig): method __init__ (line 80) | def __init__(self, projection_dim=512, logit_scale_init_value=2.6592, ... method from_vision_text_configs (line 109) | def from_vision_text_configs(cls, vision_config: PretrainedConfig, tex... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/vision_text_dual_encoder/modeling_tf_vision_text_dual_encoder.py function contrastive_loss (line 158) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function clip_loss (line 167) | def clip_loss(similarity: tf.Tensor) -> tf.Tensor: class TFVisionTextDualEncoderModel (line 174) | class TFVisionTextDualEncoderModel(TFPreTrainedModel): method __init__ (line 179) | def __init__( method build (line 223) | def build(self, input_shape=None): method tf_to_pt_weight_rename (line 242) | def tf_to_pt_weight_rename(self, tf_weight): method get_text_features (line 262) | def get_text_features( method get_image_features (line 304) | def get_image_features( method call (line 348) | def call( method from_vision_text_pretrained (line 466) | def from_vision_text_pretrained( method dummy_inputs (line 600) | def dummy_inputs(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vision_text_dual_encoder/modeling_vision_text_dual_encoder.py function contrastive_loss (line 149) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clip_loss (line 154) | def clip_loss(similarity: torch.Tensor) -> torch.Tensor: class VisionTextDualEncoderModel (line 161) | class VisionTextDualEncoderModel(PreTrainedModel): method __init__ (line 165) | def __init__( method get_text_features (line 211) | def get_text_features( method get_image_features (line 253) | def get_image_features( method forward (line 296) | def forward( method from_pretrained (line 409) | def from_pretrained(cls, *args, **kwargs): method from_vision_text_pretrained (line 416) | def from_vision_text_pretrained( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vision_text_dual_encoder/processing_vision_text_dual_encoder.py class VisionTextDualEncoderProcessor (line 25) | class VisionTextDualEncoderProcessor(ProcessorMixin): method __init__ (line 45) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 64) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 116) | def batch_decode(self, *args, **kwargs): method decode (line 123) | def decode(self, *args, **kwargs): method model_input_names (line 131) | def model_input_names(self): method feature_extractor_class (line 137) | def feature_extractor_class(self): method feature_extractor (line 145) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/visual_bert/configuration_visual_bert.py class VisualBertConfig (line 24) | class VisualBertConfig(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py function load_state_dict (line 58) | def load_state_dict(checkpoint_path): function get_new_dict (line 63) | def get_new_dict(d, config, rename_keys_prefix=rename_keys_prefix): function convert_visual_bert_checkpoint (line 82) | def convert_visual_bert_checkpoint(checkpoint_path, pytorch_dump_folder_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/visual_bert/modeling_visual_bert.py class VisualBertEmbeddings (line 51) | class VisualBertEmbeddings(nn.Module): method __init__ (line 54) | def __init__(self, config): method forward (line 86) | def forward( class VisualBertSelfAttention (line 185) | class VisualBertSelfAttention(nn.Module): method __init__ (line 186) | def __init__(self, config): method transpose_for_scores (line 204) | def transpose_for_scores(self, x): method forward (line 209) | def forward( class VisualBertSelfOutput (line 254) | class VisualBertSelfOutput(nn.Module): method __init__ (line 255) | def __init__(self, config): method forward (line 261) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VisualBertAttention (line 268) | class VisualBertAttention(nn.Module): method __init__ (line 269) | def __init__(self, config): method prune_heads (line 275) | def prune_heads(self, heads): method forward (line 293) | def forward( class VisualBertIntermediate (line 312) | class VisualBertIntermediate(nn.Module): method __init__ (line 313) | def __init__(self, config): method forward (line 321) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisualBertOutput (line 328) | class VisualBertOutput(nn.Module): method __init__ (line 329) | def __init__(self, config): method forward (line 335) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VisualBertLayer (line 342) | class VisualBertLayer(nn.Module): method __init__ (line 343) | def __init__(self, config): method forward (line 351) | def forward( method feed_forward_chunk (line 375) | def feed_forward_chunk(self, attention_output): class VisualBertEncoder (line 381) | class VisualBertEncoder(nn.Module): method __init__ (line 382) | def __init__(self, config): method forward (line 388) | def forward( class VisualBertPooler (line 440) | class VisualBertPooler(nn.Module): method __init__ (line 441) | def __init__(self, config): method forward (line 446) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisualBertPredictionHeadTransform (line 456) | class VisualBertPredictionHeadTransform(nn.Module): method __init__ (line 457) | def __init__(self, config): method forward (line 466) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisualBertLMPredictionHead (line 474) | class VisualBertLMPredictionHead(nn.Module): method __init__ (line 475) | def __init__(self, config): method _tie_weights (line 488) | def _tie_weights(self): method forward (line 491) | def forward(self, hidden_states): class VisualBertPreTrainingHeads (line 498) | class VisualBertPreTrainingHeads(nn.Module): method __init__ (line 499) | def __init__(self, config): method forward (line 504) | def forward(self, sequence_output, pooled_output): class VisualBertPreTrainedModel (line 510) | class VisualBertPreTrainedModel(PreTrainedModel): method _init_weights (line 520) | def _init_weights(self, module): class VisualBertForPreTrainingOutput (line 535) | class VisualBertForPreTrainingOutput(ModelOutput): class VisualBertModel (line 657) | class VisualBertModel(VisualBertPreTrainedModel): method __init__ (line 665) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 682) | def get_input_embeddings(self): method set_input_embeddings (line 685) | def set_input_embeddings(self, value): method _prune_heads (line 688) | def _prune_heads(self, heads_to_prune): method forward (line 698) | def forward( class VisualBertForPreTraining (line 854) | class VisualBertForPreTraining(VisualBertPreTrainedModel): method __init__ (line 857) | def __init__(self, config): method get_output_embeddings (line 866) | def get_output_embeddings(self): method set_output_embeddings (line 869) | def set_output_embeddings(self, new_embeddings): method forward (line 875) | def forward( class VisualBertForMultipleChoice (line 1000) | class VisualBertForMultipleChoice(VisualBertPreTrainedModel): method __init__ (line 1001) | def __init__(self, config): method forward (line 1015) | def forward( class VisualBertForQuestionAnswering (line 1153) | class VisualBertForQuestionAnswering(VisualBertPreTrainedModel): method __init__ (line 1154) | def __init__(self, config): method forward (line 1167) | def forward( class VisualBertForVisualReasoning (line 1279) | class VisualBertForVisualReasoning(VisualBertPreTrainedModel): method __init__ (line 1280) | def __init__(self, config): method forward (line 1293) | def forward( class VisualBertRegionToPhraseAttention (line 1388) | class VisualBertRegionToPhraseAttention(nn.Module): method __init__ (line 1389) | def __init__(self, config): method transpose_for_scores (line 1406) | def transpose_for_scores(self, x): method forward (line 1411) | def forward(self, query, key, attention_mask): class VisualBertForRegionToPhraseAlignment (line 1439) | class VisualBertForRegionToPhraseAlignment(VisualBertPreTrainedModel): method __init__ (line 1442) | def __init__(self, config): method forward (line 1455) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit/configuration_vit.py class ViTConfig (line 30) | class ViTConfig(PretrainedConfig): method __init__ (line 89) | def __init__( class ViTOnnxConfig (line 125) | class ViTOnnxConfig(OnnxConfig): method inputs (line 129) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 137) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit/convert_dino_to_pytorch.py function create_rename_keys (line 35) | 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 rename_key (line 118) | def rename_key(dct, old, new): function prepare_img (line 124) | def prepare_img(): function convert_vit_checkpoint (line 131) | def convert_vit_checkpoint(model_name, pytorch_dump_folder_path, base_mo... FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit/convert_vit_timm_to_pytorch.py function create_rename_keys (line 35) | 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 rename_key (line 118) | def rename_key(dct, old, new): function prepare_img (line 124) | def prepare_img(): function convert_vit_checkpoint (line 131) | def convert_vit_checkpoint(vit_name, pytorch_dump_folder_path): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/vit/image_processing_vit.py class ViTImageProcessor (line 42) | class ViTImageProcessor(BaseImageProcessor): method __init__ (line 75) | def __init__( method resize (line 99) | def resize( method preprocess (line 148) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit/image_processing_vit_fast.py class ViTImageProcessorFast (line 50) | class ViTImageProcessorFast(BaseImageProcessorFast): method __init__ (line 94) | def __init__( method _build_transforms (line 118) | def _build_transforms( method _validate_input_arguments (line 159) | def _validate_input_arguments( method preprocess (line 188) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit/modeling_flax_vit.py class FlaxViTPatchEmbeddings (line 88) | class FlaxViTPatchEmbeddings(nn.Module): method setup (line 92) | def setup(self): method __call__ (line 109) | def __call__(self, pixel_values): class FlaxViTEmbeddings (line 120) | class FlaxViTEmbeddings(nn.Module): method setup (line 126) | def setup(self): method __call__ (line 141) | def __call__(self, pixel_values, deterministic=True): class FlaxViTSelfAttention (line 153) | class FlaxViTSelfAttention(nn.Module): method setup (line 157) | def setup(self): method __call__ (line 189) | def __call__(self, hidden_states, deterministic: bool = True, output_a... class FlaxViTSelfOutput (line 224) | class FlaxViTSelfOutput(nn.Module): method setup (line 228) | def setup(self): method __call__ (line 238) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxViTAttention (line 244) | class FlaxViTAttention(nn.Module): method setup (line 248) | def setup(self): method __call__ (line 252) | def __call__(self, hidden_states, deterministic=True, output_attention... class FlaxViTIntermediate (line 265) | class FlaxViTIntermediate(nn.Module): method setup (line 269) | def setup(self): method __call__ (line 279) | def __call__(self, hidden_states): class FlaxViTOutput (line 285) | class FlaxViTOutput(nn.Module): method setup (line 289) | def setup(self): method __call__ (line 299) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxViTLayer (line 306) | class FlaxViTLayer(nn.Module): method setup (line 310) | def setup(self): method __call__ (line 317) | def __call__(self, hidden_states, deterministic: bool = True, output_a... class FlaxViTLayerCollection (line 342) | class FlaxViTLayerCollection(nn.Module): method setup (line 346) | def setup(self): method __call__ (line 351) | def __call__( class FlaxViTEncoder (line 385) | class FlaxViTEncoder(nn.Module): method setup (line 389) | def setup(self): method __call__ (line 392) | def __call__( class FlaxViTPooler (line 409) | class FlaxViTPooler(nn.Module): method setup (line 413) | def setup(self): method __call__ (line 422) | def __call__(self, hidden_states): class FlaxViTPreTrainedModel (line 428) | class FlaxViTPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 439) | def __init__( method init_weights (line 453) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 473) | def __call__( class FlaxViTModule (line 506) | class FlaxViTModule(nn.Module): method setup (line 511) | def setup(self): method __call__ (line 517) | def __call__( class FlaxViTModel (line 556) | class FlaxViTModel(FlaxViTPreTrainedModel): class FlaxViTForImageClassificationModule (line 586) | class FlaxViTForImageClassificationModule(nn.Module): method setup (line 590) | def setup(self): method __call__ (line 600) | def __call__( class FlaxViTForImageClassification (line 639) | class FlaxViTForImageClassification(FlaxViTPreTrainedModel): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit/modeling_tf_vit.py class TFViTEmbeddings (line 56) | class TFViTEmbeddings(keras.layers.Layer): method __init__ (line 62) | def __init__(self, config: ViTConfig, **kwargs): method build (line 69) | def build(self, input_shape=None): method interpolate_pos_encoding (line 91) | def interpolate_pos_encoding(self, embeddings, height, width) -> tf.Te... method call (line 125) | def call( class TFViTPatchEmbeddings (line 150) | class TFViTPatchEmbeddings(keras.layers.Layer): method __init__ (line 157) | def __init__(self, config: ViTConfig, **kwargs): method call (line 183) | def call( method build (line 213) | def build(self, input_shape=None): class TFViTSelfAttention (line 222) | class TFViTSelfAttention(keras.layers.Layer): method __init__ (line 223) | def __init__(self, config: ViTConfig, **kwargs): method transpose_for_scores (line 249) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 256) | def call( method build (line 297) | def build(self, input_shape=None): class TFViTSelfOutput (line 312) | class TFViTSelfOutput(keras.layers.Layer): method __init__ (line 318) | def __init__(self, config: ViTConfig, **kwargs): method call (line 327) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 333) | def build(self, input_shape=None): class TFViTAttention (line 342) | class TFViTAttention(keras.layers.Layer): method __init__ (line 343) | def __init__(self, config: ViTConfig, **kwargs): method prune_heads (line 349) | def prune_heads(self, heads): method call (line 352) | def call( method build (line 369) | def build(self, input_shape=None): class TFViTIntermediate (line 381) | class TFViTIntermediate(keras.layers.Layer): method __init__ (line 382) | def __init__(self, config: ViTConfig, **kwargs): method call (line 395) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 401) | def build(self, input_shape=None): class TFViTOutput (line 410) | class TFViTOutput(keras.layers.Layer): method __init__ (line 411) | def __init__(self, config: ViTConfig, **kwargs): method call (line 420) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 427) | def build(self, input_shape=None): class TFViTLayer (line 436) | class TFViTLayer(keras.layers.Layer): method __init__ (line 439) | def __init__(self, config: ViTConfig, **kwargs): method call (line 450) | def call( method build (line 482) | def build(self, input_shape=None): class TFViTEncoder (line 503) | class TFViTEncoder(keras.layers.Layer): method __init__ (line 504) | def __init__(self, config: ViTConfig, **kwargs): method call (line 509) | def call( method build (line 547) | def build(self, input_shape=None): class TFViTMainLayer (line 558) | class TFViTMainLayer(keras.layers.Layer): method __init__ (line 561) | def __init__(self, config: ViTConfig, add_pooling_layer: bool = True, ... method get_input_embeddings (line 571) | def get_input_embeddings(self) -> keras.layers.Layer: method _prune_heads (line 574) | def _prune_heads(self, heads_to_prune): method call (line 582) | def call( method build (line 634) | def build(self, input_shape=None): class TFViTPreTrainedModel (line 652) | class TFViTPreTrainedModel(TFPreTrainedModel): class TFViTModel (line 740) | class TFViTModel(TFViTPreTrainedModel): method __init__ (line 741) | def __init__(self, config: ViTConfig, *inputs, add_pooling_layer=True,... method call (line 755) | def call( method build (line 777) | def build(self, input_shape=None): class TFViTPooler (line 786) | class TFViTPooler(keras.layers.Layer): method __init__ (line 787) | def __init__(self, config: ViTConfig, **kwargs): method call (line 798) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 806) | def build(self, input_shape=None): class TFViTForImageClassification (line 830) | class TFViTForImageClassification(TFViTPreTrainedModel, TFSequenceClassi... method __init__ (line 831) | def __init__(self, config: ViTConfig, *inputs, **kwargs): method call (line 853) | def call( method build (line 895) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit/modeling_vit.py class ViTEmbeddings (line 59) | class ViTEmbeddings(nn.Module): method __init__ (line 64) | def __init__(self, config: ViTConfig, use_mask_token: bool = False) ->... method interpolate_pos_encoding (line 75) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 108) | def forward( class ViTPatchEmbeddings (line 139) | class ViTPatchEmbeddings(nn.Module): method __init__ (line 146) | def __init__(self, config): method forward (line 161) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class ViTSelfAttention (line 178) | class ViTSelfAttention(nn.Module): method __init__ (line 179) | def __init__(self, config: ViTConfig) -> None: method transpose_for_scores (line 197) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 202) | def forward( class ViTSdpaSelfAttention (line 238) | class ViTSdpaSelfAttention(ViTSelfAttention): method __init__ (line 239) | def __init__(self, config: ViTConfig) -> None: method forward (line 243) | def forward( class ViTSelfOutput (line 269) | class ViTSelfOutput(nn.Module): method __init__ (line 275) | def __init__(self, config: ViTConfig) -> None: method forward (line 280) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTAttention (line 287) | class ViTAttention(nn.Module): method __init__ (line 288) | def __init__(self, config: ViTConfig) -> None: method prune_heads (line 294) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 312) | def forward( class ViTSdpaAttention (line 326) | class ViTSdpaAttention(ViTAttention): method __init__ (line 327) | def __init__(self, config: ViTConfig) -> None: class ViTIntermediate (line 332) | class ViTIntermediate(nn.Module): method __init__ (line 333) | def __init__(self, config: ViTConfig) -> None: method forward (line 341) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTOutput (line 348) | class ViTOutput(nn.Module): method __init__ (line 349) | def __init__(self, config: ViTConfig) -> None: method forward (line 354) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTLayer (line 369) | class ViTLayer(nn.Module): method __init__ (line 372) | def __init__(self, config: ViTConfig) -> None: method forward (line 382) | def forward( class ViTEncoder (line 411) | class ViTEncoder(nn.Module): method __init__ (line 412) | def __init__(self, config: ViTConfig) -> None: method forward (line 418) | def forward( class ViTPreTrainedModel (line 462) | class ViTPreTrainedModel(PreTrainedModel): method _init_weights (line 475) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class ViTModel (line 542) | class ViTModel(ViTPreTrainedModel): method __init__ (line 543) | def __init__(self, config: ViTConfig, add_pooling_layer: bool = True, ... method get_input_embeddings (line 556) | def get_input_embeddings(self) -> ViTPatchEmbeddings: method _prune_heads (line 559) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 575) | def forward( class ViTPooler (line 637) | class ViTPooler(nn.Module): method __init__ (line 638) | def __init__(self, config: ViTConfig): method forward (line 643) | def forward(self, hidden_states): class ViTForMaskedImageModeling (line 664) | class ViTForMaskedImageModeling(ViTPreTrainedModel): method __init__ (line 665) | def __init__(self, config: ViTConfig) -> None: method forward (line 684) | def forward( class ViTForImageClassification (line 793) | class ViTForImageClassification(ViTPreTrainedModel): method __init__ (line 794) | def __init__(self, config: ViTConfig) -> None: method forward (line 813) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit_mae/configuration_vit_mae.py class ViTMAEConfig (line 24) | class ViTMAEConfig(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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(keras.layers.Layer): method __init__ (line 208) | def __init__(self, config: ViTMAEConfig, **kwargs): method build (line 216) | def build(self, input_shape=None): method interpolate_pos_encoding (line 243) | def interpolate_pos_encoding(self, embeddings, height, width) -> tf.Te... method random_masking (line 275) | def random_masking(self, sequence: tf.Tensor, noise: tf.Tensor | None ... method call (line 316) | def call( class TFViTMAEPatchEmbeddings (line 339) | class TFViTMAEPatchEmbeddings(keras.layers.Layer): method __init__ (line 346) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 370) | def call( method build (line 400) | def build(self, input_shape=None): class TFViTMAESelfAttention (line 410) | class TFViTMAESelfAttention(keras.layers.Layer): method __init__ (line 411) | def __init__(self, config: ViTMAEConfig, **kwargs): method transpose_for_scores (line 437) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 444) | def call( method build (line 485) | def build(self, input_shape=None): class TFViTMAESelfOutput (line 501) | class TFViTMAESelfOutput(keras.layers.Layer): method __init__ (line 507) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 516) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 522) | def build(self, input_shape=None): class TFViTMAEAttention (line 532) | class TFViTMAEAttention(keras.layers.Layer): method __init__ (line 533) | def __init__(self, config: ViTMAEConfig, **kwargs): method prune_heads (line 539) | def prune_heads(self, heads): method call (line 542) | def call( method build (line 559) | def build(self, input_shape=None): class TFViTMAEIntermediate (line 572) | class TFViTMAEIntermediate(keras.layers.Layer): method __init__ (line 573) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 586) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 592) | def build(self, input_shape=None): class TFViTMAEOutput (line 602) | class TFViTMAEOutput(keras.layers.Layer): method __init__ (line 603) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 612) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 619) | def build(self, input_shape=None): class TFViTMAELayer (line 629) | class TFViTMAELayer(keras.layers.Layer): method __init__ (line 632) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 643) | def call( method build (line 675) | def build(self, input_shape=None): class TFViTMAEEncoder (line 697) | class TFViTMAEEncoder(keras.layers.Layer): method __init__ (line 698) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 703) | def call( method build (line 741) | def build(self, input_shape=None): class TFViTMAEMainLayer (line 752) | class TFViTMAEMainLayer(keras.layers.Layer): method __init__ (line 755) | def __init__(self, config: ViTMAEConfig, **kwargs): method get_input_embeddings (line 764) | def get_input_embeddings(self) -> keras.layers.Layer: method _prune_heads (line 767) | def _prune_heads(self, heads_to_prune): method call (line 775) | def call( method build (line 826) | def build(self, input_shape=None): class TFViTMAEPreTrainedModel (line 841) | class TFViTMAEPreTrainedModel(TFPreTrainedModel): class TFViTMAEModel (line 931) | class TFViTMAEModel(TFViTMAEPreTrainedModel): method __init__ (line 932) | def __init__(self, config: ViTMAEConfig, *inputs, **kwargs): method get_input_embeddings (line 937) | def get_input_embeddings(self): method call (line 943) | def call( method build (line 987) | def build(self, input_shape=None): class TFViTMAEDecoder (line 996) | class TFViTMAEDecoder(keras.layers.Layer): method __init__ (line 997) | def __init__(self, config, num_patches, **kwargs): method build (line 1019) | def build(self, input_shape=None): method interpolate_pos_encoding (line 1056) | def interpolate_pos_encoding(self, embeddings) -> tf.Tensor: method call (line 1089) | def call( class TFViTMAEForPreTraining (line 1152) | class TFViTMAEForPreTraining(TFViTMAEPreTrainedModel): method __init__ (line 1153) | def __init__(self, config): method get_input_embeddings (line 1164) | def get_input_embeddings(self): method _prune_heads (line 1167) | def _prune_heads(self, heads_to_prune): method patchify (line 1170) | def patchify(self, pixel_values, interpolate_pos_encoding: bool = False): method unpatchify (line 1222) | def unpatchify(self, patchified_pixel_values, original_image_size: Opt... method forward_loss (line 1263) | def forward_loss(self, pixel_values, pred, mask, interpolate_pos_encod... method call (line 1294) | def call( method build (line 1363) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit_mae/modeling_vit_mae.py class ViTMAEModelOutput (line 49) | class ViTMAEModelOutput(ModelOutput): class ViTMAEDecoderOutput (line 78) | class ViTMAEDecoderOutput(ModelOutput): class ViTMAEForPreTrainingOutput (line 101) | class ViTMAEForPreTrainingOutput(ModelOutput): function get_2d_sincos_pos_embed (line 132) | def get_2d_sincos_pos_embed(embed_dim, grid_size, add_cls_token=False): function get_2d_sincos_pos_embed_from_grid (line 160) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 172) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): class ViTMAEEmbeddings (line 193) | class ViTMAEEmbeddings(nn.Module): method __init__ (line 199) | def __init__(self, config): method initialize_weights (line 212) | def initialize_weights(self): method interpolate_pos_encoding (line 226) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method random_masking (line 261) | def random_masking(self, sequence, noise=None): method forward (line 293) | def forward(self, pixel_values, noise=None, interpolate_pos_encoding: ... class ViTMAEPatchEmbeddings (line 315) | class ViTMAEPatchEmbeddings(nn.Module): method __init__ (line 322) | def __init__(self, config): method forward (line 336) | def forward(self, pixel_values, interpolate_pos_encoding: bool = False): class ViTMAESelfAttention (line 352) | class ViTMAESelfAttention(nn.Module): method __init__ (line 353) | def __init__(self, config: ViTMAEConfig) -> None: method transpose_for_scores (line 371) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 376) | def forward( class ViTMAESdpaSelfAttention (line 413) | class ViTMAESdpaSelfAttention(ViTMAESelfAttention): method __init__ (line 414) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 418) | def forward( class ViTMAESelfOutput (line 445) | class ViTMAESelfOutput(nn.Module): method __init__ (line 451) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 456) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMAEAttention (line 464) | class ViTMAEAttention(nn.Module): method __init__ (line 465) | def __init__(self, config: ViTMAEConfig) -> None: method prune_heads (line 471) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 489) | def forward( class ViTMAESdpaAttention (line 504) | class ViTMAESdpaAttention(ViTMAEAttention): method __init__ (line 505) | def __init__(self, config: ViTMAEConfig) -> None: class ViTMAEIntermediate (line 511) | class ViTMAEIntermediate(nn.Module): method __init__ (line 512) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 520) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTMAEOutput (line 528) | class ViTMAEOutput(nn.Module): method __init__ (line 529) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 534) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMAELayer (line 550) | class ViTMAELayer(nn.Module): method __init__ (line 553) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 563) | def forward( class ViTMAEEncoder (line 593) | class ViTMAEEncoder(nn.Module): method __init__ (line 594) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 600) | def forward( class ViTMAEPreTrainedModel (line 644) | class ViTMAEPreTrainedModel(PreTrainedModel): method _init_weights (line 656) | def _init_weights(self, module): class ViTMAEModel (line 710) | class ViTMAEModel(ViTMAEPreTrainedModel): method __init__ (line 711) | def __init__(self, config): method get_input_embeddings (line 723) | def get_input_embeddings(self): method _prune_heads (line 726) | def _prune_heads(self, heads_to_prune): method forward (line 736) | def forward( class ViTMAEDecoder (line 808) | class ViTMAEDecoder(nn.Module): method __init__ (line 809) | def __init__(self, config, num_patches): method interpolate_pos_encoding (line 834) | def interpolate_pos_encoding(self, embeddings: torch.Tensor) -> torch.... method initialize_weights (line 875) | def initialize_weights(self, num_patches): method forward (line 885) | def forward( class ViTMAEForPreTraining (line 965) | class ViTMAEForPreTraining(ViTMAEPreTrainedModel): method __init__ (line 966) | def __init__(self, config): method get_input_embeddings (line 976) | def get_input_embeddings(self): method _prune_heads (line 979) | def _prune_heads(self, heads_to_prune): method patchify (line 987) | def patchify(self, pixel_values, interpolate_pos_encoding: bool = False): method unpatchify (line 1023) | def unpatchify(self, patchified_pixel_values, original_image_size: Opt... method forward_loss (line 1069) | def forward_loss(self, pixel_values, pred, mask, interpolate_pos_encod... method forward (line 1097) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vit_msn/configuration_vit_msn.py class ViTMSNConfig (line 24) | class ViTMSNConfig(PretrainedConfig): method __init__ (line 81) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/vit_msn/modeling_vit_msn.py class ViTMSNEmbeddings (line 41) | class ViTMSNEmbeddings(nn.Module): method __init__ (line 46) | def __init__(self, config: ViTMSNConfig, use_mask_token: bool = False)... method interpolate_pos_encoding (line 57) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 92) | def forward( class ViTMSNPatchEmbeddings (line 124) | class ViTMSNPatchEmbeddings(nn.Module): method __init__ (line 131) | def __init__(self, config): method forward (line 146) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class ViTMSNSelfAttention (line 164) | class ViTMSNSelfAttention(nn.Module): method __init__ (line 165) | def __init__(self, config: ViTMSNConfig) -> None: method transpose_for_scores (line 183) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 188) | def forward( class ViTMSNSdpaSelfAttention (line 225) | class ViTMSNSdpaSelfAttention(ViTMSNSelfAttention): method __init__ (line 226) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 230) | def forward( class ViTMSNSelfOutput (line 257) | class ViTMSNSelfOutput(nn.Module): method __init__ (line 263) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 268) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMSNAttention (line 276) | class ViTMSNAttention(nn.Module): method __init__ (line 277) | def __init__(self, config: ViTMSNConfig) -> None: method prune_heads (line 283) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 301) | def forward( class ViTMSNSdpaAttention (line 316) | class ViTMSNSdpaAttention(ViTMSNAttention): method __init__ (line 317) | def __init__(self, config: ViTMSNConfig) -> None: class ViTMSNIntermediate (line 323) | class ViTMSNIntermediate(nn.Module): method __init__ (line 324) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 332) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTMSNOutput (line 340) | class ViTMSNOutput(nn.Module): method __init__ (line 341) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 346) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMSNLayer (line 359) | class ViTMSNLayer(nn.Module): method __init__ (line 362) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 372) | def forward( class ViTMSNEncoder (line 402) | class ViTMSNEncoder(nn.Module): method __init__ (line 403) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 409) | def forward( class ViTMSNPreTrainedModel (line 453) | class ViTMSNPreTrainedModel(PreTrainedModel): method _init_weights (line 468) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class ViTMSNModel (line 521) | class ViTMSNModel(ViTMSNPreTrainedModel): method __init__ (line 522) | def __init__(self, config: ViTMSNConfig, use_mask_token: bool = False): method get_input_embeddings (line 534) | def get_input_embeddings(self) -> ViTMSNPatchEmbeddings: method _prune_heads (line 537) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 547) | def forward( class ViTMSNForImageClassification (line 630) | class ViTMSNForImageClassification(ViTMSNPreTrainedModel): method __init__ (line 631) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 645) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vitdet/configuration_vitdet.py class VitDetConfig (line 25) | class VitDetConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 103) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vitdet/modeling_vitdet.py class VitDetEmbeddings (line 44) | class VitDetEmbeddings(nn.Module): method __init__ (line 50) | def __init__(self, config): method get_absolute_positions (line 72) | def get_absolute_positions(self, abs_pos_embeddings, has_cls_token, he... method forward (line 110) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: function get_rel_pos (line 133) | def get_rel_pos(q_size, k_size, rel_pos): function add_decomposed_relative_positions (line 169) | def add_decomposed_relative_positions(attn, queries, rel_pos_h, rel_pos_... class VitDetAttention (line 210) | class VitDetAttention(nn.Module): method __init__ (line 213) | def __init__(self, config, input_size=None): method forward (line 239) | def forward(self, hidden_state, output_attentions=False): function drop_path (line 273) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class VitDetDropPath (line 294) | class VitDetDropPath(nn.Module): method __init__ (line 297) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 301) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 304) | def extra_repr(self) -> str: class VitDetLayerNorm (line 308) | class VitDetLayerNorm(nn.Module): method __init__ (line 315) | def __init__(self, normalized_shape, eps=1e-6): method forward (line 322) | def forward(self, x): class VitDetResBottleneckBlock (line 330) | class VitDetResBottleneckBlock(nn.Module): method __init__ (line 336) | def __init__(self, config, in_channels, out_channels, bottleneck_chann... method forward (line 360) | def forward(self, x): class VitDetMlp (line 369) | class VitDetMlp(nn.Module): method __init__ (line 370) | def __init__(self, config, in_features: int, hidden_features: int) -> ... method forward (line 377) | def forward(self, x: torch.Tensor) -> torch.Tensor: function window_partition (line 387) | def window_partition(hidden_state, window_size): function window_unpartition (line 419) | def window_unpartition(windows, window_size, pad_height_width, height_wi... class VitDetLayer (line 450) | class VitDetLayer(nn.Module): method __init__ (line 453) | def __init__( method forward (line 482) | def forward( class VitDetEncoder (line 525) | class VitDetEncoder(nn.Module): method __init__ (line 526) | def __init__(self, config: VitDetConfig) -> None: method forward (line 548) | def forward( function caffe2_msra_fill (line 592) | def caffe2_msra_fill(module: nn.Module) -> None: class VitDetPreTrainedModel (line 606) | class VitDetPreTrainedModel(PreTrainedModel): method _init_weights (line 618) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class VitDetModel (line 700) | class VitDetModel(VitDetPreTrainedModel): method __init__ (line 701) | def __init__(self, config: VitDetConfig): method get_input_embeddings (line 711) | def get_input_embeddings(self) -> VitDetEmbeddings: method _prune_heads (line 714) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 724) | def forward( class VitDetBackbone (line 796) | class VitDetBackbone(VitDetPreTrainedModel, BackboneMixin): method __init__ (line 797) | def __init__(self, config): method get_input_embeddings (line 808) | def get_input_embeddings(self) -> VitDetEmbeddings: method forward (line 813) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vitmatte/configuration_vitmatte.py class VitMatteConfig (line 29) | class VitMatteConfig(PretrainedConfig): method __init__ (line 82) | def __init__( method to_dict (line 125) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vitmatte/convert_vitmatte_to_hf.py function get_config (line 30) | def get_config(model_name): function create_rename_keys (line 54) | def create_rename_keys(config): function rename_key (line 67) | def rename_key(dct, old, new): function convert_vitmatte_checkpoint (line 72) | def convert_vitmatte_checkpoint(model_name, pytorch_dump_folder_path, pu... FILE: mplsandbox_for_rl/transformers/src/transformers/models/vitmatte/image_processing_vitmatte.py class VitMatteImageProcessor (line 42) | class VitMatteImageProcessor(BaseImageProcessor): method __init__ (line 71) | def __init__( method pad_image (line 91) | def pad_image( method preprocess (line 133) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vitmatte/modeling_vitmatte.py class ImageMattingOutput (line 39) | class ImageMattingOutput(ModelOutput): class VitMattePreTrainedModel (line 66) | class VitMattePreTrainedModel(PreTrainedModel): method _init_weights (line 77) | def _init_weights(self, module): class VitMatteBasicConv3x3 (line 84) | class VitMatteBasicConv3x3(nn.Module): method __init__ (line 89) | def __init__(self, config, in_channels, out_channels, stride=2, paddin... method forward (line 102) | def forward(self, hidden_state): class VitMatteConvStream (line 110) | class VitMatteConvStream(nn.Module): method __init__ (line 115) | def __init__(self, config): method forward (line 134) | def forward(self, pixel_values): class VitMatteFusionBlock (line 145) | class VitMatteFusionBlock(nn.Module): method __init__ (line 150) | def __init__(self, config, in_channels, out_channels): method forward (line 154) | def forward(self, features, detailed_feature_map): class VitMatteHead (line 162) | class VitMatteHead(nn.Module): method __init__ (line 167) | def __init__(self, config): method forward (line 180) | def forward(self, hidden_state): class VitMatteDetailCaptureModule (line 186) | class VitMatteDetailCaptureModule(nn.Module): method __init__ (line 191) | def __init__(self, config): method forward (line 216) | def forward(self, features, pixel_values): class VitMatteForImageMatting (line 257) | class VitMatteForImageMatting(VitMattePreTrainedModel): method __init__ (line 258) | def __init__(self, config): method forward (line 270) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vits/configuration_vits.py class VitsConfig (line 24) | class VitsConfig(PretrainedConfig): method __init__ (line 151) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vits/convert_original_checkpoint.py function set_recursively (line 156) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function should_ignore (line 195) | def should_ignore(name, ignore_keys): function recursively_load_weights (line 209) | def recursively_load_weights(fairseq_dict, hf_model): function convert_checkpoint (line 266) | def convert_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vits/modeling_vits.py class VitsModelOutput (line 46) | class VitsModelOutput(ModelOutput): class VitsTextEncoderOutput (line 79) | class VitsTextEncoderOutput(ModelOutput): function fused_add_tanh_sigmoid_multiply (line 111) | def fused_add_tanh_sigmoid_multiply(input_a, input_b, num_channels): function _unconstrained_rational_quadratic_spline (line 119) | def _unconstrained_rational_quadratic_spline( function _rational_quadratic_spline (line 193) | def _rational_quadratic_spline( class VitsWaveNet (line 329) | class VitsWaveNet(torch.nn.Module): method __init__ (line 330) | def __init__(self, config: VitsConfig, num_layers: int): method forward (line 371) | def forward(self, inputs, padding_mask, global_conditioning=None): method remove_weight_norm (line 400) | def remove_weight_norm(self): class VitsPosteriorEncoder (line 409) | class VitsPosteriorEncoder(nn.Module): method __init__ (line 410) | def __init__(self, config: VitsConfig): method forward (line 418) | def forward(self, inputs, padding_mask, global_conditioning=None): class HifiGanResidualBlock (line 428) | class HifiGanResidualBlock(nn.Module): method __init__ (line 429) | def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5), leaky_... method get_padding (line 460) | def get_padding(self, kernel_size, dilation=1): method apply_weight_norm (line 463) | def apply_weight_norm(self): method remove_weight_norm (line 469) | def remove_weight_norm(self): method forward (line 475) | def forward(self, hidden_states): class VitsHifiGan (line 486) | class VitsHifiGan(nn.Module): method __init__ (line 487) | def __init__(self, config: VitsConfig): method apply_weight_norm (line 523) | def apply_weight_norm(self): method remove_weight_norm (line 529) | def remove_weight_norm(self): method forward (line 535) | def forward( class VitsResidualCouplingLayer (line 570) | class VitsResidualCouplingLayer(nn.Module): method __init__ (line 571) | def __init__(self, config: VitsConfig): method forward (line 579) | def forward(self, inputs, padding_mask, global_conditioning=None, reve... class VitsResidualCouplingBlock (line 597) | class VitsResidualCouplingBlock(nn.Module): method __init__ (line 598) | def __init__(self, config: VitsConfig): method forward (line 604) | def forward(self, inputs, padding_mask, global_conditioning=None, reve... class VitsDilatedDepthSeparableConv (line 616) | class VitsDilatedDepthSeparableConv(nn.Module): method __init__ (line 617) | def __init__(self, config: VitsConfig, dropout_rate=0.0): method forward (line 645) | def forward(self, inputs, padding_mask, global_conditioning=None): class VitsConvFlow (line 662) | class VitsConvFlow(nn.Module): method __init__ (line 663) | def __init__(self, config: VitsConfig): method forward (line 674) | def forward(self, inputs, padding_mask, global_conditioning=None, reve... class VitsElementwiseAffine (line 705) | class VitsElementwiseAffine(nn.Module): method __init__ (line 706) | def __init__(self, config: VitsConfig): method forward (line 712) | def forward(self, inputs, padding_mask, global_conditioning=None, reve... class VitsStochasticDurationPredictor (line 723) | class VitsStochasticDurationPredictor(nn.Module): method __init__ (line 724) | def __init__(self, config): method forward (line 756) | def forward(self, inputs, padding_mask, global_conditioning=None, dura... class VitsDurationPredictor (line 823) | class VitsDurationPredictor(nn.Module): method __init__ (line 824) | def __init__(self, config): method forward (line 839) | def forward(self, inputs, padding_mask, global_conditioning=None): class VitsAttention (line 860) | class VitsAttention(nn.Module): method __init__ (line 863) | def __init__(self, config: VitsConfig): method _shape (line 888) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 891) | def forward( method _get_relative_embeddings (line 989) | def _get_relative_embeddings(self, relative_embeddings, length): method _relative_position_to_absolute_position (line 998) | def _relative_position_to_absolute_position(self, x): method _absolute_position_to_relative_position (line 1013) | def _absolute_position_to_relative_position(self, x): class VitsFeedForward (line 1026) | class VitsFeedForward(nn.Module): method __init__ (line 1027) | def __init__(self, config): method forward (line 1045) | def forward(self, hidden_states, padding_mask): class VitsEncoderLayer (line 1068) | class VitsEncoderLayer(nn.Module): method __init__ (line 1069) | def __init__(self, config: VitsConfig): method forward (line 1077) | def forward( class VitsEncoder (line 1107) | class VitsEncoder(nn.Module): method __init__ (line 1108) | def __init__(self, config: VitsConfig): method forward (line 1115) | def forward( class VitsTextEncoder (line 1184) | class VitsTextEncoder(nn.Module): method __init__ (line 1189) | def __init__(self, config: VitsConfig): method get_input_embeddings (line 1196) | def get_input_embeddings(self): method set_input_embeddings (line 1199) | def set_input_embeddings(self, value): method forward (line 1202) | def forward( class VitsPreTrainedModel (line 1240) | class VitsPreTrainedModel(PreTrainedModel): method _init_weights (line 1251) | def _init_weights(self, module): class VitsModel (line 1323) | class VitsModel(VitsPreTrainedModel): method __init__ (line 1324) | def __init__(self, config: VitsConfig): method get_encoder (line 1350) | def get_encoder(self): method forward (line 1355) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vits/tokenization_vits.py function has_non_roman_characters (line 35) | def has_non_roman_characters(input_string): class VitsTokenizer (line 45) | class VitsTokenizer(PreTrainedTokenizer): method __init__ (line 70) | def __init__( method vocab_size (line 105) | def vocab_size(self): method get_vocab (line 108) | def get_vocab(self): method normalize_text (line 113) | def normalize_text(self, input_string): method _preprocess_char (line 134) | def _preprocess_char(self, text): method prepare_for_tokenization (line 140) | def prepare_for_tokenization( method _tokenize (line 200) | def _tokenize(self, text: str) -> List[str]: method convert_tokens_to_string (line 211) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _convert_token_to_id (line 216) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 220) | def _convert_id_to_token(self, index): method save_vocabulary (line 224) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/vivit/configuration_vivit.py class VivitConfig (line 24) | class VivitConfig(PretrainedConfig): method __init__ (line 82) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vivit/convert_vivit_flax_to_pytorch.py function download_checkpoint (line 34) | def download_checkpoint(path): function get_vivit_config (line 43) | def get_vivit_config() -> VivitConfig: function prepare_video (line 60) | def prepare_video(): function transform_attention (line 68) | def transform_attention(current: np.ndarray): function transform_attention_bias (line 79) | def transform_attention_bias(current: np.ndarray): function transform_attention_kernel (line 83) | def transform_attention_kernel(current: np.ndarray): function transform_attention_output_weight (line 87) | def transform_attention_output_weight(current: np.ndarray): function transform_state_encoder_block (line 91) | def transform_state_encoder_block(state_dict, i): function get_n_layers (line 131) | def get_n_layers(state_dict): function transform_state (line 135) | def transform_state(state_dict, classification_head=False): function get_processor (line 168) | def get_processor() -> VivitImageProcessor: function convert (line 190) | def convert(output_path: str): FILE: mplsandbox_for_rl/transformers/src/transformers/models/vivit/image_processing_vivit.py function make_batched (line 53) | def make_batched(videos) -> List[List[ImageInput]]: class VivitImageProcessor (line 66) | class VivitImageProcessor(BaseImageProcessor): method __init__ (line 109) | def __init__( method resize (line 142) | def resize( method rescale (line 187) | def rescale( method _preprocess_image (line 227) | def _preprocess_image( method preprocess (line 290) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/vivit/modeling_vivit.py class VivitTubeletEmbeddings (line 39) | class VivitTubeletEmbeddings(nn.Module): method __init__ (line 50) | def __init__(self, config): method forward (line 66) | def forward(self, pixel_values, interpolate_pos_encoding: bool = False): class VivitEmbeddings (line 84) | class VivitEmbeddings(nn.Module): method __init__ (line 91) | def __init__(self, config): method interpolate_pos_encoding (line 103) | def interpolate_pos_encoding(self, embeddings, height, width): method forward (line 135) | def forward(self, pixel_values, interpolate_pos_encoding: bool = False): class VivitSelfAttention (line 154) | class VivitSelfAttention(nn.Module): method __init__ (line 155) | def __init__(self, config: VivitConfig) -> None: method transpose_for_scores (line 173) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 178) | def forward( class VivitSelfOutput (line 215) | class VivitSelfOutput(nn.Module): method __init__ (line 221) | def __init__(self, config: VivitConfig) -> None: method forward (line 226) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VivitAttention (line 234) | class VivitAttention(nn.Module): method __init__ (line 235) | def __init__(self, config: VivitConfig) -> None: method prune_heads (line 241) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 259) | def forward( class VivitIntermediate (line 273) | class VivitIntermediate(nn.Module): method __init__ (line 274) | def __init__(self, config): method forward (line 283) | def forward(self, hidden_states): class VivitOutput (line 291) | class VivitOutput(nn.Module): method __init__ (line 292) | def __init__(self, config): method forward (line 297) | def forward(self, hidden_states, input_tensor): class VivitLayer (line 307) | class VivitLayer(nn.Module): method __init__ (line 310) | def __init__(self, config): method forward (line 320) | def forward(self, hidden_states, head_mask=None, output_attentions=Fal... class VivitEncoder (line 346) | class VivitEncoder(nn.Module): method __init__ (line 347) | def __init__(self, config): method forward (line 353) | def forward( class VivitPooler (line 397) | class VivitPooler(nn.Module): method __init__ (line 398) | def __init__(self, config): method forward (line 403) | def forward(self, hidden_states): class VivitPreTrainedModel (line 412) | class VivitPreTrainedModel(PreTrainedModel): method _init_weights (line 424) | def _init_weights(self, module): class VivitModel (line 483) | class VivitModel(VivitPreTrainedModel): method __init__ (line 484) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 497) | def get_input_embeddings(self): method _prune_heads (line 500) | def _prune_heads(self, heads_to_prune): method forward (line 513) | def forward( class VivitForVideoClassification (line 648) | class VivitForVideoClassification(VivitPreTrainedModel): method __init__ (line 649) | def __init__(self, config): method forward (line 663) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2/configuration_wav2vec2.py class Wav2Vec2Config (line 27) | class Wav2Vec2Config(PretrainedConfig): method __init__ (line 204) | def __init__( method inputs_to_logits_ratio (line 343) | def inputs_to_logits_ratio(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2/convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py function read_txt_into_dict (line 74) | def read_txt_into_dict(filename): function set_recursively (line 87) | def set_recursively(key, value, full_name, weight_type, hf_pointer): function rename_dict (line 149) | def rename_dict(key, value, full_name, weight_type, hf_dict): function load_wav2vec2_layer (line 176) | def load_wav2vec2_layer(name, value, hf_model=None, hf_dict=None): function recursively_load_weights (line 204) | def recursively_load_weights(fairseq_model, hf_model, is_headless): function load_conv_layer (line 229) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_wav2vec2_checkpoint (line 274) | def convert_wav2vec2_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2/convert_wav2vec2_original_s3prl_checkpoint_to_pytorch.py function convert_classification (line 35) | def convert_classification(base_model_name, hf_config, downstream_dict): function convert_diarization (line 44) | def convert_diarization(base_model_name, hf_config, downstream_dict): function convert_xvector (line 51) | def convert_xvector(base_model_name, hf_config, downstream_dict): function convert_s3prl_checkpoint (line 70) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2/modeling_tf_wav2vec2.py class TFWav2Vec2BaseModelOutput (line 59) | class TFWav2Vec2BaseModelOutput(ModelOutput): function _sample_without_replacement (line 87) | def _sample_without_replacement(distribution, num_samples): function _scatter_values_on_batch_indices (line 97) | def _scatter_values_on_batch_indices(values, batch_indices, output_shape): function _compute_mask_indices (line 112) | def _compute_mask_indices( function _expand_mask (line 187) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFWav2Vec2GroupNorm (line 200) | class TFWav2Vec2GroupNorm(keras.layers.Layer): method __init__ (line 205) | def __init__( method build (line 235) | def build(self, input_shape): method call (line 246) | def call(self, inputs): method get_config (line 262) | def get_config(self): method compute_output_shape (line 279) | def compute_output_shape(self, input_shape): method _reshape_into_groups (line 282) | def _reshape_into_groups(self, inputs, input_shape, tensor_input_shape): method _apply_normalization (line 294) | def _apply_normalization(self, reshaped_inputs, input_shape): method _get_reshaped_weights (line 317) | def _get_reshaped_weights(self, input_shape): method _check_if_input_shape_is_none (line 328) | def _check_if_input_shape_is_none(self, input_shape): method _set_number_of_groups_for_instance_norm (line 339) | def _set_number_of_groups_for_instance_norm(self, input_shape): method _check_size_of_dimensions (line 345) | def _check_size_of_dimensions(self, input_shape): method _check_axis (line 365) | def _check_axis(self): method _create_input_spec (line 371) | def _create_input_spec(self, input_shape): method _add_gamma_weight (line 375) | def _add_gamma_weight(self, input_shape): method _add_beta_weight (line 390) | def _add_beta_weight(self, input_shape): method _create_broadcast_shape (line 405) | def _create_broadcast_shape(self, input_shape): class TFWav2Vec2WeightNormConv1D (line 416) | class TFWav2Vec2WeightNormConv1D(keras.layers.Conv1D): method __init__ (line 419) | def __init__(self, filters, kernel_size, groups, explicit_padding, **k... method _init_norm (line 433) | def _init_norm(self): method _normalize_kernel (line 438) | def _normalize_kernel(self): method build (line 443) | def build(self, input_shape): method call (line 460) | def call(self, inputs): class TFWav2Vec2NoLayerNormConvLayer (line 472) | class TFWav2Vec2NoLayerNormConvLayer(keras.layers.Layer): method __init__ (line 473) | def __init__(self, config: Wav2Vec2Config, layer_id: int = 0, **kwargs... method call (line 487) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 492) | def build(self, input_shape=None): class TFWav2Vec2LayerNormConvLayer (line 501) | class TFWav2Vec2LayerNormConvLayer(keras.layers.Layer): method __init__ (line 502) | def __init__(self, config: Wav2Vec2Config, layer_id: int = 0, **kwargs... method call (line 517) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 523) | def build(self, input_shape=None): class TFWav2Vec2GroupNormConvLayer (line 535) | class TFWav2Vec2GroupNormConvLayer(keras.layers.Layer): method __init__ (line 536) | def __init__(self, config: Wav2Vec2Config, layer_id: int = 0, **kwargs... method call (line 553) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 559) | def build(self, input_shape=None): class TFWav2Vec2PositionalConvEmbedding (line 571) | class TFWav2Vec2PositionalConvEmbedding(keras.layers.Layer): method __init__ (line 572) | def __init__(self, config: Wav2Vec2Config, **kwargs: Any) -> None: method call (line 585) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 591) | def build(self, input_shape=None): class TFWav2Vec2SamePadLayer (line 600) | class TFWav2Vec2SamePadLayer(keras.layers.Layer): method __init__ (line 601) | def __init__(self, num_conv_pos_embeddings, **kwargs): method call (line 605) | def call(self, hidden_states): class TFWav2Vec2FeatureEncoder (line 611) | class TFWav2Vec2FeatureEncoder(keras.layers.Layer): method __init__ (line 612) | def __init__(self, config: Wav2Vec2Config, **kwargs: Any) -> None: method call (line 631) | def call(self, input_values): method build (line 637) | def build(self, input_shape=None): class TFWav2Vec2FeatureExtractor (line 647) | class TFWav2Vec2FeatureExtractor(TFWav2Vec2FeatureEncoder): method __init__ (line 648) | def __init__(self, config, **kwargs): class TFWav2Vec2FeatureProjection (line 658) | class TFWav2Vec2FeatureProjection(keras.layers.Layer): method __init__ (line 659) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 672) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 678) | def build(self, input_shape=None): class TFWav2Vec2Attention (line 691) | class TFWav2Vec2Attention(keras.layers.Layer): method __init__ (line 694) | def __init__( method _shape (line 722) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 725) | def call( method build (line 843) | def build(self, input_shape=None): class TFWav2Vec2FeedForward (line 861) | class TFWav2Vec2FeedForward(keras.layers.Layer): method __init__ (line 862) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 884) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... method build (line 893) | def build(self, input_shape=None): class TFWav2Vec2EncoderLayer (line 905) | class TFWav2Vec2EncoderLayer(keras.layers.Layer): method __init__ (line 906) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 921) | def call( method build (line 946) | def build(self, input_shape=None): class TFWav2Vec2EncoderLayerStableLayerNorm (line 964) | class TFWav2Vec2EncoderLayerStableLayerNorm(keras.layers.Layer): method __init__ (line 965) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 980) | def call( method build (line 1003) | def build(self, input_shape=None): class TFWav2Vec2Encoder (line 1021) | class TFWav2Vec2Encoder(keras.layers.Layer): method __init__ (line 1022) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 1030) | def call( method build (line 1085) | def build(self, input_shape=None): class TFWav2Vec2EncoderStableLayerNorm (line 1101) | class TFWav2Vec2EncoderStableLayerNorm(keras.layers.Layer): method __init__ (line 1102) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 1112) | def call( method build (line 1167) | def build(self, input_shape=None): class TFWav2Vec2MainLayer (line 1184) | class TFWav2Vec2MainLayer(keras.layers.Layer): method __init__ (line 1187) | def __init__(self, config: Wav2Vec2Config, **kwargs): method build (line 1198) | def build(self, input_shape=None): method _get_feat_extract_output_lengths (line 1216) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method _mask_hidden_states (line 1231) | def _mask_hidden_states(self, hidden_states: tf.Tensor, mask_time_indi... method call (line 1276) | def call( class TFWav2Vec2PreTrainedModel (line 1328) | class TFWav2Vec2PreTrainedModel(TFPreTrainedModel): method input_signature (line 1339) | def input_signature(self): method dummy_inputs (line 1346) | def dummy_inputs(self): method __init__ (line 1352) | def __init__(self, config, *inputs, **kwargs): method _get_feat_extract_output_lengths (line 1359) | def _get_feat_extract_output_lengths(self, input_lengths, add_adapter=... method _get_feature_vector_attention_mask (line 1376) | def _get_feature_vector_attention_mask( class TFWav2Vec2Model (line 1502) | class TFWav2Vec2Model(TFWav2Vec2PreTrainedModel): method __init__ (line 1503) | def __init__(self, config: Wav2Vec2Config, *inputs, **kwargs): method call (line 1511) | def call( method build (line 1571) | def build(self, input_shape=None): class TFWav2Vec2ForCTC (line 1584) | class TFWav2Vec2ForCTC(TFWav2Vec2PreTrainedModel): method __init__ (line 1585) | def __init__(self, config: Wav2Vec2Config, *inputs, **kwargs): method freeze_feature_extractor (line 1595) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1607) | def freeze_feature_encoder(self): method call (line 1617) | def call( method build (line 1734) | def build(self, input_shape=None): class TFWav2Vec2ForSequenceClassification (line 1746) | class TFWav2Vec2ForSequenceClassification(TFWav2Vec2PreTrainedModel): method __init__ (line 1747) | def __init__(self, config): method freeze_feature_extractor (line 1760) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1772) | def freeze_feature_encoder(self): method freeze_base_model (line 1779) | def freeze_base_model(self): method call (line 1788) | def call( method build (line 1843) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2/modeling_wav2vec2.py class Wav2Vec2ForPreTrainingOutput (line 98) | class Wav2Vec2ForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 139) | def _compute_mask_indices( function _sample_negative_indices (line 258) | def _sample_negative_indices( class Wav2Vec2NoLayerNormConvLayer (line 294) | class Wav2Vec2NoLayerNormConvLayer(nn.Module): method __init__ (line 295) | def __init__(self, config, layer_id=0): method forward (line 309) | def forward(self, hidden_states): class Wav2Vec2LayerNormConvLayer (line 315) | class Wav2Vec2LayerNormConvLayer(nn.Module): method __init__ (line 316) | def __init__(self, config, layer_id=0): method forward (line 331) | def forward(self, hidden_states): class Wav2Vec2GroupNormConvLayer (line 342) | class Wav2Vec2GroupNormConvLayer(nn.Module): method __init__ (line 343) | def __init__(self, config, layer_id=0): method forward (line 359) | def forward(self, hidden_states): class Wav2Vec2PositionalConvEmbedding (line 366) | class Wav2Vec2PositionalConvEmbedding(nn.Module): method __init__ (line 367) | def __init__(self, config): method forward (line 400) | def forward(self, hidden_states): class Wav2Vec2SamePadLayer (line 411) | class Wav2Vec2SamePadLayer(nn.Module): method __init__ (line 412) | def __init__(self, num_conv_pos_embeddings): method forward (line 416) | def forward(self, hidden_states): class Wav2Vec2FeatureEncoder (line 422) | class Wav2Vec2FeatureEncoder(nn.Module): method __init__ (line 425) | def __init__(self, config): method _freeze_parameters (line 444) | def _freeze_parameters(self): method forward (line 449) | def forward(self, input_values): class Wav2Vec2FeatureExtractor (line 468) | class Wav2Vec2FeatureExtractor(Wav2Vec2FeatureEncoder): method __init__ (line 469) | def __init__(self, config): class Wav2Vec2FeatureProjection (line 479) | class Wav2Vec2FeatureProjection(nn.Module): method __init__ (line 480) | def __init__(self, config): method forward (line 486) | def forward(self, hidden_states): class Wav2Vec2Attention (line 495) | class Wav2Vec2Attention(nn.Module): method __init__ (line 498) | def __init__( method _shape (line 529) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 532) | def forward( class Wav2Vec2FlashAttention2 (line 654) | class Wav2Vec2FlashAttention2(Wav2Vec2Attention): method __init__ (line 662) | def __init__(self, *args, **kwargs): method _reshape (line 670) | def _reshape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 673) | def forward( class Wav2Vec2SdpaAttention (line 781) | class Wav2Vec2SdpaAttention(Wav2Vec2Attention): method forward (line 783) | def forward( class Wav2Vec2FeedForward (line 895) | class Wav2Vec2FeedForward(nn.Module): method __init__ (line 896) | def __init__(self, config): method forward (line 909) | def forward(self, hidden_states): class Wav2Vec2EncoderLayer (line 919) | class Wav2Vec2EncoderLayer(nn.Module): method __init__ (line 920) | def __init__(self, config): method forward (line 934) | def forward(self, hidden_states, attention_mask=None, output_attention... class Wav2Vec2EncoderLayerStableLayerNorm (line 954) | class Wav2Vec2EncoderLayerStableLayerNorm(nn.Module): method __init__ (line 955) | def __init__(self, config): method forward (line 973) | def forward( class Wav2Vec2Encoder (line 999) | class Wav2Vec2Encoder(nn.Module): method __init__ (line 1000) | def __init__(self, config): method forward (line 1010) | def forward( class Wav2Vec2EncoderStableLayerNorm (line 1084) | class Wav2Vec2EncoderStableLayerNorm(nn.Module): method __init__ (line 1085) | def __init__(self, config): method forward (line 1097) | def forward( class Wav2Vec2GumbelVectorQuantizer (line 1173) | class Wav2Vec2GumbelVectorQuantizer(nn.Module): method __init__ (line 1179) | def __init__(self, config): method _compute_perplexity (line 1200) | def _compute_perplexity(probs, mask=None): method forward (line 1211) | def forward(self, hidden_states, mask_time_indices=None): class Wav2Vec2Adapter (line 1249) | class Wav2Vec2Adapter(nn.Module): method __init__ (line 1250) | def __init__(self, config): method forward (line 1263) | def forward(self, hidden_states): class Wav2Vec2AdapterLayer (line 1280) | class Wav2Vec2AdapterLayer(nn.Module): method __init__ (line 1281) | def __init__(self, config): method forward (line 1291) | def forward(self, hidden_states): class Wav2Vec2AttnAdapterLayer (line 1298) | class Wav2Vec2AttnAdapterLayer(nn.Module): method __init__ (line 1299) | def __init__(self, config): method forward (line 1313) | def forward(self, hidden_states: torch.FloatTensor): class Wav2Vec2PreTrainedModel (line 1323) | class Wav2Vec2PreTrainedModel(PreTrainedModel): method _init_weights (line 1336) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1375) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1398) | def _get_feature_vector_attention_mask( method _get_adapters (line 1418) | def _get_adapters(self): method init_adapter_layers (line 1434) | def init_adapter_layers(self): method load_adapter (line 1447) | def load_adapter(self, target_lang: str, force_load=True, **kwargs): class Wav2Vec2Model (line 1700) | class Wav2Vec2Model(Wav2Vec2PreTrainedModel): method __init__ (line 1701) | def __init__(self, config: Wav2Vec2Config): method freeze_feature_extractor (line 1721) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1733) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1740) | def _mask_hidden_states( method forward (line 1794) | def forward( class Wav2Vec2ForPreTraining (line 1848) | class Wav2Vec2ForPreTraining(Wav2Vec2PreTrainedModel): method __init__ (line 1849) | def __init__(self, config: Wav2Vec2Config): method set_gumbel_temperature (line 1862) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_extractor (line 1868) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1880) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1888) | def compute_contrastive_logits( method forward (line 1910) | def forward( class Wav2Vec2ForMaskedLM (line 2072) | class Wav2Vec2ForMaskedLM(Wav2Vec2PreTrainedModel): method __init__ (line 2073) | def __init__(self, config): method forward (line 2088) | def forward( class Wav2Vec2ForCTC (line 2127) | class Wav2Vec2ForCTC(Wav2Vec2PreTrainedModel): method __init__ (line 2128) | def __init__(self, config, target_lang: Optional[str] = None): method tie_weights (line 2151) | def tie_weights(self): method freeze_feature_extractor (line 2172) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 2184) | def freeze_feature_encoder(self): method freeze_base_model (line 2191) | def freeze_base_model(self): method forward (line 2207) | def forward( class Wav2Vec2ForSequenceClassification (line 2285) | class Wav2Vec2ForSequenceClassification(Wav2Vec2PreTrainedModel): method __init__ (line 2286) | def __init__(self, config): method freeze_feature_extractor (line 2303) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 2315) | def freeze_feature_encoder(self): method freeze_base_model (line 2322) | def freeze_base_model(self): method forward (line 2339) | def forward( class Wav2Vec2ForAudioFrameClassification (line 2407) | class Wav2Vec2ForAudioFrameClassification(Wav2Vec2PreTrainedModel): method __init__ (line 2408) | def __init__(self, config): method freeze_feature_extractor (line 2424) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 2436) | def freeze_feature_encoder(self): method freeze_base_model (line 2443) | def freeze_base_model(self): method forward (line 2459) | def forward( class AMSoftmaxLoss (line 2513) | class AMSoftmaxLoss(nn.Module): method __init__ (line 2514) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 2522) | def forward(self, hidden_states, labels): class TDNNLayer (line 2536) | class TDNNLayer(nn.Module): method __init__ (line 2537) | def __init__(self, config, layer_id=0): method forward (line 2547) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Wav2Vec2ForXVector (line 2573) | class Wav2Vec2ForXVector(Wav2Vec2PreTrainedModel): method __init__ (line 2574) | def __init__(self, config): method freeze_feature_extractor (line 2593) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 2605) | def freeze_feature_encoder(self): method freeze_base_model (line 2612) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 2620) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 2643) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2/processing_wav2vec2.py class Wav2Vec2Processor (line 27) | class Wav2Vec2Processor(ProcessorMixin): method __init__ (line 45) | def __init__(self, feature_extractor, tokenizer): method from_pretrained (line 51) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method __call__ (line 69) | def __call__(self, *args, **kwargs): method pad (line 107) | def pad(self, *args, **kwargs): method batch_decode (line 137) | def batch_decode(self, *args, **kwargs): method decode (line 144) | def decode(self, *args, **kwargs): method as_target_processor (line 152) | def as_target_processor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2/tokenization_wav2vec2.py class Wav2Vec2CTCTokenizerOutput (line 94) | class Wav2Vec2CTCTokenizerOutput(ModelOutput): class Wav2Vec2CTCTokenizer (line 115) | class Wav2Vec2CTCTokenizer(PreTrainedTokenizer): method __init__ (line 149) | def __init__( method set_target_lang (line 198) | def set_target_lang(self, target_lang: str): method word_delimiter_token (line 220) | def word_delimiter_token(self) -> str: method word_delimiter_token_id (line 230) | def word_delimiter_token_id(self) -> Optional[int]: method word_delimiter_token (line 240) | def word_delimiter_token(self, value): method word_delimiter_token_id (line 244) | def word_delimiter_token_id(self, value): method vocab_size (line 248) | def vocab_size(self) -> int: method get_vocab (line 251) | def get_vocab(self) -> Dict: method _add_tokens (line 256) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method _tokenize (line 267) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 276) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 280) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 285) | def convert_tokens_to_string( method _compute_offsets (line 349) | def _compute_offsets( method _get_word_offsets (line 364) | def _get_word_offsets( method prepare_for_tokenization (line 398) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _decode (line 403) | def _decode( method batch_decode (line 458) | def batch_decode( method decode (line 528) | def decode( method save_vocabulary (line 633) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class Wav2Vec2Tokenizer (line 647) | class Wav2Vec2Tokenizer(PreTrainedTokenizer): method __init__ (line 707) | def __init__( method word_delimiter_token (line 750) | def word_delimiter_token(self) -> str: method word_delimiter_token_id (line 760) | def word_delimiter_token_id(self) -> Optional[int]: method word_delimiter_token (line 770) | def word_delimiter_token(self, value): method word_delimiter_token_id (line 774) | def word_delimiter_token_id(self, value): method __call__ (line 778) | def __call__( method vocab_size (line 836) | def vocab_size(self) -> int: method get_vocab (line 839) | def get_vocab(self) -> Dict: method _convert_token_to_id (line 842) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 846) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 851) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 869) | def _decode( method save_vocabulary (line 904) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2_bert/configuration_wav2vec2_bert.py class Wav2Vec2BertConfig (line 24) | class Wav2Vec2BertConfig(PretrainedConfig): method __init__ (line 182) | def __init__( method inputs_to_logits_ratio (line 306) | def inputs_to_logits_ratio(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2_bert/convert_wav2vec2_seamless_checkpoint.py function param_count (line 75) | def param_count(model): function _convert_model (line 79) | def _convert_model( function convert_wav2vec2_bert_checkpoint (line 125) | def convert_wav2vec2_bert_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py function _compute_new_attention_mask (line 68) | def _compute_new_attention_mask(hidden_states: torch.Tensor, seq_lens: t... function _compute_mask_indices (line 94) | def _compute_mask_indices( function _sample_negative_indices (line 214) | def _sample_negative_indices( class Wav2Vec2BertRotaryPositionalEmbedding (line 251) | class Wav2Vec2BertRotaryPositionalEmbedding(nn.Module): method __init__ (line 256) | def __init__(self, config): method forward (line 267) | def forward(self, hidden_states): class Wav2Vec2BertRelPositionalEmbedding (line 287) | class Wav2Vec2BertRelPositionalEmbedding(nn.Module): method __init__ (line 290) | def __init__(self, config): method extend_pe (line 297) | def extend_pe(self, x): method forward (line 328) | def forward(self, hidden_states: torch.Tensor): class Wav2Vec2BertFeatureProjection (line 337) | class Wav2Vec2BertFeatureProjection(nn.Module): method __init__ (line 338) | def __init__(self, config): method forward (line 344) | def forward(self, hidden_states): class Wav2Vec2BertFeedForward (line 352) | class Wav2Vec2BertFeedForward(nn.Module): method __init__ (line 353) | def __init__(self, config, act_fn=None, hidden_size=None): method forward (line 366) | def forward(self, hidden_states): class Wav2Vec2BertConvolutionModule (line 376) | class Wav2Vec2BertConvolutionModule(nn.Module): method __init__ (line 379) | def __init__(self, config): method forward (line 415) | def forward(self, hidden_states, attention_mask=None): class Wav2Vec2BertSelfAttention (line 448) | class Wav2Vec2BertSelfAttention(nn.Module): method __init__ (line 453) | def __init__(self, config, is_adapter_attention=False): method forward (line 482) | def forward( method _apply_rotary_embedding (line 559) | def _apply_rotary_embedding(self, hidden_states, relative_position_emb... method _apply_relative_embeddings (line 579) | def _apply_relative_embeddings(self, query, key, relative_position_emb... class Wav2Vec2BertEncoderLayer (line 619) | class Wav2Vec2BertEncoderLayer(nn.Module): method __init__ (line 622) | def __init__(self, config): method forward (line 644) | def forward( class Wav2Vec2BertEncoder (line 687) | class Wav2Vec2BertEncoder(nn.Module): method __init__ (line 688) | def __init__(self, config): method forward (line 703) | def forward( class Wav2Vec2BertAdapter (line 782) | class Wav2Vec2BertAdapter(nn.Module): method __init__ (line 783) | def __init__(self, config): method _compute_sub_sample_lengths_from_attention_mask (line 797) | def _compute_sub_sample_lengths_from_attention_mask(self, seq_lens): method forward (line 804) | def forward(self, hidden_states, attention_mask=None): class Wav2Vec2BertAdapterLayer (line 825) | class Wav2Vec2BertAdapterLayer(nn.Module): method __init__ (line 826) | def __init__(self, config): method forward (line 861) | def forward( class Wav2Vec2BertPreTrainedModel (line 914) | class Wav2Vec2BertPreTrainedModel(PreTrainedModel): method _init_weights (line 926) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 953) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 976) | def _get_feature_vector_attention_mask( class Wav2Vec2BertModel (line 1045) | class Wav2Vec2BertModel(Wav2Vec2BertPreTrainedModel): method __init__ (line 1046) | def __init__(self, config: Wav2Vec2BertConfig): method _mask_hidden_states (line 1067) | def _mask_hidden_states( method forward (line 1121) | def forward( class Wav2Vec2BertForCTC (line 1173) | class Wav2Vec2BertForCTC(Wav2Vec2BertPreTrainedModel): method __init__ (line 1175) | def __init__(self, config, target_lang: Optional[str] = None): method forward (line 1206) | def forward( class Wav2Vec2BertForSequenceClassification (line 1286) | class Wav2Vec2BertForSequenceClassification(Wav2Vec2BertPreTrainedModel): method __init__ (line 1288) | def __init__(self, config): method freeze_base_model (line 1305) | def freeze_base_model(self): method forward (line 1321) | def forward( class Wav2Vec2BertForAudioFrameClassification (line 1389) | class Wav2Vec2BertForAudioFrameClassification(Wav2Vec2BertPreTrainedModel): method __init__ (line 1391) | def __init__(self, config): method freeze_base_model (line 1408) | def freeze_base_model(self): method forward (line 1424) | def forward( class AMSoftmaxLoss (line 1479) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1480) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1488) | def forward(self, hidden_states, labels): class TDNNLayer (line 1503) | class TDNNLayer(nn.Module): method __init__ (line 1504) | def __init__(self, config, layer_id=0): method forward (line 1514) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Wav2Vec2BertForXVector (line 1540) | class Wav2Vec2BertForXVector(Wav2Vec2BertPreTrainedModel): method __init__ (line 1542) | def __init__(self, config): method freeze_base_model (line 1562) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 1571) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 1594) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2_bert/processing_wav2vec2_bert.py class Wav2Vec2BertProcessor (line 26) | class Wav2Vec2BertProcessor(ProcessorMixin): method __init__ (line 44) | def __init__(self, feature_extractor, tokenizer): method from_pretrained (line 48) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method __call__ (line 66) | def __call__(self, audio=None, text=None, **kwargs): method pad (line 112) | def pad(self, input_features=None, labels=None, **kwargs): method batch_decode (line 134) | def batch_decode(self, *args, **kwargs): method decode (line 141) | def decode(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2_conformer/configuration_wav2vec2_conformer.py class Wav2Vec2ConformerConfig (line 27) | class Wav2Vec2ConformerConfig(PretrainedConfig): method __init__ (line 209) | def __init__( method inputs_to_logits_ratio (line 356) | def inputs_to_logits_ratio(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2_conformer/convert_wav2vec2_conformer_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 81) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 118) | def recursively_load_weights(fairseq_model, hf_model, is_headless): function load_conv_layer (line 175) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_wav2vec2_conformer_checkpoint (line 220) | def convert_wav2vec2_conformer_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py class Wav2Vec2ConformerForPreTrainingOutput (line 70) | class Wav2Vec2ConformerForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 112) | def _compute_mask_indices( function _sample_negative_indices (line 232) | def _sample_negative_indices( class Wav2Vec2ConformerNoLayerNormConvLayer (line 269) | class Wav2Vec2ConformerNoLayerNormConvLayer(nn.Module): method __init__ (line 270) | def __init__(self, config, layer_id=0): method forward (line 284) | def forward(self, hidden_states): class Wav2Vec2ConformerLayerNormConvLayer (line 291) | class Wav2Vec2ConformerLayerNormConvLayer(nn.Module): method __init__ (line 292) | def __init__(self, config, layer_id=0): method forward (line 307) | def forward(self, hidden_states): class Wav2Vec2ConformerGroupNormConvLayer (line 319) | class Wav2Vec2ConformerGroupNormConvLayer(nn.Module): method __init__ (line 320) | def __init__(self, config, layer_id=0): method forward (line 336) | def forward(self, hidden_states): class Wav2Vec2ConformerPositionalConvEmbedding (line 344) | class Wav2Vec2ConformerPositionalConvEmbedding(nn.Module): method __init__ (line 345) | def __init__(self, config): method forward (line 378) | def forward(self, hidden_states): class Wav2Vec2ConformerRotaryPositionalEmbedding (line 389) | class Wav2Vec2ConformerRotaryPositionalEmbedding(nn.Module): method __init__ (line 394) | def __init__(self, config): method forward (line 404) | def forward(self, hidden_states): class Wav2Vec2ConformerRelPositionalEmbedding (line 423) | class Wav2Vec2ConformerRelPositionalEmbedding(nn.Module): method __init__ (line 426) | def __init__(self, config): method extend_pe (line 433) | def extend_pe(self, x): method forward (line 464) | def forward(self, hidden_states: torch.Tensor): class Wav2Vec2ConformerSamePadLayer (line 474) | class Wav2Vec2ConformerSamePadLayer(nn.Module): method __init__ (line 475) | def __init__(self, num_conv_pos_embeddings): method forward (line 479) | def forward(self, hidden_states): class Wav2Vec2ConformerFeatureEncoder (line 486) | class Wav2Vec2ConformerFeatureEncoder(nn.Module): method __init__ (line 489) | def __init__(self, config): method _freeze_parameters (line 509) | def _freeze_parameters(self): method forward (line 514) | def forward(self, input_values): class Wav2Vec2ConformerFeatureProjection (line 534) | class Wav2Vec2ConformerFeatureProjection(nn.Module): method __init__ (line 535) | def __init__(self, config): method forward (line 541) | def forward(self, hidden_states): class Wav2Vec2ConformerFeedForward (line 550) | class Wav2Vec2ConformerFeedForward(nn.Module): method __init__ (line 551) | def __init__(self, config): method forward (line 564) | def forward(self, hidden_states): class Wav2Vec2ConformerConvolutionModule (line 574) | class Wav2Vec2ConformerConvolutionModule(nn.Module): method __init__ (line 577) | def __init__(self, config): method forward (line 612) | def forward(self, hidden_states): class Wav2Vec2ConformerSelfAttention (line 634) | class Wav2Vec2ConformerSelfAttention(nn.Module): method __init__ (line 639) | def __init__(self, config): method forward (line 661) | def forward( method _apply_rotary_embedding (line 723) | def _apply_rotary_embedding(self, hidden_states, relative_position_emb... method _apply_relative_embeddings (line 742) | def _apply_relative_embeddings(self, query, key, relative_position_emb... class Wav2Vec2ConformerEncoderLayer (line 782) | class Wav2Vec2ConformerEncoderLayer(nn.Module): method __init__ (line 785) | def __init__(self, config): method forward (line 807) | def forward( class Wav2Vec2ConformerEncoder (line 849) | class Wav2Vec2ConformerEncoder(nn.Module): method __init__ (line 850) | def __init__(self, config): method forward (line 867) | def forward( class Wav2Vec2ConformerGumbelVectorQuantizer (line 945) | class Wav2Vec2ConformerGumbelVectorQuantizer(nn.Module): method __init__ (line 951) | def __init__(self, config): method _compute_perplexity (line 972) | def _compute_perplexity(probs, mask=None): method forward (line 983) | def forward(self, hidden_states, mask_time_indices=None): class Wav2Vec2ConformerAdapter (line 1022) | class Wav2Vec2ConformerAdapter(nn.Module): method __init__ (line 1023) | def __init__(self, config): method forward (line 1036) | def forward(self, hidden_states): class Wav2Vec2ConformerAdapterLayer (line 1054) | class Wav2Vec2ConformerAdapterLayer(nn.Module): method __init__ (line 1055) | def __init__(self, config): method forward (line 1065) | def forward(self, hidden_states): class Wav2Vec2ConformerPreTrainedModel (line 1072) | class Wav2Vec2ConformerPreTrainedModel(PreTrainedModel): method _init_weights (line 1083) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1127) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1150) | def _get_feature_vector_attention_mask( class Wav2Vec2ConformerModel (line 1232) | class Wav2Vec2ConformerModel(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1233) | def __init__(self, config: Wav2Vec2ConformerConfig): method freeze_feature_encoder (line 1251) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1259) | def _mask_hidden_states( method forward (line 1314) | def forward( class Wav2Vec2ConformerForPreTraining (line 1370) | class Wav2Vec2ConformerForPreTraining(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1372) | def __init__(self, config: Wav2Vec2ConformerConfig): method set_gumbel_temperature (line 1386) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_encoder (line 1393) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1402) | def compute_contrastive_logits( method forward (line 1425) | def forward( class Wav2Vec2ConformerForCTC (line 1590) | class Wav2Vec2ConformerForCTC(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1592) | def __init__(self, config, target_lang: Optional[str] = None): method freeze_feature_encoder (line 1616) | def freeze_feature_encoder(self): method forward (line 1632) | def forward( class Wav2Vec2ConformerForSequenceClassification (line 1710) | class Wav2Vec2ConformerForSequenceClassification(Wav2Vec2ConformerPreTra... method __init__ (line 1712) | def __init__(self, config): method freeze_feature_encoder (line 1730) | def freeze_feature_encoder(self): method freeze_base_model (line 1737) | def freeze_base_model(self): method forward (line 1753) | def forward( class Wav2Vec2ConformerForAudioFrameClassification (line 1821) | class Wav2Vec2ConformerForAudioFrameClassification(Wav2Vec2ConformerPreT... method __init__ (line 1823) | def __init__(self, config): method freeze_feature_encoder (line 1840) | def freeze_feature_encoder(self): method freeze_base_model (line 1848) | def freeze_base_model(self): method forward (line 1864) | def forward( class AMSoftmaxLoss (line 1919) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1920) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1928) | def forward(self, hidden_states, labels): class TDNNLayer (line 1943) | class TDNNLayer(nn.Module): method __init__ (line 1944) | def __init__(self, config, layer_id=0): method forward (line 1954) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Wav2Vec2ConformerForXVector (line 1980) | class Wav2Vec2ConformerForXVector(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1981) | def __init__(self, config): method freeze_feature_encoder (line 2001) | def freeze_feature_encoder(self): method freeze_base_model (line 2009) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 2018) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 2041) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2_phoneme/tokenization_wav2vec2_phoneme.py class Wav2Vec2PhonemeCTCTokenizerOutput (line 63) | class Wav2Vec2PhonemeCTCTokenizerOutput(ModelOutput): class Wav2Vec2PhonemeCTCTokenizer (line 80) | class Wav2Vec2PhonemeCTCTokenizer(PreTrainedTokenizer): method __init__ (line 115) | def __init__( method vocab_size (line 156) | def vocab_size(self) -> int: method get_vocab (line 159) | def get_vocab(self) -> Dict: method _add_tokens (line 164) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method init_backend (line 175) | def init_backend(self, phonemizer_lang: str): method prepare_for_tokenization (line 187) | def prepare_for_tokenization( method _tokenize (line 231) | def _tokenize(self, text, **kwargs): method phonemize (line 252) | def phonemize(self, text: str, phonemizer_lang: Optional[str] = None) ... method word_delimiter_token (line 271) | def word_delimiter_token(self) -> str: method word_delimiter_token_id (line 282) | def word_delimiter_token_id(self) -> Optional[int]: method word_delimiter_token (line 292) | def word_delimiter_token(self, value): method word_delimiter_token_id (line 296) | def word_delimiter_token_id(self, value): method phone_delimiter_token (line 300) | def phone_delimiter_token(self) -> str: method phone_delimiter_token_id (line 311) | def phone_delimiter_token_id(self) -> Optional[int]: method phone_delimiter_token (line 321) | def phone_delimiter_token(self, value): method phone_delimiter_token_id (line 325) | def phone_delimiter_token_id(self, value): method _convert_token_to_id (line 328) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 332) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 337) | def convert_tokens_to_string( method _compute_offsets (line 388) | def _compute_offsets( method _decode (line 407) | def _decode( method decode (line 454) | def decode( method batch_decode (line 510) | def batch_decode( method save_vocabulary (line 566) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.py class Wav2Vec2DecoderWithLMOutput (line 46) | class Wav2Vec2DecoderWithLMOutput(ModelOutput): class Wav2Vec2ProcessorWithLM (line 68) | class Wav2Vec2ProcessorWithLM(ProcessorMixin): method __init__ (line 85) | def __init__( method save_pretrained (line 115) | def save_pretrained(self, save_directory): method from_pretrained (line 120) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method _set_language_model_attribute (line 191) | def _set_language_model_attribute(decoder: "BeamSearchDecoderCTC", att... method language_model (line 195) | def language_model(self): method get_missing_alphabet_tokens (line 199) | def get_missing_alphabet_tokens(decoder, tokenizer): method __call__ (line 221) | def __call__(self, *args, **kwargs): method pad (line 260) | def pad(self, *args, **kwargs): method batch_decode (line 291) | def batch_decode( method decode (line 476) | def decode( method as_target_processor (line 641) | def as_target_processor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/wavlm/configuration_wavlm.py class WavLMConfig (line 27) | class WavLMConfig(PretrainedConfig): method __init__ (line 193) | def __init__( method inputs_to_logits_ratio (line 333) | def inputs_to_logits_ratio(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/wavlm/convert_wavlm_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 67) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 95) | def recursively_load_weights(fairseq_model, hf_model): function load_conv_layer (line 139) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_wavlm_checkpoint (line 180) | def convert_wavlm_checkpoint(checkpoint_path, pytorch_dump_folder_path, ... FILE: mplsandbox_for_rl/transformers/src/transformers/models/wavlm/convert_wavlm_original_s3prl_checkpoint_to_pytorch.py function convert_classification (line 35) | def convert_classification(base_model_name, hf_config, downstream_dict): function convert_diarization (line 44) | def convert_diarization(base_model_name, hf_config, downstream_dict): function convert_xvector (line 51) | def convert_xvector(base_model_name, hf_config, downstream_dict): function convert_s3prl_checkpoint (line 70) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: mplsandbox_for_rl/transformers/src/transformers/models/wavlm/modeling_wavlm.py function _compute_mask_indices (line 75) | def _compute_mask_indices( class WavLMNoLayerNormConvLayer (line 195) | class WavLMNoLayerNormConvLayer(nn.Module): method __init__ (line 196) | def __init__(self, config, layer_id=0): method forward (line 210) | def forward(self, hidden_states): class WavLMLayerNormConvLayer (line 217) | class WavLMLayerNormConvLayer(nn.Module): method __init__ (line 218) | def __init__(self, config, layer_id=0): method forward (line 233) | def forward(self, hidden_states): class WavLMGroupNormConvLayer (line 245) | class WavLMGroupNormConvLayer(nn.Module): method __init__ (line 246) | def __init__(self, config, layer_id=0): method forward (line 262) | def forward(self, hidden_states): class WavLMPositionalConvEmbedding (line 270) | class WavLMPositionalConvEmbedding(nn.Module): method __init__ (line 271) | def __init__(self, config): method forward (line 304) | def forward(self, hidden_states): class WavLMSamePadLayer (line 316) | class WavLMSamePadLayer(nn.Module): method __init__ (line 317) | def __init__(self, num_conv_pos_embeddings): method forward (line 321) | def forward(self, hidden_states): class WavLMFeatureEncoder (line 328) | class WavLMFeatureEncoder(nn.Module): method __init__ (line 331) | def __init__(self, config): method _freeze_parameters (line 348) | def _freeze_parameters(self): method forward (line 353) | def forward(self, input_values): class WavLMFeatureExtractor (line 372) | class WavLMFeatureExtractor(WavLMFeatureEncoder): method __init__ (line 373) | def __init__(self, config): class WavLMFeatureProjection (line 384) | class WavLMFeatureProjection(nn.Module): method __init__ (line 385) | def __init__(self, config): method forward (line 391) | def forward(self, hidden_states): class WavLMAttention (line 399) | class WavLMAttention(nn.Module): method __init__ (line 402) | def __init__( method forward (line 438) | def forward( method torch_multi_head_self_attention (line 479) | def torch_multi_head_self_attention( method compute_bias (line 534) | def compute_bias(self, query_length: int, key_length: int) -> torch.Fl... method _relative_positions_bucket (line 544) | def _relative_positions_bucket(self, relative_positions: torch.FloatTe... class WavLMFeedForward (line 566) | class WavLMFeedForward(nn.Module): method __init__ (line 567) | def __init__(self, config): method forward (line 580) | def forward(self, hidden_states): class WavLMEncoderLayer (line 590) | class WavLMEncoderLayer(nn.Module): method __init__ (line 591) | def __init__(self, config: WavLMConfig, has_relative_position_bias: bo... method forward (line 606) | def forward(self, hidden_states, attention_mask=None, position_bias=No... class WavLMEncoderLayerStableLayerNorm (line 631) | class WavLMEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 632) | def __init__(self, config: WavLMConfig, has_relative_position_bias: bo... method forward (line 647) | def forward(self, hidden_states, attention_mask=None, position_bias=No... class WavLMEncoder (line 668) | class WavLMEncoder(nn.Module): method __init__ (line 669) | def __init__(self, config): method forward (line 680) | def forward( class WavLMEncoderStableLayerNorm (line 750) | class WavLMEncoderStableLayerNorm(nn.Module): method __init__ (line 751) | def __init__(self, config): method forward (line 765) | def forward( class WavLMGumbelVectorQuantizer (line 833) | class WavLMGumbelVectorQuantizer(nn.Module): method __init__ (line 839) | def __init__(self, config): method _compute_perplexity (line 861) | def _compute_perplexity(probs): method forward (line 866) | def forward(self, hidden_states): class WavLMAdapter (line 904) | class WavLMAdapter(nn.Module): method __init__ (line 905) | def __init__(self, config): method forward (line 918) | def forward(self, hidden_states): class WavLMAdapterLayer (line 936) | class WavLMAdapterLayer(nn.Module): method __init__ (line 937) | def __init__(self, config): method forward (line 947) | def forward(self, hidden_states): class WavLMPreTrainedModel (line 954) | class WavLMPreTrainedModel(PreTrainedModel): method _init_weights (line 965) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 998) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1021) | def _get_feature_vector_attention_mask( class WavLMModel (line 1104) | class WavLMModel(WavLMPreTrainedModel): method __init__ (line 1105) | def __init__(self, config: WavLMConfig): method freeze_feature_extractor (line 1125) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1137) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1144) | def _mask_hidden_states( method forward (line 1198) | def forward( class WavLMForCTC (line 1256) | class WavLMForCTC(WavLMPreTrainedModel): method __init__ (line 1257) | def __init__(self, config, target_lang: Optional[str] = None): method tie_weights (line 1280) | def tie_weights(self): method freeze_feature_extractor (line 1301) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1313) | def freeze_feature_encoder(self): method freeze_base_model (line 1320) | def freeze_base_model(self): method forward (line 1336) | def forward( class WavLMForSequenceClassification (line 1414) | class WavLMForSequenceClassification(WavLMPreTrainedModel): method __init__ (line 1415) | def __init__(self, config): method freeze_feature_extractor (line 1433) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1446) | def freeze_feature_encoder(self): method freeze_base_model (line 1454) | def freeze_base_model(self): method forward (line 1470) | def forward( class WavLMForAudioFrameClassification (line 1539) | class WavLMForAudioFrameClassification(WavLMPreTrainedModel): method __init__ (line 1540) | def __init__(self, config): method freeze_feature_extractor (line 1556) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1568) | def freeze_feature_encoder(self): method freeze_base_model (line 1575) | def freeze_base_model(self): method forward (line 1591) | def forward( class AMSoftmaxLoss (line 1646) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1647) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1655) | def forward(self, hidden_states, labels): class TDNNLayer (line 1670) | class TDNNLayer(nn.Module): method __init__ (line 1671) | def __init__(self, config, layer_id=0): method forward (line 1681) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class WavLMForXVector (line 1708) | class WavLMForXVector(WavLMPreTrainedModel): method __init__ (line 1709) | def __init__(self, config): method freeze_feature_extractor (line 1728) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1740) | def freeze_feature_encoder(self): method freeze_base_model (line 1747) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 1755) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 1778) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/whisper/configuration_whisper.py class WhisperConfig (line 59) | class WhisperConfig(PretrainedConfig): method __init__ (line 198) | def __init__( class WhisperOnnxConfig (line 288) | class WhisperOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 290) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 306) | def generate_dummy_inputs( method atol_for_validation (line 343) | def atol_for_validation(self) -> float: FILE: mplsandbox_for_rl/transformers/src/transformers/models/whisper/convert_openai_to_hf.py function _get_generation_config (line 65) | def _get_generation_config( function remove_ignore_keys_ (line 96) | def remove_ignore_keys_(state_dict): function rename_keys (line 126) | def rename_keys(s_dict): function make_linear_from_emb (line 140) | def make_linear_from_emb(emb): function _download (line 147) | def _download(url: str, root: str) -> Any: function convert_openai_whisper_to_tfms (line 185) | def convert_openai_whisper_to_tfms( function _bpe (line 255) | def _bpe(mergeable_ranks, token: bytes, max_rank=None) -> List[bytes]: function convert_tiktoken_bpe_to_hf (line 272) | def convert_tiktoken_bpe_to_hf(tiktoken_url: str): function convert_tiktoken_to_hf (line 291) | def convert_tiktoken_to_hf( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/whisper/feature_extraction_whisper.py class WhisperFeatureExtractor (line 36) | class WhisperFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 64) | def __init__( method _np_extract_fbank_features (line 98) | def _np_extract_fbank_features(self, waveform_batch: np.array, device:... method _torch_extract_fbank_features (line 127) | def _torch_extract_fbank_features(self, waveform: np.array, device: st... method zero_mean_unit_var_norm (line 159) | def zero_mean_unit_var_norm( method __call__ (line 180) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/whisper/generation_whisper.py function _median_filter (line 45) | def _median_filter(inputs: torch.Tensor, filter_width: int) -> torch.Ten... function _dynamic_time_warping (line 66) | def _dynamic_time_warping(matrix: np.ndarray): function _get_attr_from_logit_processors (line 120) | def _get_attr_from_logit_processors(logits_processor, logit_processor_cl... function _pad_to_max_length (line 128) | def _pad_to_max_length( class WhisperGenerationMixin (line 175) | class WhisperGenerationMixin: method _extract_token_timestamps (line 176) | def _extract_token_timestamps(self, generate_outputs, alignment_heads,... method generate (line 277) | def generate( method generate_with_fallback (line 774) | def generate_with_fallback( method _prepare_segments (line 925) | def _prepare_segments(prompt_ids, batch_size, generation_config): method _postprocess_outputs (line 935) | def _postprocess_outputs( method _stack_split_outputs (line 991) | def _stack_split_outputs(self, seek_outputs, model_output_type, device... method _need_fallback (line 1026) | def _need_fallback( method _expand_variables_for_generation (line 1070) | def _expand_variables_for_generation( method _setup_no_speech_detection (line 1098) | def _setup_no_speech_detection(logits_processor, segment_input, decode... method _retrieve_total_input_frames (line 1104) | def _retrieve_total_input_frames(input_features, input_stride, kwargs): method _maybe_warn_unused_inputs (line 1119) | def _maybe_warn_unused_inputs( method _set_return_outputs (line 1154) | def _set_return_outputs(return_dict_in_generate, return_token_timestam... method _set_return_timestamps (line 1172) | def _set_return_timestamps(self, return_timestamps, is_shortform, gene... method _set_language_and_task (line 1202) | def _set_language_and_task(language, task, is_multilingual, generation... method _retrieve_init_tokens (line 1237) | def _retrieve_init_tokens(self, input_features, batch_size, generation... method detect_language (line 1388) | def detect_language( method _check_decoder_input_ids (line 1454) | def _check_decoder_input_ids(kwargs): method _set_num_frames (line 1463) | def _set_num_frames(return_token_timestamps, generation_config, kwargs): method _set_thresholds_and_condition (line 1475) | def _set_thresholds_and_condition( method _set_prompt_condition_type (line 1504) | def _set_prompt_condition_type(generation_config, prompt_condition_type): method _set_condition_on_prev_tokens (line 1523) | def _set_condition_on_prev_tokens(condition_on_prev_tokens, generation... method _retrieve_max_frames_and_seek (line 1532) | def _retrieve_max_frames_and_seek(batch_size, attention_mask, total_in... method _retrieve_logit_processors (line 1546) | def _retrieve_logit_processors(self, generation_config, logits_process... method _maybe_reduce_batch (line 1587) | def _maybe_reduce_batch(input_features, seek, max_frames, cur_bsz, bat... method _get_input_segment (line 1603) | def _get_input_segment(input_features, seek, seek_num_frames, num_segm... method _prepare_decoder_input_ids (line 1625) | def _prepare_decoder_input_ids( method _set_max_new_tokens_and_length (line 1686) | def _set_max_new_tokens_and_length(self, config, decoder_input_ids, ge... method _retrieve_compression_ratio (line 1714) | def _retrieve_compression_ratio(tokens, vocab_size): method _retrieve_avg_logprobs (line 1723) | def _retrieve_avg_logprobs(scores, tokens, eos_token_id, temperature): method _retrieve_segment (line 1742) | def _retrieve_segment( FILE: mplsandbox_for_rl/transformers/src/transformers/models/whisper/modeling_flax_whisper.py function sinusoidal_embedding_init (line 62) | def sinusoidal_embedding_init(key, shape, dtype=jnp.float_) -> jax.Array: class FlaxWhisperAttention (line 192) | class FlaxWhisperAttention(nn.Module): method setup (line 201) | def setup(self) -> None: method __call__ (line 226) | def __call__( method _split_heads (line 314) | def _split_heads(self, hidden_state) -> jnp.ndarray: method _merge_heads (line 317) | def _merge_heads(self, hidden_state) -> jnp.ndarray: method _concatenate_to_cache (line 321) | def _concatenate_to_cache(self, key, value, query, attention_mask) -> ... class FlaxWhisperEncoderLayer (line 352) | class FlaxWhisperEncoderLayer(nn.Module): method setup (line 356) | def setup(self) -> None: method __call__ (line 379) | def __call__( class FlaxWhisperEncoderLayerCollection (line 408) | class FlaxWhisperEncoderLayerCollection(nn.Module): method setup (line 413) | def setup(self): method __call__ (line 427) | def __call__( class FlaxWhisperDecoderLayer (line 471) | class FlaxWhisperDecoderLayer(nn.Module): method setup (line 475) | def setup(self) -> None: method __call__ (line 508) | def __call__( class FlaxWhisperDecoderLayerCollection (line 559) | class FlaxWhisperDecoderLayerCollection(nn.Module): method setup (line 564) | def setup(self): method __call__ (line 578) | def __call__( class FlaxWhisperEncoder (line 637) | class FlaxWhisperEncoder(nn.Module): method setup (line 642) | def setup(self) -> None: method __call__ (line 676) | def __call__( class FlaxWhisperDecoder (line 731) | class FlaxWhisperDecoder(nn.Module): method setup (line 736) | def setup(self) -> None: method __call__ (line 748) | def __call__( class FlaxWhisperModule (line 798) | class FlaxWhisperModule(nn.Module): method setup (line 803) | def setup(self) -> None: method __call__ (line 811) | def __call__( method _get_encoder_module (line 854) | def _get_encoder_module(self): method _get_decoder_module (line 857) | def _get_decoder_module(self): class FlaxWhisperPreTrainedModel (line 861) | class FlaxWhisperPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 867) | def __init__( method enable_gradient_checkpointing (line 882) | def enable_gradient_checkpointing(self): method init_weights (line 889) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 922) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 965) | def encode( method decode (line 1021) | def decode( method __call__ (line 1135) | def __call__( class FlaxWhisperModel (line 1189) | class FlaxWhisperModel(FlaxWhisperPreTrainedModel): class FlaxWhisperForConditionalGenerationModule (line 1198) | class FlaxWhisperForConditionalGenerationModule(nn.Module): method setup (line 1203) | def setup(self) -> None: method _get_encoder_module (line 1214) | def _get_encoder_module(self): method _get_decoder_module (line 1217) | def _get_decoder_module(self): method __call__ (line 1220) | def __call__( class FlaxWhisperForConditionalGeneration (line 1268) | class FlaxWhisperForConditionalGeneration(FlaxWhisperPreTrainedModel): method decode (line 1274) | def decode( method generate (line 1406) | def generate( method prepare_inputs_for_generation (line 1471) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1502) | def update_inputs_for_generation(self, model_outputs, model_kwargs): class FlaxWhisperForAudioClassificationModule (line 1537) | class FlaxWhisperForAudioClassificationModule(nn.Module): method setup (line 1542) | def setup(self) -> None: method __call__ (line 1553) | def __call__( class FlaxWhisperForAudioClassification (line 1598) | class FlaxWhisperForAudioClassification(FlaxWhisperPreTrainedModel): method init_weights (line 1602) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 1626) | def __call__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/whisper/modeling_tf_whisper.py function sinusoidal_embedding_init (line 57) | def sinusoidal_embedding_init(shape, dtype=tf.float32) -> tf.Tensor: function shift_tokens_right (line 71) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 96) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 114) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFWhisperPositionalEmbedding (line 127) | class TFWhisperPositionalEmbedding(keras.layers.Layer): method __init__ (line 128) | def __init__( method build (line 142) | def build(self, input_shape): method call (line 151) | def call(self, input_ids, past_key_values_length=0): class TFWhisperAttention (line 157) | class TFWhisperAttention(keras.layers.Layer): method __init__ (line 160) | def __init__( method _shape (line 189) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 193) | def call( method build (line 311) | def build(self, input_shape=None): class TFWhisperEncoderLayer (line 330) | class TFWhisperEncoderLayer(keras.layers.Layer): method __init__ (line 331) | def __init__(self, config: WhisperConfig, **kwargs): method call (line 346) | def call( method build (line 385) | def build(self, input_shape=None): class TFWhisperDecoderLayer (line 407) | class TFWhisperDecoderLayer(keras.layers.Layer): method __init__ (line 408) | def __init__(self, config: WhisperConfig, **kwargs): method call (line 437) | def call( method build (line 519) | def build(self, input_shape=None): class TFWhisperPreTrainedModel (line 546) | class TFWhisperPreTrainedModel(TFPreTrainedModel): method _get_feat_extract_output_lengths (line 551) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor) -... method dummy_inputs (line 560) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method input_signature (line 575) | def input_signature(self): class TFWhisperEncoder (line 678) | class TFWhisperEncoder(keras.layers.Layer): method __init__ (line 689) | def __init__(self, config: WhisperConfig, **kwargs): method call (line 718) | def call( method build (line 812) | def build(self, input_shape=None): class TFWhisperDecoder (line 835) | class TFWhisperDecoder(keras.layers.Layer): method __init__ (line 844) | def __init__(self, config: WhisperConfig, **kwargs): method get_input_embeddings (line 868) | def get_input_embeddings(self): method set_input_embeddings (line 871) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 874) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method call (line 894) | def call( method build (line 1072) | def build(self, input_shape=None): class TFWhisperMainLayer (line 1096) | class TFWhisperMainLayer(keras.layers.Layer): method __init__ (line 1099) | def __init__(self, config: WhisperConfig, **kwargs): method get_input_embeddings (line 1105) | def get_input_embeddings(self): method set_input_embeddings (line 1108) | def set_input_embeddings(self, value): method get_encoder (line 1111) | def get_encoder(self): method get_decoder (line 1114) | def get_decoder(self): method call (line 1120) | def call( method build (line 1213) | def build(self, input_shape=None): class TFWhisperModel (line 1229) | class TFWhisperModel(TFWhisperPreTrainedModel): method __init__ (line 1230) | def __init__(self, config: WhisperConfig, **kwargs): method get_input_embeddings (line 1235) | def get_input_embeddings(self): method set_input_embeddings (line 1238) | def set_input_embeddings(self, value): method get_encoder (line 1241) | def get_encoder(self): method get_decoder (line 1244) | def get_decoder(self): method decoder (line 1247) | def decoder(self): method encoder (line 1250) | def encoder(self): method call (line 1256) | def call( method serving_output (line 1313) | def serving_output(self, output): method build (line 1332) | def build(self, input_shape=None): class TFWhisperForConditionalGeneration (line 1345) | class TFWhisperForConditionalGeneration(TFWhisperPreTrainedModel, TFCaus... method __init__ (line 1356) | def __init__(self, config: WhisperConfig, **kwargs): method get_encoder (line 1360) | def get_encoder(self): method get_decoder (line 1363) | def get_decoder(self): method get_output_embeddings (line 1366) | def get_output_embeddings(self): method set_output_embeddings (line 1369) | def set_output_embeddings(self, value): method resize_token_embeddings (line 1372) | def resize_token_embeddings(self, new_num_tokens: int) -> keras.layers... method call (line 1379) | def call( method generate (line 1474) | def generate( method serving_output (line 1701) | def serving_output(self, output): method prepare_inputs_for_generation (line 1720) | def prepare_inputs_for_generation( method build (line 1752) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/whisper/modeling_whisper.py function _prepare_4d_causal_attention_mask_with_cache_position (line 63) | def _prepare_4d_causal_attention_mask_with_cache_position( function sinusoids (line 116) | def sinusoids(length: int, channels: int, max_timescale: float = 10000) ... function shift_tokens_right (line 129) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _compute_mask_indices (line 146) | def _compute_mask_indices( class WhisperPositionalEmbedding (line 265) | class WhisperPositionalEmbedding(nn.Embedding): method __init__ (line 266) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method forward (line 269) | def forward(self, input_ids, past_key_values_length=0, position_ids=No... class WhisperAttention (line 276) | class WhisperAttention(nn.Module): method __init__ (line 279) | def __init__( method _shape (line 320) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 323) | def forward( class WhisperFlashAttention2 (line 403) | class WhisperFlashAttention2(WhisperAttention): method __init__ (line 411) | def __init__(self, *args, **kwargs): method forward (line 419) | def forward( class WhisperSdpaAttention (line 526) | class WhisperSdpaAttention(WhisperAttention): method forward (line 527) | def forward( class WhisperEncoderLayer (line 632) | class WhisperEncoderLayer(nn.Module): method __init__ (line 633) | def __init__(self, config: WhisperConfig): method forward (line 651) | def forward( class WhisperDecoderLayer (line 702) | class WhisperDecoderLayer(nn.Module): method __init__ (line 703) | def __init__(self, config: WhisperConfig, layer_idx: int = None): method forward (line 734) | def forward( class WhisperPreTrainedModel (line 819) | class WhisperPreTrainedModel(PreTrainedModel): method _init_weights (line 830) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 845) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... class WhisperEncoder (line 990) | class WhisperEncoder(WhisperPreTrainedModel): method __init__ (line 999) | def __init__(self, config: WhisperConfig): method _freeze_parameters (line 1023) | def _freeze_parameters(self): method get_input_embeddings (line 1028) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1031) | def set_input_embeddings(self, value: nn.Module): method forward (line 1034) | def forward( class WhisperDecoder (line 1143) | class WhisperDecoder(WhisperPreTrainedModel): method __init__ (line 1153) | def __init__(self, config: WhisperConfig): method get_input_embeddings (line 1177) | def get_input_embeddings(self): method set_input_embeddings (line 1180) | def set_input_embeddings(self, value): method forward (line 1183) | def forward( method _update_causal_mask (line 1423) | def _update_causal_mask( class WhisperModel (line 1499) | class WhisperModel(WhisperPreTrainedModel): method __init__ (line 1500) | def __init__(self, config: WhisperConfig): method get_input_embeddings (line 1508) | def get_input_embeddings(self): method set_input_embeddings (line 1511) | def set_input_embeddings(self, value): method get_encoder (line 1514) | def get_encoder(self): method get_decoder (line 1517) | def get_decoder(self): method freeze_encoder (line 1520) | def freeze_encoder(self): method _mask_input_features (line 1527) | def _mask_input_features( method forward (line 1572) | def forward( class WhisperForConditionalGeneration (line 1671) | class WhisperForConditionalGeneration(WhisperGenerationMixin, WhisperPre... method __init__ (line 1675) | def __init__(self, config: WhisperConfig): method get_encoder (line 1683) | def get_encoder(self): method get_decoder (line 1686) | def get_decoder(self): method get_output_embeddings (line 1689) | def get_output_embeddings(self): method set_output_embeddings (line 1692) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 1695) | def get_input_embeddings(self) -> nn.Module: method freeze_encoder (line 1698) | def freeze_encoder(self): method forward (line 1707) | def forward( method prepare_inputs_for_generation (line 1807) | def prepare_inputs_for_generation( class WhisperDecoderWrapper (line 1891) | class WhisperDecoderWrapper(WhisperPreTrainedModel): method __init__ (line 1897) | def __init__(self, config): method get_input_embeddings (line 1902) | def get_input_embeddings(self): method set_input_embeddings (line 1905) | def set_input_embeddings(self, value): method forward (line 1908) | def forward(self, *args, **kwargs): class WhisperForCausalLM (line 1918) | class WhisperForCausalLM(WhisperPreTrainedModel): method __init__ (line 1922) | def __init__(self, config): method get_output_embeddings (line 1932) | def get_output_embeddings(self): method set_output_embeddings (line 1935) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 1938) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1941) | def set_input_embeddings(self, value): method set_decoder (line 1944) | def set_decoder(self, decoder): method get_decoder (line 1947) | def get_decoder(self): method forward (line 1951) | def forward( method prepare_inputs_for_generation (line 2098) | def prepare_inputs_for_generation( method _reorder_cache (line 2139) | def _reorder_cache(past_key_values, beam_idx): class WhisperForAudioClassification (line 2155) | class WhisperForAudioClassification(WhisperPreTrainedModel): method __init__ (line 2156) | def __init__(self, config): method freeze_encoder (line 2169) | def freeze_encoder(self): method get_input_embeddings (line 2176) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 2179) | def set_input_embeddings(self, value: nn.Module): method forward (line 2184) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/whisper/processing_whisper.py class WhisperProcessor (line 22) | 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: mplsandbox_for_rl/transformers/src/transformers/models/whisper/tokenization_whisper.py function bytes_to_unicode (line 45) | def bytes_to_unicode(): function get_pairs (line 73) | def get_pairs(word): class WhisperTokenizer (line 210) | class WhisperTokenizer(PreTrainedTokenizer): method __init__ (line 254) | def __init__( method vocab_size (line 329) | def vocab_size(self) -> int: method get_vocab (line 332) | def get_vocab(self): method bpe (line 338) | def bpe(self, token): method set_prefix_tokens (line 380) | def set_prefix_tokens(self, language: str = None, task: str = None, pr... method prefix_tokens (line 405) | def prefix_tokens(self) -> List[int]: method build_inputs_with_special_tokens (line 439) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 447) | def get_special_tokens_mask( method _tokenize (line 478) | def _tokenize(self, text): method _convert_token_to_id (line 489) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 493) | def _convert_id_to_token(self, index): method _normalize (line 500) | def _normalize(self, text): method _basic_normalize (line 507) | def _basic_normalize(self, text, remove_diacritics=False): method normalize (line 514) | def normalize(self, text): method basic_normalize (line 523) | def basic_normalize(text, remove_diacritics=False): method _decode_with_timestamps (line 531) | def _decode_with_timestamps(self, token_ids, skip_special_tokens=False... method _compute_offsets (line 561) | def _compute_offsets(self, token_ids, time_precision=0.02): method timestamp_ids (line 613) | def timestamp_ids(self, time_precision=0.02): method _preprocess_token_ids (line 623) | def _preprocess_token_ids(self, token_ids, skip_special_tokens: bool =... method _filter_timestamp_ids (line 641) | def _filter_timestamp_ids(self, token_ids): method decode (line 644) | def decode( method _decode (line 720) | def _decode( method convert_tokens_to_string (line 762) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 768) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 807) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method get_decoder_prompt_ids (line 813) | def get_decoder_prompt_ids(self, task=None, language=None, no_timestam... method _decode_asr (line 823) | def _decode_asr(self, model_outputs, *, return_timestamps, return_lang... method get_prompt_ids (line 832) | def get_prompt_ids(self, text: str, return_tensors="np"): method _strip_prompt (line 846) | def _strip_prompt(self, token_ids: List[int], prompt_token_id: int, de... method _convert_to_list (line 865) | def _convert_to_list(token_ids): function _decode_asr (line 878) | def _decode_asr(tokenizer, model_outputs, *, return_timestamps, return_l... function _find_longest_common_sequence (line 1107) | def _find_longest_common_sequence(sequences, token_timestamp_sequences=N... function _collate_word_timestamps (line 1227) | def _collate_word_timestamps(tokenizer, tokens, token_timestamps, langua... function _combine_tokens_into_words (line 1243) | def _combine_tokens_into_words( function _split_tokens_on_unicode (line 1269) | def _split_tokens_on_unicode(tokenizer, tokens: List[int]): function _split_tokens_on_spaces (line 1300) | def _split_tokens_on_spaces(tokenizer, tokens: List[int]): function _merge_punctuations (line 1324) | def _merge_punctuations(words, tokens, indices, prepended, appended): FILE: mplsandbox_for_rl/transformers/src/transformers/models/whisper/tokenization_whisper_fast.py class WhisperTokenizerFast (line 44) | class WhisperTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 87) | def __init__( method _batch_encode_plus (line 151) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 161) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method _decode_with_timestamps (line 172) | def _decode_with_timestamps(self, token_ids, skip_special_tokens=False... method _compute_offsets (line 203) | def _compute_offsets(self, token_ids, time_precision=0.02): method timestamp_ids (line 256) | def timestamp_ids(self, time_precision=0.02): method _preprocess_token_ids (line 267) | def _preprocess_token_ids(self, token_ids, skip_special_tokens: bool =... method _filter_timestamp_ids (line 286) | def _filter_timestamp_ids(self, token_ids): method decode (line 290) | def decode( method _decode (line 366) | def _decode( method _normalize (line 381) | def _normalize(self, text): method _basic_normalize (line 389) | def _basic_normalize(self, text, remove_diacritics=False): method normalize (line 397) | def normalize(self, text): method basic_normalize (line 407) | def basic_normalize(text, remove_diacritics=False): method save_vocabulary (line 415) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method set_prefix_tokens (line 430) | def set_prefix_tokens(self, language: str = None, task: str = None, pr... method prefix_tokens (line 470) | def prefix_tokens(self) -> List[int]: method build_inputs_with_special_tokens (line 504) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 512) | def get_special_tokens_mask( method get_decoder_prompt_ids (line 543) | def get_decoder_prompt_ids(self, task=None, language=None, no_timestam... method _decode_asr (line 553) | def _decode_asr(self, model_outputs, *, return_timestamps, return_lang... method get_prompt_ids (line 563) | def get_prompt_ids(self, text: str, return_tensors="np"): method _strip_prompt (line 578) | def _strip_prompt(self, token_ids: List[int], prompt_token_id: int, de... method _convert_to_list (line 598) | def _convert_to_list(token_ids): FILE: mplsandbox_for_rl/transformers/src/transformers/models/x_clip/configuration_x_clip.py class XCLIPTextConfig (line 27) | class XCLIPTextConfig(PretrainedConfig): method __init__ (line 83) | def __init__( method from_pretrained (line 116) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class XCLIPVisionConfig (line 134) | class XCLIPVisionConfig(PretrainedConfig): method __init__ (line 199) | def __init__( method from_pretrained (line 243) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class XCLIPConfig (line 261) | class XCLIPConfig(PretrainedConfig): method __init__ (line 299) | def __init__( method from_text_vision_configs (line 405) | def from_text_vision_configs(cls, text_config: XCLIPTextConfig, vision... FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/x_clip/modeling_x_clip.py function contrastive_loss (line 46) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function x_clip_loss (line 51) | def x_clip_loss(similarity: torch.Tensor) -> torch.Tensor: class XCLIPOutput (line 58) | class XCLIPOutput(ModelOutput): method to_tuple (line 91) | def to_tuple(self) -> Tuple[Any]: class XCLIPVisionEmbeddings (line 101) | class XCLIPVisionEmbeddings(nn.Module): method __init__ (line 102) | def __init__(self, config: XCLIPVisionConfig): method forward (line 124) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class XCLIPTextEmbeddings (line 137) | class XCLIPTextEmbeddings(nn.Module): method __init__ (line 138) | def __init__(self, config: XCLIPTextConfig): method forward (line 150) | def forward( class XCLIPAttention (line 171) | class XCLIPAttention(nn.Module): method __init__ (line 174) | def __init__(self, config): method _shape (line 193) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 196) | def forward( class XCLIPMLP (line 276) | class XCLIPMLP(nn.Module): method __init__ (line 277) | def __init__(self, config): method forward (line 284) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XCLIPEncoderLayer (line 292) | class XCLIPEncoderLayer(nn.Module): method __init__ (line 293) | def __init__(self, config: XCLIPConfig): method forward (line 301) | def forward( function drop_path (line 343) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class XCLIPDropPath (line 364) | class XCLIPDropPath(nn.Module): method __init__ (line 367) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 371) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 374) | def extra_repr(self) -> str: class XCLIPVisionEncoderLayer (line 378) | class XCLIPVisionEncoderLayer(nn.Module): method __init__ (line 383) | def __init__(self, config: XCLIPConfig): method forward (line 399) | def forward( class XCLIPPreTrainedModel (line 458) | class XCLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 468) | def _init_weights(self, module): class XCLIPEncoder (line 613) | class XCLIPEncoder(nn.Module): method __init__ (line 622) | def __init__(self, config: XCLIPConfig): method forward (line 628) | def forward( class XCLIPTextTransformer (line 710) | class XCLIPTextTransformer(nn.Module): method __init__ (line 711) | def __init__(self, config: XCLIPTextConfig): method forward (line 721) | def forward( class XCLIPTextModel (line 785) | class XCLIPTextModel(XCLIPPreTrainedModel): method __init__ (line 788) | def __init__(self, config: XCLIPTextConfig): 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 XCLIPVisionEncoder (line 838) | class XCLIPVisionEncoder(nn.Module): method __init__ (line 847) | def __init__(self, config: XCLIPConfig): method forward (line 853) | def forward( class XCLIPVisionTransformer (line 935) | class XCLIPVisionTransformer(nn.Module): method __init__ (line 940) | def __init__(self, config: XCLIPVisionConfig): method forward (line 952) | def forward( class XCLIPVisionModel (line 994) | class XCLIPVisionModel(XCLIPPreTrainedModel): method __init__ (line 998) | def __init__(self, config: XCLIPVisionConfig): method get_input_embeddings (line 1004) | def get_input_embeddings(self) -> nn.Module: method forward (line 1009) | def forward( class XCLIPMultiframeIntegrationTransformer (line 1100) | class XCLIPMultiframeIntegrationTransformer(nn.Module): method __init__ (line 1105) | def __init__(self, config: XCLIPVisionConfig): method forward (line 1111) | def forward( class XCLIPCrossAttention (line 1146) | class XCLIPCrossAttention(nn.Module): method __init__ (line 1149) | def __init__(self, config): method _shape (line 1165) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method forward (line 1168) | def forward(self, queries, keys, values): class PromptGeneratorLayer (line 1198) | class PromptGeneratorLayer(nn.Module): method __init__ (line 1199) | def __init__(self, config): method forward (line 1213) | def forward(self, x, visual): class XCLIPPromptGenerator (line 1219) | class XCLIPPromptGenerator(nn.Module): method __init__ (line 1222) | def __init__(self, config): method forward (line 1229) | def forward(self, text, visual): class XCLIPModel (line 1238) | class XCLIPModel(XCLIPPreTrainedModel): method __init__ (line 1241) | def __init__(self, config: XCLIPConfig): method get_text_features (line 1286) | def get_text_features( method get_video_features (line 1333) | def get_video_features( method forward (line 1449) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/x_clip/processing_x_clip.py class XCLIPProcessor (line 25) | class XCLIPProcessor(ProcessorMixin): method __init__ (line 43) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 62) | def __call__(self, text=None, videos=None, return_tensors=None, **kwar... method batch_decode (line 116) | def batch_decode(self, *args, **kwargs): method decode (line 123) | def decode(self, *args, **kwargs): method model_input_names (line 131) | def model_input_names(self): method feature_extractor_class (line 135) | def feature_extractor_class(self): method feature_extractor (line 143) | def feature_extractor(self): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xglm/configuration_xglm.py class XGLMConfig (line 24) | class XGLMConfig(PretrainedConfig): method __init__ (line 93) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/xglm/modeling_flax_xglm.py function create_sinusoidal_positions (line 112) | def create_sinusoidal_positions(n_pos, dim, padding_idx=1): class FlaxXGLMAttention (line 126) | class FlaxXGLMAttention(nn.Module): method setup (line 135) | def setup(self) -> None: method _split_heads (line 162) | def _split_heads(self, hidden_states): method _merge_heads (line 165) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 169) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 201) | def __call__( class FlaxXGLMDecoderLayer (line 295) | class FlaxXGLMDecoderLayer(nn.Module): method setup (line 299) | def setup(self) -> None: method __call__ (line 335) | def __call__( class FlaxXGLMDecoderLayerCollection (line 386) | class FlaxXGLMDecoderLayerCollection(nn.Module): method setup (line 390) | def setup(self): method __call__ (line 396) | def __call__( class FlaxXGLMModule (line 455) | class FlaxXGLMModule(nn.Module): method setup (line 459) | def setup(self): method __call__ (line 482) | def __call__( class FlaxXGLMPreTrainedModel (line 539) | class FlaxXGLMPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 544) | def __init__( method init_weights (line 556) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 591) | def init_cache(self, batch_size, max_length): method __call__ (line 611) | def __call__( class FlaxXGLMModel (line 688) | class FlaxXGLMModel(FlaxXGLMPreTrainedModel): class FlaxXGLMForCausalLMModule (line 700) | class FlaxXGLMForCausalLMModule(nn.Module): method setup (line 704) | def setup(self): method __call__ (line 713) | def __call__( class FlaxXGLMForCausalLM (line 765) | class FlaxXGLMForCausalLM(FlaxXGLMPreTrainedModel): method prepare_inputs_for_generation (line 768) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 789) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xglm/modeling_tf_xglm.py function create_sinusoidal_positions (line 60) | def create_sinusoidal_positions(num_positions: int, embedding_dim: int, ... function _create_position_ids_from_input_ids (line 83) | def _create_position_ids_from_input_ids( function _create_position_ids_from_inputs_embeds (line 96) | def _create_position_ids_from_inputs_embeds( function _make_causal_mask (line 114) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 132) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFXGLMAttention (line 146) | class TFXGLMAttention(keras.layers.Layer): method __init__ (line 149) | def __init__( method _shape (line 177) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 180) | def call( method build (line 298) | def build(self, input_shape=None): class TFXGLMDecoderLayer (line 316) | class TFXGLMDecoderLayer(keras.layers.Layer): method __init__ (line 317) | def __init__(self, config: XGLMConfig, **kwargs: Any) -> None: method call (line 350) | def call( method build (line 430) | def build(self, input_shape=None): class TFXGLMMainLayer (line 458) | class TFXGLMMainLayer(keras.layers.Layer): method __init__ (line 461) | def __init__( method get_input_embeddings (line 490) | def get_input_embeddings(self) -> TFSharedEmbeddings: method set_input_embeddings (line 493) | def set_input_embeddings(self, value: TFSharedEmbeddings) -> None: method _prepare_decoder_attention_mask (line 496) | def _prepare_decoder_attention_mask( method embed_positions (line 513) | def embed_positions(self, position_ids: np.ndarray | tf.Tensor | None ... method call (line 519) | def call( method build (line 650) | def build(self, input_shape=None): class TFXGLMPreTrainedModel (line 666) | class TFXGLMPreTrainedModel(TFPreTrainedModel): class TFXGLMModel (line 789) | class TFXGLMModel(TFXGLMPreTrainedModel): method __init__ (line 798) | def __init__( method call (line 812) | def call( method build (line 848) | def build(self, input_shape=None): class TFXGLMForCausalLM (line 864) | class TFXGLMForCausalLM(TFXGLMPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 874) | def __init__( method get_output_embeddings (line 888) | def get_output_embeddings(self): method set_output_embeddings (line 891) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 894) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 923) | def call( method build (line 990) | def build(self, input_shape=None): method tf_to_pt_weight_rename (line 1001) | def tf_to_pt_weight_rename(self, tf_weight): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xglm/modeling_xglm.py class XGLMScaledWordEmbedding (line 127) | class XGLMScaledWordEmbedding(nn.Embedding): method __init__ (line 132) | def __init__(self, num_embeddings: int, embedding_dim: int, padding_id... method forward (line 136) | def forward(self, input_ids: torch.Tensor): class XGLMSinusoidalPositionalEmbedding (line 140) | class XGLMSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 143) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 150) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 159) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 180) | def forward(self, position_ids: torch.Tensor = None, past_key_values_l... class XGLMAttention (line 192) | class XGLMAttention(nn.Module): method __init__ (line 195) | def __init__( method _shape (line 222) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 225) | def forward( class XGLMDecoderLayer (line 346) | class XGLMDecoderLayer(nn.Module): method __init__ (line 347) | def __init__(self, config: XGLMConfig): method forward (line 376) | def forward( class XGLMPreTrainedModel (line 466) | class XGLMPreTrainedModel(PreTrainedModel): method _init_weights (line 472) | def _init_weights(self, module): class XGLMModel (line 488) | class XGLMModel(XGLMPreTrainedModel): method __init__ (line 497) | def __init__(self, config: XGLMConfig, embed_tokens: Optional[nn.Embed... method get_input_embeddings (line 524) | def get_input_embeddings(self): method set_input_embeddings (line 527) | def set_input_embeddings(self, value): method forward (line 536) | def forward( class XGLMForCausalLM (line 699) | class XGLMForCausalLM(XGLMPreTrainedModel): method __init__ (line 703) | def __init__(self, config): method get_input_embeddings (line 711) | def get_input_embeddings(self): method set_input_embeddings (line 714) | def set_input_embeddings(self, value): method get_output_embeddings (line 717) | def get_output_embeddings(self): method set_output_embeddings (line 720) | def set_output_embeddings(self, new_embeddings): method forward (line 729) | def forward( method prepare_inputs_for_generation (line 801) | def prepare_inputs_for_generation( method _reorder_cache (line 838) | def _reorder_cache(past_key_values, beam_idx): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xglm/tokenization_xglm.py class XGLMTokenizer (line 34) | class XGLMTokenizer(PreTrainedTokenizer): method __init__ (line 101) | def __init__( method __getstate__ (line 157) | def __getstate__(self): method __setstate__ (line 163) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 173) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 198) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 226) | def create_token_type_ids_from_sequences( method vocab_size (line 251) | def vocab_size(self): method get_vocab (line 254) | def get_vocab(self): method _tokenize (line 259) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 262) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 271) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 277) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 282) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/xglm/tokenization_xglm_fast.py class XGLMTokenizerFast (line 36) | class XGLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 88) | def __init__( method can_save_slow_tokenizer (line 124) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 127) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 152) | def create_token_type_ids_from_sequences( method save_vocabulary (line 176) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm/configuration_xlm.py class XLMConfig (line 28) | class XLMConfig(PretrainedConfig): method __init__ (line 148) | def __init__( class XLMOnnxConfig (line 225) | class XLMOnnxConfig(OnnxConfig): method inputs (line 227) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm/convert_xlm_original_pytorch_checkpoint_to_pytorch.py function convert_xlm_checkpoint_to_pytorch (line 30) | def convert_xlm_checkpoint_to_pytorch(xlm_checkpoint_path, pytorch_dump_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm/modeling_tf_xlm.py function create_sinusoidal_embeddings (line 69) | def create_sinusoidal_embeddings(n_pos, dim, out): function get_masks (line 75) | def get_masks(slen, lengths, causal, padding_mask=None): class TFXLMMultiHeadAttention (line 104) | class TFXLMMultiHeadAttention(keras.layers.Layer): method __init__ (line 107) | def __init__(self, n_heads, dim, config, **kwargs): method prune_heads (line 123) | def prune_heads(self, heads): method call (line 126) | def call(self, input, mask, kv, cache, head_mask, output_attentions, t... method build (line 196) | def build(self, input_shape=None): class TFXLMTransformerFFN (line 214) | class TFXLMTransformerFFN(keras.layers.Layer): method __init__ (line 215) | def __init__(self, in_dim, dim_hidden, out_dim, config, **kwargs): method call (line 225) | def call(self, input, training=False): method build (line 233) | def build(self, input_shape=None): class TFXLMMainLayer (line 246) | class TFXLMMainLayer(keras.layers.Layer): method __init__ (line 249) | def __init__(self, config, **kwargs): method build (line 336) | def build(self, input_shape=None): method get_input_embeddings (line 373) | def get_input_embeddings(self): method set_input_embeddings (line 376) | def set_input_embeddings(self, value): method _prune_heads (line 380) | def _prune_heads(self, heads_to_prune): method call (line 388) | def call( class TFXLMPreTrainedModel (line 556) | class TFXLMPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 566) | def dummy_inputs(self): class TFXLMWithLMHeadModelOutput (line 582) | class TFXLMWithLMHeadModelOutput(ModelOutput): class TFXLMModel (line 727) | class TFXLMModel(TFXLMPreTrainedModel): method __init__ (line 728) | def __init__(self, config, *inputs, **kwargs): method call (line 739) | def call( method build (line 773) | def build(self, input_shape=None): class TFXLMPredLayer (line 782) | class TFXLMPredLayer(keras.layers.Layer): method __init__ (line 787) | def __init__(self, config, input_embeddings, **kwargs): method build (line 806) | def build(self, input_shape): method get_output_embeddings (line 812) | def get_output_embeddings(self): method set_output_embeddings (line 815) | def set_output_embeddings(self, value): method get_bias (line 819) | def get_bias(self): method set_bias (line 822) | def set_bias(self, value): method call (line 826) | def call(self, hidden_states): class TFXLMWithLMHeadModel (line 840) | class TFXLMWithLMHeadModel(TFXLMPreTrainedModel): method __init__ (line 841) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 848) | def get_lm_head(self): method get_prefix_bias_name (line 851) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 855) | def prepare_inputs_for_generation(self, inputs, **kwargs): method call (line 876) | def call( method build (line 918) | def build(self, input_shape=None): class TFXLMForSequenceClassification (line 937) | class TFXLMForSequenceClassification(TFXLMPreTrainedModel, TFSequenceCla... method __init__ (line 938) | def __init__(self, config, *inputs, **kwargs): method call (line 952) | def call( method build (line 1007) | def build(self, input_shape=None): class TFXLMForMultipleChoice (line 1026) | class TFXLMForMultipleChoice(TFXLMPreTrainedModel, TFMultipleChoiceLoss): method __init__ (line 1027) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1038) | def dummy_inputs(self): method call (line 1063) | def call( method build (line 1138) | def build(self, input_shape=None): class TFXLMForTokenClassification (line 1160) | class TFXLMForTokenClassification(TFXLMPreTrainedModel, TFTokenClassific... method __init__ (line 1161) | def __init__(self, config, *inputs, **kwargs): method call (line 1179) | def call( method build (line 1233) | def build(self, input_shape=None): class TFXLMForQuestionAnsweringSimple (line 1252) | class TFXLMForQuestionAnsweringSimple(TFXLMPreTrainedModel, TFQuestionAn... method __init__ (line 1253) | def __init__(self, config, *inputs, **kwargs): method call (line 1268) | def call( method build (line 1336) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm/modeling_xlm.py function create_sinusoidal_embeddings (line 57) | def create_sinusoidal_embeddings(n_pos, dim, out): function get_masks (line 65) | def get_masks(slen, lengths, causal, padding_mask=None): class MultiHeadAttention (line 90) | class MultiHeadAttention(nn.Module): method __init__ (line 93) | def __init__(self, n_heads, dim, config): method prune_heads (line 107) | def prune_heads(self, heads): method forward (line 122) | def forward(self, input, mask, kv=None, cache=None, head_mask=None, ou... class TransformerFFN (line 186) | class TransformerFFN(nn.Module): method __init__ (line 187) | def __init__(self, in_dim, dim_hidden, out_dim, config): method forward (line 196) | def forward(self, input): method ff_chunk (line 199) | def ff_chunk(self, input): class XLMPreTrainedModel (line 207) | class XLMPreTrainedModel(PreTrainedModel): method __init__ (line 217) | def __init__(self, *inputs, **kwargs): method dummy_inputs (line 221) | def dummy_inputs(self): method _init_weights (line 230) | def _init_weights(self, module): class XLMForQuestionAnsweringOutput (line 252) | class XLMForQuestionAnsweringOutput(ModelOutput): class XLMModel (line 383) | class XLMModel(XLMPreTrainedModel): method __init__ (line 384) | def __init__(self, config): method get_input_embeddings (line 454) | def get_input_embeddings(self): method set_input_embeddings (line 457) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 460) | def _prune_heads(self, heads_to_prune): method forward (line 474) | def forward( class XLMPredLayer (line 611) | class XLMPredLayer(nn.Module): method __init__ (line 616) | def __init__(self, config): method forward (line 634) | def forward(self, x, y=None): class XLMWithLMHeadModel (line 660) | class XLMWithLMHeadModel(XLMPreTrainedModel): method __init__ (line 663) | def __init__(self, config): method get_output_embeddings (line 671) | def get_output_embeddings(self): method set_output_embeddings (line 674) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 677) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method forward (line 697) | def forward( class XLMForSequenceClassification (line 757) | class XLMForSequenceClassification(XLMPreTrainedModel): method __init__ (line 758) | def __init__(self, config): method forward (line 775) | def forward( class XLMForQuestionAnsweringSimple (line 859) | class XLMForQuestionAnsweringSimple(XLMPreTrainedModel): method __init__ (line 860) | def __init__(self, config): method forward (line 875) | def forward( class XLMForQuestionAnswering (line 963) | class XLMForQuestionAnswering(XLMPreTrainedModel): method __init__ (line 964) | def __init__(self, config): method forward (line 975) | def forward( class XLMForTokenClassification (line 1084) | class XLMForTokenClassification(XLMPreTrainedModel): method __init__ (line 1085) | def __init__(self, config): method forward (line 1102) | def forward( class XLMForMultipleChoice (line 1168) | class XLMForMultipleChoice(XLMPreTrainedModel): method __init__ (line 1169) | def __init__(self, config, *inputs, **kwargs): method forward (line 1185) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm/tokenization_xlm.py function get_pairs (line 36) | def get_pairs(word): function lowercase_and_remove_accent (line 49) | def lowercase_and_remove_accent(text): function replace_unicode_punct (line 66) | def replace_unicode_punct(text): function remove_non_printing_char (line 109) | def remove_non_printing_char(text): function romanian_preprocessing (line 122) | def romanian_preprocessing(text): class XLMTokenizer (line 136) | class XLMTokenizer(PreTrainedTokenizer): method __init__ (line 194) | def __init__( method do_lower_case (line 269) | def do_lower_case(self): method moses_punct_norm (line 272) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 280) | def moses_tokenize(self, text, lang): method moses_pipeline (line 288) | def moses_pipeline(self, text, lang): method ja_tokenize (line 294) | def ja_tokenize(self, text): method vocab_size (line 316) | def vocab_size(self): method get_vocab (line 319) | def get_vocab(self): method bpe (line 322) | def bpe(self, token): method _tokenize (line 366) | def _tokenize(self, text, lang="en", bypass_tokenizer=False): method _convert_token_to_id (line 462) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 466) | 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 475) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 502) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 530) | def create_token_type_ids_from_sequences( method save_vocabulary (line 559) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 587) | def __getstate__(self): method __setstate__ (line 592) | def __setstate__(self, d): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm_roberta/configuration_xlm_roberta.py class XLMRobertaConfig (line 29) | class XLMRobertaConfig(PretrainedConfig): method __init__ (line 100) | def __init__( class XLMRobertaOnnxConfig (line 142) | class XLMRobertaOnnxConfig(OnnxConfig): method inputs (line 144) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py function create_position_ids_from_input_ids (line 56) | def create_position_ids_from_input_ids(input_ids, padding_idx): class FlaxXLMRobertaEmbeddings (line 142) | class FlaxXLMRobertaEmbeddings(nn.Module): method setup (line 148) | def setup(self): method __call__ (line 170) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxXLMRobertaSelfAttention (line 186) | class FlaxXLMRobertaSelfAttention(nn.Module): method setup (line 191) | def setup(self): method _split_heads (line 220) | def _split_heads(self, hidden_states): method _merge_heads (line 223) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 228) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 259) | def __call__( class FlaxXLMRobertaSelfOutput (line 358) | class FlaxXLMRobertaSelfOutput(nn.Module): method setup (line 362) | def setup(self): method __call__ (line 371) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxXLMRobertaAttention (line 379) | class FlaxXLMRobertaAttention(nn.Module): method setup (line 384) | def setup(self): method __call__ (line 388) | def __call__( class FlaxXLMRobertaIntermediate (line 422) | class FlaxXLMRobertaIntermediate(nn.Module): method setup (line 426) | def setup(self): method __call__ (line 434) | def __call__(self, hidden_states): class FlaxXLMRobertaOutput (line 441) | class FlaxXLMRobertaOutput(nn.Module): method setup (line 445) | def setup(self): method __call__ (line 454) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxXLMRobertaLayer (line 462) | class FlaxXLMRobertaLayer(nn.Module): method setup (line 466) | def setup(self): method __call__ (line 473) | def __call__( class FlaxXLMRobertaLayerCollection (line 520) | class FlaxXLMRobertaLayerCollection(nn.Module): method setup (line 525) | def setup(self): method __call__ (line 538) | def __call__( class FlaxXLMRobertaEncoder (line 603) | class FlaxXLMRobertaEncoder(nn.Module): method setup (line 608) | def setup(self): method __call__ (line 615) | def __call__( class FlaxXLMRobertaPooler (line 643) | class FlaxXLMRobertaPooler(nn.Module): method setup (line 647) | def setup(self): method __call__ (line 654) | def __call__(self, hidden_states): class FlaxXLMRobertaLMHead (line 661) | class FlaxXLMRobertaLMHead(nn.Module): method setup (line 666) | def setup(self): method __call__ (line 681) | def __call__(self, hidden_states, shared_embedding=None): class FlaxXLMRobertaClassificationHead (line 697) | class FlaxXLMRobertaClassificationHead(nn.Module): method setup (line 701) | def setup(self): method __call__ (line 719) | def __call__(self, hidden_states, deterministic=True): class FlaxXLMRobertaPreTrainedModel (line 730) | class FlaxXLMRobertaPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 741) | def __init__( method enable_gradient_checkpointing (line 755) | def enable_gradient_checkpointing(self): method init_weights (line 762) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 805) | def init_cache(self, batch_size, max_length): method __call__ (line 825) | def __call__( class FlaxXLMRobertaModule (line 923) | class FlaxXLMRobertaModule(nn.Module): method setup (line 929) | def setup(self): method __call__ (line 938) | def __call__( class FlaxXLMRobertaModel (line 998) | class FlaxXLMRobertaModel(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForMaskedLMModule (line 1006) | class FlaxXLMRobertaForMaskedLMModule(nn.Module): method setup (line 1011) | def setup(self): method __call__ (line 1020) | def __call__( class FlaxXLMRobertaForMaskedLM (line 1065) | class FlaxXLMRobertaForMaskedLM(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForSequenceClassificationModule (line 1079) | class FlaxXLMRobertaForSequenceClassificationModule(nn.Module): method setup (line 1084) | def setup(self): method __call__ (line 1093) | def __call__( class FlaxXLMRobertaForSequenceClassification (line 1138) | class FlaxXLMRobertaForSequenceClassification(FlaxXLMRobertaPreTrainedMo... class FlaxXLMRobertaForMultipleChoiceModule (line 1151) | class FlaxXLMRobertaForMultipleChoiceModule(nn.Module): method setup (line 1156) | def setup(self): method __call__ (line 1165) | def __call__( class FlaxXLMRobertaForMultipleChoice (line 1219) | class FlaxXLMRobertaForMultipleChoice(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForTokenClassificationModule (line 1235) | class FlaxXLMRobertaForTokenClassificationModule(nn.Module): method setup (line 1240) | def setup(self): method __call__ (line 1255) | def __call__( class FlaxXLMRobertaForTokenClassification (line 1301) | class FlaxXLMRobertaForTokenClassification(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForQuestionAnsweringModule (line 1314) | class FlaxXLMRobertaForQuestionAnsweringModule(nn.Module): method setup (line 1319) | def setup(self): method __call__ (line 1328) | def __call__( class FlaxXLMRobertaForQuestionAnswering (line 1378) | class FlaxXLMRobertaForQuestionAnswering(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForCausalLMModule (line 1391) | class FlaxXLMRobertaForCausalLMModule(nn.Module): method setup (line 1396) | def setup(self): method __call__ (line 1405) | def __call__( class FlaxXLMRobertaForCausalLM (line 1464) | class FlaxXLMRobertaForCausalLM(FlaxXLMRobertaPreTrainedModel): method prepare_inputs_for_generation (line 1467) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1488) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py class TFXLMRobertaEmbeddings (line 158) | class TFXLMRobertaEmbeddings(keras.layers.Layer): method __init__ (line 163) | def __init__(self, config, **kwargs): method build (line 174) | def build(self, input_shape=None): method create_position_ids_from_input_ids (line 203) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 217) | def call( class TFXLMRobertaPooler (line 264) | class TFXLMRobertaPooler(keras.layers.Layer): method __init__ (line 265) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 276) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 284) | def build(self, input_shape=None): class TFXLMRobertaSelfAttention (line 294) | class TFXLMRobertaSelfAttention(keras.layers.Layer): method __init__ (line 295) | def __init__(self, config: XLMRobertaConfig, **kwargs): method transpose_for_scores (line 323) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 330) | def call( method build (line 411) | def build(self, input_shape=None): class TFXLMRobertaSelfOutput (line 427) | class TFXLMRobertaSelfOutput(keras.layers.Layer): method __init__ (line 428) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 438) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 445) | def build(self, input_shape=None): class TFXLMRobertaAttention (line 458) | class TFXLMRobertaAttention(keras.layers.Layer): method __init__ (line 459) | def __init__(self, config: XLMRobertaConfig, **kwargs): method prune_heads (line 465) | def prune_heads(self, heads): method call (line 468) | def call( method build (line 497) | def build(self, input_shape=None): class TFXLMRobertaIntermediate (line 510) | class TFXLMRobertaIntermediate(keras.layers.Layer): method __init__ (line 511) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 524) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: method build (line 530) | def build(self, input_shape=None): class TFXLMRobertaOutput (line 540) | class TFXLMRobertaOutput(keras.layers.Layer): method __init__ (line 541) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 551) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... method build (line 558) | def build(self, input_shape=None): class TFXLMRobertaLayer (line 571) | class TFXLMRobertaLayer(keras.layers.Layer): method __init__ (line 572) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 585) | def call( method build (line 656) | def build(self, input_shape=None): class TFXLMRobertaEncoder (line 675) | class TFXLMRobertaEncoder(keras.layers.Layer): method __init__ (line 676) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 681) | def call( method build (line 743) | def build(self, input_shape=None): class TFXLMRobertaMainLayer (line 755) | class TFXLMRobertaMainLayer(keras.layers.Layer): method __init__ (line 758) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 775) | def get_input_embeddings(self) -> keras.layers.Layer: method set_input_embeddings (line 779) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 784) | def _prune_heads(self, heads_to_prune): method call (line 793) | def call( method build (line 950) | def build(self, input_shape=None): class TFXLMRobertaPreTrainedModel (line 966) | class TFXLMRobertaPreTrainedModel(TFPreTrainedModel): class TFXLMRobertaModel (line 981) | class TFXLMRobertaModel(TFXLMRobertaPreTrainedModel): method __init__ (line 982) | def __init__(self, config, *inputs, **kwargs): method call (line 993) | def call( method build (line 1049) | def build(self, input_shape=None): class TFXLMRobertaLMHead (line 1059) | class TFXLMRobertaLMHead(keras.layers.Layer): method __init__ (line 1062) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1077) | def build(self, input_shape=None): method get_output_embeddings (line 1090) | def get_output_embeddings(self): method set_output_embeddings (line 1093) | def set_output_embeddings(self, value): method get_bias (line 1097) | def get_bias(self): method set_bias (line 1100) | def set_bias(self, value): method call (line 1104) | def call(self, hidden_states): class TFXLMRobertaForMaskedLM (line 1121) | class TFXLMRobertaForMaskedLM(TFXLMRobertaPreTrainedModel, TFMaskedLangu... method __init__ (line 1125) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1131) | def get_lm_head(self): method get_prefix_bias_name (line 1134) | def get_prefix_bias_name(self): method call (line 1148) | def call( method build (line 1197) | def build(self, input_shape=None): class TFXLMRobertaForCausalLM (line 1214) | class TFXLMRobertaForCausalLM(TFXLMRobertaPreTrainedModel, TFCausalLangu... method __init__ (line 1218) | def __init__(self, config: XLMRobertaConfig, *inputs, **kwargs): method get_lm_head (line 1227) | def get_lm_head(self): method get_prefix_bias_name (line 1230) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1235) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1254) | def call( method build (line 1335) | def build(self, input_shape=None): class TFXLMRobertaClassificationHead (line 1348) | class TFXLMRobertaClassificationHead(keras.layers.Layer): method __init__ (line 1351) | def __init__(self, config, **kwargs): method call (line 1368) | def call(self, features, training=False): method build (line 1376) | def build(self, input_shape=None): class TFXLMRobertaForSequenceClassification (line 1396) | class TFXLMRobertaForSequenceClassification(TFXLMRobertaPreTrainedModel,... method __init__ (line 1400) | def __init__(self, config, *inputs, **kwargs): method call (line 1416) | def call( method build (line 1464) | def build(self, input_shape=None): class TFXLMRobertaForMultipleChoice (line 1484) | class TFXLMRobertaForMultipleChoice(TFXLMRobertaPreTrainedModel, TFMulti... method __init__ (line 1489) | def __init__(self, config, *inputs, **kwargs): method call (line 1508) | def call( method build (line 1569) | def build(self, input_shape=None): class TFXLMRobertaForTokenClassification (line 1589) | class TFXLMRobertaForTokenClassification(TFXLMRobertaPreTrainedModel, TF... method __init__ (line 1594) | def __init__(self, config, *inputs, **kwargs): method call (line 1617) | def call( method build (line 1665) | def build(self, input_shape=None): class TFXLMRobertaForQuestionAnswering (line 1685) | class TFXLMRobertaForQuestionAnswering(TFXLMRobertaPreTrainedModel, TFQu... method __init__ (line 1689) | def __init__(self, config, *inputs, **kwargs): method call (line 1708) | def call( method build (line 1770) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py class XLMRobertaEmbeddings (line 56) | class XLMRobertaEmbeddings(nn.Module): method __init__ (line 62) | def __init__(self, config): method forward (line 87) | def forward( method create_position_ids_from_inputs_embeds (line 127) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class XLMRobertaSelfAttention (line 146) | class XLMRobertaSelfAttention(nn.Module): method __init__ (line 147) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 173) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 178) | def forward( class XLMRobertaSelfOutput (line 281) | class XLMRobertaSelfOutput(nn.Module): method __init__ (line 282) | def __init__(self, config): method forward (line 288) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class XLMRobertaAttention (line 301) | class XLMRobertaAttention(nn.Module): method __init__ (line 302) | 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 XLMRobertaIntermediate (line 353) | class XLMRobertaIntermediate(nn.Module): method __init__ (line 354) | def __init__(self, config): method forward (line 362) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaOutput (line 369) | class XLMRobertaOutput(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 XLMRobertaLayer (line 384) | class XLMRobertaLayer(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 XLMRobertaEncoder (line 471) | class XLMRobertaEncoder(nn.Module): method __init__ (line 472) | def __init__(self, config): method forward (line 478) | def forward( class XLMRobertaPooler (line 565) | class XLMRobertaPooler(nn.Module): method __init__ (line 566) | def __init__(self, config): method forward (line 571) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaPreTrainedModel (line 581) | class XLMRobertaPreTrainedModel(PreTrainedModel): method _init_weights (line 593) | def _init_weights(self, module): class XLMRobertaModel (line 681) | class XLMRobertaModel(XLMRobertaPreTrainedModel): method __init__ (line 698) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 710) | def get_input_embeddings(self): method set_input_embeddings (line 713) | def set_input_embeddings(self, value): method _prune_heads (line 716) | def _prune_heads(self, heads_to_prune): method forward (line 731) | def forward( class XLMRobertaForCausalLM (line 867) | class XLMRobertaForCausalLM(XLMRobertaPreTrainedModel): method __init__ (line 870) | def __init__(self, config): method get_output_embeddings (line 882) | def get_output_embeddings(self): method set_output_embeddings (line 885) | def set_output_embeddings(self, new_embeddings): method forward (line 890) | def forward( method prepare_inputs_for_generation (line 996) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1017) | def _reorder_cache(self, past_key_values, beam_idx): class XLMRobertaForMaskedLM (line 1031) | class XLMRobertaForMaskedLM(XLMRobertaPreTrainedModel): method __init__ (line 1034) | def __init__(self, config): method get_output_embeddings (line 1049) | def get_output_embeddings(self): method set_output_embeddings (line 1052) | def set_output_embeddings(self, new_embeddings): method forward (line 1064) | def forward( class XLMRobertaLMHead (line 1125) | class XLMRobertaLMHead(nn.Module): method __init__ (line 1128) | def __init__(self, config): method forward (line 1137) | def forward(self, features, **kwargs): method _tie_weights (line 1147) | def _tie_weights(self): class XLMRobertaForSequenceClassification (line 1164) | class XLMRobertaForSequenceClassification(XLMRobertaPreTrainedModel): method __init__ (line 1165) | def __init__(self, config): method forward (line 1184) | def forward( class XLMRobertaForMultipleChoice (line 1264) | class XLMRobertaForMultipleChoice(XLMRobertaPreTrainedModel): method __init__ (line 1265) | def __init__(self, config): method forward (line 1283) | def forward( class XLMRobertaForTokenClassification (line 1359) | class XLMRobertaForTokenClassification(XLMRobertaPreTrainedModel): method __init__ (line 1360) | def __init__(self, config): method forward (line 1382) | def forward( class XLMRobertaClassificationHead (line 1438) | class XLMRobertaClassificationHead(nn.Module): method __init__ (line 1441) | def __init__(self, config): method forward (line 1450) | def forward(self, features, **kwargs): class XLMRobertaForQuestionAnswering (line 1468) | class XLMRobertaForQuestionAnswering(XLMRobertaPreTrainedModel): method __init__ (line 1469) | def __init__(self, config): method forward (line 1487) | def forward( function create_position_ids_from_input_ids (line 1563) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py class XLMRobertaTokenizer (line 34) | class XLMRobertaTokenizer(PreTrainedTokenizer): method __init__ (line 104) | def __init__( method __getstate__ (line 153) | def __getstate__(self): method __setstate__ (line 159) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 169) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 195) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 223) | def create_token_type_ids_from_sequences( method vocab_size (line 249) | def vocab_size(self): method get_vocab (line 252) | def get_vocab(self): method _tokenize (line 257) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 261) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 270) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 276) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 281) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm_roberta/tokenization_xlm_roberta_fast.py class XLMRobertaTokenizerFast (line 37) | class XLMRobertaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 92) | def __init__( method can_save_slow_tokenizer (line 124) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 127) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 153) | def create_token_type_ids_from_sequences( method save_vocabulary (line 178) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlm_roberta_xl/configuration_xlm_roberta_xl.py class XLMRobertaXLConfig (line 28) | class XLMRobertaXLConfig(PretrainedConfig): method __init__ (line 97) | def __init__( class XLMRobertaXLOnnxConfig (line 138) | class XLMRobertaXLOnnxConfig(OnnxConfig): method inputs (line 140) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py class XLMRobertaXLEmbeddings (line 54) | class XLMRobertaXLEmbeddings(nn.Module): method __init__ (line 59) | def __init__(self, config): method forward (line 83) | def forward( method create_position_ids_from_inputs_embeds (line 124) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class XLMRobertaXLSelfAttention (line 143) | class XLMRobertaXLSelfAttention(nn.Module): method __init__ (line 144) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 170) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 175) | def forward( class XLMRobertaXLSelfOutput (line 277) | class XLMRobertaXLSelfOutput(nn.Module): method __init__ (line 278) | def __init__(self, config): method forward (line 283) | def forward(self, hidden_states, input_tensor): class XLMRobertaXLAttention (line 290) | class XLMRobertaXLAttention(nn.Module): method __init__ (line 291) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 298) | def prune_heads(self, heads): method forward (line 316) | def forward( class XLMRobertaXLIntermediate (line 342) | class XLMRobertaXLIntermediate(nn.Module): method __init__ (line 343) | def __init__(self, config): method forward (line 351) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaXLOutput (line 357) | class XLMRobertaXLOutput(nn.Module): method __init__ (line 358) | def __init__(self, config): method forward (line 362) | def forward(self, hidden_states, input_tensor): class XLMRobertaXLLayer (line 368) | class XLMRobertaXLLayer(nn.Module): method __init__ (line 369) | def __init__(self, config): method forward (line 384) | def forward( method feed_forward_chunk (line 449) | def feed_forward_chunk(self, attention_output): class XLMRobertaXLEncoder (line 456) | class XLMRobertaXLEncoder(nn.Module): method __init__ (line 457) | def __init__(self, config): method forward (line 464) | def forward( class XLMRobertaXLPooler (line 552) | class XLMRobertaXLPooler(nn.Module): method __init__ (line 553) | def __init__(self, config): method forward (line 558) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaXLPreTrainedModel (line 567) | class XLMRobertaXLPreTrainedModel(PreTrainedModel): method _init_weights (line 578) | def _init_weights(self, module): class XLMRobertaXLModel (line 654) | class XLMRobertaXLModel(XLMRobertaXLPreTrainedModel): method __init__ (line 666) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 678) | def get_input_embeddings(self): method set_input_embeddings (line 681) | def set_input_embeddings(self, value): method _prune_heads (line 684) | def _prune_heads(self, heads_to_prune): method forward (line 699) | def forward( class XLMRobertaXLForCausalLM (line 834) | class XLMRobertaXLForCausalLM(XLMRobertaXLPreTrainedModel): method __init__ (line 837) | def __init__(self, config): method get_output_embeddings (line 848) | def get_output_embeddings(self): method set_output_embeddings (line 851) | def set_output_embeddings(self, new_embeddings): method forward (line 857) | def forward( method prepare_inputs_for_generation (line 958) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 979) | def _reorder_cache(self, past_key_values, beam_idx): class XLMRobertaXLForMaskedLM (line 991) | class XLMRobertaXLForMaskedLM(XLMRobertaXLPreTrainedModel): method __init__ (line 994) | def __init__(self, config): method get_output_embeddings (line 1008) | def get_output_embeddings(self): method set_output_embeddings (line 1011) | def set_output_embeddings(self, new_embeddings): method forward (line 1022) | def forward( class XLMRobertaXLLMHead (line 1080) | class XLMRobertaXLLMHead(nn.Module): method __init__ (line 1083) | def __init__(self, config): method forward (line 1092) | def forward(self, features, **kwargs): method _tie_weights (line 1102) | def _tie_weights(self) -> None: class XLMRobertaXLForSequenceClassification (line 1118) | class XLMRobertaXLForSequenceClassification(XLMRobertaXLPreTrainedModel): method __init__ (line 1119) | def __init__(self, config): method forward (line 1135) | def forward( class XLMRobertaXLForMultipleChoice (line 1212) | class XLMRobertaXLForMultipleChoice(XLMRobertaXLPreTrainedModel): method __init__ (line 1213) | def __init__(self, config): method forward (line 1230) | def forward( class XLMRobertaXLForTokenClassification (line 1303) | class XLMRobertaXLForTokenClassification(XLMRobertaXLPreTrainedModel): method __init__ (line 1304) | def __init__(self, config): method forward (line 1323) | def forward( class XLMRobertaXLClassificationHead (line 1385) | class XLMRobertaXLClassificationHead(nn.Module): method __init__ (line 1388) | def __init__(self, config): method forward (line 1397) | def forward(self, features, **kwargs): class XLMRobertaXLForQuestionAnswering (line 1414) | class XLMRobertaXLForQuestionAnswering(XLMRobertaXLPreTrainedModel): method __init__ (line 1415) | def __init__(self, config): method forward (line 1430) | def forward( function create_position_ids_from_input_ids (line 1506) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlnet/configuration_xlnet.py class XLNetConfig (line 27) | class XLNetConfig(PretrainedConfig): method __init__ (line 145) | def __init__( method max_position_embeddings (line 228) | def max_position_embeddings(self): method max_position_embeddings (line 233) | def max_position_embeddings(self, value): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlnet/convert_xlnet_original_tf_checkpoint_to_pytorch.py function convert_xlnet_checkpoint_to_pytorch (line 48) | def convert_xlnet_checkpoint_to_pytorch( FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlnet/modeling_tf_xlnet.py class TFXLNetRelativeAttention (line 63) | class TFXLNetRelativeAttention(keras.layers.Layer): method __init__ (line 64) | def __init__(self, config, **kwargs): method build (line 84) | def build(self, input_shape=None): method prune_heads (line 121) | def prune_heads(self, heads): method rel_shift (line 124) | def rel_shift(self, x, klen=-1): method rel_attn_core (line 136) | def rel_attn_core( method post_attention (line 180) | def post_attention(self, h, attn_vec, residual=True, training=False): method call (line 193) | def call( class TFXLNetFeedForward (line 333) | class TFXLNetFeedForward(keras.layers.Layer): method __init__ (line 334) | def __init__(self, config, **kwargs): method call (line 350) | def call(self, inp, training=False): method build (line 360) | def build(self, input_shape=None): class TFXLNetLayer (line 375) | class TFXLNetLayer(keras.layers.Layer): method __init__ (line 376) | def __init__(self, config, **kwargs): method call (line 382) | def call( method build (line 418) | def build(self, input_shape=None): class TFXLNetLMHead (line 430) | class TFXLNetLMHead(keras.layers.Layer): method __init__ (line 431) | def __init__(self, config, input_embeddings, **kwargs): method build (line 438) | 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 TFXLNetMainLayer (line 463) | class TFXLNetMainLayer(keras.layers.Layer): method __init__ (line 466) | def __init__(self, config, **kwargs): method get_input_embeddings (line 494) | def get_input_embeddings(self): method set_input_embeddings (line 497) | def set_input_embeddings(self, value): method build (line 501) | def build(self, input_shape=None): method _prune_heads (line 518) | def _prune_heads(self, heads_to_prune): method create_mask (line 521) | def create_mask(self, qlen, mlen): method cache_mem (line 550) | def cache_mem(self, curr_out, prev_mem): method positional_embedding (line 572) | def positional_embedding(pos_seq, inv_freq, bsz=None): method relative_positional_encoding (line 582) | def relative_positional_encoding(self, qlen, klen, bsz=None): method call (line 623) | def call( class TFXLNetPreTrainedModel (line 828) | class TFXLNetPreTrainedModel(TFPreTrainedModel): class TFXLNetModelOutput (line 839) | class TFXLNetModelOutput(ModelOutput): class TFXLNetLMHeadModelOutput (line 873) | class TFXLNetLMHeadModelOutput(ModelOutput): class TFXLNetForSequenceClassificationOutput (line 910) | class TFXLNetForSequenceClassificationOutput(ModelOutput): class TFXLNetForTokenClassificationOutput (line 944) | class TFXLNetForTokenClassificationOutput(ModelOutput): class TFXLNetForMultipleChoiceOutput (line 978) | class TFXLNetForMultipleChoiceOutput(ModelOutput): class TFXLNetForQuestionAnsweringSimpleOutput (line 1014) | class TFXLNetForQuestionAnsweringSimpleOutput(ModelOutput): class TFXLNetModel (line 1169) | class TFXLNetModel(TFXLNetPreTrainedModel): method __init__ (line 1170) | def __init__(self, config, *inputs, **kwargs): method call (line 1181) | def call( method build (line 1217) | def build(self, input_shape=None): class TFXLNetLMHeadModel (line 1232) | class TFXLNetLMHeadModel(TFXLNetPreTrainedModel, TFCausalLanguageModelin... method __init__ (line 1233) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1240) | def get_lm_head(self): method get_prefix_bias_name (line 1243) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1247) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 1289) | def call( method build (line 1384) | def build(self, input_shape=None): class TFXLNetForSequenceClassification (line 1403) | class TFXLNetForSequenceClassification(TFXLNetPreTrainedModel, TFSequenc... method __init__ (line 1404) | def __init__(self, config, *inputs, **kwargs): method call (line 1424) | def call( method build (line 1483) | def build(self, input_shape=None): class TFXLNetForMultipleChoice (line 1505) | class TFXLNetForMultipleChoice(TFXLNetPreTrainedModel, TFMultipleChoiceL... method __init__ (line 1506) | def __init__(self, config, *inputs, **kwargs): method call (line 1525) | def call( method build (line 1599) | def build(self, input_shape=None): class TFXLNetForTokenClassification (line 1621) | class TFXLNetForTokenClassification(TFXLNetPreTrainedModel, TFTokenClass... method __init__ (line 1622) | def __init__(self, config, *inputs, **kwargs): method call (line 1639) | def call( method build (line 1694) | def build(self, input_shape=None): class TFXLNetForQuestionAnsweringSimple (line 1713) | class TFXLNetForQuestionAnsweringSimple(TFXLNetPreTrainedModel, TFQuesti... method __init__ (line 1714) | def __init__(self, config, *inputs, **kwargs): method call (line 1729) | def call( method build (line 1800) | def build(self, input_shape=None): FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlnet/modeling_xlnet.py function build_tf_xlnet_to_pytorch_map (line 48) | def build_tf_xlnet_to_pytorch_map(model, config, tf_weights=None): function load_tf_weights_in_xlnet (line 131) | def load_tf_weights_in_xlnet(model, config, tf_path): class XLNetRelativeAttention (line 198) | class XLNetRelativeAttention(nn.Module): method __init__ (line 199) | def __init__(self, config): method prune_heads (line 227) | def prune_heads(self, heads): method rel_shift (line 231) | def rel_shift(x, klen=-1): method rel_shift_bnij (line 244) | def rel_shift_bnij(x, klen=-1): method rel_attn_core (line 258) | def rel_attn_core( method post_attention (line 310) | def post_attention(self, h, attn_vec, residual=True): method forward (line 322) | def forward( class XLNetFeedForward (line 458) | class XLNetFeedForward(nn.Module): method __init__ (line 459) | def __init__(self, config): method forward (line 470) | def forward(self, inp): class XLNetLayer (line 481) | class XLNetLayer(nn.Module): method __init__ (line 482) | def __init__(self, config): method forward (line 490) | def forward( method ff_chunk (line 526) | def ff_chunk(self, output_x): class XLNetPreTrainedModel (line 531) | class XLNetPreTrainedModel(PreTrainedModel): method _init_weights (line 541) | def _init_weights(self, module): class XLNetModelOutput (line 574) | class XLNetModelOutput(ModelOutput): class XLNetLMHeadModelOutput (line 608) | class XLNetLMHeadModelOutput(ModelOutput): class XLNetForSequenceClassificationOutput (line 645) | class XLNetForSequenceClassificationOutput(ModelOutput): class XLNetForTokenClassificationOutput (line 679) | class XLNetForTokenClassificationOutput(ModelOutput): class XLNetForMultipleChoiceOutput (line 713) | class XLNetForMultipleChoiceOutput(ModelOutput): class XLNetForQuestionAnsweringSimpleOutput (line 749) | class XLNetForQuestionAnsweringSimpleOutput(ModelOutput): class XLNetForQuestionAnsweringOutput (line 786) | class XLNetForQuestionAnsweringOutput(ModelOutput): class XLNetModel (line 926) | class XLNetModel(XLNetPreTrainedModel): method __init__ (line 927) | def __init__(self, config): method get_input_embeddings (line 947) | def get_input_embeddings(self): method set_input_embeddings (line 950) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 953) | def _prune_heads(self, heads_to_prune): method create_mask (line 956) | def create_mask(self, qlen, mlen): method cache_mem (line 984) | def cache_mem(self, curr_out, prev_mem): method positional_embedding (line 1006) | def positional_embedding(pos_seq, inv_freq, bsz=None): method relative_positional_encoding (line 1016) | def relative_positional_encoding(self, qlen, klen, bsz=None): method forward (line 1060) | def forward( class XLNetLMHeadModel (line 1289) | class XLNetLMHeadModel(XLNetPreTrainedModel): method __init__ (line 1292) | def __init__(self, config): method get_output_embeddings (line 1303) | def get_output_embeddings(self): method set_output_embeddings (line 1306) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 1309) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 1353) | def forward( method _reorder_cache (line 1479) | def _reorder_cache(mems: List[torch.Tensor], beam_idx: torch.Tensor) -... class XLNetForSequenceClassification (line 1495) | class XLNetForSequenceClassification(XLNetPreTrainedModel): method __init__ (line 1496) | def __init__(self, config): method forward (line 1514) | def forward( class XLNetForTokenClassification (line 1604) | class XLNetForTokenClassification(XLNetPreTrainedModel): method __init__ (line 1605) | def __init__(self, config): method forward (line 1621) | def forward( class XLNetForMultipleChoice (line 1691) | class XLNetForMultipleChoice(XLNetPreTrainedModel): method __init__ (line 1692) | def __init__(self, config): method forward (line 1708) | def forward( class XLNetForQuestionAnsweringSimple (line 1794) | class XLNetForQuestionAnsweringSimple(XLNetPreTrainedModel): method __init__ (line 1795) | def __init__(self, config): method forward (line 1811) | def forward( class XLNetForQuestionAnswering (line 1904) | class XLNetForQuestionAnswering(XLNetPreTrainedModel): method __init__ (line 1905) | def __init__(self, config): method forward (line 1920) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlnet/tokenization_xlnet.py class XLNetTokenizer (line 41) | class XLNetTokenizer(PreTrainedTokenizer): method __init__ (line 119) | def __init__( method vocab_size (line 168) | def vocab_size(self): method get_vocab (line 171) | def get_vocab(self): method __getstate__ (line 176) | def __getstate__(self): method __setstate__ (line 181) | def __setstate__(self, d): method preprocess_text (line 191) | def preprocess_text(self, inputs): method _tokenize (line 206) | 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 230) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 234) | def convert_tokens_to_string(self, tokens): method _decode (line 239) | def _decode( method build_inputs_with_special_tokens (line 284) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 309) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 337) | def create_token_type_ids_from_sequences( method save_vocabulary (line 367) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/xlnet/tokenization_xlnet_fast.py class XLNetTokenizerFast (line 47) | class XLNetTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 112) | def __init__( method can_save_slow_tokenizer (line 156) | def can_save_slow_tokenizer(self) -> bool: method build_inputs_with_special_tokens (line 159) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 184) | def create_token_type_ids_from_sequences( method save_vocabulary (line 214) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: mplsandbox_for_rl/transformers/src/transformers/models/xmod/configuration_xmod.py class XmodConfig (line 29) | class XmodConfig(PretrainedConfig): method __init__ (line 114) | def __init__( class XmodOnnxConfig (line 170) | class XmodOnnxConfig(OnnxConfig): method inputs (line 172) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/xmod/modeling_xmod.py class XmodEmbeddings (line 46) | class XmodEmbeddings(nn.Module): method __init__ (line 52) | def __init__(self, config): method forward (line 77) | def forward( method create_position_ids_from_inputs_embeds (line 117) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class XmodSelfAttention (line 136) | class XmodSelfAttention(nn.Module): method __init__ (line 137) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 163) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 168) | def forward( class XmodSelfOutput (line 270) | class XmodSelfOutput(nn.Module): method __init__ (line 272) | def __init__(self, config): method forward (line 278) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class XmodAttention (line 285) | class XmodAttention(nn.Module): method __init__ (line 286) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 294) | def prune_heads(self, heads): method forward (line 312) | def forward( class XmodIntermediate (line 342) | class XmodIntermediate(nn.Module): method __init__ (line 343) | def __init__(self, config): method forward (line 351) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XmodAdapter (line 357) | class XmodAdapter(nn.Module): method __init__ (line 358) | def __init__(self, config): method forward (line 368) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XmodOutput (line 375) | class XmodOutput(nn.Module): method __init__ (line 376) | def __init__(self, config): method forward (line 391) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... method lang_adapter (line 398) | def lang_adapter(self, lang_ids: torch.Tensor, hidden_states: torch.Te... class XmodLayer (line 425) | class XmodLayer(nn.Module): method __init__ (line 426) | def __init__(self, config): method forward (line 441) | def forward( method feed_forward_chunk (line 516) | def feed_forward_chunk(self, attention_output): class XmodEncoder (line 520) | class XmodEncoder(nn.Module): method __init__ (line 521) | def __init__(self, config): method forward (line 530) | def forward( class XmodPooler (line 622) | class XmodPooler(nn.Module): method __init__ (line 623) | def __init__(self, config): method forward (line 628) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XmodPreTrainedModel (line 637) | class XmodPreTrainedModel(PreTrainedModel): method _init_weights (line 648) | def _init_weights(self, module): method set_default_language (line 664) | def set_default_language(self, language: str): method freeze_embeddings_and_language_adapters (line 677) | def freeze_embeddings_and_language_adapters(self): class XmodModel (line 767) | class XmodModel(XmodPreTrainedModel): method __init__ (line 784) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 797) | def get_input_embeddings(self): method set_input_embeddings (line 801) | def set_input_embeddings(self, value): method _prune_heads (line 805) | def _prune_heads(self, heads_to_prune): method forward (line 814) | def forward( class XmodForCausalLM (line 959) | class XmodForCausalLM(XmodPreTrainedModel): method __init__ (line 963) | def __init__(self, config): method get_output_embeddings (line 976) | def get_output_embeddings(self): method set_output_embeddings (line 980) | def set_output_embeddings(self, new_embeddings): method forward (line 984) | def forward( method prepare_inputs_for_generation (line 1092) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1114) | def _reorder_cache(self, past_key_values, beam_idx): class XmodForMaskedLM (line 1127) | class XmodForMaskedLM(XmodPreTrainedModel): method __init__ (line 1131) | def __init__(self, config): method get_output_embeddings (line 1147) | def get_output_embeddings(self): method set_output_embeddings (line 1151) | def set_output_embeddings(self, new_embeddings): method forward (line 1155) | def forward( class XmodLMHead (line 1216) | class XmodLMHead(nn.Module): method __init__ (line 1219) | def __init__(self, config): method forward (line 1228) | def forward(self, features, **kwargs): method _tie_weights (line 1238) | def _tie_weights(self): class XmodForSequenceClassification (line 1254) | class XmodForSequenceClassification(XmodPreTrainedModel): method __init__ (line 1256) | def __init__(self, config): method forward (line 1268) | def forward( class XmodForMultipleChoice (line 1347) | class XmodForMultipleChoice(XmodPreTrainedModel): method __init__ (line 1349) | def __init__(self, config): method forward (line 1360) | def forward( class XmodForTokenClassification (line 1436) | class XmodForTokenClassification(XmodPreTrainedModel): method __init__ (line 1438) | def __init__(self, config): method forward (line 1453) | def forward( class XmodClassificationHead (line 1509) | class XmodClassificationHead(nn.Module): method __init__ (line 1512) | def __init__(self, config): method forward (line 1521) | def forward(self, features, **kwargs): class XmodForQuestionAnswering (line 1538) | class XmodForQuestionAnswering(XmodPreTrainedModel): method __init__ (line 1540) | def __init__(self, config): method forward (line 1551) | def forward( function create_position_ids_from_input_ids (line 1629) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: mplsandbox_for_rl/transformers/src/transformers/models/yolos/configuration_yolos.py class YolosConfig (line 30) | class YolosConfig(PretrainedConfig): method __init__ (line 104) | def __init__( class YolosOnnxConfig (line 158) | class YolosOnnxConfig(OnnxConfig): method inputs (line 162) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 170) | def atol_for_validation(self) -> float: method default_onnx_opset (line 174) | def default_onnx_opset(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/models/yolos/convert_yolos_to_pytorch.py function get_yolos_config (line 34) | def get_yolos_config(yolos_name: str) -> YolosConfig: function read_in_q_k_v (line 70) | def read_in_q_k_v(state_dict: dict, config: YolosConfig, base_model: boo... function rename_key (line 88) | def rename_key(name: str) -> str: function convert_state_dict (line 125) | def convert_state_dict(orig_state_dict: dict, model: YolosForObjectDetec... function prepare_img (line 150) | def prepare_img() -> torch.Tensor: function convert_yolos_checkpoint (line 157) | def convert_yolos_checkpoint( FILE: mplsandbox_for_rl/transformers/src/transformers/models/yolos/feature_extraction_yolos.py function rgb_to_id (line 27) | def rgb_to_id(x): class YolosFeatureExtractor (line 36) | class YolosFeatureExtractor(YolosImageProcessor): method __init__ (line 37) | def __init__(self, *args, **kwargs) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/models/yolos/image_processing_yolos.py function get_max_height_width (line 86) | def get_max_height_width( function get_size_with_aspect_ratio (line 104) | def get_size_with_aspect_ratio( function get_image_size_for_max_height_width (line 154) | def get_image_size_for_max_height_width( function get_resize_output_image_size (line 190) | def get_resize_output_image_size( function get_numpy_to_framework_fn (line 219) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 244) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 258) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 273) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function make_pixel_mask (line 281) | def make_pixel_mask( function convert_coco_poly_to_mask (line 300) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 335) | def prepare_coco_detection_annotation( function masks_to_boxes (line 396) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 431) | def prepare_coco_panoptic_annotation( function get_segmentation_image (line 473) | def get_segmentation_image( function get_mask_area (line 499) | def get_mask_area(seg_img: np.ndarray, target_size: Tuple[int, int], n_c... function score_labels_from_class_probabilities (line 509) | def score_labels_from_class_probabilities(logits: np.ndarray) -> Tuple[n... function resize_annotation (line 518) | def resize_annotation( function binary_mask_to_rle (line 570) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 593) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 615) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 644) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 663) | def compute_segments( class YolosImageProcessor (line 723) | class YolosImageProcessor(BaseImageProcessor): method __init__ (line 774) | def __init__( method from_dict (line 846) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method prepare_annotation (line 860) | def prepare_annotation( method resize (line 893) | def resize( method resize_annotation (line 962) | def resize_annotation( method rescale (line 976) | def rescale( method normalize_annotation (line 1005) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method _update_annotation_for_padded_image (line 1013) | def _update_annotation_for_padded_image( method _pad_image (line 1057) | def _pad_image( method pad (line 1090) | def pad( method preprocess (line 1176) | def preprocess( method post_process (line 1439) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 1481) | def post_process_object_detection( FILE: mplsandbox_for_rl/transformers/src/transformers/models/yolos/modeling_yolos.py class YolosObjectDetectionOutput (line 66) | class YolosObjectDetectionOutput(ModelOutput): class YolosEmbeddings (line 110) | class YolosEmbeddings(nn.Module): method __init__ (line 116) | def __init__(self, config: YolosConfig) -> None: method forward (line 131) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class InterpolateInitialPositionEmbeddings (line 153) | class InterpolateInitialPositionEmbeddings(nn.Module): method __init__ (line 154) | def __init__(self, config) -> None: method forward (line 158) | def forward(self, pos_embed, img_size=(800, 1344)) -> torch.Tensor: class InterpolateMidPositionEmbeddings (line 182) | class InterpolateMidPositionEmbeddings(nn.Module): method __init__ (line 183) | def __init__(self, config) -> None: method forward (line 187) | def forward(self, pos_embed, img_size=(800, 1344)) -> torch.Tensor: class YolosPatchEmbeddings (line 215) | class YolosPatchEmbeddings(nn.Module): method __init__ (line 222) | def __init__(self, config): method forward (line 237) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class YolosSelfAttention (line 249) | class YolosSelfAttention(nn.Module): method __init__ (line 250) | def __init__(self, config: YolosConfig) -> None: method transpose_for_scores (line 268) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 273) | def forward( class YolosSdpaSelfAttention (line 310) | class YolosSdpaSelfAttention(YolosSelfAttention): method __init__ (line 311) | def __init__(self, config: YolosConfig) -> None: method forward (line 315) | def forward( class YolosSelfOutput (line 342) | class YolosSelfOutput(nn.Module): method __init__ (line 348) | def __init__(self, config: YolosConfig) -> None: method forward (line 353) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YolosAttention (line 361) | class YolosAttention(nn.Module): method __init__ (line 362) | def __init__(self, config: YolosConfig) -> None: method prune_heads (line 368) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 386) | def forward( class YolosSdpaAttention (line 401) | class YolosSdpaAttention(YolosAttention): method __init__ (line 402) | def __init__(self, config: YolosConfig) -> None: class YolosIntermediate (line 408) | class YolosIntermediate(nn.Module): method __init__ (line 409) | def __init__(self, config: YolosConfig) -> None: method forward (line 417) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class YolosOutput (line 425) | class YolosOutput(nn.Module): method __init__ (line 426) | def __init__(self, config: YolosConfig) -> None: method forward (line 431) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YolosLayer (line 444) | class YolosLayer(nn.Module): method __init__ (line 447) | def __init__(self, config: YolosConfig) -> None: method forward (line 457) | def forward( class YolosEncoder (line 486) | class YolosEncoder(nn.Module): method __init__ (line 487) | def __init__(self, config: YolosConfig) -> None: method forward (line 511) | def forward( class YolosPreTrainedModel (line 564) | class YolosPreTrainedModel(PreTrainedModel): method _init_weights (line 577) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... class YolosModel (line 628) | class YolosModel(YolosPreTrainedModel): method __init__ (line 629) | def __init__(self, config: YolosConfig, add_pooling_layer: bool = True): method get_input_embeddings (line 642) | def get_input_embeddings(self) -> YolosPatchEmbeddings: method _prune_heads (line 645) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 665) | def forward( class YolosPooler (line 716) | class YolosPooler(nn.Module): method __init__ (line 717) | def __init__(self, config: YolosConfig): method forward (line 722) | def forward(self, hidden_states): class YolosForObjectDetection (line 737) | class YolosForObjectDetection(YolosPreTrainedModel): method __init__ (line 738) | def __init__(self, config: YolosConfig): method _set_aux_loss (line 758) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 766) | def forward( function dice_loss (line 895) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 915) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class YolosLoss (line 947) | class YolosLoss(nn.Module): method __init__ (line 972) | def __init__(self, matcher, num_classes, eos_coef, losses): method loss_labels (line 983) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 1005) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 1020) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 1044) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 1077) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 1083) | def _get_target_permutation_idx(self, indices): method get_loss (line 1089) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 1100) | def forward(self, outputs, targets): class YolosMLPPredictionHead (line 1147) | class YolosMLPPredictionHead(nn.Module): method __init__ (line 1156) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 1162) | def forward(self, x): class YolosHungarianMatcher (line 1169) | class YolosHungarianMatcher(nn.Module): method __init__ (line 1186) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 1197) | def forward(self, outputs, targets): function _upcast (line 1248) | def _upcast(t: Tensor) -> Tensor: function box_area (line 1257) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 1274) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 1291) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 1316) | def _max_by_axis(the_list): class NestedTensor (line 1326) | class NestedTensor: method __init__ (line 1327) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 1331) | def to(self, device): method decompose (line 1340) | def decompose(self): method __repr__ (line 1343) | def __repr__(self): function nested_tensor_from_tensor_list (line 1348) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: mplsandbox_for_rl/transformers/src/transformers/models/yoso/configuration_yoso.py class YosoConfig (line 24) | class YosoConfig(PretrainedConfig): method __init__ (line 95) | def __init__( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/models/yoso/modeling_yoso.py function load_cuda_kernels (line 57) | def load_cuda_kernels(): function to_contiguous (line 72) | def to_contiguous(input_tensors): function normalize (line 86) | def normalize(input_tensors): function hashing (line 96) | def hashing(query, key, num_hash, hash_len): class YosoCumulation (line 115) | class YosoCumulation(torch.autograd.Function): method forward (line 117) | def forward(ctx, query_mask, key_mask, query, key, value, config): method backward (line 130) | def backward(ctx, grad): class YosoLSHCumulation (line 146) | class YosoLSHCumulation(torch.autograd.Function): method forward (line 148) | def forward(ctx, query_mask, key_mask, query, key, value, config): method backward (line 186) | def backward(ctx, grad): class YosoEmbeddings (line 236) | class YosoEmbeddings(nn.Module): method __init__ (line 239) | def __init__(self, config): method forward (line 261) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class YosoSelfAttention (line 296) | class YosoSelfAttention(nn.Module): method __init__ (line 297) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 348) | def transpose_for_scores(self, layer): method forward (line 353) | def forward(self, hidden_states, attention_mask=None, output_attention... class YosoSelfOutput (line 438) | class YosoSelfOutput(nn.Module): method __init__ (line 439) | def __init__(self, config): method forward (line 445) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YosoAttention (line 452) | class YosoAttention(nn.Module): method __init__ (line 453) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 459) | def prune_heads(self, heads): method forward (line 477) | def forward(self, hidden_states, attention_mask=None, output_attention... class YosoIntermediate (line 485) | class YosoIntermediate(nn.Module): method __init__ (line 486) | def __init__(self, config): method forward (line 494) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class YosoOutput (line 501) | class YosoOutput(nn.Module): method __init__ (line 502) | def __init__(self, config): method forward (line 508) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YosoLayer (line 515) | class YosoLayer(nn.Module): method __init__ (line 516) | def __init__(self, config): method forward (line 525) | def forward(self, hidden_states, attention_mask=None, output_attention... method feed_forward_chunk (line 538) | def feed_forward_chunk(self, attention_output): class YosoEncoder (line 544) | class YosoEncoder(nn.Module): method __init__ (line 545) | def __init__(self, config): method forward (line 551) | 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 _tie_weights (line 626) | def _tie_weights(self): method forward (line 629) | def forward(self, hidden_states): class YosoOnlyMLMHead (line 636) | class YosoOnlyMLMHead(nn.Module): method __init__ (line 637) | def __init__(self, config): method forward (line 641) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class YosoPreTrainedModel (line 646) | class YosoPreTrainedModel(PreTrainedModel): method _init_weights (line 656) | def _init_weights(self, module): class YosoModel (line 738) | class YosoModel(YosoPreTrainedModel): method __init__ (line 739) | def __init__(self, config): method get_input_embeddings (line 749) | def get_input_embeddings(self): method set_input_embeddings (line 752) | def set_input_embeddings(self, value): method _prune_heads (line 755) | def _prune_heads(self, heads_to_prune): method forward (line 769) | def forward( class YosoForMaskedLM (line 846) | class YosoForMaskedLM(YosoPreTrainedModel): method __init__ (line 849) | def __init__(self, config): method get_output_embeddings (line 858) | def get_output_embeddings(self): method set_output_embeddings (line 861) | def set_output_embeddings(self, new_embeddings): method forward (line 871) | def forward( class YosoClassificationHead (line 924) | class YosoClassificationHead(nn.Module): method __init__ (line 927) | def __init__(self, config): method forward (line 935) | def forward(self, features, **kwargs): class YosoForSequenceClassification (line 950) | class YosoForSequenceClassification(YosoPreTrainedModel): method __init__ (line 951) | def __init__(self, config): method forward (line 966) | def forward( class YosoForMultipleChoice (line 1041) | class YosoForMultipleChoice(YosoPreTrainedModel): method __init__ (line 1042) | def __init__(self, config): method forward (line 1058) | def forward( class YosoForTokenClassification (line 1132) | class YosoForTokenClassification(YosoPreTrainedModel): method __init__ (line 1133) | def __init__(self, config): method forward (line 1150) | def forward( class YosoForQuestionAnswering (line 1217) | class YosoForQuestionAnswering(YosoPreTrainedModel): method __init__ (line 1218) | def __init__(self, config): method forward (line 1236) | def forward( FILE: mplsandbox_for_rl/transformers/src/transformers/models/zoedepth/configuration_zoedepth.py class ZoeDepthConfig (line 29) | class ZoeDepthConfig(PretrainedConfig): method __init__ (line 137) | def __init__( FILE: mplsandbox_for_rl/transformers/src/transformers/models/zoedepth/convert_zoedepth_to_hf.py function get_zoedepth_config (line 37) | def get_zoedepth_config(model_name): function rename_key (line 75) | def rename_key(name): function read_in_q_k_v_metric_head (line 232) | def read_in_q_k_v_metric_head(state_dict): function convert_state_dict (line 257) | def convert_state_dict(orig_state_dict): function remove_ignore_keys (line 268) | def remove_ignore_keys(state_dict): function read_in_q_k_v (line 281) | def read_in_q_k_v(state_dict, config): function prepare_img (line 299) | def prepare_img(): function convert_zoedepth_checkpoint (line 306) | def convert_zoedepth_checkpoint(model_name, pytorch_dump_folder_path, pu... FILE: mplsandbox_for_rl/transformers/src/transformers/models/zoedepth/image_processing_zoedepth.py function get_resize_output_image_size (line 59) | def get_resize_output_image_size( class ZoeDepthImageProcessor (line 98) | class ZoeDepthImageProcessor(BaseImageProcessor): method __init__ (line 144) | def __init__( method resize (line 174) | def resize( method pad_image (line 243) | def pad_image( method preprocess (line 294) | def preprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/models/zoedepth/modeling_zoedepth.py class ZoeDepthDepthEstimatorOutput (line 45) | class ZoeDepthDepthEstimatorOutput(ModelOutput): class ZoeDepthReassembleStage (line 78) | class ZoeDepthReassembleStage(nn.Module): method __init__ (line 94) | def __init__(self, config): method forward (line 111) | def forward(self, hidden_states: List[torch.Tensor], patch_height, pat... class ZoeDepthReassembleLayer (line 152) | class ZoeDepthReassembleLayer(nn.Module): method __init__ (line 153) | def __init__(self, config, channels, factor): method forward (line 169) | def forward(self, hidden_state): class ZoeDepthFeatureFusionStage (line 176) | class ZoeDepthFeatureFusionStage(nn.Module): method __init__ (line 177) | def __init__(self, config): method forward (line 183) | def forward(self, hidden_states): class ZoeDepthPreActResidualLayer (line 200) | class ZoeDepthPreActResidualLayer(nn.Module): method __init__ (line 210) | def __init__(self, config): method forward (line 244) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class ZoeDepthFeatureFusionLayer (line 263) | class ZoeDepthFeatureFusionLayer(nn.Module): method __init__ (line 273) | def __init__(self, config, align_corners=True): method forward (line 283) | def forward(self, hidden_state, residual=None): class ZoeDepthNeck (line 300) | class ZoeDepthNeck(nn.Module): method __init__ (line 313) | def __init__(self, config): method forward (line 330) | def forward(self, hidden_states: List[torch.Tensor], patch_height, pat... class ZoeDepthRelativeDepthEstimationHead (line 354) | class ZoeDepthRelativeDepthEstimationHead(nn.Module): method __init__ (line 361) | def __init__(self, config): method forward (line 376) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: function log_binom (line 398) | def log_binom(n, k, eps=1e-7): class LogBinomialSoftmax (line 405) | class LogBinomialSoftmax(nn.Module): method __init__ (line 406) | def __init__(self, n_classes=256, act=torch.softmax): method forward (line 421) | def forward(self, probabilities, temperature=1.0, eps=1e-4): class ZoeDepthConditionalLogBinomialSoftmax (line 449) | class ZoeDepthConditionalLogBinomialSoftmax(nn.Module): method __init__ (line 450) | def __init__( method forward (line 487) | def forward(self, main_feature, condition_feature): class ZoeDepthSeedBinRegressor (line 516) | class ZoeDepthSeedBinRegressor(nn.Module): method __init__ (line 517) | def __init__(self, config, n_bins=16, mlp_dim=256, min_depth=1e-3, max... method forward (line 546) | def forward(self, x): function inv_attractor (line 573) | def inv_attractor(dx, alpha: float = 300, gamma: int = 2): class ZoeDepthAttractorLayer (line 592) | class ZoeDepthAttractorLayer(nn.Module): method __init__ (line 593) | def __init__( method forward (line 624) | def forward(self, x, prev_bin, prev_bin_embedding=None, interpolate=Tr... class ZoeDepthAttractorLayerUnnormed (line 687) | class ZoeDepthAttractorLayerUnnormed(nn.Module): method __init__ (line 688) | def __init__( method forward (line 717) | def forward(self, x, prev_bin, prev_bin_embedding=None, interpolate=Tr... class ZoeDepthProjector (line 771) | class ZoeDepthProjector(nn.Module): method __init__ (line 772) | def __init__(self, in_features, out_features, mlp_dim=128): method forward (line 789) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class ZoeDepthMultiheadAttention (line 798) | class ZoeDepthMultiheadAttention(nn.Module): method __init__ (line 802) | def __init__(self, hidden_size, num_attention_heads, dropout): method transpose_for_scores (line 822) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 827) | def forward( class ZoeDepthTransformerEncoderLayer (line 867) | class ZoeDepthTransformerEncoderLayer(nn.Module): method __init__ (line 868) | def __init__(self, config, dropout=0.1, activation="relu"): method forward (line 888) | def forward( class ZoeDepthPatchTransformerEncoder (line 903) | class ZoeDepthPatchTransformerEncoder(nn.Module): method __init__ (line 904) | def __init__(self, config): method positional_encoding_1d (line 923) | def positional_encoding_1d(self, batch_size, sequence_length, embeddin... method forward (line 941) | def forward(self, x): class ZoeDepthMLPClassifier (line 966) | class ZoeDepthMLPClassifier(nn.Module): method __init__ (line 967) | def __init__(self, in_features, out_features) -> None: method forward (line 975) | def forward(self, hidden_state): class ZoeDepthMultipleMetricDepthEstimationHeads (line 983) | class ZoeDepthMultipleMetricDepthEstimationHeads(nn.Module): method __init__ (line 988) | def __init__(self, config): method forward (line 1072) | def forward(self, outconv_activation, bottleneck, feature_blocks, rela... class ZoeDepthMetricDepthEstimationHead (line 1124) | class ZoeDepthMetricDepthEstimationHead(nn.Module): method __init__ (line 1125) | def __init__(self, config): method forward (line 1184) | def forward(self, outconv_activation, bottleneck, feature_blocks, rela... class ZoeDepthPreTrainedModel (line 1222) | class ZoeDepthPreTrainedModel(PreTrainedModel): method _init_weights (line 1233) | def _init_weights(self, module): class ZoeDepthForDepthEstimation (line 1280) | class ZoeDepthForDepthEstimation(ZoeDepthPreTrainedModel): method __init__ (line 1281) | def __init__(self, config): method forward (line 1308) | def forward( FILE: mplsandbox_for_rl/transformers/src/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 188) | def main(): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/onnx/convert.py function check_onnxruntime_requirements (line 53) | def check_onnxruntime_requirements(minimum_version: Version): function export_pytorch (line 82) | def export_pytorch( function export_tensorflow (line 185) | def export_tensorflow( function export (line 251) | def export( function validate_model_outputs (line 317) | def validate_model_outputs( function ensure_model_and_config_inputs_match (line 440) | def ensure_model_and_config_inputs_match( FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/optimization.py function _get_constant_lambda (line 36) | def _get_constant_lambda(_=None): function get_constant_schedule (line 40) | def get_constant_schedule(optimizer: Optimizer, last_epoch: int = -1): function get_reduce_on_plateau_schedule (line 57) | def get_reduce_on_plateau_schedule(optimizer: Optimizer, **kwargs): function _get_constant_schedule_with_warmup_lr_lambda (line 75) | def _get_constant_schedule_with_warmup_lr_lambda(current_step: int, *, n... function get_constant_schedule_with_warmup (line 81) | def get_constant_schedule_with_warmup(optimizer: Optimizer, num_warmup_s... function _get_linear_schedule_with_warmup_lr_lambda (line 102) | def _get_linear_schedule_with_warmup_lr_lambda(current_step: int, *, num... function get_linear_schedule_with_warmup (line 108) | def get_linear_schedule_with_warmup(optimizer, num_warmup_steps, num_tra... function _get_cosine_schedule_with_warmup_lr_lambda (line 135) | def _get_cosine_schedule_with_warmup_lr_lambda( function get_cosine_schedule_with_warmup (line 144) | def get_cosine_schedule_with_warmup( function _get_cosine_with_hard_restarts_schedule_with_warmup_lr_lambda (line 178) | def _get_cosine_with_hard_restarts_schedule_with_warmup_lr_lambda( function get_cosine_with_hard_restarts_schedule_with_warmup (line 189) | def get_cosine_with_hard_restarts_schedule_with_warmup( function _get_polynomial_decay_schedule_with_warmup_lr_lambda (line 222) | def _get_polynomial_decay_schedule_with_warmup_lr_lambda( function get_polynomial_decay_schedule_with_warmup (line 243) | def get_polynomial_decay_schedule_with_warmup( function _get_inverse_sqrt_schedule_lr_lambda (line 289) | def _get_inverse_sqrt_schedule_lr_lambda(current_step: int, *, num_warmu... function get_inverse_sqrt_schedule (line 297) | def get_inverse_sqrt_schedule( function _get_cosine_schedule_with_warmup_lr_lambda (line 327) | def _get_cosine_schedule_with_warmup_lr_lambda( function get_cosine_with_min_lr_schedule_with_warmup (line 338) | def get_cosine_with_min_lr_schedule_with_warmup( function _get_wsd_scheduler_lambda (line 390) | def _get_wsd_scheduler_lambda( function get_wsd_schedule (line 410) | def get_wsd_schedule( function get_scheduler (line 471) | def get_scheduler( class AdamW (line 558) | class AdamW(Optimizer): method __init__ (line 580) | def __init__( method step (line 610) | def step(self, closure: Callable = None): class Adafactor (line 672) | class Adafactor(Optimizer): method __init__ (line 757) | def __init__( method _get_lr (line 790) | def _get_lr(param_group, param_state): method _get_options (line 801) | def _get_options(param_group, param_shape): method _rms (line 807) | def _rms(tensor): method _approx_sq_grad (line 811) | def _approx_sq_grad(exp_avg_sq_row, exp_avg_sq_col): method step (line 819) | def step(self, closure=None): class AdafactorSchedule (line 913) | class AdafactorSchedule(LambdaLR): method __init__ (line 921) | def __init__(self, optimizer, initial_lr=0.0): method get_lr (line 931) | def get_lr(self): function get_adafactor_schedule (line 943) | def get_adafactor_schedule(optimizer, initial_lr=0.0): FILE: mplsandbox_for_rl/transformers/src/transformers/optimization_tf.py class WarmUp (line 38) | class WarmUp(schedules.LearningRateSchedule): method __init__ (line 56) | def __init__( method __call__ (line 71) | def __call__(self, step): method get_config (line 86) | def get_config(self): function create_optimizer (line 96) | def create_optimizer( class AdamWeightDecay (line 180) | class AdamWeightDecay(Adam): method __init__ (line 219) | def __init__( method from_config (line 238) | def from_config(cls, config): method _prepare_local (line 243) | def _prepare_local(self, var_device, var_dtype, apply_state): method _decay_weights_op (line 249) | def _decay_weights_op(self, var, learning_rate, apply_state): method apply_gradients (line 258) | def apply_gradients(self, grads_and_vars, name=None, **kwargs): method _get_lr (line 262) | def _get_lr(self, var_device, var_dtype, apply_state): method _resource_apply_dense (line 275) | def _resource_apply_dense(self, grad, var, apply_state=None): method _resource_apply_sparse (line 281) | def _resource_apply_sparse(self, grad, var, indices, apply_state=None): method get_config (line 287) | def get_config(self): method _do_use_weight_decay (line 292) | def _do_use_weight_decay(self, param_name): class GradientAccumulator (line 310) | class GradientAccumulator: method __init__ (line 321) | def __init__(self): method step (line 327) | def step(self): method gradients (line 340) | def gradients(self): method __call__ (line 346) | def __call__(self, gradients): method reset (line 372) | def reset(self): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/__init__.py function get_supported_tasks (line 454) | def get_supported_tasks() -> List[str]: function get_task (line 461) | def get_task(model: str, token: Optional[str] = None, **deprecated_kwarg... function check_task (line 488) | def check_task(task: str) -> Tuple[str, Dict, Any]: function clean_custom_task (line 536) | def clean_custom_task(task_info): function pipeline (line 552) | def pipeline( FILE: mplsandbox_for_rl/transformers/src/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 138) | def _sanitize_parameters(self, top_k=None, **kwargs): method preprocess (line 147) | def preprocess(self, inputs): method _forward (line 202) | def _forward(self, model_inputs): method postprocess (line 206) | def postprocess(self, model_outputs, top_k=5): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/audio_utils.py function ffmpeg_read (line 10) | def ffmpeg_read(bpayload: bytes, sampling_rate: int) -> np.array: function ffmpeg_microphone (line 49) | def ffmpeg_microphone( function ffmpeg_microphone_live (line 123) | def ffmpeg_microphone_live( function chunk_bytes_iter (line 207) | def chunk_bytes_iter(iterator, chunk_len: int, stride: Tuple[int, int], ... function _ffmpeg_stream (line 242) | def _ffmpeg_stream(ffmpeg_command, buflen: int): function _get_microphone_name (line 258) | def _get_microphone_name(): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/automatic_speech_recognition.py function rescale_stride (line 40) | def rescale_stride(stride, ratio): function chunk_iter (line 60) | def chunk_iter(inputs, feature_extractor, chunk_len, stride_left, stride... function _fast_find_longest_common_sequence (line 81) | def _fast_find_longest_common_sequence(sequence_left, sequence_right): function _find_longest_common_sequence (line 101) | def _find_longest_common_sequence(sequences, tokenizer): class AutomaticSpeechRecognitionPipeline (line 126) | class AutomaticSpeechRecognitionPipeline(ChunkPipeline): method __init__ (line 194) | def __init__( method __call__ (line 221) | def __call__( method _sanitize_parameters (line 286) | def _sanitize_parameters( method preprocess (line 350) | def preprocess(self, inputs, chunk_length_s=0, stride_length_s=None): method _forward (line 467) | def _forward(self, model_inputs, return_timestamps=False, **generate_k... method postprocess (line 550) | def postprocess( function _find_timestamp_sequence (line 643) | def _find_timestamp_sequence(sequences, tokenizer, feature_extractor, ma... FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/base.py function no_collate_fn (line 82) | def no_collate_fn(items): function _pad (line 88) | def _pad(items, key, padding_value, padding_side): function pad_collate_fn (line 141) | def pad_collate_fn(tokenizer, feature_extractor): function infer_framework_load_model (line 204) | def infer_framework_load_model( function infer_framework_from_model (line 309) | def infer_framework_from_model( function get_framework (line 348) | def get_framework(model, revision: Optional[str] = None): function get_default_model_and_revision (line 382) | def get_default_model_and_revision( class PipelineException (line 426) | class PipelineException(Exception): method __init__ (line 436) | def __init__(self, task: str, model: str, reason: str): class ArgumentHandler (line 443) | class ArgumentHandler(ABC): method __call__ (line 449) | def __call__(self, *args, **kwargs): class PipelineDataFormat (line 453) | class PipelineDataFormat: method __init__ (line 475) | def __init__( method __iter__ (line 499) | def __iter__(self): method save (line 503) | def save(self, data: Union[dict, List[dict]]): method save_binary (line 512) | def save_binary(self, data: Union[dict, List[dict]]) -> str: method from_str (line 531) | def from_str( class CsvPipelineDataFormat (line 566) | class CsvPipelineDataFormat(PipelineDataFormat): method __init__ (line 578) | def __init__( method __iter__ (line 587) | def __iter__(self): method save (line 596) | def save(self, data: List[dict]): class JsonPipelineDataFormat (line 610) | class JsonPipelineDataFormat(PipelineDataFormat): method __init__ (line 622) | def __init__( method __iter__ (line 634) | def __iter__(self): method save (line 641) | def save(self, data: dict): class PipedPipelineDataFormat (line 652) | class PipedPipelineDataFormat(PipelineDataFormat): method __iter__ (line 666) | def __iter__(self): method save (line 681) | def save(self, data: dict): method save_binary (line 690) | def save_binary(self, data: Union[dict, List[dict]]) -> str: class _ScikitCompat (line 700) | class _ScikitCompat(ABC): method transform (line 706) | def transform(self, X): method predict (line 710) | def predict(self, X): function build_pipeline_init_args (line 714) | def build_pipeline_init_args( class Pipeline (line 790) | class Pipeline(_ScikitCompat, PushToHubMixin): method __init__ (line 809) | def __init__( method save_pretrained (line 931) | def save_pretrained( method transform (line 1002) | def transform(self, X): method predict (line 1008) | def predict(self, X): method torch_dtype (line 1015) | def torch_dtype(self) -> Optional["torch.dtype"]: method device_placement (line 1022) | def device_placement(self): method ensure_tensor_on_device (line 1054) | def ensure_tensor_on_device(self, **inputs): method _ensure_tensor_on_device (line 1068) | def _ensure_tensor_on_device(self, inputs, device): method check_model_type (line 1086) | def check_model_type(self, supported_models: Union[List[str], dict]): method _sanitize_parameters (line 1116) | def _sanitize_parameters(self, **pipeline_parameters): method preprocess (line 1129) | def preprocess(self, input_: Any, **preprocess_parameters: Dict) -> Di... method _forward (line 1137) | def _forward(self, input_tensors: Dict[str, GenericTensor], **forward_... method postprocess (line 1150) | def postprocess(self, model_outputs: ModelOutput, **postprocess_parame... method get_inference_context (line 1158) | def get_inference_context(self): method forward (line 1161) | def forward(self, model_inputs, **forward_params): method get_iterator (line 1176) | def get_iterator( method __call__ (line 1201) | def __call__(self, inputs, *args, num_workers=None, batch_size=None, *... method run_multi (line 1265) | def run_multi(self, inputs, preprocess_params, forward_params, postpro... method run_single (line 1268) | def run_single(self, inputs, preprocess_params, forward_params, postpr... method iterate (line 1274) | def iterate(self, inputs, preprocess_params, forward_params, postproce... class ChunkPipeline (line 1288) | class ChunkPipeline(Pipeline): method run_single (line 1289) | def run_single(self, inputs, preprocess_params, forward_params, postpr... method get_iterator (line 1297) | def get_iterator( class PipelineRegistry (line 1320) | class PipelineRegistry: method __init__ (line 1321) | def __init__(self, supported_tasks: Dict[str, Any], task_aliases: Dict... method get_supported_tasks (line 1325) | def get_supported_tasks(self) -> List[str]: method check_task (line 1330) | def check_task(self, task: str) -> Tuple[str, Dict, Any]: method register_pipeline (line 1349) | def register_pipeline( method to_dict (line 1384) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/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, timeout=None, **kwargs): method preprocess (line 90) | def preprocess(self, image, timeout=None): method _forward (line 98) | def _forward(self, model_inputs): method postprocess (line 102) | def postprocess(self, model_outputs): FILE: mplsandbox_for_rl/transformers/src/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 194) | def __call__( method preprocess (line 273) | def preprocess( method _forward (line 425) | def _forward(self, model_inputs, **generate_kwargs): method postprocess (line 444) | def postprocess(self, model_outputs, top_k=1, **kwargs): method postprocess_encoder_decoder_single (line 453) | def postprocess_encoder_decoder_single(self, model_outputs, **kwargs): method postprocess_extractive_qa (line 469) | def postprocess_extractive_qa( FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/feature_extraction.py class FeatureExtractionPipeline (line 15) | class FeatureExtractionPipeline(Pipeline): method _sanitize_parameters (line 40) | def _sanitize_parameters(self, truncation=None, tokenize_kwargs=None, ... method preprocess (line 59) | def preprocess(self, inputs, **tokenize_kwargs) -> Dict[str, GenericTe... method _forward (line 63) | def _forward(self, model_inputs): method postprocess (line 67) | def postprocess(self, model_outputs, return_tensors=False): method __call__ (line 76) | def __call__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/fill_mask.py class FillMaskPipeline (line 34) | class FillMaskPipeline(Pipeline): method get_masked_index (line 87) | def get_masked_index(self, input_ids: GenericTensor) -> np.ndarray: method _ensure_exactly_one_mask_token (line 96) | def _ensure_exactly_one_mask_token(self, input_ids: GenericTensor) -> ... method ensure_exactly_one_mask_token (line 106) | def ensure_exactly_one_mask_token(self, model_inputs: GenericTensor): method preprocess (line 114) | def preprocess( method _forward (line 126) | def _forward(self, model_inputs): method postprocess (line 131) | def postprocess(self, model_outputs, top_k=5, target_ids=None): method get_target_ids (line 186) | def get_target_ids(self, targets, top_k=None): method _sanitize_parameters (line 227) | def _sanitize_parameters(self, top_k=None, targets=None, tokenizer_kwa... method __call__ (line 248) | def __call__(self, inputs, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/image_classification.py function sigmoid (line 34) | def sigmoid(_outputs): function softmax (line 39) | def softmax(_outputs): class ClassificationFunction (line 46) | class ClassificationFunction(ExplicitEnum): class ImageClassificationPipeline (line 64) | class ImageClassificationPipeline(Pipeline): method __init__ (line 90) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 99) | def _sanitize_parameters(self, top_k=None, function_to_apply=None, tim... method __call__ (line 112) | def __call__(self, images: Union[str, List[str], "Image.Image", List["... method preprocess (line 161) | def preprocess(self, image, timeout=None): method _forward (line 168) | def _forward(self, model_inputs): method postprocess (line 172) | def postprocess(self, model_outputs, function_to_apply=None, top_k=5): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/image_feature_extraction.py class ImageFeatureExtractionPipeline (line 21) | class ImageFeatureExtractionPipeline(Pipeline): method _sanitize_parameters (line 46) | def _sanitize_parameters(self, image_processor_kwargs=None, return_ten... method preprocess (line 60) | def preprocess(self, image, timeout=None, **image_processor_kwargs) ->... method _forward (line 67) | def _forward(self, model_inputs): method postprocess (line 71) | def postprocess(self, model_outputs, pool=None, return_tensors=False): method __call__ (line 91) | def __call__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/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 80) | def _sanitize_parameters(self, **kwargs): method __call__ (line 97) | def __call__(self, images, **kwargs) -> Union[Predictions, List[Predic... method preprocess (line 141) | def preprocess(self, image, subtask=None, timeout=None): method _forward (line 165) | def _forward(self, model_inputs): method postprocess (line 171) | def postprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/image_to_image.py class ImageToImagePipeline (line 40) | class ImageToImagePipeline(Pipeline): method __init__ (line 70) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 75) | def _sanitize_parameters(self, **kwargs): method __call__ (line 87) | def __call__( method _forward (line 115) | def _forward(self, model_inputs): method preprocess (line 119) | def preprocess(self, image, timeout=None): method postprocess (line 126) | def postprocess(self, model_outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/image_to_text.py class ImageToTextPipeline (line 46) | class ImageToTextPipeline(Pipeline): method __init__ (line 69) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 76) | def _sanitize_parameters(self, max_new_tokens=None, generate_kwargs=No... method __call__ (line 97) | def __call__(self, images: Union[str, List[str], "Image.Image", List["... method preprocess (line 127) | def preprocess(self, image, prompt=None, timeout=None): method _forward (line 174) | def _forward(self, model_inputs, **generate_kwargs): method postprocess (line 192) | def postprocess(self, model_outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/mask_generation.py class MaskGenerationPipeline (line 33) | class MaskGenerationPipeline(ChunkPipeline): method __init__ (line 84) | def __init__(self, **kwargs): method _sanitize_parameters (line 94) | def _sanitize_parameters(self, **kwargs): method __call__ (line 128) | def __call__(self, image, *args, num_workers=None, batch_size=None, **... method preprocess (line 168) | def preprocess( method _forward (line 216) | def _forward( method postprocess (line 254) | def postprocess( FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/object_detection.py class ObjectDetectionPipeline (line 27) | class ObjectDetectionPipeline(Pipeline): method __init__ (line 52) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 63) | def _sanitize_parameters(self, **kwargs): method __call__ (line 72) | def __call__(self, *args, **kwargs) -> Union[Predictions, List[Predict... method preprocess (line 106) | def preprocess(self, image, timeout=None): method _forward (line 117) | def _forward(self, model_inputs): method postprocess (line 125) | def postprocess(self, model_outputs, threshold=0.5): method _get_bounding_box (line 170) | def _get_bounding_box(self, box: "torch.Tensor") -> Dict[str, int]: FILE: mplsandbox_for_rl/transformers/src/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 154) | class PipelineChunkIterator(PipelineIterator): method __init__ (line 155) | def __init__(self, loader, infer, params, loader_batch_size=None): method __iter__ (line 175) | def __iter__(self): method __next__ (line 180) | def __next__(self): class PipelinePackIterator (line 199) | class PipelinePackIterator(PipelineIterator): method __iter__ (line 245) | def __iter__(self): method __next__ (line 249) | def __next__(self): class KeyDataset (line 299) | class KeyDataset(Dataset): method __init__ (line 300) | def __init__(self, dataset: Dataset, key: str): method __len__ (line 304) | def __len__(self): method __getitem__ (line 307) | def __getitem__(self, i): class KeyPairDataset (line 311) | class KeyPairDataset(Dataset): method __init__ (line 312) | def __init__(self, dataset: Dataset, key1: str, key2: str): method __len__ (line 317) | def __len__(self): method __getitem__ (line 320) | def __getitem__(self, i): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/question_answering.py function decode_spans (line 46) | def decode_spans( function select_starts_ends (line 96) | def select_starts_ends( class QuestionAnsweringArgumentHandler (line 150) | class QuestionAnsweringArgumentHandler(ArgumentHandler): method normalize (line 159) | def normalize(self, item): method __call__ (line 174) | def __call__(self, *args, **kwargs): class QuestionAnsweringPipeline (line 225) | class QuestionAnsweringPipeline(ChunkPipeline): method __init__ (line 253) | def __init__( method create_sample (line 279) | def create_sample( method _sanitize_parameters (line 300) | def _sanitize_parameters( method __call__ (line 343) | def __call__(self, *args, **kwargs): method preprocess (line 396) | def preprocess(self, example, padding="do_not_pad", doc_stride=None, m... method _forward (line 513) | def _forward(self, inputs): method postprocess (line 527) | def postprocess( method get_indices (line 612) | def get_indices( method span_to_answer (line 630) | def span_to_answer(self, text: str, start: int, end: int) -> Dict[str,... FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/table_question_answering.py class TableQuestionAnsweringArgumentHandler (line 32) | class TableQuestionAnsweringArgumentHandler(ArgumentHandler): method __call__ (line 37) | def __call__(self, table=None, query=None, **kwargs): class TableQuestionAnsweringPipeline (line 86) | class TableQuestionAnsweringPipeline(Pipeline): method __init__ (line 119) | def __init__(self, args_parser=TableQuestionAnsweringArgumentHandler()... method batch_inference (line 136) | def batch_inference(self, **inputs): method sequential_inference (line 139) | def sequential_inference(self, **inputs): method __call__ (line 269) | def __call__(self, *args, **kwargs): method _sanitize_parameters (line 351) | def _sanitize_parameters(self, sequential=None, padding=None, truncati... method preprocess (line 363) | def preprocess(self, pipeline_input, sequential=None, padding=True, tr... method _forward (line 379) | def _forward(self, model_inputs, sequential=False, **generate_kwargs): method postprocess (line 392) | def postprocess(self, model_outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/text2text_generation.py class ReturnType (line 20) | class ReturnType(enum.Enum): class Text2TextGenerationPipeline (line 26) | class Text2TextGenerationPipeline(Pipeline): method __init__ (line 66) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 75) | def _sanitize_parameters( method check_inputs (line 111) | def check_inputs(self, input_length: int, min_length: int, max_length:... method _parse_and_tokenize (line 117) | def _parse_and_tokenize(self, *args, truncation): method __call__ (line 138) | def __call__(self, *args, **kwargs): method preprocess (line 176) | def preprocess(self, inputs, truncation=TruncationStrategy.DO_NOT_TRUN... method _forward (line 180) | def _forward(self, model_inputs, **generate_kwargs): method postprocess (line 199) | def postprocess(self, model_outputs, return_type=ReturnType.TEXT, clea... class SummarizationPipeline (line 217) | class SummarizationPipeline(Text2TextGenerationPipeline): method __call__ (line 245) | def __call__(self, *args, **kwargs): method check_inputs (line 271) | def check_inputs(self, input_length: int, min_length: int, max_length:... class TranslationPipeline (line 287) | class TranslationPipeline(Text2TextGenerationPipeline): method check_inputs (line 309) | def check_inputs(self, input_length: int, min_length: int, max_length:... method preprocess (line 317) | def preprocess(self, *args, truncation=TruncationStrategy.DO_NOT_TRUNC... method _sanitize_parameters (line 325) | def _sanitize_parameters(self, src_lang=None, tgt_lang=None, **kwargs): method __call__ (line 341) | def __call__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/text_classification.py function sigmoid (line 18) | def sigmoid(_outputs): function softmax (line 22) | def softmax(_outputs): class ClassificationFunction (line 28) | 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, inputs, **kwargs): method preprocess (line 165) | def preprocess(self, inputs, **tokenizer_kwargs) -> Dict[str, GenericT... method _forward (line 182) | def _forward(self, model_inputs): method postprocess (line 189) | def postprocess(self, model_outputs, function_to_apply=None, top_k=1, ... FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/text_generation.py class ReturnType (line 19) | class ReturnType(enum.Enum): class Chat (line 25) | class Chat: method __init__ (line 30) | def __init__(self, messages: Dict): class TextGenerationPipeline (line 38) | class TextGenerationPipeline(Pipeline): method __init__ (line 95) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 122) | def _sanitize_parameters( method _parse_and_tokenize (line 199) | def _parse_and_tokenize(self, *args, **kwargs): method __call__ (line 209) | def __call__(self, text_inputs, **kwargs): method preprocess (line 264) | def preprocess( method _forward (line 320) | def _forward(self, model_inputs, **generate_kwargs): method postprocess (line 359) | def postprocess(self, model_outputs, return_type=ReturnType.FULL_TEXT,... FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/text_to_audio.py class TextToAudioPipeline (line 27) | class TextToAudioPipeline(Pipeline): method __init__ (line 76) | def __init__(self, *args, vocoder=None, sampling_rate=None, **kwargs): method preprocess (line 107) | def preprocess(self, text, **kwargs): method _forward (line 130) | def _forward(self, model_inputs, **kwargs): method __call__ (line 160) | def __call__(self, text_inputs: Union[str, List[str]], **forward_params): method _sanitize_parameters (line 184) | def _sanitize_parameters( method postprocess (line 201) | def postprocess(self, waveform): FILE: mplsandbox_for_rl/transformers/src/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 95) | class TokenClassificationPipeline(ChunkPipeline): method __init__ (line 134) | def __init__(self, args_parser=TokenClassificationArgumentHandler(), *... method _sanitize_parameters (line 145) | def _sanitize_parameters( method __call__ (line 218) | def __call__(self, inputs: Union[str, List[str]], **kwargs): method preprocess (line 250) | def preprocess(self, sentence, offset_mapping=None, **preprocess_params): method _forward (line 276) | def _forward(self, model_inputs): method postprocess (line 297) | def postprocess(self, all_outputs, aggregation_strategy=AggregationStr... method aggregate_overlapping_entities (line 335) | def aggregate_overlapping_entities(self, entities): method gather_pre_entities (line 355) | def gather_pre_entities( method aggregate (line 417) | def aggregate(self, pre_entities: List[dict], aggregation_strategy: Ag... method aggregate_word (line 439) | def aggregate_word(self, entities: List[dict], aggregation_strategy: A... method aggregate_words (line 469) | 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: mplsandbox_for_rl/transformers/src/transformers/pipelines/video_classification.py class VideoClassificationPipeline (line 28) | class VideoClassificationPipeline(Pipeline): method __init__ (line 40) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 45) | def _sanitize_parameters(self, top_k=None, num_frames=None, frame_samp... method __call__ (line 57) | def __call__(self, videos: Union[str, List[str]], **kwargs): method preprocess (line 92) | def preprocess(self, video, num_frames=None, frame_sampling_rate=1): method _forward (line 113) | def _forward(self, model_inputs): method postprocess (line 117) | def postprocess(self, model_outputs, top_k=5): function read_video_pyav (line 132) | def read_video_pyav(container, indices): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/visual_question_answering.py class VisualQuestionAnsweringPipeline (line 20) | class VisualQuestionAnsweringPipeline(Pipeline): method __init__ (line 55) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 59) | def _sanitize_parameters(self, top_k=None, padding=None, truncation=No... method __call__ (line 71) | def __call__( method preprocess (line 149) | def preprocess(self, inputs, padding=False, truncation=False, timeout=... method _forward (line 163) | def _forward(self, model_inputs, **generate_kwargs): method postprocess (line 170) | def postprocess(self, model_outputs, top_k=5): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/zero_shot_audio_classification.py class ZeroShotAudioClassificationPipeline (line 33) | class ZeroShotAudioClassificationPipeline(Pipeline): method __init__ (line 63) | def __init__(self, **kwargs): method __call__ (line 70) | def __call__(self, audios: Union[np.ndarray, bytes, str], **kwargs): method _sanitize_parameters (line 94) | def _sanitize_parameters(self, **kwargs): method preprocess (line 103) | def preprocess(self, audio, candidate_labels=None, hypothesis_template... method _forward (line 132) | def _forward(self, model_inputs): method postprocess (line 149) | def postprocess(self, model_outputs): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/zero_shot_classification.py class ZeroShotClassificationArgumentHandler (line 14) | class ZeroShotClassificationArgumentHandler(ArgumentHandler): method _parse_labels (line 20) | def _parse_labels(self, labels): method __call__ (line 25) | def __call__(self, sequences, labels, hypothesis_template): class ZeroShotClassificationPipeline (line 47) | class ZeroShotClassificationPipeline(ChunkPipeline): method __init__ (line 87) | def __init__(self, args_parser=ZeroShotClassificationArgumentHandler()... method entailment_id (line 97) | def entailment_id(self): method _parse_and_tokenize (line 103) | def _parse_and_tokenize( method _sanitize_parameters (line 145) | def _sanitize_parameters(self, **kwargs): method __call__ (line 163) | def __call__( method preprocess (line 208) | def preprocess(self, inputs, candidate_labels=None, hypothesis_templat... method _forward (line 221) | def _forward(self, inputs): method postprocess (line 239) | def postprocess(self, model_outputs, multi_label=False): FILE: mplsandbox_for_rl/transformers/src/transformers/pipelines/zero_shot_image_classification.py class ZeroShotImageClassificationPipeline (line 33) | class ZeroShotImageClassificationPipeline(Pipeline): method __init__ (line 66) | def __init__(self, **kwargs): method __call__ (line 76) | def __call__(self, images: Union[str, List[str], "Image", List["Image"... method _sanitize_parameters (line 109) | def _sanitize_parameters(self, **kwargs): method preprocess (line 120) | def preprocess(self, image, candidate_labels=None, hypothesis_template... method _forward (line 132) | def _forward(self, model_inputs): method postprocess (line 149) | def postprocess(self, model_outputs): FILE: mplsandbox_for_rl/transformers/src/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 138) | def _sanitize_parameters(self, **kwargs): method preprocess (line 149) | def preprocess(self, inputs, timeout=None): method _forward (line 169) | def _forward(self, model_inputs): method postprocess (line 179) | def postprocess(self, model_outputs, threshold=0.1, top_k=None): method _get_bounding_box (line 201) | def _get_bounding_box(self, box: "torch.Tensor") -> Dict[str, int]: FILE: mplsandbox_for_rl/transformers/src/transformers/processing_utils.py class TextKwargs (line 71) | class TextKwargs(TypedDict, total=False): class ImagesKwargs (line 126) | class ImagesKwargs(TypedDict, total=False): class VideosKwargs (line 178) | class VideosKwargs(TypedDict, total=False): class AudioKwargs (line 226) | class AudioKwargs(TypedDict, total=False): class CommonKwargs (line 265) | class CommonKwargs(TypedDict, total=False): class ProcessingKwargs (line 269) | class ProcessingKwargs(TextKwargs, ImagesKwargs, VideosKwargs, AudioKwar... class ProcessorMixin (line 313) | class ProcessorMixin(PushToHubMixin): method __init__ (line 327) | def __init__(self, *args, **kwargs): method to_dict (line 365) | def to_dict(self) -> Dict[str, Any]: method to_json_string (line 403) | def to_json_string(self) -> str: method to_json_file (line 414) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method __repr__ (line 425) | def __repr__(self): method save_pretrained (line 430) | def save_pretrained(self, save_directory, push_to_hub: bool = False, *... method get_processor_dict (line 530) | def get_processor_dict( method from_args_and_dict (line 683) | def from_args_and_dict(cls, args, processor_dict: Dict[str, Any], **kw... method _merge_kwargs (line 728) | def _merge_kwargs( method from_pretrained (line 834) | def from_pretrained( method register_for_auto_class (line 898) | def register_for_auto_class(cls, auto_class="AutoProcessor"): method _get_arguments_from_pretrained (line 924) | def _get_arguments_from_pretrained(cls, pretrained_model_name_or_path,... method model_input_names (line 942) | def model_input_names(self): method validate_init_kwargs (line 947) | def validate_init_kwargs(processor_config, valid_kwargs): method apply_chat_template (line 959) | def apply_chat_template( FILE: mplsandbox_for_rl/transformers/src/transformers/pytorch_utils.py function softmax_backward_data (line 40) | def softmax_backward_data(parent, grad_output, output, dim, self): function prune_linear_layer (line 51) | def prune_linear_layer(layer: nn.Linear, index: torch.LongTensor, dim: i... class Conv1D (line 85) | class Conv1D(nn.Module): method __init__ (line 96) | def __init__(self, nf, nx): method __repr__ (line 104) | def __repr__(self) -> str: method forward (line 107) | def forward(self, x): function prune_conv1d_layer (line 114) | def prune_conv1d_layer(layer: Conv1D, index: torch.LongTensor, dim: int ... function prune_layer (line 147) | def prune_layer( function apply_chunking_to_forward (line 171) | def apply_chunking_to_forward( function find_pruneable_heads_and_indices (line 249) | def find_pruneable_heads_and_indices( function meshgrid (line 276) | def meshgrid( function id_tensor_storage (line 287) | def id_tensor_storage(tensor: torch.Tensor) -> Tuple[torch.device, int, ... FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/auto.py class AutoQuantizationConfig (line 70) | class AutoQuantizationConfig: method from_dict (line 77) | def from_dict(cls, quantization_config_dict: Dict): method from_pretrained (line 98) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): class AutoHfQuantizer (line 111) | class AutoHfQuantizer: method from_config (line 118) | def from_config(cls, quantization_config: Union[QuantizationConfigMixi... method from_pretrained (line 143) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method merge_quantization_configs (line 148) | def merge_quantization_configs( FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/base.py class HfQuantizer (line 28) | class HfQuantizer(ABC): method __init__ (line 52) | def __init__(self, quantization_config: QuantizationConfigMixin, **kwa... method update_torch_dtype (line 66) | def update_torch_dtype(self, torch_dtype: "torch.dtype") -> "torch.dty... method update_device_map (line 78) | def update_device_map(self, device_map: Optional[Dict[str, Any]]) -> O... method adjust_target_dtype (line 90) | def adjust_target_dtype(self, torch_dtype: "torch.dtype") -> "torch.dt... method update_missing_keys (line 102) | def update_missing_keys(self, model, missing_keys: List[str], prefix: ... method get_special_dtypes_update (line 112) | def get_special_dtypes_update(self, model, torch_dtype: "torch.dtype")... method adjust_max_memory (line 131) | def adjust_max_memory(self, max_memory: Dict[str, Union[int, str]]) ->... method check_quantized_param (line 135) | def check_quantized_param( method create_quantized_param (line 150) | def create_quantized_param(self, *args, **kwargs) -> "torch.nn.Paramet... method validate_environment (line 160) | def validate_environment(self, *args, **kwargs): method preprocess_model (line 168) | def preprocess_model(self, model: "PreTrainedModel", **kwargs): method postprocess_model (line 184) | def postprocess_model(self, model: "PreTrainedModel", **kwargs): method dequantize (line 197) | def dequantize(self, model): method _dequantize (line 209) | def _dequantize(self, model): method _process_model_before_weight_loading (line 215) | def _process_model_before_weight_loading(self, model, **kwargs): ... method _process_model_after_weight_loading (line 218) | def _process_model_after_weight_loading(self, model, **kwargs): ... method is_serializable (line 222) | def is_serializable(self): ... method is_trainable (line 226) | def is_trainable(self): ... FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_aqlm.py class AqlmHfQuantizer (line 36) | class AqlmHfQuantizer(HfQuantizer): method __init__ (line 45) | def __init__(self, quantization_config: QuantizationConfigMixin, **kwa... method validate_environment (line 49) | def validate_environment(self, *args, **kwargs): method update_torch_dtype (line 56) | def update_torch_dtype(self, torch_dtype: "torch.dtype") -> "torch.dty... method _process_model_before_weight_loading (line 70) | def _process_model_before_weight_loading( method _process_model_after_weight_loading (line 82) | def _process_model_after_weight_loading(self, model: "PreTrainedModel"... method is_trainable (line 86) | def is_trainable(self, model: Optional["PreTrainedModel"] = None): method is_serializable (line 97) | def is_serializable(self): FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_awq.py class AwqQuantizer (line 35) | class AwqQuantizer(HfQuantizer): method __init__ (line 45) | def __init__(self, quantization_config, **kwargs): method validate_environment (line 48) | def validate_environment(self, device_map, **kwargs): method update_torch_dtype (line 70) | def update_torch_dtype(self, torch_dtype): method _process_model_before_weight_loading (line 77) | def _process_model_before_weight_loading(self, model: "PreTrainedModel... method _process_model_after_weight_loading (line 97) | def _process_model_after_weight_loading(self, model): method is_serializable (line 110) | def is_serializable(self): method is_trainable (line 123) | def is_trainable(self): FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_bnb_4bit.py class Bnb4BitHfQuantizer (line 43) | class Bnb4BitHfQuantizer(HfQuantizer): method __init__ (line 60) | def __init__(self, quantization_config, **kwargs): method validate_environment (line 66) | def validate_environment(self, *args, **kwargs): method adjust_target_dtype (line 109) | def adjust_target_dtype(self, target_dtype: "torch.dtype") -> "torch.d... method check_quantized_param (line 124) | def check_quantized_param( method create_quantized_param (line 145) | def create_quantized_param( method adjust_max_memory (line 230) | def adjust_max_memory(self, max_memory: Dict[str, Union[int, str]]) ->... method update_torch_dtype (line 236) | def update_torch_dtype(self, torch_dtype: "torch.dtype") -> "torch.dty... method update_device_map (line 250) | def update_device_map(self, device_map): method _process_model_before_weight_loading (line 261) | def _process_model_before_weight_loading( method _process_model_after_weight_loading (line 303) | def _process_model_after_weight_loading(self, model: "PreTrainedModel"... method is_serializable (line 309) | def is_serializable(self): method is_trainable (line 322) | def is_trainable(self) -> bool: method _dequantize (line 325) | def _dequantize(self, model): FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_bnb_8bit.py class Bnb8BitHfQuantizer (line 43) | class Bnb8BitHfQuantizer(HfQuantizer): method __init__ (line 60) | def __init__(self, quantization_config, **kwargs): method validate_environment (line 66) | def validate_environment(self, *args, **kwargs): method adjust_max_memory (line 110) | def adjust_max_memory(self, max_memory: Dict[str, Union[int, str]]) ->... method update_torch_dtype (line 115) | def update_torch_dtype(self, torch_dtype: "torch.dtype") -> "torch.dty... method update_device_map (line 128) | def update_device_map(self, device_map): method adjust_target_dtype (line 138) | def adjust_target_dtype(self, target_dtype: "torch.dtype") -> "torch.d... method check_quantized_param (line 143) | def check_quantized_param( method create_quantized_param (line 165) | def create_quantized_param( method _process_model_after_weight_loading (line 228) | def _process_model_after_weight_loading(self, model: "PreTrainedModel"... method _process_model_before_weight_loading (line 233) | def _process_model_before_weight_loading( method is_serializable (line 275) | def is_serializable(self): method is_trainable (line 291) | def is_trainable(self) -> bool: method _dequantize (line 294) | def _dequantize(self, model): FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_eetq.py class EetqHfQuantizer (line 33) | class EetqHfQuantizer(HfQuantizer): method __init__ (line 45) | def __init__(self, quantization_config, **kwargs): method validate_environment (line 49) | def validate_environment(self, *args, **kwargs): method update_torch_dtype (line 81) | def update_torch_dtype(self, torch_dtype: "torch.dtype") -> "torch.dty... method check_quantized_param (line 95) | def check_quantized_param( method create_quantized_param (line 118) | def create_quantized_param( method _process_model_after_weight_loading (line 138) | def _process_model_after_weight_loading(self, model: "PreTrainedModel"... method _process_model_before_weight_loading (line 141) | def _process_model_before_weight_loading( method is_serializable (line 165) | def is_serializable(self): method is_trainable (line 169) | def is_trainable(self) -> bool: FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_fbgemm_fp8.py class FbgemmFp8HfQuantizer (line 36) | class FbgemmFp8HfQuantizer(HfQuantizer): method __init__ (line 46) | def __init__(self, quantization_config, **kwargs): method validate_environment (line 50) | def validate_environment(self, *args, **kwargs): method update_torch_dtype (line 95) | def update_torch_dtype(self, torch_dtype: "torch.dtype") -> "torch.dty... method check_quantized_param (line 112) | def check_quantized_param( method create_quantized_param (line 135) | def create_quantized_param( method _process_model_after_weight_loading (line 158) | def _process_model_after_weight_loading(self, model: "PreTrainedModel"... method _process_model_before_weight_loading (line 161) | def _process_model_before_weight_loading( method update_missing_keys (line 184) | def update_missing_keys(self, model, missing_keys: List[str], prefix: ... method is_serializable (line 200) | def is_serializable(self): method is_trainable (line 204) | def is_trainable(self) -> bool: FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_gptq.py class GptqHfQuantizer (line 35) | class GptqHfQuantizer(HfQuantizer): method __init__ (line 45) | def __init__(self, quantization_config: QuantizationConfigMixin, **kwa... method validate_environment (line 51) | def validate_environment(self, *args, **kwargs): method update_torch_dtype (line 64) | def update_torch_dtype(self, torch_dtype: "torch.dtype") -> "torch.dty... method _process_model_before_weight_loading (line 71) | def _process_model_before_weight_loading(self, model: "PreTrainedModel... method _process_model_after_weight_loading (line 78) | def _process_model_after_weight_loading(self, model: "PreTrainedModel"... method is_trainable (line 89) | def is_trainable(self, model: Optional["PreTrainedModel"] = None): method is_serializable (line 93) | def is_serializable(self): FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_hqq.py function find_parent (line 37) | def find_parent(model, name): class HqqHfQuantizer (line 45) | class HqqHfQuantizer(HfQuantizer): method __init__ (line 57) | def __init__(self, quantization_config, **kwargs): method validate_environment (line 62) | def validate_environment(self, *args, **kwargs): method check_quantized_param (line 94) | def check_quantized_param( method create_quantized_param (line 106) | def create_quantized_param( method _patch_layer_for_multigpu (line 164) | def _patch_layer_for_multigpu(self, hqq_layer): method _process_model_before_weight_loading (line 176) | def _process_model_before_weight_loading( method _process_model_after_weight_loading (line 189) | def _process_model_after_weight_loading(self, model: "PreTrainedModel"... method is_serializable (line 195) | def is_serializable(self): method is_trainable (line 199) | def is_trainable(self) -> bool: FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_quanto.py class QuantoHfQuantizer (line 36) | class QuantoHfQuantizer(HfQuantizer): method __init__ (line 45) | def __init__(self, quantization_config: QuantoConfig, **kwargs): method post_init (line 49) | def post_init(self): method validate_environment (line 59) | def validate_environment(self, *args, **kwargs): method update_device_map (line 67) | def update_device_map(self, device_map): method update_torch_dtype (line 77) | def update_torch_dtype(self, torch_dtype: "torch.dtype") -> "torch.dty... method update_missing_keys (line 83) | def update_missing_keys(self, model, missing_keys: List[str], prefix: ... method check_quantized_param (line 98) | def check_quantized_param( method adjust_max_memory (line 128) | def adjust_max_memory(self, max_memory: Dict[str, Union[int, str]]) ->... method create_quantized_param (line 132) | def create_quantized_param( method adjust_target_dtype (line 151) | def adjust_target_dtype(self, target_dtype: "torch.dtype") -> "torch.d... method _process_model_before_weight_loading (line 170) | def _process_model_before_weight_loading( method _process_model_after_weight_loading (line 191) | def _process_model_after_weight_loading(self, model): method is_trainable (line 195) | def is_trainable(self, model: Optional["PreTrainedModel"] = None): method is_serializable (line 199) | def is_serializable(self): FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizer_torchao.py function find_parent (line 41) | def find_parent(model, name): class TorchAoHfQuantizer (line 49) | class TorchAoHfQuantizer(HfQuantizer): method __init__ (line 58) | def __init__(self, quantization_config, **kwargs): method validate_environment (line 61) | def validate_environment(self, *args, **kwargs): method update_torch_dtype (line 77) | def update_torch_dtype(self, torch_dtype): method adjust_target_dtype (line 90) | def adjust_target_dtype(self, target_dtype: "torch.dtype") -> "torch.d... method adjust_max_memory (line 107) | def adjust_max_memory(self, max_memory: Dict[str, Union[int, str]]) ->... method _process_model_before_weight_loading (line 112) | def _process_model_before_weight_loading(self, model: "PreTrainedModel... method check_quantized_param (line 122) | def check_quantized_param( method create_quantized_param (line 142) | def create_quantized_param( method _process_model_after_weight_loading (line 159) | def _process_model_after_weight_loading(self, model): method is_serializable (line 164) | def is_serializable(self): method is_trainable (line 168) | def is_trainable(self): FILE: mplsandbox_for_rl/transformers/src/transformers/quantizers/quantizers_utils.py function get_module_from_name (line 17) | def get_module_from_name(module, tensor_name: str) -> Tuple[Any, str]: FILE: mplsandbox_for_rl/transformers/src/transformers/safetensors_conversion.py function previous_pr (line 14) | def previous_pr(api: HfApi, model_id: str, pr_title: str, token: str) ->... function spawn_conversion (line 25) | def spawn_conversion(token: str, private: bool, model_id: str): function get_conversion_pr_reference (line 64) | def get_conversion_pr_reference(api: HfApi, model_id: str, **kwargs): function auto_conversion (line 87) | def auto_conversion(pretrained_model_name_or_path: str, ignore_errors_du... FILE: mplsandbox_for_rl/transformers/src/transformers/sagemaker/trainer_sm.py class SageMakerTrainer (line 23) | class SageMakerTrainer(Trainer): method __init__ (line 24) | def __init__(self, args=None, **kwargs): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/testing_utils.py function parse_flag_from_env (line 183) | def parse_flag_from_env(key, default=False): function parse_int_from_env (line 199) | def parse_int_from_env(key, default=None): function is_pt_tf_cross_test (line 223) | def is_pt_tf_cross_test(test_case): function is_pt_flax_cross_test (line 242) | def is_pt_flax_cross_test(test_case): function is_staging_test (line 261) | def is_staging_test(test_case): function is_pipeline_test (line 278) | def is_pipeline_test(test_case): function is_agent_test (line 294) | def is_agent_test(test_case): function slow (line 309) | def slow(test_case): function tooslow (line 319) | def tooslow(test_case): function custom_tokenizers (line 330) | def custom_tokenizers(test_case): function require_bs4 (line 340) | def require_bs4(test_case): function require_galore_torch (line 347) | def require_galore_torch(test_case): function require_lomo (line 355) | def require_lomo(test_case): function require_grokadamw (line 363) | def require_grokadamw(test_case): function require_cv2 (line 370) | def require_cv2(test_case): function require_levenshtein (line 380) | def require_levenshtein(test_case): function require_nltk (line 390) | def require_nltk(test_case): function require_accelerate (line 400) | def require_accelerate(test_case, min_version: str = ACCELERATE_MIN_VERS... function require_gguf (line 409) | def require_gguf(test_case): function require_fsdp (line 416) | def require_fsdp(test_case, min_version: str = "1.12.0"): function require_g2p_en (line 425) | def require_g2p_en(test_case): function require_safetensors (line 432) | def require_safetensors(test_case): function require_rjieba (line 439) | def require_rjieba(test_case): function require_jieba (line 446) | def require_jieba(test_case): function require_jinja (line 453) | def require_jinja(test_case): function require_tf2onnx (line 460) | def require_tf2onnx(test_case): function require_onnx (line 464) | def require_onnx(test_case): function require_timm (line 468) | def require_timm(test_case): function require_natten (line 478) | def require_natten(test_case): function require_torch (line 488) | def require_torch(test_case): function require_flash_attn (line 498) | def require_flash_attn(test_case): function require_torch_sdpa (line 508) | def require_torch_sdpa(test_case): function require_read_token (line 517) | def require_read_token(fn): function require_peft (line 534) | def require_peft(test_case): function require_torchvision (line 544) | def require_torchvision(test_case): function require_torch_or_tf (line 554) | def require_torch_or_tf(test_case): function require_intel_extension_for_pytorch (line 566) | def require_intel_extension_for_pytorch(test_case): function require_tensorflow_probability (line 581) | def require_tensorflow_probability(test_case): function require_torchaudio (line 593) | def require_torchaudio(test_case): function require_tf (line 600) | def require_tf(test_case): function require_flax (line 607) | def require_flax(test_case): function require_sentencepiece (line 614) | def require_sentencepiece(test_case): function require_sacremoses (line 621) | def require_sacremoses(test_case): function require_seqio (line 628) | def require_seqio(test_case): function require_scipy (line 635) | def require_scipy(test_case): function require_tokenizers (line 642) | def require_tokenizers(test_case): function require_tensorflow_text (line 649) | def require_tensorflow_text(test_case): function require_keras_nlp (line 657) | def require_keras_nlp(test_case): function require_pandas (line 664) | def require_pandas(test_case): function require_pytesseract (line 671) | def require_pytesseract(test_case): function require_pytorch_quantization (line 678) | def require_pytorch_quantization(test_case): function require_vision (line 688) | def require_vision(test_case): function require_ftfy (line 696) | def require_ftfy(test_case): function require_spacy (line 703) | def require_spacy(test_case): function require_decord (line 710) | def require_decord(test_case): function require_torch_multi_gpu (line 717) | def require_torch_multi_gpu(test_case): function require_torch_multi_accelerator (line 732) | def require_torch_multi_accelerator(test_case): function require_torch_non_multi_gpu (line 746) | def require_torch_non_multi_gpu(test_case): function require_torch_non_multi_accelerator (line 758) | def require_torch_non_multi_accelerator(test_case): function require_torch_up_to_2_gpus (line 768) | def require_torch_up_to_2_gpus(test_case): function require_torch_up_to_2_accelerators (line 780) | def require_torch_up_to_2_accelerators(test_case): function require_torch_xla (line 791) | def require_torch_xla(test_case): function require_torch_neuroncore (line 798) | def require_torch_neuroncore(test_case): function require_torch_npu (line 807) | def require_torch_npu(test_case): function require_torch_multi_npu (line 814) | def require_torch_multi_npu(test_case): function require_torch_xpu (line 827) | def require_torch_xpu(test_case): function require_torch_multi_xpu (line 838) | def require_torch_multi_xpu(test_case): function require_torchdynamo (line 909) | def require_torchdynamo(test_case): function require_torchao (line 914) | def require_torchao(test_case): function require_torch_tensorrt_fx (line 919) | def require_torch_tensorrt_fx(test_case): function require_torch_gpu (line 924) | def require_torch_gpu(test_case): function require_torch_accelerator (line 929) | def require_torch_accelerator(test_case): function require_torch_fp16 (line 936) | def require_torch_fp16(test_case): function require_torch_bf16 (line 943) | def require_torch_bf16(test_case): function require_torch_bf16_gpu (line 950) | def require_torch_bf16_gpu(test_case): function require_torch_bf16_cpu (line 958) | def require_torch_bf16_cpu(test_case): function require_deterministic_for_xpu (line 966) | def require_deterministic_for_xpu(test_case): function require_torch_tf32 (line 975) | def require_torch_tf32(test_case): function require_detectron2 (line 982) | def require_detectron2(test_case): function require_faiss (line 987) | def require_faiss(test_case): function require_optuna (line 992) | def require_optuna(test_case): function require_ray (line 1002) | def require_ray(test_case): function require_sigopt (line 1012) | def require_sigopt(test_case): function require_wandb (line 1022) | def require_wandb(test_case): function require_clearml (line 1032) | def require_clearml(test_case): function require_soundfile (line 1042) | def require_soundfile(test_case): function require_deepspeed (line 1052) | def require_deepspeed(test_case): function require_apex (line 1059) | def require_apex(test_case): function require_aqlm (line 1066) | def require_aqlm(test_case): function require_eetq (line 1073) | def require_eetq(test_case): function require_av (line 1080) | def require_av(test_case): function require_bitsandbytes (line 1087) | def require_bitsandbytes(test_case): function require_optimum (line 1102) | def require_optimum(test_case): function require_tensorboard (line 1109) | def require_tensorboard(test_case): function require_auto_gptq (line 1116) | def require_auto_gptq(test_case): function require_auto_awq (line 1123) | def require_auto_awq(test_case): function require_quanto (line 1130) | def require_quanto(test_case): function require_fbgemm_gpu (line 1137) | def require_fbgemm_gpu(test_case): function require_phonemizer (line 1144) | def require_phonemizer(test_case): function require_pyctcdecode (line 1151) | def require_pyctcdecode(test_case): function require_librosa (line 1158) | def require_librosa(test_case): function require_essentia (line 1165) | def require_essentia(test_case): function require_pretty_midi (line 1172) | def require_pretty_midi(test_case): function cmd_exists (line 1179) | def cmd_exists(cmd): function require_usr_bin_time (line 1183) | def require_usr_bin_time(test_case): function require_sudachi (line 1190) | def require_sudachi(test_case): function require_sudachi_projection (line 1197) | def require_sudachi_projection(test_case): function require_jumanpp (line 1206) | def require_jumanpp(test_case): function require_cython (line 1213) | def require_cython(test_case): function get_gpu_count (line 1220) | def get_gpu_count(): function get_tests_dir (line 1240) | def get_tests_dir(append_path=None): function apply_print_resets (line 1278) | def apply_print_resets(buf): function assert_screenout (line 1282) | def assert_screenout(out, what): class CaptureStd (line 1288) | class CaptureStd: method __init__ (line 1337) | def __init__(self, out=True, err=True, replay=True): method __enter__ (line 1354) | def __enter__(self): method __exit__ (line 1365) | def __exit__(self, *exc): method __repr__ (line 1380) | def __repr__(self): class CaptureStdout (line 1395) | class CaptureStdout(CaptureStd): method __init__ (line 1398) | def __init__(self, replay=True): class CaptureStderr (line 1402) | class CaptureStderr(CaptureStd): method __init__ (line 1405) | def __init__(self, replay=True): class CaptureLogger (line 1409) | class CaptureLogger: method __init__ (line 1434) | def __init__(self, logger): method __enter__ (line 1440) | def __enter__(self): method __exit__ (line 1444) | def __exit__(self, *exc): method __repr__ (line 1448) | def __repr__(self): function LoggingLevel (line 1453) | def LoggingLevel(level): function ExtendSysPath (line 1475) | def ExtendSysPath(path: Union[str, os.PathLike]) -> Iterator[None]: class TestCasePlus (line 1495) | class TestCasePlus(unittest.TestCase): method setUp (line 1574) | def setUp(self): method test_file_path (line 1595) | def test_file_path(self): method test_file_path_str (line 1599) | def test_file_path_str(self): method test_file_dir (line 1603) | def test_file_dir(self): method test_file_dir_str (line 1607) | def test_file_dir_str(self): method tests_dir (line 1611) | def tests_dir(self): method tests_dir_str (line 1615) | def tests_dir_str(self): method examples_dir (line 1619) | def examples_dir(self): method examples_dir_str (line 1623) | def examples_dir_str(self): method repo_root_dir (line 1627) | def repo_root_dir(self): method repo_root_dir_str (line 1631) | def repo_root_dir_str(self): method src_dir (line 1635) | def src_dir(self): method src_dir_str (line 1639) | def src_dir_str(self): method get_env (line 1642) | def get_env(self): method get_auto_remove_tmp_dir (line 1662) | def get_auto_remove_tmp_dir(self, tmp_dir=None, before=None, after=None): method python_one_liner_max_rss (line 1730) | def python_one_liner_max_rss(self, one_liner_str): method tearDown (line 1763) | def tearDown(self): function mockenv (line 1778) | def mockenv(**kwargs): function mockenv_context (line 1791) | def mockenv_context(*remove, **update): function pytest_addoption_shared (line 1827) | def pytest_addoption_shared(parser): function pytest_terminal_summary_main (line 1846) | def pytest_terminal_summary_main(tr, id): class _RunOutput (line 1985) | class _RunOutput: method __init__ (line 1986) | def __init__(self, returncode, stdout, stderr): function _read_stream (line 1992) | async def _read_stream(stream, callback): function _stream_subprocess (line 2001) | async def _stream_subprocess(cmd, env=None, stdin=None, timeout=None, qu... function execute_subprocess_async (line 2042) | def execute_subprocess_async(cmd, env=None, stdin=None, timeout=180, qui... function pytest_xdist_worker_id (line 2064) | def pytest_xdist_worker_id(): function get_torch_dist_unique_port (line 2074) | def get_torch_dist_unique_port(): function nested_simplify (line 2086) | def nested_simplify(obj, decimals=3): function check_json_file_has_correct_format (line 2117) | def check_json_file_has_correct_format(file_path): function to_2tuple (line 2134) | def to_2tuple(x): class SubprocessCallException (line 2141) | class SubprocessCallException(Exception): function run_command (line 2145) | def run_command(command: List[str], return_stdout=False): class RequestCounter (line 2162) | class RequestCounter: method __enter__ (line 2178) | def __enter__(self): method __exit__ (line 2184) | def __exit__(self, *args, **kwargs) -> None: method __getitem__ (line 2193) | def __getitem__(self, key: str) -> int: method total_calls (line 2197) | def total_calls(self) -> int: function is_flaky (line 2201) | def is_flaky(max_attempts: int = 5, wait_before_retry: Optional[float] =... function run_test_in_subprocess (line 2237) | def run_test_in_subprocess(test_case, target_func, inputs=None, timeout=... function preprocess_string (line 2290) | def preprocess_string(string, skip_cuda_tests): class HfDocTestParser (line 2319) | class HfDocTestParser(doctest.DocTestParser): method parse (line 2356) | def parse(self, string, name=""): class HfDoctestModule (line 2365) | class HfDoctestModule(Module): method collect (line 2371) | def collect(self) -> Iterable[DoctestItem]: function _device_agnostic_dispatch (line 2441) | def _device_agnostic_dispatch(device: str, dispatch_table: Dict[str, Cal... function backend_manual_seed (line 2466) | def backend_manual_seed(device: str, seed: int): function backend_empty_cache (line 2470) | def backend_empty_cache(device: str): function backend_device_count (line 2474) | def backend_device_count(device: str): function update_mapping_from_spec (line 2510) | def update_mapping_from_spec(device_fn_dict: Dict[str, Callable], attrib... FILE: mplsandbox_for_rl/transformers/src/transformers/tf_utils.py function shape_list (line 28) | def shape_list(tensor: Union[tf.Tensor, np.ndarray]) -> List[int]: function stable_softmax (line 51) | def stable_softmax(logits: tf.Tensor, axis: Optional[int] = None, name: ... function functional_layernorm (line 75) | def functional_layernorm(inputs, weight, bias, epsilon=1e-5, axis=-1): function scaled_dot_product_attention (line 107) | def scaled_dot_product_attention( function flatten (line 134) | def flatten(input, start_dim=0, end_dim=-1): function invert_attention_mask (line 152) | def invert_attention_mask(encoder_attention_mask: tf.Tensor) -> tf.Tensor: function check_embeddings_within_bounds (line 180) | def check_embeddings_within_bounds(tensor: tf.Tensor, embed_dim: int, te... function save_attributes_to_hdf5_group (line 200) | def save_attributes_to_hdf5_group(group, name, data): function load_attributes_from_hdf5_group (line 247) | def load_attributes_from_hdf5_group(group, name): function expand_1d (line 275) | def expand_1d(data): function convert_batch_encoding (line 287) | def convert_batch_encoding(*args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/time_series_utils.py class AffineTransformed (line 35) | class AffineTransformed(TransformedDistribution): method __init__ (line 36) | def __init__(self, base_distribution: Distribution, loc=None, scale=No... method mean (line 43) | def mean(self): method variance (line 50) | def variance(self): method stddev (line 57) | def stddev(self): class ParameterProjection (line 64) | class ParameterProjection(nn.Module): method __init__ (line 65) | def __init__( method forward (line 73) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor]: class LambdaLayer (line 79) | class LambdaLayer(nn.Module): method __init__ (line 80) | def __init__(self, function): method forward (line 84) | def forward(self, x, *args): class DistributionOutput (line 88) | class DistributionOutput: method __init__ (line 93) | def __init__(self, dim: int = 1) -> None: method _base_distribution (line 97) | def _base_distribution(self, distr_args): method distribution (line 103) | def distribution( method event_shape (line 116) | def event_shape(self) -> Tuple: method event_dim (line 123) | def event_dim(self) -> int: method value_in_support (line 131) | def value_in_support(self) -> float: method get_parameter_projection (line 138) | def get_parameter_projection(self, in_features: int) -> nn.Module: method domain_map (line 148) | def domain_map(self, *args: torch.Tensor): method squareplus (line 157) | def squareplus(x: torch.Tensor) -> torch.Tensor: class StudentTOutput (line 165) | class StudentTOutput(DistributionOutput): method domain_map (line 174) | def domain_map(cls, df: torch.Tensor, loc: torch.Tensor, scale: torch.... class NormalOutput (line 180) | class NormalOutput(DistributionOutput): method domain_map (line 189) | def domain_map(cls, loc: torch.Tensor, scale: torch.Tensor): class NegativeBinomialOutput (line 194) | class NegativeBinomialOutput(DistributionOutput): method domain_map (line 203) | def domain_map(cls, total_count: torch.Tensor, logits: torch.Tensor): method _base_distribution (line 207) | def _base_distribution(self, distr_args) -> Distribution: method distribution (line 217) | def distribution( FILE: mplsandbox_for_rl/transformers/src/transformers/tokenization_utils.py class Trie (line 53) | class Trie: method __init__ (line 59) | def __init__(self, *args): method update (line 65) | def update(self, *args): method add (line 75) | def add(self, word: str): method split (line 106) | def split(self, text: str) -> List[str]: method cut_text (line 259) | def cut_text(self, text, offsets): class ExtensionsTrie (line 284) | class ExtensionsTrie(Trie): method __init__ (line 285) | def __init__(self, *args): method extensions (line 288) | def extensions(self, prefix: str): method _get_node (line 307) | def _get_node(self, token: str) -> dict: method _collect_tokens (line 322) | def _collect_tokens(self, node: dict) -> list: function _is_whitespace (line 340) | def _is_whitespace(char): function _is_control (line 352) | def _is_control(char): function _is_punctuation (line 364) | def _is_punctuation(char): function _is_end_of_word (line 379) | def _is_end_of_word(text): function _is_start_of_word (line 385) | def _is_start_of_word(text): function _insert_one_token_to_ordered_list (line 391) | def _insert_one_token_to_ordered_list(token_list: List[str], new_token: ... class PreTrainedTokenizer (line 405) | class PreTrainedTokenizer(PreTrainedTokenizerBase): method __init__ (line 418) | def __init__(self, **kwargs): method is_fast (line 444) | def is_fast(self) -> bool: method vocab_size (line 448) | def vocab_size(self) -> int: method added_tokens_encoder (line 455) | def added_tokens_encoder(self) -> Dict[str, int]: method added_tokens_decoder (line 463) | def added_tokens_decoder(self) -> Dict[int, AddedToken]: method added_tokens_decoder (line 473) | def added_tokens_decoder(self, value: Dict[int, Union[AddedToken, str]... method get_added_vocab (line 485) | def get_added_vocab(self) -> Dict[str, int]: method __len__ (line 496) | def __len__(self): method _update_total_vocab_size (line 502) | def _update_total_vocab_size(self): method _add_tokens (line 510) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method _update_trie (line 588) | def _update_trie(self, unique_no_split_tokens: Optional[str] = []): method num_special_tokens_to_add (line 596) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method tokenize (line 619) | def tokenize(self, text: TextInput, **kwargs) -> List[str]: method _tokenize (line 699) | def _tokenize(self, text, **kwargs): method convert_tokens_to_ids (line 708) | def convert_tokens_to_ids(self, tokens: Union[str, List[str]]) -> Unio... method _convert_token_to_id_with_added_voc (line 730) | def _convert_token_to_id_with_added_voc(self, token): method _convert_token_to_id (line 738) | def _convert_token_to_id(self, token): method _encode_plus (line 741) | def _encode_plus( method _batch_encode_plus (line 819) | def _batch_encode_plus( method _batch_prepare_for_model (line 907) | def _batch_prepare_for_model( method prepare_for_tokenization (line 973) | def prepare_for_tokenization( method get_special_tokens_mask (line 997) | def get_special_tokens_mask( method convert_ids_to_tokens (line 1028) | def convert_ids_to_tokens(self, ids: int, skip_special_tokens: bool = ... method convert_ids_to_tokens (line 1031) | def convert_ids_to_tokens(self, ids: List[int], skip_special_tokens: b... method convert_ids_to_tokens (line 1033) | def convert_ids_to_tokens( method _convert_id_to_token (line 1065) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 1068) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 1071) | def _decode( FILE: mplsandbox_for_rl/transformers/src/transformers/tokenization_utils_base.py class AddedToken (line 84) | class AddedToken: method __init__ (line 93) | def __init__( method __getstate__ (line 103) | def __getstate__(self): method __str__ (line 106) | def __str__(self): class EncodingFast (line 110) | class EncodingFast: class TruncationStrategy (line 142) | class TruncationStrategy(ExplicitEnum): class CharSpan (line 154) | class CharSpan(NamedTuple): class TokenSpan (line 167) | class TokenSpan(NamedTuple): class BatchEncoding (line 180) | class BatchEncoding(UserDict): method __init__ (line 207) | def __init__( method n_sequences (line 230) | def n_sequences(self) -> Optional[int]: method is_fast (line 239) | def is_fast(self) -> bool: method __getitem__ (line 246) | def __getitem__(self, item: Union[int, str]) -> Union[Any, EncodingFast]: method __getattr__ (line 268) | def __getattr__(self, item: str): method __getstate__ (line 274) | def __getstate__(self): method __setstate__ (line 277) | def __setstate__(self, state): method keys (line 284) | def keys(self): method values (line 287) | def values(self): method items (line 290) | def items(self): method encodings (line 298) | def encodings(self) -> Optional[List[EncodingFast]]: method tokens (line 305) | def tokens(self, batch_index: int = 0) -> List[str]: method sequence_ids (line 323) | def sequence_ids(self, batch_index: int = 0) -> List[Optional[int]]: method words (line 347) | def words(self, batch_index: int = 0) -> List[Optional[int]]: method word_ids (line 371) | def word_ids(self, batch_index: int = 0) -> List[Optional[int]]: method token_to_sequence (line 390) | def token_to_sequence(self, batch_or_token_index: int, token_index: Op... method token_to_word (line 429) | def token_to_word(self, batch_or_token_index: int, token_index: Option... method word_to_tokens (line 467) | def word_to_tokens( method token_to_chars (line 520) | def token_to_chars(self, batch_or_token_index: int, token_index: Optio... method char_to_token (line 559) | def char_to_token( method word_to_chars (line 600) | def word_to_chars( method char_to_word (line 645) | def char_to_word(self, batch_or_char_index: int, char_index: Optional[... method convert_to_tensors (line 684) | def convert_to_tensors( method to (line 787) | def to(self, device: Union[str, "torch.device"]) -> "BatchEncoding": class SpecialTokensMixin (line 809) | class SpecialTokensMixin: method __init__ (line 848) | def __init__(self, verbose=False, **kwargs): method sanitize_special_tokens (line 879) | def sanitize_special_tokens(self) -> int: method add_special_tokens (line 887) | def add_special_tokens( method add_tokens (line 989) | def add_tokens( method _add_tokens (line 1038) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method bos_token (line 1042) | def bos_token(self) -> str: method eos_token (line 1053) | def eos_token(self) -> str: method unk_token (line 1064) | def unk_token(self) -> str: method sep_token (line 1075) | def sep_token(self) -> str: method pad_token (line 1087) | def pad_token(self) -> str: method cls_token (line 1098) | def cls_token(self) -> str: method mask_token (line 1110) | def mask_token(self) -> str: method additional_special_tokens (line 1122) | def additional_special_tokens(self) -> List[str]: method bos_token (line 1134) | def bos_token(self, value): method eos_token (line 1140) | def eos_token(self, value): method unk_token (line 1146) | def unk_token(self, value): method sep_token (line 1152) | def sep_token(self, value): method pad_token (line 1158) | def pad_token(self, value): method cls_token (line 1164) | def cls_token(self, value): method mask_token (line 1170) | def mask_token(self, value): method additional_special_tokens (line 1176) | def additional_special_tokens(self, value): method bos_token_id (line 1180) | def bos_token_id(self) -> Optional[int]: method eos_token_id (line 1190) | def eos_token_id(self) -> Optional[int]: method unk_token_id (line 1200) | def unk_token_id(self) -> Optional[int]: method sep_token_id (line 1209) | def sep_token_id(self) -> Optional[int]: method pad_token_id (line 1219) | def pad_token_id(self) -> Optional[int]: method pad_token_type_id (line 1228) | def pad_token_type_id(self) -> int: method cls_token_id (line 1235) | def cls_token_id(self) -> Optional[int]: method mask_token_id (line 1247) | def mask_token_id(self) -> Optional[int]: method additional_special_tokens_ids (line 1257) | def additional_special_tokens_ids(self) -> List[int]: method bos_token_id (line 1265) | def bos_token_id(self, value): method eos_token_id (line 1269) | def eos_token_id(self, value): method unk_token_id (line 1273) | def unk_token_id(self, value): method sep_token_id (line 1277) | def sep_token_id(self, value): method pad_token_id (line 1281) | def pad_token_id(self, value): method cls_token_id (line 1285) | def cls_token_id(self, value): method mask_token_id (line 1289) | def mask_token_id(self, value): method additional_special_tokens_ids (line 1293) | def additional_special_tokens_ids(self, values): method special_tokens_map (line 1297) | def special_tokens_map(self) -> Dict[str, Union[str, List[str]]]: method special_tokens_map_extended (line 1312) | def special_tokens_map_extended(self) -> Dict[str, Union[str, AddedTok... method all_special_tokens_extended (line 1328) | def all_special_tokens_extended(self) -> List[Union[str, AddedToken]]: method all_special_tokens (line 1349) | def all_special_tokens(self) -> List[str]: method all_special_ids (line 1359) | def all_special_ids(self) -> List[int]: class PreTrainedTokenizerBase (line 1551) | class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin): method __init__ (line 1569) | def __init__(self, **kwargs): method max_len_single_sentence (line 1627) | def max_len_single_sentence(self) -> int: method max_len_sentences_pair (line 1634) | def max_len_sentences_pair(self) -> int: method max_len_single_sentence (line 1641) | def max_len_single_sentence(self, value) -> int: method max_len_sentences_pair (line 1655) | def max_len_sentences_pair(self, value) -> int: method _set_processor_class (line 1666) | def _set_processor_class(self, processor_class: str): method added_tokens_decoder (line 1671) | def added_tokens_decoder(self) -> Dict[int, AddedToken]: method __repr__ (line 1674) | def __repr__(self) -> str: method __len__ (line 1684) | def __len__(self) -> int: method get_vocab (line 1687) | def get_vocab(self) -> Dict[str, int]: method apply_chat_template (line 1699) | def apply_chat_template( method _render_with_assistant_indices (line 1891) | def _render_with_assistant_indices( method _compile_jinja_template (line 1909) | def _compile_jinja_template(self, chat_template): method get_chat_template (line 1979) | def get_chat_template(self, chat_template: Optional[str] = None, tools... method from_pretrained (line 2035) | def from_pretrained( method _from_pretrained (line 2286) | def _from_pretrained( method _eventually_correct_t5_max_length (line 2520) | def _eventually_correct_t5_max_length(pretrained_model_name_or_path, m... method convert_added_tokens (line 2528) | def convert_added_tokens(cls, obj: Union[AddedToken, Any], save=False,... method save_pretrained (line 2546) | def save_pretrained( method _save_pretrained (line 2715) | def _save_pretrained( method save_vocabulary (line 2750) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method tokenize (line 2768) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode (line 2798) | def encode( method num_special_tokens_to_add (line 2839) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method _get_padding_truncation_strategies (line 2842) | def _get_padding_truncation_strategies( method __call__ (line 2981) | def __call__( method _call_one (line 3070) | def _call_one( method encode_plus (line 3186) | def encode_plus( method _encode_plus (line 3259) | def _encode_plus( method batch_encode_plus (line 3284) | def batch_encode_plus( method _batch_encode_plus (line 3359) | def _batch_encode_plus( method pad (line 3389) | def pad( method create_token_type_ids_from_sequences (line 3562) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 3582) | def build_inputs_with_special_tokens( method prepare_for_model (line 3603) | def prepare_for_model( method truncate_sequences (line 3738) | def truncate_sequences( method _pad (line 3862) | def _pad( method convert_tokens_to_string (line 3939) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method batch_decode (line 3952) | def batch_decode( method decode (line 3986) | def decode( method _decode (line 4023) | def _decode( method get_special_tokens_mask (line 4032) | def get_special_tokens_mask( method clean_up_tokenization (line 4064) | def clean_up_tokenization(out_string: str) -> str: method _eventual_warn_about_too_long_sequence (line 4088) | def _eventual_warn_about_too_long_sequence(self, ids: List[int], max_l... method _switch_to_input_mode (line 4108) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 4114) | def _switch_to_target_mode(self): method as_target_tokenizer (line 4121) | def as_target_tokenizer(self): method register_for_auto_class (line 4138) | def register_for_auto_class(cls, auto_class="AutoTokenizer"): method prepare_seq2seq_batch (line 4163) | def prepare_seq2seq_batch( function get_fast_tokenizer_file (line 4286) | def get_fast_tokenizer_file(tokenization_files: List[str]) -> str: FILE: mplsandbox_for_rl/transformers/src/transformers/tokenization_utils_fast.py class PreTrainedTokenizerFast (line 81) | class PreTrainedTokenizerFast(PreTrainedTokenizerBase): method __init__ (line 97) | def __init__(self, *args, **kwargs): method is_fast (line 215) | def is_fast(self) -> bool: method can_save_slow_tokenizer (line 219) | def can_save_slow_tokenizer(self) -> bool: method vocab_size (line 227) | def vocab_size(self) -> int: method get_vocab (line 233) | def get_vocab(self) -> Dict[str, int]: method vocab (line 237) | def vocab(self) -> Dict[str, int]: method added_tokens_encoder (line 241) | def added_tokens_encoder(self) -> Dict[str, int]: method added_tokens_decoder (line 249) | def added_tokens_decoder(self) -> Dict[int, AddedToken]: method get_added_vocab (line 258) | def get_added_vocab(self) -> Dict[str, int]: method __len__ (line 267) | def __len__(self) -> int: method backend_tokenizer (line 274) | def backend_tokenizer(self) -> TokenizerFast: method decoder (line 281) | def decoder(self) -> DecoderFast: method _convert_encoding (line 287) | def _convert_encoding( method convert_tokens_to_ids (line 334) | def convert_tokens_to_ids(self, tokens: Union[str, List[str]]) -> Unio... method _convert_token_to_id_with_added_voc (line 353) | def _convert_token_to_id_with_added_voc(self, token: str) -> int: method _convert_id_to_token (line 359) | def _convert_id_to_token(self, index: int) -> Optional[str]: method _add_tokens (line 362) | def _add_tokens(self, new_tokens: List[Union[str, AddedToken]], specia... method num_special_tokens_to_add (line 368) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method convert_ids_to_tokens (line 389) | def convert_ids_to_tokens( method tokenize (line 415) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method set_truncation_and_padding (line 418) | def set_truncation_and_padding( method _batch_encode_plus (line 489) | def _batch_encode_plus( method _encode_plus (line 578) | def _encode_plus( method convert_tokens_to_string (line 637) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 640) | def _decode( method _save_pretrained (line 664) | def _save_pretrained( method train_new_from_iterator (line 713) | def train_new_from_iterator( FILE: mplsandbox_for_rl/transformers/src/transformers/trainer.py function _is_peft_model (line 248) | def _is_peft_model(model): function _get_fsdp_ckpt_kwargs (line 260) | def _get_fsdp_ckpt_kwargs(): class Trainer (line 287) | class Trainer: method __init__ (line 376) | def __init__( method _activate_neftune (line 707) | def _activate_neftune(self, model): method _deactivate_neftune (line 726) | def _deactivate_neftune(self, model): method add_callback (line 743) | def add_callback(self, callback): method pop_callback (line 754) | def pop_callback(self, callback): method remove_callback (line 770) | def remove_callback(self, callback): method _move_model_to_device (line 781) | def _move_model_to_device(self, model, device): method _set_signature_columns_if_needed (line 787) | def _set_signature_columns_if_needed(self): method _remove_unused_columns (line 802) | def _remove_unused_columns(self, dataset: "datasets.Dataset", descript... method _get_collator_with_removed_columns (line 834) | def _get_collator_with_removed_columns( method _get_train_sampler (line 852) | def _get_train_sampler(self) -> Optional[torch.utils.data.Sampler]: method get_train_dataloader (line 877) | def get_train_dataloader(self) -> DataLoader: method _get_eval_sampler (line 912) | def _get_eval_sampler(self, eval_dataset: Dataset) -> Optional[torch.u... method get_eval_dataloader (line 934) | def get_eval_dataloader(self, eval_dataset: Optional[Union[str, Datase... method get_test_dataloader (line 995) | def get_test_dataloader(self, test_dataset: Dataset) -> DataLoader: method create_optimizer_and_scheduler (line 1029) | def create_optimizer_and_scheduler(self, num_training_steps: int): method get_decay_parameter_names (line 1045) | def get_decay_parameter_names(self, model) -> List[str]: method create_optimizer (line 1056) | def create_optimizer(self): method get_num_trainable_parameters (line 1120) | def get_num_trainable_parameters(self): method get_learning_rates (line 1126) | def get_learning_rates(self): method get_optimizer_group (line 1134) | def get_optimizer_group(self, param: Optional[Union[str, torch.nn.para... method get_optimizer_cls_and_kwargs (line 1151) | def get_optimizer_cls_and_kwargs( method create_scheduler (line 1459) | def create_scheduler(self, num_training_steps: int, optimizer: torch.o... method num_examples (line 1478) | def num_examples(self, dataloader: DataLoader) -> int: method num_tokens (line 1492) | def num_tokens(self, train_dl: DataLoader, max_steps: Optional[int] = ... method _hp_search_setup (line 1508) | def _hp_search_setup(self, trial: Union["optuna.Trial", Dict[str, Any]]): method _report_to_hp_search (line 1557) | def _report_to_hp_search(self, trial: Union["optuna.Trial", Dict[str, ... method _tune_save_checkpoint (line 1581) | def _tune_save_checkpoint(self, checkpoint_dir: str): method call_model_init (line 1591) | def call_model_init(self, trial=None): method torch_jit_model_eval (line 1605) | def torch_jit_model_eval(self, model, dataloader, training=False): method ipex_optimize_model (line 1647) | def ipex_optimize_model(self, model, training=False, dtype=torch.float... method compare_trainer_and_checkpoint_args (line 1670) | def compare_trainer_and_checkpoint_args(self, training_args, trainer_s... method _wrap_model (line 1698) | def _wrap_model(self, model, training=True, dataloader=None): method train (line 1854) | def train( method _inner_training_loop (line 1962) | def _inner_training_loop( method _get_output_dir (line 2467) | def _get_output_dir(self, trial): method _load_from_checkpoint (line 2487) | def _load_from_checkpoint(self, resume_from_checkpoint, model=None): method _load_best_model (line 2648) | def _load_best_model(self): method _issue_warnings_after_load (line 2764) | def _issue_warnings_after_load(self, load_result): method _evaluate (line 2777) | def _evaluate(self, trial, ignore_keys_for_eval, skip_scheduler=False): method _maybe_log_save_evaluate (line 2795) | def _maybe_log_save_evaluate(self, tr_loss, grad_norm, model, trial, e... method _load_rng_state (line 2827) | def _load_rng_state(self, checkpoint): method _save_checkpoint (line 2901) | def _save_checkpoint(self, model, trial, metrics=None): method _save_rng_state (line 2959) | def _save_rng_state(self, output_dir): method _save_optimizer_and_scheduler (line 3003) | def _save_optimizer_and_scheduler(self, output_dir): method _load_optimizer_and_scheduler (line 3068) | def _load_optimizer_and_scheduler(self, checkpoint): method _load_callback_state (line 3166) | def _load_callback_state(self): method hyperparameter_search (line 3205) | def hyperparameter_search( method log (line 3284) | def log(self, logs: Dict[str, float]) -> None: method _prepare_input (line 3303) | def _prepare_input(self, data: Union[torch.Tensor, Any]) -> Union[torc... method _prepare_inputs (line 3321) | def _prepare_inputs(self, inputs: Dict[str, Union[torch.Tensor, Any]])... method compute_loss_context_manager (line 3337) | def compute_loss_context_manager(self): method autocast_smart_context_manager (line 3343) | def autocast_smart_context_manager(self, cache_enabled: Optional[bool]... method training_step (line 3355) | def training_step(self, model: nn.Module, inputs: Dict[str, Union[torc... method compute_loss (line 3417) | def compute_loss(self, model, inputs, return_outputs=False): method is_local_process_zero (line 3454) | def is_local_process_zero(self) -> bool: method is_world_process_zero (line 3461) | def is_world_process_zero(self) -> bool: method save_model (line 3473) | def save_model(self, output_dir: Optional[str] = None, _internal_call:... method _save_tpu (line 3524) | def _save_tpu(self, output_dir: Optional[str] = None): method _save (line 3596) | def _save(self, output_dir: Optional[str] = None, state_dict=None): method store_flos (line 3632) | def store_flos(self): method _sorted_checkpoints (line 3643) | def _sorted_checkpoints( method _rotate_checkpoints (line 3670) | def _rotate_checkpoints(self, use_mtime=False, output_dir=None) -> None: method evaluate (line 3695) | def evaluate( method predict (line 3799) | def predict( method evaluation_loop (line 3863) | def evaluation_loop( method _nested_gather (line 4076) | def _nested_gather(self, tensors, name=None): method prediction_step (line 4095) | def prediction_step( method floating_point_ops (line 4200) | def floating_point_ops(self, inputs: Dict[str, Union[torch.Tensor, Any... method init_hf_repo (line 4218) | def init_hf_repo(self, token: Optional[str] = None): method create_model_card (line 4236) | def create_model_card( method _push_from_checkpoint (line 4310) | def _push_from_checkpoint(self, checkpoint_folder): method _finish_current_push (line 4376) | def _finish_current_push(self): method push_to_hub (line 4383) | def push_to_hub( method prediction_loop (line 4459) | def prediction_loop( method _gather_and_numpify (line 4636) | def _gather_and_numpify(self, tensors, name): method _add_sm_patterns_to_gitignore (line 4652) | def _add_sm_patterns_to_gitignore(self) -> None: method create_accelerator_and_postprocess (line 4691) | def create_accelerator_and_postprocess(self): method propagate_args_to_deepspeed (line 4791) | def propagate_args_to_deepspeed(self, auto_find_batch_size=False): method _fsdp_qlora_plugin_updates (line 4803) | def _fsdp_qlora_plugin_updates(self): FILE: mplsandbox_for_rl/transformers/src/transformers/trainer_callback.py class TrainerState (line 36) | class TrainerState: method __post_init__ (line 112) | def __post_init__(self): method save_to_json (line 139) | def save_to_json(self, json_path: str): method load_from_json (line 146) | def load_from_json(cls, json_path: str): class ExportableState (line 153) | class ExportableState: method state (line 186) | def state(self) -> dict: method from_state (line 190) | def from_state(cls, state): class TrainerControl (line 198) | class TrainerControl(ExportableState): method _new_training (line 232) | def _new_training(self): method _new_epoch (line 236) | def _new_epoch(self): method _new_step (line 240) | def _new_step(self): method state (line 246) | def state(self) -> dict: class TrainerCallback (line 259) | class TrainerCallback: method on_init_end (line 310) | def on_init_end(self, args: TrainingArguments, state: TrainerState, co... method on_train_begin (line 316) | def on_train_begin(self, args: TrainingArguments, state: TrainerState,... method on_train_end (line 322) | def on_train_end(self, args: TrainingArguments, state: TrainerState, c... method on_epoch_begin (line 328) | def on_epoch_begin(self, args: TrainingArguments, state: TrainerState,... method on_epoch_end (line 334) | def on_epoch_end(self, args: TrainingArguments, state: TrainerState, c... method on_step_begin (line 340) | def on_step_begin(self, args: TrainingArguments, state: TrainerState, ... method on_optimizer_step (line 347) | def on_optimizer_step(self, args: TrainingArguments, state: TrainerSta... method on_substep_end (line 353) | def on_substep_end(self, args: TrainingArguments, state: TrainerState,... method on_step_end (line 359) | def on_step_end(self, args: TrainingArguments, state: TrainerState, co... method on_evaluate (line 366) | def on_evaluate(self, args: TrainingArguments, state: TrainerState, co... method on_predict (line 372) | def on_predict(self, args: TrainingArguments, state: TrainerState, con... method on_save (line 378) | def on_save(self, args: TrainingArguments, state: TrainerState, contro... method on_log (line 384) | def on_log(self, args: TrainingArguments, state: TrainerState, control... method on_prediction_step (line 390) | def on_prediction_step(self, args: TrainingArguments, state: TrainerSt... class CallbackHandler (line 397) | class CallbackHandler(TrainerCallback): method __init__ (line 400) | def __init__(self, callbacks, model, tokenizer, optimizer, lr_scheduler): method add_callback (line 419) | def add_callback(self, callback): method pop_callback (line 430) | def pop_callback(self, callback): method remove_callback (line 442) | def remove_callback(self, callback): method callback_list (line 452) | def callback_list(self): method on_init_end (line 455) | def on_init_end(self, args: TrainingArguments, state: TrainerState, co... method on_train_begin (line 458) | def on_train_begin(self, args: TrainingArguments, state: TrainerState,... method on_train_end (line 462) | def on_train_end(self, args: TrainingArguments, state: TrainerState, c... method on_epoch_begin (line 465) | def on_epoch_begin(self, args: TrainingArguments, state: TrainerState,... method on_epoch_end (line 469) | def on_epoch_end(self, args: TrainingArguments, state: TrainerState, c... method on_step_begin (line 472) | def on_step_begin(self, args: TrainingArguments, state: TrainerState, ... method on_optimizer_step (line 478) | def on_optimizer_step(self, args: TrainingArguments, state: TrainerSta... method on_substep_end (line 481) | def on_substep_end(self, args: TrainingArguments, state: TrainerState,... method on_step_end (line 484) | def on_step_end(self, args: TrainingArguments, state: TrainerState, co... method on_evaluate (line 487) | def on_evaluate(self, args: TrainingArguments, state: TrainerState, co... method on_predict (line 491) | def on_predict(self, args: TrainingArguments, state: TrainerState, con... method on_save (line 494) | def on_save(self, args: TrainingArguments, state: TrainerState, contro... method on_log (line 498) | def on_log(self, args: TrainingArguments, state: TrainerState, control... method on_prediction_step (line 502) | def on_prediction_step(self, args: TrainingArguments, state: TrainerSt... method call_event (line 505) | def call_event(self, event, args, state, control, **kwargs): class DefaultFlowCallback (line 525) | class DefaultFlowCallback(TrainerCallback): method on_step_end (line 530) | def on_step_end(self, args: TrainingArguments, state: TrainerState, co... method on_epoch_end (line 562) | def on_epoch_end(self, args: TrainingArguments, state: TrainerState, c... class ProgressCallback (line 578) | class ProgressCallback(TrainerCallback): method __init__ (line 583) | def __init__(self): method on_train_begin (line 587) | def on_train_begin(self, args, state, control, **kwargs): method on_step_end (line 592) | def on_step_end(self, args, state, control, **kwargs): method on_prediction_step (line 597) | def on_prediction_step(self, args, state, control, eval_dataloader=Non... method on_evaluate (line 605) | def on_evaluate(self, args, state, control, **kwargs): method on_predict (line 611) | def on_predict(self, args, state, control, **kwargs): method on_log (line 617) | def on_log(self, args, state, control, logs=None, **kwargs): method on_train_end (line 630) | def on_train_end(self, args, state, control, **kwargs): class PrinterCallback (line 636) | class PrinterCallback(TrainerCallback): method on_log (line 641) | def on_log(self, args, state, control, logs=None, **kwargs): class EarlyStoppingCallback (line 647) | class EarlyStoppingCallback(TrainerCallback, ExportableState): method __init__ (line 664) | def __init__(self, early_stopping_patience: int = 1, early_stopping_th... method check_metric_value (line 670) | def check_metric_value(self, args, state, control, metric_value): method on_train_begin (line 681) | def on_train_begin(self, args, state, control, **kwargs): method on_evaluate (line 690) | def on_evaluate(self, args, state, control, metrics, **kwargs): method state (line 707) | def state(self) -> dict: FILE: mplsandbox_for_rl/transformers/src/transformers/trainer_pt_utils.py function get_dataloader_sampler (line 70) | def get_dataloader_sampler(dataloader): function atleast_1d (line 77) | def atleast_1d(tensor_or_array: Union[torch.Tensor, np.ndarray]): function torch_pad_and_concatenate (line 88) | def torch_pad_and_concatenate(tensor1, tensor2, padding_index=-100): function numpy_pad_and_concatenate (line 106) | def numpy_pad_and_concatenate(array1, array2, padding_index=-100): function nested_concat (line 124) | def nested_concat(tensors, new_tensors, padding_index=-100): function find_batch_size (line 147) | def find_batch_size(tensors): function nested_numpify (line 167) | def nested_numpify(tensors): function nested_detach (line 183) | def nested_detach(tensors): function nested_xla_mesh_reduce (line 192) | def nested_xla_mesh_reduce(tensors, name): function distributed_concat (line 209) | def distributed_concat(tensor: Any, num_total_examples: Optional[int] = ... function distributed_broadcast_scalars (line 228) | def distributed_broadcast_scalars( function reissue_pt_warnings (line 247) | def reissue_pt_warnings(caught_warnings): function torch_distributed_zero_first (line 256) | def torch_distributed_zero_first(local_rank: int): class DistributedSamplerWithLoop (line 270) | class DistributedSamplerWithLoop(DistributedSampler): method __init__ (line 284) | def __init__(self, dataset, batch_size, **kwargs): method __iter__ (line 288) | def __iter__(self): class EvalLoopContainer (line 298) | class EvalLoopContainer: method __init__ (line 311) | def __init__(self, do_nested_concat: bool = True, padding_index: int =... method add (line 317) | def add(self, tensors) -> None: method to_cpu_and_numpy (line 326) | def to_cpu_and_numpy(self) -> None: method get_arrays (line 344) | def get_arrays(self): class SequentialDistributedSampler (line 350) | class SequentialDistributedSampler(Sampler): method __init__ (line 360) | def __init__(self, dataset, num_replicas=None, rank=None, batch_size=N... method __iter__ (line 385) | def __iter__(self): method __len__ (line 402) | def __len__(self): function get_tpu_sampler (line 406) | def get_tpu_sampler(dataset: torch.utils.data.Dataset, batch_size: int): function nested_new_like (line 412) | def nested_new_like(arrays, num_samples, padding_index=-100): function expand_like (line 419) | def expand_like(arrays, new_seq_length, padding_index=-100): function nested_truncate (line 426) | def nested_truncate(tensors, limit): class DistributedTensorGatherer (line 436) | class DistributedTensorGatherer: method __init__ (line 482) | def __init__(self, world_size, num_samples, make_multiple_of=None, pad... method add_arrays (line 496) | def add_arrays(self, arrays): method _nested_set_tensors (line 511) | def _nested_set_tensors(self, storage, arrays): method finalize (line 532) | def finalize(self): class LabelSmoother (line 545) | class LabelSmoother: method __call__ (line 559) | def __call__(self, model_output, labels, shift_labels=False): function get_length_grouped_indices (line 587) | def get_length_grouped_indices(lengths, batch_size, mega_batch_mult=None... class LengthGroupedSampler (line 622) | class LengthGroupedSampler(Sampler): method __init__ (line 628) | def __init__( method __len__ (line 660) | def __len__(self): method __iter__ (line 663) | def __iter__(self): class DistributedLengthGroupedSampler (line 668) | class DistributedLengthGroupedSampler(DistributedSampler): method __init__ (line 675) | def __init__( method __iter__ (line 735) | def __iter__(self) -> Iterator: class ShardSampler (line 756) | class ShardSampler(Sampler): method __init__ (line 765) | def __init__( method __iter__ (line 784) | def __iter__(self): method __len__ (line 798) | def __len__(self): class IterableDatasetShard (line 803) | class IterableDatasetShard(IterableDataset): method __init__ (line 844) | def __init__( method set_epoch (line 862) | def set_epoch(self, epoch): method __iter__ (line 867) | def __iter__(self): method __len__ (line 900) | def __len__(self): function _get_learning_rate (line 912) | def _get_learning_rate(self): function _secs2timedelta (line 935) | def _secs2timedelta(secs): function metrics_format (line 944) | def metrics_format(self, metrics: Dict[str, float]) -> Dict[str, float]: function log_metrics (line 970) | def log_metrics(self, split, metrics): function save_metrics (line 1060) | def save_metrics(self, split, metrics, combined=True): function save_state (line 1098) | def save_state(self): function get_model_param_count (line 1111) | def get_model_param_count(model, trainable_only=False): function get_parameter_names (line 1128) | def get_parameter_names(model, forbidden_layer_types): function get_module_class_from_name (line 1144) | def get_module_class_from_name(module, name): function remove_dummy_checkpoint (line 1164) | def remove_dummy_checkpoint(is_main_process, output_dir, filenames): function smp_forward_backward (line 1176) | def smp_forward_backward(model, inputs, gradient_accumulation_steps=1): function smp_forward_only (line 1184) | def smp_forward_only(model, inputs): function smp_gather (line 1187) | def smp_gather(tensor): function smp_nested_concat (line 1200) | def smp_nested_concat(tensor): class AcceleratorConfig (line 1211) | class AcceleratorConfig: method from_json_file (line 1324) | def from_json_file(cls, json_file): method to_dict (line 1338) | def to_dict(self): method pop (line 1341) | def pop(self, key, default=None): class LayerWiseDummyOptimizer (line 1345) | class LayerWiseDummyOptimizer(torch.optim.Optimizer): method __init__ (line 1356) | def __init__(self, optimizer_dict=None, *args, **kwargs): method zero_grad (line 1361) | def zero_grad(self, set_to_none: bool = True) -> None: method step (line 1364) | def step(self, closure=None) -> Optional[float]: class LayerWiseDummyScheduler (line 1368) | class LayerWiseDummyScheduler(LRScheduler): method __init__ (line 1376) | def __init__(self, *args, **kwargs): method get_lr (line 1383) | def get_lr(self): method _get_closed_form_lr (line 1396) | def _get_closed_form_lr(self): FILE: mplsandbox_for_rl/transformers/src/transformers/trainer_seq2seq.py class Seq2SeqTrainer (line 42) | class Seq2SeqTrainer(Trainer): method __init__ (line 43) | def __init__( method load_generation_config (line 78) | def load_generation_config(gen_config_arg: Union[str, GenerationConfig... method evaluate (line 126) | def evaluate( method predict (line 182) | def predict( method prediction_step (line 246) | def prediction_step( method _pad_tensors_to_max_len (line 351) | def _pad_tensors_to_max_len(self, tensor, max_length): FILE: mplsandbox_for_rl/transformers/src/transformers/trainer_utils.py function seed_worker (line 52) | def seed_worker(_): function enable_full_determinism (line 60) | def enable_full_determinism(seed: int, warn_only: bool = False): function set_seed (line 92) | def set_seed(seed: int, deterministic: bool = False): function neftune_post_forward_hook (line 126) | def neftune_post_forward_hook(module, input, output): class EvalPrediction (line 152) | class EvalPrediction: method __init__ (line 162) | def __init__( method __iter__ (line 172) | def __iter__(self): method __getitem__ (line 178) | def __getitem__(self, idx): class EvalLoopOutput (line 191) | class EvalLoopOutput(NamedTuple): class PredictionOutput (line 198) | class PredictionOutput(NamedTuple): class TrainOutput (line 204) | class TrainOutput(NamedTuple): function get_last_checkpoint (line 214) | def get_last_checkpoint(folder): class IntervalStrategy (line 226) | class IntervalStrategy(ExplicitEnum): class EvaluationStrategy (line 232) | class EvaluationStrategy(ExplicitEnum): class HubStrategy (line 238) | class HubStrategy(ExplicitEnum): class BestRun (line 245) | class BestRun(NamedTuple): function default_compute_objective (line 267) | def default_compute_objective(metrics: Dict[str, float]) -> float: function default_hp_space_optuna (line 292) | def default_hp_space_optuna(trial) -> Dict[str, float]: function default_hp_space_ray (line 304) | def default_hp_space_ray(trial) -> Dict[str, float]: function default_hp_space_sigopt (line 318) | def default_hp_space_sigopt(trial): function default_hp_space_wandb (line 331) | def default_hp_space_wandb(trial) -> Dict[str, float]: class HPSearchBackend (line 349) | class HPSearchBackend(ExplicitEnum): function is_main_process (line 356) | def is_main_process(local_rank): function total_processes_number (line 368) | def total_processes_number(local_rank): function speed_metrics (line 383) | def speed_metrics(split, start_time, num_samples=None, num_steps=None, n... class SchedulerType (line 413) | class SchedulerType(ExplicitEnum): class TrainerMemoryTracker (line 426) | class TrainerMemoryTracker: method __init__ (line 458) | def __init__(self, skip_memory_metrics=False): method derive_stage (line 499) | def derive_stage(self): method cpu_mem_used (line 509) | def cpu_mem_used(self): method peak_monitor_func (line 513) | def peak_monitor_func(self): method start (line 525) | def start(self): method stop (line 581) | def stop(self, stage): method update_metrics (line 660) | def update_metrics(self, stage, metrics): method stop_and_update_metrics (line 701) | def stop_and_update_metrics(self, metrics=None): function has_length (line 714) | def has_length(dataset): function denumpify_detensorize (line 725) | def denumpify_detensorize(metrics): function number_of_arguments (line 740) | def number_of_arguments(func): function find_executable_batch_size (line 750) | def find_executable_batch_size( class FSDPOption (line 781) | class FSDPOption(ExplicitEnum): class RemoveColumnsCollator (line 791) | class RemoveColumnsCollator: method __init__ (line 794) | def __init__( method _remove_columns (line 809) | def _remove_columns(self, feature: dict) -> dict: method __call__ (line 825) | def __call__(self, features: List[dict]): function check_target_module_exists (line 830) | def check_target_module_exists(optim_target_modules, key: str, return_is... FILE: mplsandbox_for_rl/transformers/src/transformers/training_args.py function default_logdir (line 113) | def default_logdir() -> str: function get_int_from_env (line 124) | def get_int_from_env(env_keys, default): function get_xla_device_type (line 133) | def get_xla_device_type(device: "torch.device") -> Optional[str]: class OptimizerNames (line 144) | class OptimizerNames(ExplicitEnum): function _convert_str_dict (line 195) | def _convert_str_dict(passed_value: dict): class TrainingArguments (line 215) | class TrainingArguments: method __post_init__ (line 1501) | def __post_init__(self): method __str__ (line 2049) | def __str__(self): method train_batch_size (line 2065) | def train_batch_size(self) -> int: method eval_batch_size (line 2079) | def eval_batch_size(self) -> int: method ddp_timeout_delta (line 2093) | def ddp_timeout_delta(self) -> timedelta: method _setup_devices (line 2100) | def _setup_devices(self) -> "torch.device": method device (line 2227) | def device(self) -> "torch.device": method n_gpu (line 2235) | def n_gpu(self): method parallel_mode (line 2250) | def parallel_mode(self): method world_size (line 2277) | def world_size(self): method process_index (line 2289) | def process_index(self): method local_process_index (line 2301) | def local_process_index(self): method should_log (line 2314) | def should_log(self): method should_save (line 2327) | def should_save(self): method get_process_log_level (line 2339) | def get_process_log_level(self): method place_model_on_device (line 2362) | def place_model_on_device(self): method _no_sync_in_gradient_accumulation (line 2369) | def _no_sync_in_gradient_accumulation(self): method main_process_first (line 2378) | def main_process_first(self, local=True, desc="work"): method get_warmup_steps (line 2428) | def get_warmup_steps(self, num_training_steps: int): method _dict_torch_dtype_to_str (line 2437) | def _dict_torch_dtype_to_str(self, d: Dict[str, Any]) -> None: method to_dict (line 2449) | def to_dict(self): method to_json_string (line 2471) | def to_json_string(self): method to_sanitized_dict (line 2477) | def to_sanitized_dict(self) -> Dict[str, Any]: method set_training (line 2491) | def set_training( method set_evaluate (line 2566) | def set_evaluate( method set_testing (line 2627) | def set_testing( method set_save (line 2667) | def set_save( method set_logging (line 2716) | def set_logging( method set_push_to_hub (line 2791) | def set_push_to_hub( method set_optimizer (line 2861) | def set_optimizer( method set_lr_scheduler (line 2912) | def set_lr_scheduler( method set_dataloader (line 2957) | def set_dataloader( class ParallelMode (line 3026) | class ParallelMode(Enum): FILE: mplsandbox_for_rl/transformers/src/transformers/training_args_seq2seq.py class Seq2SeqTrainingArguments (line 30) | class Seq2SeqTrainingArguments(TrainingArguments): method to_dict (line 86) | def to_dict(self): FILE: mplsandbox_for_rl/transformers/src/transformers/training_args_tf.py class TFTrainingArguments (line 32) | class TFTrainingArguments(TrainingArguments): method _setup_strategy (line 192) | def _setup_strategy(self) -> Tuple["tf.distribute.Strategy", int]: method strategy (line 241) | def strategy(self) -> "tf.distribute.Strategy": method n_replicas (line 249) | def n_replicas(self) -> int: method should_log (line 257) | def should_log(self): method train_batch_size (line 264) | def train_batch_size(self) -> int: method eval_batch_size (line 277) | def eval_batch_size(self) -> int: method n_gpu (line 290) | def n_gpu(self) -> int: FILE: mplsandbox_for_rl/transformers/src/transformers/utils/__init__.py function check_min_version (line 260) | def check_min_version(min_version): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/backbone_utils.py class BackboneType (line 27) | class BackboneType(enum.Enum): function verify_out_features_out_indices (line 32) | def verify_out_features_out_indices( function _align_output_features_output_indices (line 77) | def _align_output_features_output_indices( function get_aligned_output_features_output_indices (line 108) | def get_aligned_output_features_output_indices( class BackboneMixin (line 140) | class BackboneMixin: method _init_timm_backbone (line 143) | def _init_timm_backbone(self, config) -> None: method _init_transformers_backbone (line 167) | def _init_transformers_backbone(self, config) -> None: method _init_backbone (line 179) | def _init_backbone(self, config) -> None: method out_features (line 197) | def out_features(self): method out_features (line 201) | def out_features(self, out_features: List[str]): method out_indices (line 210) | def out_indices(self): method out_indices (line 214) | def out_indices(self, out_indices: Union[Tuple[int], List[int]]): method out_feature_channels (line 223) | def out_feature_channels(self): method channels (line 229) | def channels(self): method forward_with_filtered_kwargs (line 232) | def forward_with_filtered_kwargs(self, *args, **kwargs): method forward (line 237) | def forward( method to_dict (line 246) | def to_dict(self): class BackboneConfigMixin (line 257) | class BackboneConfigMixin: method out_features (line 263) | def out_features(self): method out_features (line 267) | def out_features(self, out_features: List[str]): method out_indices (line 276) | def out_indices(self): method out_indices (line 280) | def out_indices(self, out_indices: Union[Tuple[int], List[int]]): method to_dict (line 288) | def to_dict(self): function load_backbone (line 299) | def load_backbone(config): function verify_backbone_config_arguments (line 360) | def verify_backbone_config_arguments( FILE: mplsandbox_for_rl/transformers/src/transformers/utils/chat_template_utils.py class TypeHintParsingException (line 40) | class TypeHintParsingException(Exception): class DocstringParsingException (line 46) | class DocstringParsingException(Exception): function _get_json_schema_type (line 52) | def _get_json_schema_type(param_type: str) -> Dict[str, str]: function _parse_type_hint (line 63) | def _parse_type_hint(hint: str) -> Dict: function _convert_type_hints_to_json_schema (line 128) | def _convert_type_hints_to_json_schema(func: Callable) -> Dict: function parse_google_format_docstring (line 149) | def parse_google_format_docstring(docstring: str) -> Tuple[Optional[str]... function get_json_schema (line 182) | def get_json_schema(func: Callable) -> Dict: FILE: mplsandbox_for_rl/transformers/src/transformers/utils/deprecation.py class Action (line 25) | class Action(ExplicitEnum): function deprecate_kwarg (line 32) | def deprecate_kwarg( FILE: mplsandbox_for_rl/transformers/src/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 1050) | def filter_outputs_from_example(docstring, **kwargs): function add_code_sample_docstrings (line 1064) | def add_code_sample_docstrings( function replace_return_docstrings (line 1162) | def replace_return_docstrings(output_type=None, config_class=None): function copy_func (line 1184) | def copy_func(f): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/dummy_detectron2_objects.py class LayoutLMv2Model (line 5) | class LayoutLMv2Model: method __init__ (line 6) | def __init__(self, *args, **kwargs): method from_pretrained (line 10) | def from_pretrained(cls, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.py class Pop2PianoFeatureExtractor (line 5) | class Pop2PianoFeatureExtractor(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class Pop2PianoTokenizer (line 12) | class Pop2PianoTokenizer(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): class Pop2PianoProcessor (line 19) | class Pop2PianoProcessor(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/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 FlaxForceTokensLogitsProcessor (line 19) | class FlaxForceTokensLogitsProcessor(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class FlaxGenerationMixin (line 26) | class FlaxGenerationMixin(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class FlaxLogitsProcessor (line 33) | class FlaxLogitsProcessor(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class FlaxLogitsProcessorList (line 40) | class FlaxLogitsProcessorList(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class FlaxLogitsWarper (line 47) | class FlaxLogitsWarper(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class FlaxMinLengthLogitsProcessor (line 54) | class FlaxMinLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class FlaxSuppressTokensAtBeginLogitsProcessor (line 61) | class FlaxSuppressTokensAtBeginLogitsProcessor(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class FlaxSuppressTokensLogitsProcessor (line 68) | class FlaxSuppressTokensLogitsProcessor(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class FlaxTemperatureLogitsWarper (line 75) | class FlaxTemperatureLogitsWarper(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class FlaxTopKLogitsWarper (line 82) | class FlaxTopKLogitsWarper(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class FlaxTopPLogitsWarper (line 89) | class FlaxTopPLogitsWarper(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class FlaxWhisperTimeStampLogitsProcessor (line 96) | class FlaxWhisperTimeStampLogitsProcessor(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class FlaxPreTrainedModel (line 103) | class FlaxPreTrainedModel(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class FlaxAlbertForMaskedLM (line 110) | class FlaxAlbertForMaskedLM(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class FlaxAlbertForMultipleChoice (line 117) | class FlaxAlbertForMultipleChoice(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class FlaxAlbertForPreTraining (line 124) | class FlaxAlbertForPreTraining(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class FlaxAlbertForQuestionAnswering (line 131) | class FlaxAlbertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class FlaxAlbertForSequenceClassification (line 138) | class FlaxAlbertForSequenceClassification(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class FlaxAlbertForTokenClassification (line 145) | class FlaxAlbertForTokenClassification(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class FlaxAlbertModel (line 152) | class FlaxAlbertModel(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class FlaxAlbertPreTrainedModel (line 159) | class FlaxAlbertPreTrainedModel(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): class FlaxAutoModel (line 208) | class FlaxAutoModel(metaclass=DummyObject): method __init__ (line 211) | def __init__(self, *args, **kwargs): class FlaxAutoModelForCausalLM (line 215) | class FlaxAutoModelForCausalLM(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): class FlaxAutoModelForImageClassification (line 222) | class FlaxAutoModelForImageClassification(metaclass=DummyObject): method __init__ (line 225) | def __init__(self, *args, **kwargs): class FlaxAutoModelForMaskedLM (line 229) | class FlaxAutoModelForMaskedLM(metaclass=DummyObject): method __init__ (line 232) | def __init__(self, *args, **kwargs): class FlaxAutoModelForMultipleChoice (line 236) | class FlaxAutoModelForMultipleChoice(metaclass=DummyObject): method __init__ (line 239) | def __init__(self, *args, **kwargs): class FlaxAutoModelForNextSentencePrediction (line 243) | class FlaxAutoModelForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 246) | def __init__(self, *args, **kwargs): class FlaxAutoModelForPreTraining (line 250) | class FlaxAutoModelForPreTraining(metaclass=DummyObject): method __init__ (line 253) | def __init__(self, *args, **kwargs): class FlaxAutoModelForQuestionAnswering (line 257) | class FlaxAutoModelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 260) | def __init__(self, *args, **kwargs): class FlaxAutoModelForSeq2SeqLM (line 264) | class FlaxAutoModelForSeq2SeqLM(metaclass=DummyObject): method __init__ (line 267) | def __init__(self, *args, **kwargs): class FlaxAutoModelForSequenceClassification (line 271) | class FlaxAutoModelForSequenceClassification(metaclass=DummyObject): method __init__ (line 274) | def __init__(self, *args, **kwargs): class FlaxAutoModelForSpeechSeq2Seq (line 278) | class FlaxAutoModelForSpeechSeq2Seq(metaclass=DummyObject): method __init__ (line 281) | def __init__(self, *args, **kwargs): class FlaxAutoModelForTokenClassification (line 285) | class FlaxAutoModelForTokenClassification(metaclass=DummyObject): method __init__ (line 288) | def __init__(self, *args, **kwargs): class FlaxAutoModelForVision2Seq (line 292) | class FlaxAutoModelForVision2Seq(metaclass=DummyObject): method __init__ (line 295) | def __init__(self, *args, **kwargs): class FlaxBartDecoderPreTrainedModel (line 299) | class FlaxBartDecoderPreTrainedModel(metaclass=DummyObject): method __init__ (line 302) | def __init__(self, *args, **kwargs): class FlaxBartForCausalLM (line 306) | class FlaxBartForCausalLM(metaclass=DummyObject): method __init__ (line 309) | def __init__(self, *args, **kwargs): class FlaxBartForConditionalGeneration (line 313) | class FlaxBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 316) | def __init__(self, *args, **kwargs): class FlaxBartForQuestionAnswering (line 320) | class FlaxBartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 323) | def __init__(self, *args, **kwargs): class FlaxBartForSequenceClassification (line 327) | class FlaxBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 330) | def __init__(self, *args, **kwargs): class FlaxBartModel (line 334) | class FlaxBartModel(metaclass=DummyObject): method __init__ (line 337) | def __init__(self, *args, **kwargs): class FlaxBartPreTrainedModel (line 341) | class FlaxBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 344) | def __init__(self, *args, **kwargs): class FlaxBeitForImageClassification (line 348) | class FlaxBeitForImageClassification(metaclass=DummyObject): method __init__ (line 351) | def __init__(self, *args, **kwargs): class FlaxBeitForMaskedImageModeling (line 355) | class FlaxBeitForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 358) | def __init__(self, *args, **kwargs): class FlaxBeitModel (line 362) | class FlaxBeitModel(metaclass=DummyObject): method __init__ (line 365) | def __init__(self, *args, **kwargs): class FlaxBeitPreTrainedModel (line 369) | class FlaxBeitPreTrainedModel(metaclass=DummyObject): method __init__ (line 372) | def __init__(self, *args, **kwargs): class FlaxBertForCausalLM (line 376) | class FlaxBertForCausalLM(metaclass=DummyObject): method __init__ (line 379) | def __init__(self, *args, **kwargs): class FlaxBertForMaskedLM (line 383) | class FlaxBertForMaskedLM(metaclass=DummyObject): method __init__ (line 386) | def __init__(self, *args, **kwargs): class FlaxBertForMultipleChoice (line 390) | class FlaxBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 393) | def __init__(self, *args, **kwargs): class FlaxBertForNextSentencePrediction (line 397) | class FlaxBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 400) | def __init__(self, *args, **kwargs): class FlaxBertForPreTraining (line 404) | class FlaxBertForPreTraining(metaclass=DummyObject): method __init__ (line 407) | def __init__(self, *args, **kwargs): class FlaxBertForQuestionAnswering (line 411) | class FlaxBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 414) | def __init__(self, *args, **kwargs): class FlaxBertForSequenceClassification (line 418) | class FlaxBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 421) | def __init__(self, *args, **kwargs): class FlaxBertForTokenClassification (line 425) | class FlaxBertForTokenClassification(metaclass=DummyObject): method __init__ (line 428) | def __init__(self, *args, **kwargs): class FlaxBertModel (line 432) | class FlaxBertModel(metaclass=DummyObject): method __init__ (line 435) | def __init__(self, *args, **kwargs): class FlaxBertPreTrainedModel (line 439) | class FlaxBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 442) | def __init__(self, *args, **kwargs): class FlaxBigBirdForCausalLM (line 446) | class FlaxBigBirdForCausalLM(metaclass=DummyObject): method __init__ (line 449) | def __init__(self, *args, **kwargs): class FlaxBigBirdForMaskedLM (line 453) | class FlaxBigBirdForMaskedLM(metaclass=DummyObject): method __init__ (line 456) | def __init__(self, *args, **kwargs): class FlaxBigBirdForMultipleChoice (line 460) | class FlaxBigBirdForMultipleChoice(metaclass=DummyObject): method __init__ (line 463) | def __init__(self, *args, **kwargs): class FlaxBigBirdForPreTraining (line 467) | class FlaxBigBirdForPreTraining(metaclass=DummyObject): method __init__ (line 470) | def __init__(self, *args, **kwargs): class FlaxBigBirdForQuestionAnswering (line 474) | class FlaxBigBirdForQuestionAnswering(metaclass=DummyObject): method __init__ (line 477) | def __init__(self, *args, **kwargs): class FlaxBigBirdForSequenceClassification (line 481) | class FlaxBigBirdForSequenceClassification(metaclass=DummyObject): method __init__ (line 484) | def __init__(self, *args, **kwargs): class FlaxBigBirdForTokenClassification (line 488) | class FlaxBigBirdForTokenClassification(metaclass=DummyObject): method __init__ (line 491) | def __init__(self, *args, **kwargs): class FlaxBigBirdModel (line 495) | class FlaxBigBirdModel(metaclass=DummyObject): method __init__ (line 498) | def __init__(self, *args, **kwargs): class FlaxBigBirdPreTrainedModel (line 502) | class FlaxBigBirdPreTrainedModel(metaclass=DummyObject): method __init__ (line 505) | def __init__(self, *args, **kwargs): class FlaxBlenderbotForConditionalGeneration (line 509) | class FlaxBlenderbotForConditionalGeneration(metaclass=DummyObject): method __init__ (line 512) | def __init__(self, *args, **kwargs): class FlaxBlenderbotModel (line 516) | class FlaxBlenderbotModel(metaclass=DummyObject): method __init__ (line 519) | def __init__(self, *args, **kwargs): class FlaxBlenderbotPreTrainedModel (line 523) | class FlaxBlenderbotPreTrainedModel(metaclass=DummyObject): method __init__ (line 526) | def __init__(self, *args, **kwargs): class FlaxBlenderbotSmallForConditionalGeneration (line 530) | class FlaxBlenderbotSmallForConditionalGeneration(metaclass=DummyObject): method __init__ (line 533) | def __init__(self, *args, **kwargs): class FlaxBlenderbotSmallModel (line 537) | class FlaxBlenderbotSmallModel(metaclass=DummyObject): method __init__ (line 540) | def __init__(self, *args, **kwargs): class FlaxBlenderbotSmallPreTrainedModel (line 544) | class FlaxBlenderbotSmallPreTrainedModel(metaclass=DummyObject): method __init__ (line 547) | def __init__(self, *args, **kwargs): class FlaxBloomForCausalLM (line 551) | class FlaxBloomForCausalLM(metaclass=DummyObject): method __init__ (line 554) | def __init__(self, *args, **kwargs): class FlaxBloomModel (line 558) | class FlaxBloomModel(metaclass=DummyObject): method __init__ (line 561) | def __init__(self, *args, **kwargs): class FlaxBloomPreTrainedModel (line 565) | class FlaxBloomPreTrainedModel(metaclass=DummyObject): method __init__ (line 568) | def __init__(self, *args, **kwargs): class FlaxCLIPModel (line 572) | class FlaxCLIPModel(metaclass=DummyObject): method __init__ (line 575) | def __init__(self, *args, **kwargs): class FlaxCLIPPreTrainedModel (line 579) | class FlaxCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 582) | def __init__(self, *args, **kwargs): class FlaxCLIPTextModel (line 586) | class FlaxCLIPTextModel(metaclass=DummyObject): method __init__ (line 589) | def __init__(self, *args, **kwargs): class FlaxCLIPTextModelWithProjection (line 593) | class FlaxCLIPTextModelWithProjection(metaclass=DummyObject): method __init__ (line 596) | def __init__(self, *args, **kwargs): class FlaxCLIPTextPreTrainedModel (line 600) | class FlaxCLIPTextPreTrainedModel(metaclass=DummyObject): method __init__ (line 603) | def __init__(self, *args, **kwargs): class FlaxCLIPVisionModel (line 607) | class FlaxCLIPVisionModel(metaclass=DummyObject): method __init__ (line 610) | def __init__(self, *args, **kwargs): class FlaxCLIPVisionPreTrainedModel (line 614) | class FlaxCLIPVisionPreTrainedModel(metaclass=DummyObject): method __init__ (line 617) | def __init__(self, *args, **kwargs): class FlaxDinov2ForImageClassification (line 621) | class FlaxDinov2ForImageClassification(metaclass=DummyObject): method __init__ (line 624) | def __init__(self, *args, **kwargs): class FlaxDinov2Model (line 628) | class FlaxDinov2Model(metaclass=DummyObject): method __init__ (line 631) | def __init__(self, *args, **kwargs): class FlaxDinov2PreTrainedModel (line 635) | class FlaxDinov2PreTrainedModel(metaclass=DummyObject): method __init__ (line 638) | def __init__(self, *args, **kwargs): class FlaxDistilBertForMaskedLM (line 642) | class FlaxDistilBertForMaskedLM(metaclass=DummyObject): method __init__ (line 645) | def __init__(self, *args, **kwargs): class FlaxDistilBertForMultipleChoice (line 649) | class FlaxDistilBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 652) | def __init__(self, *args, **kwargs): class FlaxDistilBertForQuestionAnswering (line 656) | class FlaxDistilBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 659) | def __init__(self, *args, **kwargs): class FlaxDistilBertForSequenceClassification (line 663) | class FlaxDistilBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 666) | def __init__(self, *args, **kwargs): class FlaxDistilBertForTokenClassification (line 670) | class FlaxDistilBertForTokenClassification(metaclass=DummyObject): method __init__ (line 673) | def __init__(self, *args, **kwargs): class FlaxDistilBertModel (line 677) | class FlaxDistilBertModel(metaclass=DummyObject): method __init__ (line 680) | def __init__(self, *args, **kwargs): class FlaxDistilBertPreTrainedModel (line 684) | class FlaxDistilBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 687) | def __init__(self, *args, **kwargs): class FlaxElectraForCausalLM (line 691) | class FlaxElectraForCausalLM(metaclass=DummyObject): method __init__ (line 694) | def __init__(self, *args, **kwargs): class FlaxElectraForMaskedLM (line 698) | class FlaxElectraForMaskedLM(metaclass=DummyObject): method __init__ (line 701) | def __init__(self, *args, **kwargs): class FlaxElectraForMultipleChoice (line 705) | class FlaxElectraForMultipleChoice(metaclass=DummyObject): method __init__ (line 708) | def __init__(self, *args, **kwargs): class FlaxElectraForPreTraining (line 712) | class FlaxElectraForPreTraining(metaclass=DummyObject): method __init__ (line 715) | def __init__(self, *args, **kwargs): class FlaxElectraForQuestionAnswering (line 719) | class FlaxElectraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 722) | def __init__(self, *args, **kwargs): class FlaxElectraForSequenceClassification (line 726) | class FlaxElectraForSequenceClassification(metaclass=DummyObject): method __init__ (line 729) | def __init__(self, *args, **kwargs): class FlaxElectraForTokenClassification (line 733) | class FlaxElectraForTokenClassification(metaclass=DummyObject): method __init__ (line 736) | def __init__(self, *args, **kwargs): class FlaxElectraModel (line 740) | class FlaxElectraModel(metaclass=DummyObject): method __init__ (line 743) | def __init__(self, *args, **kwargs): class FlaxElectraPreTrainedModel (line 747) | class FlaxElectraPreTrainedModel(metaclass=DummyObject): method __init__ (line 750) | def __init__(self, *args, **kwargs): class FlaxEncoderDecoderModel (line 754) | class FlaxEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 757) | def __init__(self, *args, **kwargs): class FlaxGemmaForCausalLM (line 761) | class FlaxGemmaForCausalLM(metaclass=DummyObject): method __init__ (line 764) | def __init__(self, *args, **kwargs): class FlaxGemmaModel (line 768) | class FlaxGemmaModel(metaclass=DummyObject): method __init__ (line 771) | def __init__(self, *args, **kwargs): class FlaxGemmaPreTrainedModel (line 775) | class FlaxGemmaPreTrainedModel(metaclass=DummyObject): method __init__ (line 778) | def __init__(self, *args, **kwargs): class FlaxGPT2LMHeadModel (line 782) | class FlaxGPT2LMHeadModel(metaclass=DummyObject): method __init__ (line 785) | def __init__(self, *args, **kwargs): class FlaxGPT2Model (line 789) | class FlaxGPT2Model(metaclass=DummyObject): method __init__ (line 792) | def __init__(self, *args, **kwargs): class FlaxGPT2PreTrainedModel (line 796) | class FlaxGPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 799) | def __init__(self, *args, **kwargs): class FlaxGPTNeoForCausalLM (line 803) | class FlaxGPTNeoForCausalLM(metaclass=DummyObject): method __init__ (line 806) | def __init__(self, *args, **kwargs): class FlaxGPTNeoModel (line 810) | class FlaxGPTNeoModel(metaclass=DummyObject): method __init__ (line 813) | def __init__(self, *args, **kwargs): class FlaxGPTNeoPreTrainedModel (line 817) | class FlaxGPTNeoPreTrainedModel(metaclass=DummyObject): method __init__ (line 820) | def __init__(self, *args, **kwargs): class FlaxGPTJForCausalLM (line 824) | class FlaxGPTJForCausalLM(metaclass=DummyObject): method __init__ (line 827) | def __init__(self, *args, **kwargs): class FlaxGPTJModel (line 831) | class FlaxGPTJModel(metaclass=DummyObject): method __init__ (line 834) | def __init__(self, *args, **kwargs): class FlaxGPTJPreTrainedModel (line 838) | class FlaxGPTJPreTrainedModel(metaclass=DummyObject): method __init__ (line 841) | def __init__(self, *args, **kwargs): class FlaxLlamaForCausalLM (line 845) | class FlaxLlamaForCausalLM(metaclass=DummyObject): method __init__ (line 848) | def __init__(self, *args, **kwargs): class FlaxLlamaModel (line 852) | class FlaxLlamaModel(metaclass=DummyObject): method __init__ (line 855) | def __init__(self, *args, **kwargs): class FlaxLlamaPreTrainedModel (line 859) | class FlaxLlamaPreTrainedModel(metaclass=DummyObject): method __init__ (line 862) | def __init__(self, *args, **kwargs): class FlaxLongT5ForConditionalGeneration (line 866) | class FlaxLongT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 869) | def __init__(self, *args, **kwargs): class FlaxLongT5Model (line 873) | class FlaxLongT5Model(metaclass=DummyObject): method __init__ (line 876) | def __init__(self, *args, **kwargs): class FlaxLongT5PreTrainedModel (line 880) | class FlaxLongT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 883) | def __init__(self, *args, **kwargs): class FlaxMarianModel (line 887) | class FlaxMarianModel(metaclass=DummyObject): method __init__ (line 890) | def __init__(self, *args, **kwargs): class FlaxMarianMTModel (line 894) | class FlaxMarianMTModel(metaclass=DummyObject): method __init__ (line 897) | def __init__(self, *args, **kwargs): class FlaxMarianPreTrainedModel (line 901) | class FlaxMarianPreTrainedModel(metaclass=DummyObject): method __init__ (line 904) | def __init__(self, *args, **kwargs): class FlaxMBartForConditionalGeneration (line 908) | class FlaxMBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 911) | def __init__(self, *args, **kwargs): class FlaxMBartForQuestionAnswering (line 915) | class FlaxMBartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 918) | def __init__(self, *args, **kwargs): class FlaxMBartForSequenceClassification (line 922) | class FlaxMBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 925) | def __init__(self, *args, **kwargs): class FlaxMBartModel (line 929) | class FlaxMBartModel(metaclass=DummyObject): method __init__ (line 932) | def __init__(self, *args, **kwargs): class FlaxMBartPreTrainedModel (line 936) | class FlaxMBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 939) | def __init__(self, *args, **kwargs): class FlaxMistralForCausalLM (line 943) | class FlaxMistralForCausalLM(metaclass=DummyObject): method __init__ (line 946) | def __init__(self, *args, **kwargs): class FlaxMistralModel (line 950) | class FlaxMistralModel(metaclass=DummyObject): method __init__ (line 953) | def __init__(self, *args, **kwargs): class FlaxMistralPreTrainedModel (line 957) | class FlaxMistralPreTrainedModel(metaclass=DummyObject): method __init__ (line 960) | def __init__(self, *args, **kwargs): class FlaxMT5EncoderModel (line 964) | class FlaxMT5EncoderModel(metaclass=DummyObject): method __init__ (line 967) | def __init__(self, *args, **kwargs): class FlaxMT5ForConditionalGeneration (line 971) | class FlaxMT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 974) | def __init__(self, *args, **kwargs): class FlaxMT5Model (line 978) | class FlaxMT5Model(metaclass=DummyObject): method __init__ (line 981) | def __init__(self, *args, **kwargs): class FlaxOPTForCausalLM (line 985) | class FlaxOPTForCausalLM(metaclass=DummyObject): method __init__ (line 988) | def __init__(self, *args, **kwargs): class FlaxOPTModel (line 992) | class FlaxOPTModel(metaclass=DummyObject): method __init__ (line 995) | def __init__(self, *args, **kwargs): class FlaxOPTPreTrainedModel (line 999) | class FlaxOPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1002) | def __init__(self, *args, **kwargs): class FlaxPegasusForConditionalGeneration (line 1006) | class FlaxPegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1009) | def __init__(self, *args, **kwargs): class FlaxPegasusModel (line 1013) | class FlaxPegasusModel(metaclass=DummyObject): method __init__ (line 1016) | def __init__(self, *args, **kwargs): class FlaxPegasusPreTrainedModel (line 1020) | class FlaxPegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 1023) | def __init__(self, *args, **kwargs): class FlaxRegNetForImageClassification (line 1027) | class FlaxRegNetForImageClassification(metaclass=DummyObject): method __init__ (line 1030) | def __init__(self, *args, **kwargs): class FlaxRegNetModel (line 1034) | class FlaxRegNetModel(metaclass=DummyObject): method __init__ (line 1037) | def __init__(self, *args, **kwargs): class FlaxRegNetPreTrainedModel (line 1041) | class FlaxRegNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 1044) | def __init__(self, *args, **kwargs): class FlaxResNetForImageClassification (line 1048) | class FlaxResNetForImageClassification(metaclass=DummyObject): method __init__ (line 1051) | def __init__(self, *args, **kwargs): class FlaxResNetModel (line 1055) | class FlaxResNetModel(metaclass=DummyObject): method __init__ (line 1058) | def __init__(self, *args, **kwargs): class FlaxResNetPreTrainedModel (line 1062) | class FlaxResNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 1065) | def __init__(self, *args, **kwargs): class FlaxRobertaForCausalLM (line 1069) | class FlaxRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 1072) | def __init__(self, *args, **kwargs): class FlaxRobertaForMaskedLM (line 1076) | class FlaxRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 1079) | def __init__(self, *args, **kwargs): class FlaxRobertaForMultipleChoice (line 1083) | class FlaxRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 1086) | def __init__(self, *args, **kwargs): class FlaxRobertaForQuestionAnswering (line 1090) | class FlaxRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1093) | def __init__(self, *args, **kwargs): class FlaxRobertaForSequenceClassification (line 1097) | class FlaxRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 1100) | def __init__(self, *args, **kwargs): class FlaxRobertaForTokenClassification (line 1104) | class FlaxRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 1107) | def __init__(self, *args, **kwargs): class FlaxRobertaModel (line 1111) | class FlaxRobertaModel(metaclass=DummyObject): method __init__ (line 1114) | def __init__(self, *args, **kwargs): class FlaxRobertaPreTrainedModel (line 1118) | class FlaxRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 1121) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForCausalLM (line 1125) | class FlaxRobertaPreLayerNormForCausalLM(metaclass=DummyObject): method __init__ (line 1128) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForMaskedLM (line 1132) | class FlaxRobertaPreLayerNormForMaskedLM(metaclass=DummyObject): method __init__ (line 1135) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForMultipleChoice (line 1139) | class FlaxRobertaPreLayerNormForMultipleChoice(metaclass=DummyObject): method __init__ (line 1142) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForQuestionAnswering (line 1146) | class FlaxRobertaPreLayerNormForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1149) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForSequenceClassification (line 1153) | class FlaxRobertaPreLayerNormForSequenceClassification(metaclass=DummyOb... method __init__ (line 1156) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForTokenClassification (line 1160) | class FlaxRobertaPreLayerNormForTokenClassification(metaclass=DummyObject): method __init__ (line 1163) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormModel (line 1167) | class FlaxRobertaPreLayerNormModel(metaclass=DummyObject): method __init__ (line 1170) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormPreTrainedModel (line 1174) | class FlaxRobertaPreLayerNormPreTrainedModel(metaclass=DummyObject): method __init__ (line 1177) | def __init__(self, *args, **kwargs): class FlaxRoFormerForMaskedLM (line 1181) | class FlaxRoFormerForMaskedLM(metaclass=DummyObject): method __init__ (line 1184) | def __init__(self, *args, **kwargs): class FlaxRoFormerForMultipleChoice (line 1188) | class FlaxRoFormerForMultipleChoice(metaclass=DummyObject): method __init__ (line 1191) | def __init__(self, *args, **kwargs): class FlaxRoFormerForQuestionAnswering (line 1195) | class FlaxRoFormerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1198) | def __init__(self, *args, **kwargs): class FlaxRoFormerForSequenceClassification (line 1202) | class FlaxRoFormerForSequenceClassification(metaclass=DummyObject): method __init__ (line 1205) | def __init__(self, *args, **kwargs): class FlaxRoFormerForTokenClassification (line 1209) | class FlaxRoFormerForTokenClassification(metaclass=DummyObject): method __init__ (line 1212) | def __init__(self, *args, **kwargs): class FlaxRoFormerModel (line 1216) | class FlaxRoFormerModel(metaclass=DummyObject): method __init__ (line 1219) | def __init__(self, *args, **kwargs): class FlaxRoFormerPreTrainedModel (line 1223) | class FlaxRoFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1226) | def __init__(self, *args, **kwargs): class FlaxSpeechEncoderDecoderModel (line 1230) | class FlaxSpeechEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 1233) | def __init__(self, *args, **kwargs): class FlaxT5EncoderModel (line 1237) | class FlaxT5EncoderModel(metaclass=DummyObject): method __init__ (line 1240) | def __init__(self, *args, **kwargs): class FlaxT5ForConditionalGeneration (line 1244) | class FlaxT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1247) | def __init__(self, *args, **kwargs): class FlaxT5Model (line 1251) | class FlaxT5Model(metaclass=DummyObject): method __init__ (line 1254) | def __init__(self, *args, **kwargs): class FlaxT5PreTrainedModel (line 1258) | class FlaxT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 1261) | def __init__(self, *args, **kwargs): class FlaxVisionEncoderDecoderModel (line 1265) | class FlaxVisionEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 1268) | def __init__(self, *args, **kwargs): class FlaxVisionTextDualEncoderModel (line 1272) | class FlaxVisionTextDualEncoderModel(metaclass=DummyObject): method __init__ (line 1275) | def __init__(self, *args, **kwargs): class FlaxViTForImageClassification (line 1279) | class FlaxViTForImageClassification(metaclass=DummyObject): method __init__ (line 1282) | def __init__(self, *args, **kwargs): class FlaxViTModel (line 1286) | class FlaxViTModel(metaclass=DummyObject): method __init__ (line 1289) | def __init__(self, *args, **kwargs): class FlaxViTPreTrainedModel (line 1293) | class FlaxViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1296) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2ForCTC (line 1300) | class FlaxWav2Vec2ForCTC(metaclass=DummyObject): method __init__ (line 1303) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2ForPreTraining (line 1307) | class FlaxWav2Vec2ForPreTraining(metaclass=DummyObject): method __init__ (line 1310) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2Model (line 1314) | class FlaxWav2Vec2Model(metaclass=DummyObject): method __init__ (line 1317) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2PreTrainedModel (line 1321) | class FlaxWav2Vec2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1324) | def __init__(self, *args, **kwargs): class FlaxWhisperForAudioClassification (line 1328) | class FlaxWhisperForAudioClassification(metaclass=DummyObject): method __init__ (line 1331) | def __init__(self, *args, **kwargs): class FlaxWhisperForConditionalGeneration (line 1335) | class FlaxWhisperForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1338) | def __init__(self, *args, **kwargs): class FlaxWhisperModel (line 1342) | class FlaxWhisperModel(metaclass=DummyObject): method __init__ (line 1345) | def __init__(self, *args, **kwargs): class FlaxWhisperPreTrainedModel (line 1349) | class FlaxWhisperPreTrainedModel(metaclass=DummyObject): method __init__ (line 1352) | def __init__(self, *args, **kwargs): class FlaxXGLMForCausalLM (line 1356) | class FlaxXGLMForCausalLM(metaclass=DummyObject): method __init__ (line 1359) | def __init__(self, *args, **kwargs): class FlaxXGLMModel (line 1363) | class FlaxXGLMModel(metaclass=DummyObject): method __init__ (line 1366) | def __init__(self, *args, **kwargs): class FlaxXGLMPreTrainedModel (line 1370) | class FlaxXGLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 1373) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForCausalLM (line 1377) | class FlaxXLMRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 1380) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForMaskedLM (line 1384) | class FlaxXLMRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 1387) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForMultipleChoice (line 1391) | class FlaxXLMRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 1394) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForQuestionAnswering (line 1398) | class FlaxXLMRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1401) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForSequenceClassification (line 1405) | class FlaxXLMRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 1408) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForTokenClassification (line 1412) | class FlaxXLMRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 1415) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaModel (line 1419) | class FlaxXLMRobertaModel(metaclass=DummyObject): method __init__ (line 1422) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaPreTrainedModel (line 1426) | class FlaxXLMRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 1429) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/utils/dummy_music_objects.py class Pop2PianoFeatureExtractor (line 5) | class Pop2PianoFeatureExtractor(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class Pop2PianoTokenizer (line 12) | class Pop2PianoTokenizer(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/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 Cache (line 19) | class Cache(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class CacheConfig (line 26) | class CacheConfig(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class DynamicCache (line 33) | class DynamicCache(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class EncoderDecoderCache (line 40) | class EncoderDecoderCache(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class HQQQuantizedCache (line 47) | class HQQQuantizedCache(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class HybridCache (line 54) | class HybridCache(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class MambaCache (line 61) | class MambaCache(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class OffloadedCache (line 68) | class OffloadedCache(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class QuantizedCache (line 75) | class QuantizedCache(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class QuantizedCacheConfig (line 82) | class QuantizedCacheConfig(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class QuantoQuantizedCache (line 89) | class QuantoQuantizedCache(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class SinkCache (line 96) | class SinkCache(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class SlidingWindowCache (line 103) | class SlidingWindowCache(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class StaticCache (line 110) | class StaticCache(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class GlueDataset (line 117) | class GlueDataset(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class GlueDataTrainingArguments (line 124) | class GlueDataTrainingArguments(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class LineByLineTextDataset (line 131) | class LineByLineTextDataset(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class LineByLineWithRefDataset (line 138) | class LineByLineWithRefDataset(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class LineByLineWithSOPTextDataset (line 145) | class LineByLineWithSOPTextDataset(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class SquadDataset (line 152) | class SquadDataset(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class SquadDataTrainingArguments (line 159) | class SquadDataTrainingArguments(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): class TextDataset (line 166) | class TextDataset(metaclass=DummyObject): method __init__ (line 169) | def __init__(self, *args, **kwargs): class TextDatasetForNextSentencePrediction (line 173) | class TextDatasetForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 176) | def __init__(self, *args, **kwargs): class AlternatingCodebooksLogitsProcessor (line 180) | class AlternatingCodebooksLogitsProcessor(metaclass=DummyObject): method __init__ (line 183) | def __init__(self, *args, **kwargs): class BeamScorer (line 187) | class BeamScorer(metaclass=DummyObject): method __init__ (line 190) | def __init__(self, *args, **kwargs): class BeamSearchScorer (line 194) | class BeamSearchScorer(metaclass=DummyObject): method __init__ (line 197) | def __init__(self, *args, **kwargs): class ClassifierFreeGuidanceLogitsProcessor (line 201) | class ClassifierFreeGuidanceLogitsProcessor(metaclass=DummyObject): method __init__ (line 204) | def __init__(self, *args, **kwargs): class ConstrainedBeamSearchScorer (line 208) | class ConstrainedBeamSearchScorer(metaclass=DummyObject): method __init__ (line 211) | def __init__(self, *args, **kwargs): class Constraint (line 215) | class Constraint(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): class ConstraintListState (line 222) | class ConstraintListState(metaclass=DummyObject): method __init__ (line 225) | def __init__(self, *args, **kwargs): class DisjunctiveConstraint (line 229) | class DisjunctiveConstraint(metaclass=DummyObject): method __init__ (line 232) | def __init__(self, *args, **kwargs): class EncoderNoRepeatNGramLogitsProcessor (line 236) | class EncoderNoRepeatNGramLogitsProcessor(metaclass=DummyObject): method __init__ (line 239) | def __init__(self, *args, **kwargs): class EncoderRepetitionPenaltyLogitsProcessor (line 243) | class EncoderRepetitionPenaltyLogitsProcessor(metaclass=DummyObject): method __init__ (line 246) | def __init__(self, *args, **kwargs): class EosTokenCriteria (line 250) | class EosTokenCriteria(metaclass=DummyObject): method __init__ (line 253) | def __init__(self, *args, **kwargs): class EpsilonLogitsWarper (line 257) | class EpsilonLogitsWarper(metaclass=DummyObject): method __init__ (line 260) | def __init__(self, *args, **kwargs): class EtaLogitsWarper (line 264) | class EtaLogitsWarper(metaclass=DummyObject): method __init__ (line 267) | def __init__(self, *args, **kwargs): class ExponentialDecayLengthPenalty (line 271) | class ExponentialDecayLengthPenalty(metaclass=DummyObject): method __init__ (line 274) | def __init__(self, *args, **kwargs): class ForcedBOSTokenLogitsProcessor (line 278) | class ForcedBOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 281) | def __init__(self, *args, **kwargs): class ForcedEOSTokenLogitsProcessor (line 285) | class ForcedEOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 288) | def __init__(self, *args, **kwargs): class ForceTokensLogitsProcessor (line 292) | class ForceTokensLogitsProcessor(metaclass=DummyObject): method __init__ (line 295) | def __init__(self, *args, **kwargs): class GenerationMixin (line 299) | class GenerationMixin(metaclass=DummyObject): method __init__ (line 302) | def __init__(self, *args, **kwargs): class HammingDiversityLogitsProcessor (line 306) | class HammingDiversityLogitsProcessor(metaclass=DummyObject): method __init__ (line 309) | def __init__(self, *args, **kwargs): class InfNanRemoveLogitsProcessor (line 313) | class InfNanRemoveLogitsProcessor(metaclass=DummyObject): method __init__ (line 316) | def __init__(self, *args, **kwargs): class LogitNormalization (line 320) | class LogitNormalization(metaclass=DummyObject): method __init__ (line 323) | def __init__(self, *args, **kwargs): class LogitsProcessor (line 327) | class LogitsProcessor(metaclass=DummyObject): method __init__ (line 330) | def __init__(self, *args, **kwargs): class LogitsProcessorList (line 334) | class LogitsProcessorList(metaclass=DummyObject): method __init__ (line 337) | def __init__(self, *args, **kwargs): class LogitsWarper (line 341) | class LogitsWarper(metaclass=DummyObject): method __init__ (line 344) | def __init__(self, *args, **kwargs): class MaxLengthCriteria (line 348) | class MaxLengthCriteria(metaclass=DummyObject): method __init__ (line 351) | def __init__(self, *args, **kwargs): class MaxTimeCriteria (line 355) | class MaxTimeCriteria(metaclass=DummyObject): method __init__ (line 358) | def __init__(self, *args, **kwargs): class MinLengthLogitsProcessor (line 362) | class MinLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 365) | def __init__(self, *args, **kwargs): class MinNewTokensLengthLogitsProcessor (line 369) | class MinNewTokensLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 372) | def __init__(self, *args, **kwargs): class MinPLogitsWarper (line 376) | class MinPLogitsWarper(metaclass=DummyObject): method __init__ (line 379) | def __init__(self, *args, **kwargs): class NoBadWordsLogitsProcessor (line 383) | class NoBadWordsLogitsProcessor(metaclass=DummyObject): method __init__ (line 386) | def __init__(self, *args, **kwargs): class NoRepeatNGramLogitsProcessor (line 390) | class NoRepeatNGramLogitsProcessor(metaclass=DummyObject): method __init__ (line 393) | def __init__(self, *args, **kwargs): class PhrasalConstraint (line 397) | class PhrasalConstraint(metaclass=DummyObject): method __init__ (line 400) | def __init__(self, *args, **kwargs): class PrefixConstrainedLogitsProcessor (line 404) | class PrefixConstrainedLogitsProcessor(metaclass=DummyObject): method __init__ (line 407) | def __init__(self, *args, **kwargs): class RepetitionPenaltyLogitsProcessor (line 411) | class RepetitionPenaltyLogitsProcessor(metaclass=DummyObject): method __init__ (line 414) | def __init__(self, *args, **kwargs): class SequenceBiasLogitsProcessor (line 418) | class SequenceBiasLogitsProcessor(metaclass=DummyObject): method __init__ (line 421) | def __init__(self, *args, **kwargs): class StoppingCriteria (line 425) | class StoppingCriteria(metaclass=DummyObject): method __init__ (line 428) | def __init__(self, *args, **kwargs): class StoppingCriteriaList (line 432) | class StoppingCriteriaList(metaclass=DummyObject): method __init__ (line 435) | def __init__(self, *args, **kwargs): class StopStringCriteria (line 439) | class StopStringCriteria(metaclass=DummyObject): method __init__ (line 442) | def __init__(self, *args, **kwargs): class SuppressTokensAtBeginLogitsProcessor (line 446) | class SuppressTokensAtBeginLogitsProcessor(metaclass=DummyObject): method __init__ (line 449) | def __init__(self, *args, **kwargs): class SuppressTokensLogitsProcessor (line 453) | class SuppressTokensLogitsProcessor(metaclass=DummyObject): method __init__ (line 456) | def __init__(self, *args, **kwargs): class TemperatureLogitsWarper (line 460) | class TemperatureLogitsWarper(metaclass=DummyObject): method __init__ (line 463) | def __init__(self, *args, **kwargs): class TopKLogitsWarper (line 467) | class TopKLogitsWarper(metaclass=DummyObject): method __init__ (line 470) | def __init__(self, *args, **kwargs): class TopPLogitsWarper (line 474) | class TopPLogitsWarper(metaclass=DummyObject): method __init__ (line 477) | def __init__(self, *args, **kwargs): class TypicalLogitsWarper (line 481) | class TypicalLogitsWarper(metaclass=DummyObject): method __init__ (line 484) | def __init__(self, *args, **kwargs): class UnbatchedClassifierFreeGuidanceLogitsProcessor (line 488) | class UnbatchedClassifierFreeGuidanceLogitsProcessor(metaclass=DummyObje... method __init__ (line 491) | def __init__(self, *args, **kwargs): class WatermarkDetector (line 495) | class WatermarkDetector(metaclass=DummyObject): method __init__ (line 498) | def __init__(self, *args, **kwargs): class WatermarkLogitsProcessor (line 502) | class WatermarkLogitsProcessor(metaclass=DummyObject): method __init__ (line 505) | def __init__(self, *args, **kwargs): class WhisperTimeStampLogitsProcessor (line 509) | class WhisperTimeStampLogitsProcessor(metaclass=DummyObject): method __init__ (line 512) | def __init__(self, *args, **kwargs): class PreTrainedModel (line 519) | class PreTrainedModel(metaclass=DummyObject): method __init__ (line 522) | def __init__(self, *args, **kwargs): class AlbertForMaskedLM (line 526) | class AlbertForMaskedLM(metaclass=DummyObject): method __init__ (line 529) | def __init__(self, *args, **kwargs): class AlbertForMultipleChoice (line 533) | class AlbertForMultipleChoice(metaclass=DummyObject): method __init__ (line 536) | def __init__(self, *args, **kwargs): class AlbertForPreTraining (line 540) | class AlbertForPreTraining(metaclass=DummyObject): method __init__ (line 543) | def __init__(self, *args, **kwargs): class AlbertForQuestionAnswering (line 547) | class AlbertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 550) | def __init__(self, *args, **kwargs): class AlbertForSequenceClassification (line 554) | class AlbertForSequenceClassification(metaclass=DummyObject): method __init__ (line 557) | def __init__(self, *args, **kwargs): class AlbertForTokenClassification (line 561) | class AlbertForTokenClassification(metaclass=DummyObject): method __init__ (line 564) | def __init__(self, *args, **kwargs): class AlbertModel (line 568) | class AlbertModel(metaclass=DummyObject): method __init__ (line 571) | def __init__(self, *args, **kwargs): class AlbertPreTrainedModel (line 575) | class AlbertPreTrainedModel(metaclass=DummyObject): method __init__ (line 578) | def __init__(self, *args, **kwargs): function load_tf_weights_in_albert (line 582) | def load_tf_weights_in_albert(*args, **kwargs): class AlignModel (line 586) | class AlignModel(metaclass=DummyObject): method __init__ (line 589) | def __init__(self, *args, **kwargs): class AlignPreTrainedModel (line 593) | class AlignPreTrainedModel(metaclass=DummyObject): method __init__ (line 596) | def __init__(self, *args, **kwargs): class AlignTextModel (line 600) | class AlignTextModel(metaclass=DummyObject): method __init__ (line 603) | def __init__(self, *args, **kwargs): class AlignVisionModel (line 607) | class AlignVisionModel(metaclass=DummyObject): method __init__ (line 610) | def __init__(self, *args, **kwargs): class AltCLIPModel (line 614) | class AltCLIPModel(metaclass=DummyObject): method __init__ (line 617) | def __init__(self, *args, **kwargs): class AltCLIPPreTrainedModel (line 621) | class AltCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 624) | def __init__(self, *args, **kwargs): class AltCLIPTextModel (line 628) | class AltCLIPTextModel(metaclass=DummyObject): method __init__ (line 631) | def __init__(self, *args, **kwargs): class AltCLIPVisionModel (line 635) | class AltCLIPVisionModel(metaclass=DummyObject): method __init__ (line 638) | def __init__(self, *args, **kwargs): class ASTForAudioClassification (line 642) | class ASTForAudioClassification(metaclass=DummyObject): method __init__ (line 645) | def __init__(self, *args, **kwargs): class ASTModel (line 649) | class ASTModel(metaclass=DummyObject): method __init__ (line 652) | def __init__(self, *args, **kwargs): class ASTPreTrainedModel (line 656) | class ASTPreTrainedModel(metaclass=DummyObject): method __init__ (line 659) | def __init__(self, *args, **kwargs): class AutoBackbone (line 789) | class AutoBackbone(metaclass=DummyObject): method __init__ (line 792) | def __init__(self, *args, **kwargs): class AutoModel (line 796) | class AutoModel(metaclass=DummyObject): method __init__ (line 799) | def __init__(self, *args, **kwargs): class AutoModelForAudioClassification (line 803) | class AutoModelForAudioClassification(metaclass=DummyObject): method __init__ (line 806) | def __init__(self, *args, **kwargs): class AutoModelForAudioFrameClassification (line 810) | class AutoModelForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 813) | def __init__(self, *args, **kwargs): class AutoModelForAudioXVector (line 817) | class AutoModelForAudioXVector(metaclass=DummyObject): method __init__ (line 820) | def __init__(self, *args, **kwargs): class AutoModelForCausalLM (line 824) | class AutoModelForCausalLM(metaclass=DummyObject): method __init__ (line 827) | def __init__(self, *args, **kwargs): class AutoModelForCTC (line 831) | class AutoModelForCTC(metaclass=DummyObject): method __init__ (line 834) | def __init__(self, *args, **kwargs): class AutoModelForDepthEstimation (line 838) | class AutoModelForDepthEstimation(metaclass=DummyObject): method __init__ (line 841) | def __init__(self, *args, **kwargs): class AutoModelForDocumentQuestionAnswering (line 845) | class AutoModelForDocumentQuestionAnswering(metaclass=DummyObject): method __init__ (line 848) | def __init__(self, *args, **kwargs): class AutoModelForImageClassification (line 852) | class AutoModelForImageClassification(metaclass=DummyObject): method __init__ (line 855) | def __init__(self, *args, **kwargs): class AutoModelForImageSegmentation (line 859) | class AutoModelForImageSegmentation(metaclass=DummyObject): method __init__ (line 862) | def __init__(self, *args, **kwargs): class AutoModelForImageToImage (line 866) | class AutoModelForImageToImage(metaclass=DummyObject): method __init__ (line 869) | def __init__(self, *args, **kwargs): class AutoModelForInstanceSegmentation (line 873) | class AutoModelForInstanceSegmentation(metaclass=DummyObject): method __init__ (line 876) | def __init__(self, *args, **kwargs): class AutoModelForKeypointDetection (line 880) | class AutoModelForKeypointDetection(metaclass=DummyObject): method __init__ (line 883) | def __init__(self, *args, **kwargs): class AutoModelForMaskedImageModeling (line 887) | class AutoModelForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 890) | def __init__(self, *args, **kwargs): class AutoModelForMaskedLM (line 894) | class AutoModelForMaskedLM(metaclass=DummyObject): method __init__ (line 897) | def __init__(self, *args, **kwargs): class AutoModelForMaskGeneration (line 901) | class AutoModelForMaskGeneration(metaclass=DummyObject): method __init__ (line 904) | def __init__(self, *args, **kwargs): class AutoModelForMultipleChoice (line 908) | class AutoModelForMultipleChoice(metaclass=DummyObject): method __init__ (line 911) | def __init__(self, *args, **kwargs): class AutoModelForNextSentencePrediction (line 915) | class AutoModelForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 918) | def __init__(self, *args, **kwargs): class AutoModelForObjectDetection (line 922) | class AutoModelForObjectDetection(metaclass=DummyObject): method __init__ (line 925) | def __init__(self, *args, **kwargs): class AutoModelForPreTraining (line 929) | class AutoModelForPreTraining(metaclass=DummyObject): method __init__ (line 932) | def __init__(self, *args, **kwargs): class AutoModelForQuestionAnswering (line 936) | class AutoModelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 939) | def __init__(self, *args, **kwargs): class AutoModelForSemanticSegmentation (line 943) | class AutoModelForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 946) | def __init__(self, *args, **kwargs): class AutoModelForSeq2SeqLM (line 950) | class AutoModelForSeq2SeqLM(metaclass=DummyObject): method __init__ (line 953) | def __init__(self, *args, **kwargs): class AutoModelForSequenceClassification (line 957) | class AutoModelForSequenceClassification(metaclass=DummyObject): method __init__ (line 960) | def __init__(self, *args, **kwargs): class AutoModelForSpeechSeq2Seq (line 964) | class AutoModelForSpeechSeq2Seq(metaclass=DummyObject): method __init__ (line 967) | def __init__(self, *args, **kwargs): class AutoModelForTableQuestionAnswering (line 971) | class AutoModelForTableQuestionAnswering(metaclass=DummyObject): method __init__ (line 974) | def __init__(self, *args, **kwargs): class AutoModelForTextEncoding (line 978) | class AutoModelForTextEncoding(metaclass=DummyObject): method __init__ (line 981) | def __init__(self, *args, **kwargs): class AutoModelForTextToSpectrogram (line 985) | class AutoModelForTextToSpectrogram(metaclass=DummyObject): method __init__ (line 988) | def __init__(self, *args, **kwargs): class AutoModelForTextToWaveform (line 992) | class AutoModelForTextToWaveform(metaclass=DummyObject): method __init__ (line 995) | def __init__(self, *args, **kwargs): class AutoModelForTokenClassification (line 999) | class AutoModelForTokenClassification(metaclass=DummyObject): method __init__ (line 1002) | def __init__(self, *args, **kwargs): class AutoModelForUniversalSegmentation (line 1006) | class AutoModelForUniversalSegmentation(metaclass=DummyObject): method __init__ (line 1009) | def __init__(self, *args, **kwargs): class AutoModelForVideoClassification (line 1013) | class AutoModelForVideoClassification(metaclass=DummyObject): method __init__ (line 1016) | def __init__(self, *args, **kwargs): class AutoModelForVision2Seq (line 1020) | class AutoModelForVision2Seq(metaclass=DummyObject): method __init__ (line 1023) | def __init__(self, *args, **kwargs): class AutoModelForVisualQuestionAnswering (line 1027) | class AutoModelForVisualQuestionAnswering(metaclass=DummyObject): method __init__ (line 1030) | def __init__(self, *args, **kwargs): class AutoModelForZeroShotImageClassification (line 1034) | class AutoModelForZeroShotImageClassification(metaclass=DummyObject): method __init__ (line 1037) | def __init__(self, *args, **kwargs): class AutoModelForZeroShotObjectDetection (line 1041) | class AutoModelForZeroShotObjectDetection(metaclass=DummyObject): method __init__ (line 1044) | def __init__(self, *args, **kwargs): class AutoModelWithLMHead (line 1048) | class AutoModelWithLMHead(metaclass=DummyObject): method __init__ (line 1051) | def __init__(self, *args, **kwargs): class AutoformerForPrediction (line 1055) | class AutoformerForPrediction(metaclass=DummyObject): method __init__ (line 1058) | def __init__(self, *args, **kwargs): class AutoformerModel (line 1062) | class AutoformerModel(metaclass=DummyObject): method __init__ (line 1065) | def __init__(self, *args, **kwargs): class AutoformerPreTrainedModel (line 1069) | class AutoformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1072) | def __init__(self, *args, **kwargs): class BarkCausalModel (line 1076) | class BarkCausalModel(metaclass=DummyObject): method __init__ (line 1079) | def __init__(self, *args, **kwargs): class BarkCoarseModel (line 1083) | class BarkCoarseModel(metaclass=DummyObject): method __init__ (line 1086) | def __init__(self, *args, **kwargs): class BarkFineModel (line 1090) | class BarkFineModel(metaclass=DummyObject): method __init__ (line 1093) | def __init__(self, *args, **kwargs): class BarkModel (line 1097) | class BarkModel(metaclass=DummyObject): method __init__ (line 1100) | def __init__(self, *args, **kwargs): class BarkPreTrainedModel (line 1104) | class BarkPreTrainedModel(metaclass=DummyObject): method __init__ (line 1107) | def __init__(self, *args, **kwargs): class BarkSemanticModel (line 1111) | class BarkSemanticModel(metaclass=DummyObject): method __init__ (line 1114) | def __init__(self, *args, **kwargs): class BartForCausalLM (line 1118) | class BartForCausalLM(metaclass=DummyObject): method __init__ (line 1121) | def __init__(self, *args, **kwargs): class BartForConditionalGeneration (line 1125) | class BartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1128) | def __init__(self, *args, **kwargs): class BartForQuestionAnswering (line 1132) | class BartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1135) | def __init__(self, *args, **kwargs): class BartForSequenceClassification (line 1139) | class BartForSequenceClassification(metaclass=DummyObject): method __init__ (line 1142) | def __init__(self, *args, **kwargs): class BartModel (line 1146) | class BartModel(metaclass=DummyObject): method __init__ (line 1149) | def __init__(self, *args, **kwargs): class BartPreTrainedModel (line 1153) | class BartPreTrainedModel(metaclass=DummyObject): method __init__ (line 1156) | def __init__(self, *args, **kwargs): class BartPretrainedModel (line 1160) | class BartPretrainedModel(metaclass=DummyObject): method __init__ (line 1163) | def __init__(self, *args, **kwargs): class PretrainedBartModel (line 1167) | class PretrainedBartModel(metaclass=DummyObject): method __init__ (line 1170) | def __init__(self, *args, **kwargs): class BeitBackbone (line 1174) | class BeitBackbone(metaclass=DummyObject): method __init__ (line 1177) | def __init__(self, *args, **kwargs): class BeitForImageClassification (line 1181) | class BeitForImageClassification(metaclass=DummyObject): method __init__ (line 1184) | def __init__(self, *args, **kwargs): class BeitForMaskedImageModeling (line 1188) | class BeitForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 1191) | def __init__(self, *args, **kwargs): class BeitForSemanticSegmentation (line 1195) | class BeitForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 1198) | def __init__(self, *args, **kwargs): class BeitModel (line 1202) | class BeitModel(metaclass=DummyObject): method __init__ (line 1205) | def __init__(self, *args, **kwargs): class BeitPreTrainedModel (line 1209) | class BeitPreTrainedModel(metaclass=DummyObject): method __init__ (line 1212) | def __init__(self, *args, **kwargs): class BertForMaskedLM (line 1216) | class BertForMaskedLM(metaclass=DummyObject): method __init__ (line 1219) | def __init__(self, *args, **kwargs): class BertForMultipleChoice (line 1223) | class BertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1226) | def __init__(self, *args, **kwargs): class BertForNextSentencePrediction (line 1230) | class BertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 1233) | def __init__(self, *args, **kwargs): class BertForPreTraining (line 1237) | class BertForPreTraining(metaclass=DummyObject): method __init__ (line 1240) | def __init__(self, *args, **kwargs): class BertForQuestionAnswering (line 1244) | class BertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1247) | def __init__(self, *args, **kwargs): class BertForSequenceClassification (line 1251) | class BertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1254) | def __init__(self, *args, **kwargs): class BertForTokenClassification (line 1258) | class BertForTokenClassification(metaclass=DummyObject): method __init__ (line 1261) | def __init__(self, *args, **kwargs): class BertLayer (line 1265) | class BertLayer(metaclass=DummyObject): method __init__ (line 1268) | def __init__(self, *args, **kwargs): class BertLMHeadModel (line 1272) | class BertLMHeadModel(metaclass=DummyObject): method __init__ (line 1275) | def __init__(self, *args, **kwargs): class BertModel (line 1279) | class BertModel(metaclass=DummyObject): method __init__ (line 1282) | def __init__(self, *args, **kwargs): class BertPreTrainedModel (line 1286) | class BertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1289) | def __init__(self, *args, **kwargs): function load_tf_weights_in_bert (line 1293) | def load_tf_weights_in_bert(*args, **kwargs): class BertGenerationDecoder (line 1297) | class BertGenerationDecoder(metaclass=DummyObject): method __init__ (line 1300) | def __init__(self, *args, **kwargs): class BertGenerationEncoder (line 1304) | class BertGenerationEncoder(metaclass=DummyObject): method __init__ (line 1307) | def __init__(self, *args, **kwargs): class BertGenerationPreTrainedModel (line 1311) | class BertGenerationPreTrainedModel(metaclass=DummyObject): method __init__ (line 1314) | def __init__(self, *args, **kwargs): function load_tf_weights_in_bert_generation (line 1318) | def load_tf_weights_in_bert_generation(*args, **kwargs): class BigBirdForCausalLM (line 1322) | class BigBirdForCausalLM(metaclass=DummyObject): method __init__ (line 1325) | def __init__(self, *args, **kwargs): class BigBirdForMaskedLM (line 1329) | class BigBirdForMaskedLM(metaclass=DummyObject): method __init__ (line 1332) | def __init__(self, *args, **kwargs): class BigBirdForMultipleChoice (line 1336) | class BigBirdForMultipleChoice(metaclass=DummyObject): method __init__ (line 1339) | def __init__(self, *args, **kwargs): class BigBirdForPreTraining (line 1343) | class BigBirdForPreTraining(metaclass=DummyObject): method __init__ (line 1346) | def __init__(self, *args, **kwargs): class BigBirdForQuestionAnswering (line 1350) | class BigBirdForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1353) | def __init__(self, *args, **kwargs): class BigBirdForSequenceClassification (line 1357) | class BigBirdForSequenceClassification(metaclass=DummyObject): method __init__ (line 1360) | def __init__(self, *args, **kwargs): class BigBirdForTokenClassification (line 1364) | class BigBirdForTokenClassification(metaclass=DummyObject): method __init__ (line 1367) | def __init__(self, *args, **kwargs): class BigBirdLayer (line 1371) | class BigBirdLayer(metaclass=DummyObject): method __init__ (line 1374) | def __init__(self, *args, **kwargs): class BigBirdModel (line 1378) | class BigBirdModel(metaclass=DummyObject): method __init__ (line 1381) | def __init__(self, *args, **kwargs): class BigBirdPreTrainedModel (line 1385) | class BigBirdPreTrainedModel(metaclass=DummyObject): method __init__ (line 1388) | def __init__(self, *args, **kwargs): function load_tf_weights_in_big_bird (line 1392) | def load_tf_weights_in_big_bird(*args, **kwargs): class BigBirdPegasusForCausalLM (line 1396) | class BigBirdPegasusForCausalLM(metaclass=DummyObject): method __init__ (line 1399) | def __init__(self, *args, **kwargs): class BigBirdPegasusForConditionalGeneration (line 1403) | class BigBirdPegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1406) | def __init__(self, *args, **kwargs): class BigBirdPegasusForQuestionAnswering (line 1410) | class BigBirdPegasusForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1413) | def __init__(self, *args, **kwargs): class BigBirdPegasusForSequenceClassification (line 1417) | class BigBirdPegasusForSequenceClassification(metaclass=DummyObject): method __init__ (line 1420) | def __init__(self, *args, **kwargs): class BigBirdPegasusModel (line 1424) | class BigBirdPegasusModel(metaclass=DummyObject): method __init__ (line 1427) | def __init__(self, *args, **kwargs): class BigBirdPegasusPreTrainedModel (line 1431) | class BigBirdPegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 1434) | def __init__(self, *args, **kwargs): class BioGptForCausalLM (line 1438) | class BioGptForCausalLM(metaclass=DummyObject): method __init__ (line 1441) | def __init__(self, *args, **kwargs): class BioGptForSequenceClassification (line 1445) | class BioGptForSequenceClassification(metaclass=DummyObject): method __init__ (line 1448) | def __init__(self, *args, **kwargs): class BioGptForTokenClassification (line 1452) | class BioGptForTokenClassification(metaclass=DummyObject): method __init__ (line 1455) | def __init__(self, *args, **kwargs): class BioGptModel (line 1459) | class BioGptModel(metaclass=DummyObject): method __init__ (line 1462) | def __init__(self, *args, **kwargs): class BioGptPreTrainedModel (line 1466) | class BioGptPreTrainedModel(metaclass=DummyObject): method __init__ (line 1469) | def __init__(self, *args, **kwargs): class BitBackbone (line 1473) | class BitBackbone(metaclass=DummyObject): method __init__ (line 1476) | def __init__(self, *args, **kwargs): class BitForImageClassification (line 1480) | class BitForImageClassification(metaclass=DummyObject): method __init__ (line 1483) | def __init__(self, *args, **kwargs): class BitModel (line 1487) | class BitModel(metaclass=DummyObject): method __init__ (line 1490) | def __init__(self, *args, **kwargs): class BitPreTrainedModel (line 1494) | class BitPreTrainedModel(metaclass=DummyObject): method __init__ (line 1497) | def __init__(self, *args, **kwargs): class BlenderbotForCausalLM (line 1501) | class BlenderbotForCausalLM(metaclass=DummyObject): method __init__ (line 1504) | def __init__(self, *args, **kwargs): class BlenderbotForConditionalGeneration (line 1508) | class BlenderbotForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1511) | def __init__(self, *args, **kwargs): class BlenderbotModel (line 1515) | class BlenderbotModel(metaclass=DummyObject): method __init__ (line 1518) | def __init__(self, *args, **kwargs): class BlenderbotPreTrainedModel (line 1522) | class BlenderbotPreTrainedModel(metaclass=DummyObject): method __init__ (line 1525) | def __init__(self, *args, **kwargs): class BlenderbotSmallForCausalLM (line 1529) | class BlenderbotSmallForCausalLM(metaclass=DummyObject): method __init__ (line 1532) | def __init__(self, *args, **kwargs): class BlenderbotSmallForConditionalGeneration (line 1536) | class BlenderbotSmallForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1539) | def __init__(self, *args, **kwargs): class BlenderbotSmallModel (line 1543) | class BlenderbotSmallModel(metaclass=DummyObject): method __init__ (line 1546) | def __init__(self, *args, **kwargs): class BlenderbotSmallPreTrainedModel (line 1550) | class BlenderbotSmallPreTrainedModel(metaclass=DummyObject): method __init__ (line 1553) | def __init__(self, *args, **kwargs): class BlipForConditionalGeneration (line 1557) | class BlipForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1560) | def __init__(self, *args, **kwargs): class BlipForImageTextRetrieval (line 1564) | class BlipForImageTextRetrieval(metaclass=DummyObject): method __init__ (line 1567) | def __init__(self, *args, **kwargs): class BlipForQuestionAnswering (line 1571) | class BlipForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1574) | def __init__(self, *args, **kwargs): class BlipModel (line 1578) | class BlipModel(metaclass=DummyObject): method __init__ (line 1581) | def __init__(self, *args, **kwargs): class BlipPreTrainedModel (line 1585) | class BlipPreTrainedModel(metaclass=DummyObject): method __init__ (line 1588) | def __init__(self, *args, **kwargs): class BlipTextModel (line 1592) | class BlipTextModel(metaclass=DummyObject): method __init__ (line 1595) | def __init__(self, *args, **kwargs): class BlipVisionModel (line 1599) | class BlipVisionModel(metaclass=DummyObject): method __init__ (line 1602) | def __init__(self, *args, **kwargs): class Blip2ForConditionalGeneration (line 1606) | class Blip2ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1609) | def __init__(self, *args, **kwargs): class Blip2Model (line 1613) | class Blip2Model(metaclass=DummyObject): method __init__ (line 1616) | def __init__(self, *args, **kwargs): class Blip2PreTrainedModel (line 1620) | class Blip2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1623) | def __init__(self, *args, **kwargs): class Blip2QFormerModel (line 1627) | class Blip2QFormerModel(metaclass=DummyObject): method __init__ (line 1630) | def __init__(self, *args, **kwargs): class Blip2VisionModel (line 1634) | class Blip2VisionModel(metaclass=DummyObject): method __init__ (line 1637) | def __init__(self, *args, **kwargs): class BloomForCausalLM (line 1641) | class BloomForCausalLM(metaclass=DummyObject): method __init__ (line 1644) | def __init__(self, *args, **kwargs): class BloomForQuestionAnswering (line 1648) | class BloomForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1651) | def __init__(self, *args, **kwargs): class BloomForSequenceClassification (line 1655) | class BloomForSequenceClassification(metaclass=DummyObject): method __init__ (line 1658) | def __init__(self, *args, **kwargs): class BloomForTokenClassification (line 1662) | class BloomForTokenClassification(metaclass=DummyObject): method __init__ (line 1665) | def __init__(self, *args, **kwargs): class BloomModel (line 1669) | class BloomModel(metaclass=DummyObject): method __init__ (line 1672) | def __init__(self, *args, **kwargs): class BloomPreTrainedModel (line 1676) | class BloomPreTrainedModel(metaclass=DummyObject): method __init__ (line 1679) | def __init__(self, *args, **kwargs): class BridgeTowerForContrastiveLearning (line 1683) | class BridgeTowerForContrastiveLearning(metaclass=DummyObject): method __init__ (line 1686) | def __init__(self, *args, **kwargs): class BridgeTowerForImageAndTextRetrieval (line 1690) | class BridgeTowerForImageAndTextRetrieval(metaclass=DummyObject): method __init__ (line 1693) | def __init__(self, *args, **kwargs): class BridgeTowerForMaskedLM (line 1697) | class BridgeTowerForMaskedLM(metaclass=DummyObject): method __init__ (line 1700) | def __init__(self, *args, **kwargs): class BridgeTowerModel (line 1704) | class BridgeTowerModel(metaclass=DummyObject): method __init__ (line 1707) | def __init__(self, *args, **kwargs): class BridgeTowerPreTrainedModel (line 1711) | class BridgeTowerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1714) | def __init__(self, *args, **kwargs): class BrosForTokenClassification (line 1718) | class BrosForTokenClassification(metaclass=DummyObject): method __init__ (line 1721) | def __init__(self, *args, **kwargs): class BrosModel (line 1725) | class BrosModel(metaclass=DummyObject): method __init__ (line 1728) | def __init__(self, *args, **kwargs): class BrosPreTrainedModel (line 1732) | class BrosPreTrainedModel(metaclass=DummyObject): method __init__ (line 1735) | def __init__(self, *args, **kwargs): class BrosProcessor (line 1739) | class BrosProcessor(metaclass=DummyObject): method __init__ (line 1742) | def __init__(self, *args, **kwargs): class BrosSpadeEEForTokenClassification (line 1746) | class BrosSpadeEEForTokenClassification(metaclass=DummyObject): method __init__ (line 1749) | def __init__(self, *args, **kwargs): class BrosSpadeELForTokenClassification (line 1753) | class BrosSpadeELForTokenClassification(metaclass=DummyObject): method __init__ (line 1756) | def __init__(self, *args, **kwargs): class CamembertForCausalLM (line 1760) | class CamembertForCausalLM(metaclass=DummyObject): method __init__ (line 1763) | def __init__(self, *args, **kwargs): class CamembertForMaskedLM (line 1767) | class CamembertForMaskedLM(metaclass=DummyObject): method __init__ (line 1770) | def __init__(self, *args, **kwargs): class CamembertForMultipleChoice (line 1774) | class CamembertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1777) | def __init__(self, *args, **kwargs): class CamembertForQuestionAnswering (line 1781) | class CamembertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1784) | def __init__(self, *args, **kwargs): class CamembertForSequenceClassification (line 1788) | class CamembertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1791) | def __init__(self, *args, **kwargs): class CamembertForTokenClassification (line 1795) | class CamembertForTokenClassification(metaclass=DummyObject): method __init__ (line 1798) | def __init__(self, *args, **kwargs): class CamembertModel (line 1802) | class CamembertModel(metaclass=DummyObject): method __init__ (line 1805) | def __init__(self, *args, **kwargs): class CamembertPreTrainedModel (line 1809) | class CamembertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1812) | def __init__(self, *args, **kwargs): class CanineForMultipleChoice (line 1816) | class CanineForMultipleChoice(metaclass=DummyObject): method __init__ (line 1819) | def __init__(self, *args, **kwargs): class CanineForQuestionAnswering (line 1823) | class CanineForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1826) | def __init__(self, *args, **kwargs): class CanineForSequenceClassification (line 1830) | class CanineForSequenceClassification(metaclass=DummyObject): method __init__ (line 1833) | def __init__(self, *args, **kwargs): class CanineForTokenClassification (line 1837) | class CanineForTokenClassification(metaclass=DummyObject): method __init__ (line 1840) | def __init__(self, *args, **kwargs): class CanineLayer (line 1844) | class CanineLayer(metaclass=DummyObject): method __init__ (line 1847) | def __init__(self, *args, **kwargs): class CanineModel (line 1851) | class CanineModel(metaclass=DummyObject): method __init__ (line 1854) | def __init__(self, *args, **kwargs): class CaninePreTrainedModel (line 1858) | class CaninePreTrainedModel(metaclass=DummyObject): method __init__ (line 1861) | def __init__(self, *args, **kwargs): function load_tf_weights_in_canine (line 1865) | def load_tf_weights_in_canine(*args, **kwargs): class ChameleonForConditionalGeneration (line 1869) | class ChameleonForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1872) | def __init__(self, *args, **kwargs): class ChameleonModel (line 1876) | class ChameleonModel(metaclass=DummyObject): method __init__ (line 1879) | def __init__(self, *args, **kwargs): class ChameleonPreTrainedModel (line 1883) | class ChameleonPreTrainedModel(metaclass=DummyObject): method __init__ (line 1886) | def __init__(self, *args, **kwargs): class ChameleonProcessor (line 1890) | class ChameleonProcessor(metaclass=DummyObject): method __init__ (line 1893) | def __init__(self, *args, **kwargs): class ChameleonVQVAE (line 1897) | class ChameleonVQVAE(metaclass=DummyObject): method __init__ (line 1900) | def __init__(self, *args, **kwargs): class ChineseCLIPModel (line 1904) | class ChineseCLIPModel(metaclass=DummyObject): method __init__ (line 1907) | def __init__(self, *args, **kwargs): class ChineseCLIPPreTrainedModel (line 1911) | class ChineseCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 1914) | def __init__(self, *args, **kwargs): class ChineseCLIPTextModel (line 1918) | class ChineseCLIPTextModel(metaclass=DummyObject): method __init__ (line 1921) | def __init__(self, *args, **kwargs): class ChineseCLIPVisionModel (line 1925) | class ChineseCLIPVisionModel(metaclass=DummyObject): method __init__ (line 1928) | def __init__(self, *args, **kwargs): class ClapAudioModel (line 1932) | class ClapAudioModel(metaclass=DummyObject): method __init__ (line 1935) | def __init__(self, *args, **kwargs): class ClapAudioModelWithProjection (line 1939) | class ClapAudioModelWithProjection(metaclass=DummyObject): method __init__ (line 1942) | def __init__(self, *args, **kwargs): class ClapFeatureExtractor (line 1946) | class ClapFeatureExtractor(metaclass=DummyObject): method __init__ (line 1949) | def __init__(self, *args, **kwargs): class ClapModel (line 1953) | class ClapModel(metaclass=DummyObject): method __init__ (line 1956) | def __init__(self, *args, **kwargs): class ClapPreTrainedModel (line 1960) | class ClapPreTrainedModel(metaclass=DummyObject): method __init__ (line 1963) | def __init__(self, *args, **kwargs): class ClapTextModel (line 1967) | class ClapTextModel(metaclass=DummyObject): method __init__ (line 1970) | def __init__(self, *args, **kwargs): class ClapTextModelWithProjection (line 1974) | class ClapTextModelWithProjection(metaclass=DummyObject): method __init__ (line 1977) | def __init__(self, *args, **kwargs): class CLIPForImageClassification (line 1981) | class CLIPForImageClassification(metaclass=DummyObject): method __init__ (line 1984) | def __init__(self, *args, **kwargs): class CLIPModel (line 1988) | class CLIPModel(metaclass=DummyObject): method __init__ (line 1991) | def __init__(self, *args, **kwargs): class CLIPPreTrainedModel (line 1995) | class CLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 1998) | def __init__(self, *args, **kwargs): class CLIPTextModel (line 2002) | class CLIPTextModel(metaclass=DummyObject): method __init__ (line 2005) | def __init__(self, *args, **kwargs): class CLIPTextModelWithProjection (line 2009) | class CLIPTextModelWithProjection(metaclass=DummyObject): method __init__ (line 2012) | def __init__(self, *args, **kwargs): class CLIPVisionModel (line 2016) | class CLIPVisionModel(metaclass=DummyObject): method __init__ (line 2019) | def __init__(self, *args, **kwargs): class CLIPVisionModelWithProjection (line 2023) | class CLIPVisionModelWithProjection(metaclass=DummyObject): method __init__ (line 2026) | def __init__(self, *args, **kwargs): class CLIPSegForImageSegmentation (line 2030) | class CLIPSegForImageSegmentation(metaclass=DummyObject): method __init__ (line 2033) | def __init__(self, *args, **kwargs): class CLIPSegModel (line 2037) | class CLIPSegModel(metaclass=DummyObject): method __init__ (line 2040) | def __init__(self, *args, **kwargs): class CLIPSegPreTrainedModel (line 2044) | class CLIPSegPreTrainedModel(metaclass=DummyObject): method __init__ (line 2047) | def __init__(self, *args, **kwargs): class CLIPSegTextModel (line 2051) | class CLIPSegTextModel(metaclass=DummyObject): method __init__ (line 2054) | def __init__(self, *args, **kwargs): class CLIPSegVisionModel (line 2058) | class CLIPSegVisionModel(metaclass=DummyObject): method __init__ (line 2061) | def __init__(self, *args, **kwargs): class ClvpDecoder (line 2065) | class ClvpDecoder(metaclass=DummyObject): method __init__ (line 2068) | def __init__(self, *args, **kwargs): class ClvpEncoder (line 2072) | class ClvpEncoder(metaclass=DummyObject): method __init__ (line 2075) | def __init__(self, *args, **kwargs): class ClvpForCausalLM (line 2079) | class ClvpForCausalLM(metaclass=DummyObject): method __init__ (line 2082) | def __init__(self, *args, **kwargs): class ClvpModel (line 2086) | class ClvpModel(metaclass=DummyObject): method __init__ (line 2089) | def __init__(self, *args, **kwargs): class ClvpModelForConditionalGeneration (line 2093) | class ClvpModelForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2096) | def __init__(self, *args, **kwargs): class ClvpPreTrainedModel (line 2100) | class ClvpPreTrainedModel(metaclass=DummyObject): method __init__ (line 2103) | def __init__(self, *args, **kwargs): class CodeGenForCausalLM (line 2107) | class CodeGenForCausalLM(metaclass=DummyObject): method __init__ (line 2110) | def __init__(self, *args, **kwargs): class CodeGenModel (line 2114) | class CodeGenModel(metaclass=DummyObject): method __init__ (line 2117) | def __init__(self, *args, **kwargs): class CodeGenPreTrainedModel (line 2121) | class CodeGenPreTrainedModel(metaclass=DummyObject): method __init__ (line 2124) | def __init__(self, *args, **kwargs): class CohereForCausalLM (line 2128) | class CohereForCausalLM(metaclass=DummyObject): method __init__ (line 2131) | def __init__(self, *args, **kwargs): class CohereModel (line 2135) | class CohereModel(metaclass=DummyObject): method __init__ (line 2138) | def __init__(self, *args, **kwargs): class CoherePreTrainedModel (line 2142) | class CoherePreTrainedModel(metaclass=DummyObject): method __init__ (line 2145) | def __init__(self, *args, **kwargs): class ConditionalDetrForObjectDetection (line 2149) | class ConditionalDetrForObjectDetection(metaclass=DummyObject): method __init__ (line 2152) | def __init__(self, *args, **kwargs): class ConditionalDetrForSegmentation (line 2156) | class ConditionalDetrForSegmentation(metaclass=DummyObject): method __init__ (line 2159) | def __init__(self, *args, **kwargs): class ConditionalDetrModel (line 2163) | class ConditionalDetrModel(metaclass=DummyObject): method __init__ (line 2166) | def __init__(self, *args, **kwargs): class ConditionalDetrPreTrainedModel (line 2170) | class ConditionalDetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 2173) | def __init__(self, *args, **kwargs): class ConvBertForMaskedLM (line 2177) | class ConvBertForMaskedLM(metaclass=DummyObject): method __init__ (line 2180) | def __init__(self, *args, **kwargs): class ConvBertForMultipleChoice (line 2184) | class ConvBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 2187) | def __init__(self, *args, **kwargs): class ConvBertForQuestionAnswering (line 2191) | class ConvBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2194) | def __init__(self, *args, **kwargs): class ConvBertForSequenceClassification (line 2198) | class ConvBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 2201) | def __init__(self, *args, **kwargs): class ConvBertForTokenClassification (line 2205) | class ConvBertForTokenClassification(metaclass=DummyObject): method __init__ (line 2208) | def __init__(self, *args, **kwargs): class ConvBertLayer (line 2212) | class ConvBertLayer(metaclass=DummyObject): method __init__ (line 2215) | def __init__(self, *args, **kwargs): class ConvBertModel (line 2219) | class ConvBertModel(metaclass=DummyObject): method __init__ (line 2222) | def __init__(self, *args, **kwargs): class ConvBertPreTrainedModel (line 2226) | class ConvBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 2229) | def __init__(self, *args, **kwargs): function load_tf_weights_in_convbert (line 2233) | def load_tf_weights_in_convbert(*args, **kwargs): class ConvNextBackbone (line 2237) | class ConvNextBackbone(metaclass=DummyObject): method __init__ (line 2240) | def __init__(self, *args, **kwargs): class ConvNextForImageClassification (line 2244) | class ConvNextForImageClassification(metaclass=DummyObject): method __init__ (line 2247) | def __init__(self, *args, **kwargs): class ConvNextModel (line 2251) | class ConvNextModel(metaclass=DummyObject): method __init__ (line 2254) | def __init__(self, *args, **kwargs): class ConvNextPreTrainedModel (line 2258) | class ConvNextPreTrainedModel(metaclass=DummyObject): method __init__ (line 2261) | def __init__(self, *args, **kwargs): class ConvNextV2Backbone (line 2265) | class ConvNextV2Backbone(metaclass=DummyObject): method __init__ (line 2268) | def __init__(self, *args, **kwargs): class ConvNextV2ForImageClassification (line 2272) | class ConvNextV2ForImageClassification(metaclass=DummyObject): method __init__ (line 2275) | def __init__(self, *args, **kwargs): class ConvNextV2Model (line 2279) | class ConvNextV2Model(metaclass=DummyObject): method __init__ (line 2282) | def __init__(self, *args, **kwargs): class ConvNextV2PreTrainedModel (line 2286) | class ConvNextV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2289) | def __init__(self, *args, **kwargs): class CpmAntForCausalLM (line 2293) | class CpmAntForCausalLM(metaclass=DummyObject): method __init__ (line 2296) | def __init__(self, *args, **kwargs): class CpmAntModel (line 2300) | class CpmAntModel(metaclass=DummyObject): method __init__ (line 2303) | def __init__(self, *args, **kwargs): class CpmAntPreTrainedModel (line 2307) | class CpmAntPreTrainedModel(metaclass=DummyObject): method __init__ (line 2310) | def __init__(self, *args, **kwargs): class CTRLForSequenceClassification (line 2314) | class CTRLForSequenceClassification(metaclass=DummyObject): method __init__ (line 2317) | def __init__(self, *args, **kwargs): class CTRLLMHeadModel (line 2321) | class CTRLLMHeadModel(metaclass=DummyObject): method __init__ (line 2324) | def __init__(self, *args, **kwargs): class CTRLModel (line 2328) | class CTRLModel(metaclass=DummyObject): method __init__ (line 2331) | def __init__(self, *args, **kwargs): class CTRLPreTrainedModel (line 2335) | class CTRLPreTrainedModel(metaclass=DummyObject): method __init__ (line 2338) | def __init__(self, *args, **kwargs): class CvtForImageClassification (line 2342) | class CvtForImageClassification(metaclass=DummyObject): method __init__ (line 2345) | def __init__(self, *args, **kwargs): class CvtModel (line 2349) | class CvtModel(metaclass=DummyObject): method __init__ (line 2352) | def __init__(self, *args, **kwargs): class CvtPreTrainedModel (line 2356) | class CvtPreTrainedModel(metaclass=DummyObject): method __init__ (line 2359) | def __init__(self, *args, **kwargs): class DacModel (line 2363) | class DacModel(metaclass=DummyObject): method __init__ (line 2366) | def __init__(self, *args, **kwargs): class DacPreTrainedModel (line 2370) | class DacPreTrainedModel(metaclass=DummyObject): method __init__ (line 2373) | def __init__(self, *args, **kwargs): class Data2VecAudioForAudioFrameClassification (line 2377) | class Data2VecAudioForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 2380) | def __init__(self, *args, **kwargs): class Data2VecAudioForCTC (line 2384) | class Data2VecAudioForCTC(metaclass=DummyObject): method __init__ (line 2387) | def __init__(self, *args, **kwargs): class Data2VecAudioForSequenceClassification (line 2391) | class Data2VecAudioForSequenceClassification(metaclass=DummyObject): method __init__ (line 2394) | def __init__(self, *args, **kwargs): class Data2VecAudioForXVector (line 2398) | class Data2VecAudioForXVector(metaclass=DummyObject): method __init__ (line 2401) | def __init__(self, *args, **kwargs): class Data2VecAudioModel (line 2405) | class Data2VecAudioModel(metaclass=DummyObject): method __init__ (line 2408) | def __init__(self, *args, **kwargs): class Data2VecAudioPreTrainedModel (line 2412) | class Data2VecAudioPreTrainedModel(metaclass=DummyObject): method __init__ (line 2415) | def __init__(self, *args, **kwargs): class Data2VecTextForCausalLM (line 2419) | class Data2VecTextForCausalLM(metaclass=DummyObject): method __init__ (line 2422) | def __init__(self, *args, **kwargs): class Data2VecTextForMaskedLM (line 2426) | class Data2VecTextForMaskedLM(metaclass=DummyObject): method __init__ (line 2429) | def __init__(self, *args, **kwargs): class Data2VecTextForMultipleChoice (line 2433) | class Data2VecTextForMultipleChoice(metaclass=DummyObject): method __init__ (line 2436) | def __init__(self, *args, **kwargs): class Data2VecTextForQuestionAnswering (line 2440) | class Data2VecTextForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2443) | def __init__(self, *args, **kwargs): class Data2VecTextForSequenceClassification (line 2447) | class Data2VecTextForSequenceClassification(metaclass=DummyObject): method __init__ (line 2450) | def __init__(self, *args, **kwargs): class Data2VecTextForTokenClassification (line 2454) | class Data2VecTextForTokenClassification(metaclass=DummyObject): method __init__ (line 2457) | def __init__(self, *args, **kwargs): class Data2VecTextModel (line 2461) | class Data2VecTextModel(metaclass=DummyObject): method __init__ (line 2464) | def __init__(self, *args, **kwargs): class Data2VecTextPreTrainedModel (line 2468) | class Data2VecTextPreTrainedModel(metaclass=DummyObject): method __init__ (line 2471) | def __init__(self, *args, **kwargs): class Data2VecVisionForImageClassification (line 2475) | class Data2VecVisionForImageClassification(metaclass=DummyObject): method __init__ (line 2478) | def __init__(self, *args, **kwargs): class Data2VecVisionForSemanticSegmentation (line 2482) | class Data2VecVisionForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 2485) | def __init__(self, *args, **kwargs): class Data2VecVisionModel (line 2489) | class Data2VecVisionModel(metaclass=DummyObject): method __init__ (line 2492) | def __init__(self, *args, **kwargs): class Data2VecVisionPreTrainedModel (line 2496) | class Data2VecVisionPreTrainedModel(metaclass=DummyObject): method __init__ (line 2499) | def __init__(self, *args, **kwargs): class DbrxForCausalLM (line 2503) | class DbrxForCausalLM(metaclass=DummyObject): method __init__ (line 2506) | def __init__(self, *args, **kwargs): class DbrxModel (line 2510) | class DbrxModel(metaclass=DummyObject): method __init__ (line 2513) | def __init__(self, *args, **kwargs): class DbrxPreTrainedModel (line 2517) | class DbrxPreTrainedModel(metaclass=DummyObject): method __init__ (line 2520) | def __init__(self, *args, **kwargs): class DebertaForMaskedLM (line 2524) | class DebertaForMaskedLM(metaclass=DummyObject): method __init__ (line 2527) | def __init__(self, *args, **kwargs): class DebertaForQuestionAnswering (line 2531) | class DebertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2534) | def __init__(self, *args, **kwargs): class DebertaForSequenceClassification (line 2538) | class DebertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 2541) | def __init__(self, *args, **kwargs): class DebertaForTokenClassification (line 2545) | class DebertaForTokenClassification(metaclass=DummyObject): method __init__ (line 2548) | def __init__(self, *args, **kwargs): class DebertaModel (line 2552) | class DebertaModel(metaclass=DummyObject): method __init__ (line 2555) | def __init__(self, *args, **kwargs): class DebertaPreTrainedModel (line 2559) | class DebertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2562) | def __init__(self, *args, **kwargs): class DebertaV2ForMaskedLM (line 2566) | class DebertaV2ForMaskedLM(metaclass=DummyObject): method __init__ (line 2569) | def __init__(self, *args, **kwargs): class DebertaV2ForMultipleChoice (line 2573) | class DebertaV2ForMultipleChoice(metaclass=DummyObject): method __init__ (line 2576) | def __init__(self, *args, **kwargs): class DebertaV2ForQuestionAnswering (line 2580) | class DebertaV2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2583) | def __init__(self, *args, **kwargs): class DebertaV2ForSequenceClassification (line 2587) | class DebertaV2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 2590) | def __init__(self, *args, **kwargs): class DebertaV2ForTokenClassification (line 2594) | class DebertaV2ForTokenClassification(metaclass=DummyObject): method __init__ (line 2597) | def __init__(self, *args, **kwargs): class DebertaV2Model (line 2601) | class DebertaV2Model(metaclass=DummyObject): method __init__ (line 2604) | def __init__(self, *args, **kwargs): class DebertaV2PreTrainedModel (line 2608) | class DebertaV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2611) | def __init__(self, *args, **kwargs): class DecisionTransformerGPT2Model (line 2615) | class DecisionTransformerGPT2Model(metaclass=DummyObject): method __init__ (line 2618) | def __init__(self, *args, **kwargs): class DecisionTransformerGPT2PreTrainedModel (line 2622) | class DecisionTransformerGPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2625) | def __init__(self, *args, **kwargs): class DecisionTransformerModel (line 2629) | class DecisionTransformerModel(metaclass=DummyObject): method __init__ (line 2632) | def __init__(self, *args, **kwargs): class DecisionTransformerPreTrainedModel (line 2636) | class DecisionTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2639) | def __init__(self, *args, **kwargs): class DeformableDetrForObjectDetection (line 2643) | class DeformableDetrForObjectDetection(metaclass=DummyObject): method __init__ (line 2646) | def __init__(self, *args, **kwargs): class DeformableDetrModel (line 2650) | class DeformableDetrModel(metaclass=DummyObject): method __init__ (line 2653) | def __init__(self, *args, **kwargs): class DeformableDetrPreTrainedModel (line 2657) | class DeformableDetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 2660) | def __init__(self, *args, **kwargs): class DeiTForImageClassification (line 2664) | class DeiTForImageClassification(metaclass=DummyObject): method __init__ (line 2667) | def __init__(self, *args, **kwargs): class DeiTForImageClassificationWithTeacher (line 2671) | class DeiTForImageClassificationWithTeacher(metaclass=DummyObject): method __init__ (line 2674) | def __init__(self, *args, **kwargs): class DeiTForMaskedImageModeling (line 2678) | class DeiTForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 2681) | def __init__(self, *args, **kwargs): class DeiTModel (line 2685) | class DeiTModel(metaclass=DummyObject): method __init__ (line 2688) | def __init__(self, *args, **kwargs): class DeiTPreTrainedModel (line 2692) | class DeiTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2695) | def __init__(self, *args, **kwargs): class DetaForObjectDetection (line 2699) | class DetaForObjectDetection(metaclass=DummyObject): method __init__ (line 2702) | def __init__(self, *args, **kwargs): class DetaModel (line 2706) | class DetaModel(metaclass=DummyObject): method __init__ (line 2709) | def __init__(self, *args, **kwargs): class DetaPreTrainedModel (line 2713) | class DetaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2716) | def __init__(self, *args, **kwargs): class EfficientFormerForImageClassification (line 2720) | class EfficientFormerForImageClassification(metaclass=DummyObject): method __init__ (line 2723) | def __init__(self, *args, **kwargs): class EfficientFormerForImageClassificationWithTeacher (line 2727) | class EfficientFormerForImageClassificationWithTeacher(metaclass=DummyOb... method __init__ (line 2730) | def __init__(self, *args, **kwargs): class EfficientFormerModel (line 2734) | class EfficientFormerModel(metaclass=DummyObject): method __init__ (line 2737) | def __init__(self, *args, **kwargs): class EfficientFormerPreTrainedModel (line 2741) | class EfficientFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2744) | def __init__(self, *args, **kwargs): class ErnieMForInformationExtraction (line 2748) | class ErnieMForInformationExtraction(metaclass=DummyObject): method __init__ (line 2751) | def __init__(self, *args, **kwargs): class ErnieMForMultipleChoice (line 2755) | class ErnieMForMultipleChoice(metaclass=DummyObject): method __init__ (line 2758) | def __init__(self, *args, **kwargs): class ErnieMForQuestionAnswering (line 2762) | class ErnieMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2765) | def __init__(self, *args, **kwargs): class ErnieMForSequenceClassification (line 2769) | class ErnieMForSequenceClassification(metaclass=DummyObject): method __init__ (line 2772) | def __init__(self, *args, **kwargs): class ErnieMForTokenClassification (line 2776) | class ErnieMForTokenClassification(metaclass=DummyObject): method __init__ (line 2779) | def __init__(self, *args, **kwargs): class ErnieMModel (line 2783) | class ErnieMModel(metaclass=DummyObject): method __init__ (line 2786) | def __init__(self, *args, **kwargs): class ErnieMPreTrainedModel (line 2790) | class ErnieMPreTrainedModel(metaclass=DummyObject): method __init__ (line 2793) | def __init__(self, *args, **kwargs): class GPTSanJapaneseForConditionalGeneration (line 2797) | class GPTSanJapaneseForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2800) | def __init__(self, *args, **kwargs): class GPTSanJapaneseModel (line 2804) | class GPTSanJapaneseModel(metaclass=DummyObject): method __init__ (line 2807) | def __init__(self, *args, **kwargs): class GPTSanJapanesePreTrainedModel (line 2811) | class GPTSanJapanesePreTrainedModel(metaclass=DummyObject): method __init__ (line 2814) | def __init__(self, *args, **kwargs): class GraphormerForGraphClassification (line 2818) | class GraphormerForGraphClassification(metaclass=DummyObject): method __init__ (line 2821) | def __init__(self, *args, **kwargs): class GraphormerModel (line 2825) | class GraphormerModel(metaclass=DummyObject): method __init__ (line 2828) | def __init__(self, *args, **kwargs): class GraphormerPreTrainedModel (line 2832) | class GraphormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2835) | def __init__(self, *args, **kwargs): class JukeboxModel (line 2839) | class JukeboxModel(metaclass=DummyObject): method __init__ (line 2842) | def __init__(self, *args, **kwargs): class JukeboxPreTrainedModel (line 2846) | class JukeboxPreTrainedModel(metaclass=DummyObject): method __init__ (line 2849) | def __init__(self, *args, **kwargs): class JukeboxPrior (line 2853) | class JukeboxPrior(metaclass=DummyObject): method __init__ (line 2856) | def __init__(self, *args, **kwargs): class JukeboxVQVAE (line 2860) | class JukeboxVQVAE(metaclass=DummyObject): method __init__ (line 2863) | def __init__(self, *args, **kwargs): class MCTCTForCTC (line 2867) | class MCTCTForCTC(metaclass=DummyObject): method __init__ (line 2870) | def __init__(self, *args, **kwargs): class MCTCTModel (line 2874) | class MCTCTModel(metaclass=DummyObject): method __init__ (line 2877) | def __init__(self, *args, **kwargs): class MCTCTPreTrainedModel (line 2881) | class MCTCTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2884) | def __init__(self, *args, **kwargs): class MegaForCausalLM (line 2888) | class MegaForCausalLM(metaclass=DummyObject): method __init__ (line 2891) | def __init__(self, *args, **kwargs): class MegaForMaskedLM (line 2895) | class MegaForMaskedLM(metaclass=DummyObject): method __init__ (line 2898) | def __init__(self, *args, **kwargs): class MegaForMultipleChoice (line 2902) | class MegaForMultipleChoice(metaclass=DummyObject): method __init__ (line 2905) | def __init__(self, *args, **kwargs): class MegaForQuestionAnswering (line 2909) | class MegaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2912) | def __init__(self, *args, **kwargs): class MegaForSequenceClassification (line 2916) | class MegaForSequenceClassification(metaclass=DummyObject): method __init__ (line 2919) | def __init__(self, *args, **kwargs): class MegaForTokenClassification (line 2923) | class MegaForTokenClassification(metaclass=DummyObject): method __init__ (line 2926) | def __init__(self, *args, **kwargs): class MegaModel (line 2930) | class MegaModel(metaclass=DummyObject): method __init__ (line 2933) | def __init__(self, *args, **kwargs): class MegaPreTrainedModel (line 2937) | class MegaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2940) | def __init__(self, *args, **kwargs): class MMBTForClassification (line 2944) | class MMBTForClassification(metaclass=DummyObject): method __init__ (line 2947) | def __init__(self, *args, **kwargs): class MMBTModel (line 2951) | class MMBTModel(metaclass=DummyObject): method __init__ (line 2954) | def __init__(self, *args, **kwargs): class ModalEmbeddings (line 2958) | class ModalEmbeddings(metaclass=DummyObject): method __init__ (line 2961) | def __init__(self, *args, **kwargs): class NatBackbone (line 2965) | class NatBackbone(metaclass=DummyObject): method __init__ (line 2968) | def __init__(self, *args, **kwargs): class NatForImageClassification (line 2972) | class NatForImageClassification(metaclass=DummyObject): method __init__ (line 2975) | def __init__(self, *args, **kwargs): class NatModel (line 2979) | class NatModel(metaclass=DummyObject): method __init__ (line 2982) | def __init__(self, *args, **kwargs): class NatPreTrainedModel (line 2986) | class NatPreTrainedModel(metaclass=DummyObject): method __init__ (line 2989) | def __init__(self, *args, **kwargs): class NezhaForMaskedLM (line 2993) | class NezhaForMaskedLM(metaclass=DummyObject): method __init__ (line 2996) | def __init__(self, *args, **kwargs): class NezhaForMultipleChoice (line 3000) | class NezhaForMultipleChoice(metaclass=DummyObject): method __init__ (line 3003) | def __init__(self, *args, **kwargs): class NezhaForNextSentencePrediction (line 3007) | class NezhaForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 3010) | def __init__(self, *args, **kwargs): class NezhaForPreTraining (line 3014) | class NezhaForPreTraining(metaclass=DummyObject): method __init__ (line 3017) | def __init__(self, *args, **kwargs): class NezhaForQuestionAnswering (line 3021) | class NezhaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3024) | def __init__(self, *args, **kwargs): class NezhaForSequenceClassification (line 3028) | class NezhaForSequenceClassification(metaclass=DummyObject): method __init__ (line 3031) | def __init__(self, *args, **kwargs): class NezhaForTokenClassification (line 3035) | class NezhaForTokenClassification(metaclass=DummyObject): method __init__ (line 3038) | def __init__(self, *args, **kwargs): class NezhaModel (line 3042) | class NezhaModel(metaclass=DummyObject): method __init__ (line 3045) | def __init__(self, *args, **kwargs): class NezhaPreTrainedModel (line 3049) | class NezhaPreTrainedModel(metaclass=DummyObject): method __init__ (line 3052) | def __init__(self, *args, **kwargs): class OpenLlamaForCausalLM (line 3056) | class OpenLlamaForCausalLM(metaclass=DummyObject): method __init__ (line 3059) | def __init__(self, *args, **kwargs): class OpenLlamaForSequenceClassification (line 3063) | class OpenLlamaForSequenceClassification(metaclass=DummyObject): method __init__ (line 3066) | def __init__(self, *args, **kwargs): class OpenLlamaModel (line 3070) | class OpenLlamaModel(metaclass=DummyObject): method __init__ (line 3073) | def __init__(self, *args, **kwargs): class OpenLlamaPreTrainedModel (line 3077) | class OpenLlamaPreTrainedModel(metaclass=DummyObject): method __init__ (line 3080) | def __init__(self, *args, **kwargs): class QDQBertForMaskedLM (line 3084) | class QDQBertForMaskedLM(metaclass=DummyObject): method __init__ (line 3087) | def __init__(self, *args, **kwargs): class QDQBertForMultipleChoice (line 3091) | class QDQBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 3094) | def __init__(self, *args, **kwargs): class QDQBertForNextSentencePrediction (line 3098) | class QDQBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 3101) | def __init__(self, *args, **kwargs): class QDQBertForQuestionAnswering (line 3105) | class QDQBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3108) | def __init__(self, *args, **kwargs): class QDQBertForSequenceClassification (line 3112) | class QDQBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 3115) | def __init__(self, *args, **kwargs): class QDQBertForTokenClassification (line 3119) | class QDQBertForTokenClassification(metaclass=DummyObject): method __init__ (line 3122) | def __init__(self, *args, **kwargs): class QDQBertLayer (line 3126) | class QDQBertLayer(metaclass=DummyObject): method __init__ (line 3129) | def __init__(self, *args, **kwargs): class QDQBertLMHeadModel (line 3133) | class QDQBertLMHeadModel(metaclass=DummyObject): method __init__ (line 3136) | def __init__(self, *args, **kwargs): class QDQBertModel (line 3140) | class QDQBertModel(metaclass=DummyObject): method __init__ (line 3143) | def __init__(self, *args, **kwargs): class QDQBertPreTrainedModel (line 3147) | class QDQBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 3150) | def __init__(self, *args, **kwargs): function load_tf_weights_in_qdqbert (line 3154) | def load_tf_weights_in_qdqbert(*args, **kwargs): class RealmEmbedder (line 3158) | class RealmEmbedder(metaclass=DummyObject): method __init__ (line 3161) | def __init__(self, *args, **kwargs): class RealmForOpenQA (line 3165) | class RealmForOpenQA(metaclass=DummyObject): method __init__ (line 3168) | def __init__(self, *args, **kwargs): class RealmKnowledgeAugEncoder (line 3172) | class RealmKnowledgeAugEncoder(metaclass=DummyObject): method __init__ (line 3175) | def __init__(self, *args, **kwargs): class RealmPreTrainedModel (line 3179) | class RealmPreTrainedModel(metaclass=DummyObject): method __init__ (line 3182) | def __init__(self, *args, **kwargs): class RealmReader (line 3186) | class RealmReader(metaclass=DummyObject): method __init__ (line 3189) | def __init__(self, *args, **kwargs): class RealmRetriever (line 3193) | class RealmRetriever(metaclass=DummyObject): method __init__ (line 3196) | def __init__(self, *args, **kwargs): class RealmScorer (line 3200) | class RealmScorer(metaclass=DummyObject): method __init__ (line 3203) | def __init__(self, *args, **kwargs): function load_tf_weights_in_realm (line 3207) | def load_tf_weights_in_realm(*args, **kwargs): class RetriBertModel (line 3211) | class RetriBertModel(metaclass=DummyObject): method __init__ (line 3214) | def __init__(self, *args, **kwargs): class RetriBertPreTrainedModel (line 3218) | class RetriBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 3221) | def __init__(self, *args, **kwargs): class Speech2Text2ForCausalLM (line 3225) | class Speech2Text2ForCausalLM(metaclass=DummyObject): method __init__ (line 3228) | def __init__(self, *args, **kwargs): class Speech2Text2PreTrainedModel (line 3232) | class Speech2Text2PreTrainedModel(metaclass=DummyObject): method __init__ (line 3235) | def __init__(self, *args, **kwargs): class TrajectoryTransformerModel (line 3239) | class TrajectoryTransformerModel(metaclass=DummyObject): method __init__ (line 3242) | def __init__(self, *args, **kwargs): class TrajectoryTransformerPreTrainedModel (line 3246) | class TrajectoryTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 3249) | def __init__(self, *args, **kwargs): class AdaptiveEmbedding (line 3253) | class AdaptiveEmbedding(metaclass=DummyObject): method __init__ (line 3256) | def __init__(self, *args, **kwargs): class TransfoXLForSequenceClassification (line 3260) | class TransfoXLForSequenceClassification(metaclass=DummyObject): method __init__ (line 3263) | def __init__(self, *args, **kwargs): class TransfoXLLMHeadModel (line 3267) | class TransfoXLLMHeadModel(metaclass=DummyObject): method __init__ (line 3270) | def __init__(self, *args, **kwargs): class TransfoXLModel (line 3274) | class TransfoXLModel(metaclass=DummyObject): method __init__ (line 3277) | def __init__(self, *args, **kwargs): class TransfoXLPreTrainedModel (line 3281) | class TransfoXLPreTrainedModel(metaclass=DummyObject): method __init__ (line 3284) | def __init__(self, *args, **kwargs): function load_tf_weights_in_transfo_xl (line 3288) | def load_tf_weights_in_transfo_xl(*args, **kwargs): class TvltForAudioVisualClassification (line 3292) | class TvltForAudioVisualClassification(metaclass=DummyObject): method __init__ (line 3295) | def __init__(self, *args, **kwargs): class TvltForPreTraining (line 3299) | class TvltForPreTraining(metaclass=DummyObject): method __init__ (line 3302) | def __init__(self, *args, **kwargs): class TvltModel (line 3306) | class TvltModel(metaclass=DummyObject): method __init__ (line 3309) | def __init__(self, *args, **kwargs): class TvltPreTrainedModel (line 3313) | class TvltPreTrainedModel(metaclass=DummyObject): method __init__ (line 3316) | def __init__(self, *args, **kwargs): class VanForImageClassification (line 3320) | class VanForImageClassification(metaclass=DummyObject): method __init__ (line 3323) | def __init__(self, *args, **kwargs): class VanModel (line 3327) | class VanModel(metaclass=DummyObject): method __init__ (line 3330) | def __init__(self, *args, **kwargs): class VanPreTrainedModel (line 3334) | class VanPreTrainedModel(metaclass=DummyObject): method __init__ (line 3337) | def __init__(self, *args, **kwargs): class ViTHybridForImageClassification (line 3341) | class ViTHybridForImageClassification(metaclass=DummyObject): method __init__ (line 3344) | def __init__(self, *args, **kwargs): class ViTHybridModel (line 3348) | class ViTHybridModel(metaclass=DummyObject): method __init__ (line 3351) | def __init__(self, *args, **kwargs): class ViTHybridPreTrainedModel (line 3355) | class ViTHybridPreTrainedModel(metaclass=DummyObject): method __init__ (line 3358) | def __init__(self, *args, **kwargs): class XLMProphetNetDecoder (line 3362) | class XLMProphetNetDecoder(metaclass=DummyObject): method __init__ (line 3365) | def __init__(self, *args, **kwargs): class XLMProphetNetEncoder (line 3369) | class XLMProphetNetEncoder(metaclass=DummyObject): method __init__ (line 3372) | def __init__(self, *args, **kwargs): class XLMProphetNetForCausalLM (line 3376) | class XLMProphetNetForCausalLM(metaclass=DummyObject): method __init__ (line 3379) | def __init__(self, *args, **kwargs): class XLMProphetNetForConditionalGeneration (line 3383) | class XLMProphetNetForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3386) | def __init__(self, *args, **kwargs): class XLMProphetNetModel (line 3390) | class XLMProphetNetModel(metaclass=DummyObject): method __init__ (line 3393) | def __init__(self, *args, **kwargs): class XLMProphetNetPreTrainedModel (line 3397) | class XLMProphetNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 3400) | def __init__(self, *args, **kwargs): class DepthAnythingForDepthEstimation (line 3404) | class DepthAnythingForDepthEstimation(metaclass=DummyObject): method __init__ (line 3407) | def __init__(self, *args, **kwargs): class DepthAnythingPreTrainedModel (line 3411) | class DepthAnythingPreTrainedModel(metaclass=DummyObject): method __init__ (line 3414) | def __init__(self, *args, **kwargs): class DetrForObjectDetection (line 3418) | class DetrForObjectDetection(metaclass=DummyObject): method __init__ (line 3421) | def __init__(self, *args, **kwargs): class DetrForSegmentation (line 3425) | class DetrForSegmentation(metaclass=DummyObject): method __init__ (line 3428) | def __init__(self, *args, **kwargs): class DetrModel (line 3432) | class DetrModel(metaclass=DummyObject): method __init__ (line 3435) | def __init__(self, *args, **kwargs): class DetrPreTrainedModel (line 3439) | class DetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 3442) | def __init__(self, *args, **kwargs): class DinatBackbone (line 3446) | class DinatBackbone(metaclass=DummyObject): method __init__ (line 3449) | def __init__(self, *args, **kwargs): class DinatForImageClassification (line 3453) | class DinatForImageClassification(metaclass=DummyObject): method __init__ (line 3456) | def __init__(self, *args, **kwargs): class DinatModel (line 3460) | class DinatModel(metaclass=DummyObject): method __init__ (line 3463) | def __init__(self, *args, **kwargs): class DinatPreTrainedModel (line 3467) | class DinatPreTrainedModel(metaclass=DummyObject): method __init__ (line 3470) | def __init__(self, *args, **kwargs): class Dinov2Backbone (line 3474) | class Dinov2Backbone(metaclass=DummyObject): method __init__ (line 3477) | def __init__(self, *args, **kwargs): class Dinov2ForImageClassification (line 3481) | class Dinov2ForImageClassification(metaclass=DummyObject): method __init__ (line 3484) | def __init__(self, *args, **kwargs): class Dinov2Model (line 3488) | class Dinov2Model(metaclass=DummyObject): method __init__ (line 3491) | def __init__(self, *args, **kwargs): class Dinov2PreTrainedModel (line 3495) | class Dinov2PreTrainedModel(metaclass=DummyObject): method __init__ (line 3498) | def __init__(self, *args, **kwargs): class DistilBertForMaskedLM (line 3502) | class DistilBertForMaskedLM(metaclass=DummyObject): method __init__ (line 3505) | def __init__(self, *args, **kwargs): class DistilBertForMultipleChoice (line 3509) | class DistilBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 3512) | def __init__(self, *args, **kwargs): class DistilBertForQuestionAnswering (line 3516) | class DistilBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3519) | def __init__(self, *args, **kwargs): class DistilBertForSequenceClassification (line 3523) | class DistilBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 3526) | def __init__(self, *args, **kwargs): class DistilBertForTokenClassification (line 3530) | class DistilBertForTokenClassification(metaclass=DummyObject): method __init__ (line 3533) | def __init__(self, *args, **kwargs): class DistilBertModel (line 3537) | class DistilBertModel(metaclass=DummyObject): method __init__ (line 3540) | def __init__(self, *args, **kwargs): class DistilBertPreTrainedModel (line 3544) | class DistilBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 3547) | def __init__(self, *args, **kwargs): class DonutSwinModel (line 3551) | class DonutSwinModel(metaclass=DummyObject): method __init__ (line 3554) | def __init__(self, *args, **kwargs): class DonutSwinPreTrainedModel (line 3558) | class DonutSwinPreTrainedModel(metaclass=DummyObject): method __init__ (line 3561) | def __init__(self, *args, **kwargs): class DPRContextEncoder (line 3565) | class DPRContextEncoder(metaclass=DummyObject): method __init__ (line 3568) | def __init__(self, *args, **kwargs): class DPRPretrainedContextEncoder (line 3572) | class DPRPretrainedContextEncoder(metaclass=DummyObject): method __init__ (line 3575) | def __init__(self, *args, **kwargs): class DPRPreTrainedModel (line 3579) | class DPRPreTrainedModel(metaclass=DummyObject): method __init__ (line 3582) | def __init__(self, *args, **kwargs): class DPRPretrainedQuestionEncoder (line 3586) | class DPRPretrainedQuestionEncoder(metaclass=DummyObject): method __init__ (line 3589) | def __init__(self, *args, **kwargs): class DPRPretrainedReader (line 3593) | class DPRPretrainedReader(metaclass=DummyObject): method __init__ (line 3596) | def __init__(self, *args, **kwargs): class DPRQuestionEncoder (line 3600) | class DPRQuestionEncoder(metaclass=DummyObject): method __init__ (line 3603) | def __init__(self, *args, **kwargs): class DPRReader (line 3607) | class DPRReader(metaclass=DummyObject): method __init__ (line 3610) | def __init__(self, *args, **kwargs): class DPTForDepthEstimation (line 3614) | class DPTForDepthEstimation(metaclass=DummyObject): method __init__ (line 3617) | def __init__(self, *args, **kwargs): class DPTForSemanticSegmentation (line 3621) | class DPTForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 3624) | def __init__(self, *args, **kwargs): class DPTModel (line 3628) | class DPTModel(metaclass=DummyObject): method __init__ (line 3631) | def __init__(self, *args, **kwargs): class DPTPreTrainedModel (line 3635) | class DPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 3638) | def __init__(self, *args, **kwargs): class EfficientNetForImageClassification (line 3642) | class EfficientNetForImageClassification(metaclass=DummyObject): method __init__ (line 3645) | def __init__(self, *args, **kwargs): class EfficientNetModel (line 3649) | class EfficientNetModel(metaclass=DummyObject): method __init__ (line 3652) | def __init__(self, *args, **kwargs): class EfficientNetPreTrainedModel (line 3656) | class EfficientNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 3659) | def __init__(self, *args, **kwargs): class ElectraForCausalLM (line 3663) | class ElectraForCausalLM(metaclass=DummyObject): method __init__ (line 3666) | def __init__(self, *args, **kwargs): class ElectraForMaskedLM (line 3670) | class ElectraForMaskedLM(metaclass=DummyObject): method __init__ (line 3673) | def __init__(self, *args, **kwargs): class ElectraForMultipleChoice (line 3677) | class ElectraForMultipleChoice(metaclass=DummyObject): method __init__ (line 3680) | def __init__(self, *args, **kwargs): class ElectraForPreTraining (line 3684) | class ElectraForPreTraining(metaclass=DummyObject): method __init__ (line 3687) | def __init__(self, *args, **kwargs): class ElectraForQuestionAnswering (line 3691) | class ElectraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3694) | def __init__(self, *args, **kwargs): class ElectraForSequenceClassification (line 3698) | class ElectraForSequenceClassification(metaclass=DummyObject): method __init__ (line 3701) | def __init__(self, *args, **kwargs): class ElectraForTokenClassification (line 3705) | class ElectraForTokenClassification(metaclass=DummyObject): method __init__ (line 3708) | def __init__(self, *args, **kwargs): class ElectraModel (line 3712) | class ElectraModel(metaclass=DummyObject): method __init__ (line 3715) | def __init__(self, *args, **kwargs): class ElectraPreTrainedModel (line 3719) | class ElectraPreTrainedModel(metaclass=DummyObject): method __init__ (line 3722) | def __init__(self, *args, **kwargs): function load_tf_weights_in_electra (line 3726) | def load_tf_weights_in_electra(*args, **kwargs): class EncodecModel (line 3730) | class EncodecModel(metaclass=DummyObject): method __init__ (line 3733) | def __init__(self, *args, **kwargs): class EncodecPreTrainedModel (line 3737) | class EncodecPreTrainedModel(metaclass=DummyObject): method __init__ (line 3740) | def __init__(self, *args, **kwargs): class EncoderDecoderModel (line 3744) | class EncoderDecoderModel(metaclass=DummyObject): method __init__ (line 3747) | def __init__(self, *args, **kwargs): class ErnieForCausalLM (line 3751) | class ErnieForCausalLM(metaclass=DummyObject): method __init__ (line 3754) | def __init__(self, *args, **kwargs): class ErnieForMaskedLM (line 3758) | class ErnieForMaskedLM(metaclass=DummyObject): method __init__ (line 3761) | def __init__(self, *args, **kwargs): class ErnieForMultipleChoice (line 3765) | class ErnieForMultipleChoice(metaclass=DummyObject): method __init__ (line 3768) | def __init__(self, *args, **kwargs): class ErnieForNextSentencePrediction (line 3772) | class ErnieForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 3775) | def __init__(self, *args, **kwargs): class ErnieForPreTraining (line 3779) | class ErnieForPreTraining(metaclass=DummyObject): method __init__ (line 3782) | def __init__(self, *args, **kwargs): class ErnieForQuestionAnswering (line 3786) | class ErnieForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3789) | def __init__(self, *args, **kwargs): class ErnieForSequenceClassification (line 3793) | class ErnieForSequenceClassification(metaclass=DummyObject): method __init__ (line 3796) | def __init__(self, *args, **kwargs): class ErnieForTokenClassification (line 3800) | class ErnieForTokenClassification(metaclass=DummyObject): method __init__ (line 3803) | def __init__(self, *args, **kwargs): class ErnieModel (line 3807) | class ErnieModel(metaclass=DummyObject): method __init__ (line 3810) | def __init__(self, *args, **kwargs): class ErniePreTrainedModel (line 3814) | class ErniePreTrainedModel(metaclass=DummyObject): method __init__ (line 3817) | def __init__(self, *args, **kwargs): class EsmFoldPreTrainedModel (line 3821) | class EsmFoldPreTrainedModel(metaclass=DummyObject): method __init__ (line 3824) | def __init__(self, *args, **kwargs): class EsmForMaskedLM (line 3828) | class EsmForMaskedLM(metaclass=DummyObject): method __init__ (line 3831) | def __init__(self, *args, **kwargs): class EsmForProteinFolding (line 3835) | class EsmForProteinFolding(metaclass=DummyObject): method __init__ (line 3838) | def __init__(self, *args, **kwargs): class EsmForSequenceClassification (line 3842) | class EsmForSequenceClassification(metaclass=DummyObject): method __init__ (line 3845) | def __init__(self, *args, **kwargs): class EsmForTokenClassification (line 3849) | class EsmForTokenClassification(metaclass=DummyObject): method __init__ (line 3852) | def __init__(self, *args, **kwargs): class EsmModel (line 3856) | class EsmModel(metaclass=DummyObject): method __init__ (line 3859) | def __init__(self, *args, **kwargs): class EsmPreTrainedModel (line 3863) | class EsmPreTrainedModel(metaclass=DummyObject): method __init__ (line 3866) | def __init__(self, *args, **kwargs): class FalconForCausalLM (line 3870) | class FalconForCausalLM(metaclass=DummyObject): method __init__ (line 3873) | def __init__(self, *args, **kwargs): class FalconForQuestionAnswering (line 3877) | class FalconForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3880) | def __init__(self, *args, **kwargs): class FalconForSequenceClassification (line 3884) | class FalconForSequenceClassification(metaclass=DummyObject): method __init__ (line 3887) | def __init__(self, *args, **kwargs): class FalconForTokenClassification (line 3891) | class FalconForTokenClassification(metaclass=DummyObject): method __init__ (line 3894) | def __init__(self, *args, **kwargs): class FalconModel (line 3898) | class FalconModel(metaclass=DummyObject): method __init__ (line 3901) | def __init__(self, *args, **kwargs): class FalconPreTrainedModel (line 3905) | class FalconPreTrainedModel(metaclass=DummyObject): method __init__ (line 3908) | def __init__(self, *args, **kwargs): class FalconMambaForCausalLM (line 3912) | class FalconMambaForCausalLM(metaclass=DummyObject): method __init__ (line 3915) | def __init__(self, *args, **kwargs): class FalconMambaModel (line 3919) | class FalconMambaModel(metaclass=DummyObject): method __init__ (line 3922) | def __init__(self, *args, **kwargs): class FalconMambaPreTrainedModel (line 3926) | class FalconMambaPreTrainedModel(metaclass=DummyObject): method __init__ (line 3929) | def __init__(self, *args, **kwargs): class FastSpeech2ConformerHifiGan (line 3933) | class FastSpeech2ConformerHifiGan(metaclass=DummyObject): method __init__ (line 3936) | def __init__(self, *args, **kwargs): class FastSpeech2ConformerModel (line 3940) | class FastSpeech2ConformerModel(metaclass=DummyObject): method __init__ (line 3943) | def __init__(self, *args, **kwargs): class FastSpeech2ConformerPreTrainedModel (line 3947) | class FastSpeech2ConformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 3950) | def __init__(self, *args, **kwargs): class FastSpeech2ConformerWithHifiGan (line 3954) | class FastSpeech2ConformerWithHifiGan(metaclass=DummyObject): method __init__ (line 3957) | def __init__(self, *args, **kwargs): class FlaubertForMultipleChoice (line 3961) | class FlaubertForMultipleChoice(metaclass=DummyObject): method __init__ (line 3964) | def __init__(self, *args, **kwargs): class FlaubertForQuestionAnswering (line 3968) | class FlaubertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3971) | def __init__(self, *args, **kwargs): class FlaubertForQuestionAnsweringSimple (line 3975) | class FlaubertForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 3978) | def __init__(self, *args, **kwargs): class FlaubertForSequenceClassification (line 3982) | class FlaubertForSequenceClassification(metaclass=DummyObject): method __init__ (line 3985) | def __init__(self, *args, **kwargs): class FlaubertForTokenClassification (line 3989) | class FlaubertForTokenClassification(metaclass=DummyObject): method __init__ (line 3992) | def __init__(self, *args, **kwargs): class FlaubertModel (line 3996) | class FlaubertModel(metaclass=DummyObject): method __init__ (line 3999) | def __init__(self, *args, **kwargs): class FlaubertPreTrainedModel (line 4003) | class FlaubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4006) | def __init__(self, *args, **kwargs): class FlaubertWithLMHeadModel (line 4010) | class FlaubertWithLMHeadModel(metaclass=DummyObject): method __init__ (line 4013) | def __init__(self, *args, **kwargs): class FlavaForPreTraining (line 4017) | class FlavaForPreTraining(metaclass=DummyObject): method __init__ (line 4020) | def __init__(self, *args, **kwargs): class FlavaImageCodebook (line 4024) | class FlavaImageCodebook(metaclass=DummyObject): method __init__ (line 4027) | def __init__(self, *args, **kwargs): class FlavaImageModel (line 4031) | class FlavaImageModel(metaclass=DummyObject): method __init__ (line 4034) | def __init__(self, *args, **kwargs): class FlavaModel (line 4038) | class FlavaModel(metaclass=DummyObject): method __init__ (line 4041) | def __init__(self, *args, **kwargs): class FlavaMultimodalModel (line 4045) | class FlavaMultimodalModel(metaclass=DummyObject): method __init__ (line 4048) | def __init__(self, *args, **kwargs): class FlavaPreTrainedModel (line 4052) | class FlavaPreTrainedModel(metaclass=DummyObject): method __init__ (line 4055) | def __init__(self, *args, **kwargs): class FlavaTextModel (line 4059) | class FlavaTextModel(metaclass=DummyObject): method __init__ (line 4062) | def __init__(self, *args, **kwargs): class FNetForMaskedLM (line 4066) | class FNetForMaskedLM(metaclass=DummyObject): method __init__ (line 4069) | def __init__(self, *args, **kwargs): class FNetForMultipleChoice (line 4073) | class FNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 4076) | def __init__(self, *args, **kwargs): class FNetForNextSentencePrediction (line 4080) | class FNetForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 4083) | def __init__(self, *args, **kwargs): class FNetForPreTraining (line 4087) | class FNetForPreTraining(metaclass=DummyObject): method __init__ (line 4090) | def __init__(self, *args, **kwargs): class FNetForQuestionAnswering (line 4094) | class FNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4097) | def __init__(self, *args, **kwargs): class FNetForSequenceClassification (line 4101) | class FNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 4104) | def __init__(self, *args, **kwargs): class FNetForTokenClassification (line 4108) | class FNetForTokenClassification(metaclass=DummyObject): method __init__ (line 4111) | def __init__(self, *args, **kwargs): class FNetLayer (line 4115) | class FNetLayer(metaclass=DummyObject): method __init__ (line 4118) | def __init__(self, *args, **kwargs): class FNetModel (line 4122) | class FNetModel(metaclass=DummyObject): method __init__ (line 4125) | def __init__(self, *args, **kwargs): class FNetPreTrainedModel (line 4129) | class FNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 4132) | def __init__(self, *args, **kwargs): class FocalNetBackbone (line 4136) | class FocalNetBackbone(metaclass=DummyObject): method __init__ (line 4139) | def __init__(self, *args, **kwargs): class FocalNetForImageClassification (line 4143) | class FocalNetForImageClassification(metaclass=DummyObject): method __init__ (line 4146) | def __init__(self, *args, **kwargs): class FocalNetForMaskedImageModeling (line 4150) | class FocalNetForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 4153) | def __init__(self, *args, **kwargs): class FocalNetModel (line 4157) | class FocalNetModel(metaclass=DummyObject): method __init__ (line 4160) | def __init__(self, *args, **kwargs): class FocalNetPreTrainedModel (line 4164) | class FocalNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 4167) | def __init__(self, *args, **kwargs): class FSMTForConditionalGeneration (line 4171) | class FSMTForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4174) | def __init__(self, *args, **kwargs): class FSMTModel (line 4178) | class FSMTModel(metaclass=DummyObject): method __init__ (line 4181) | def __init__(self, *args, **kwargs): class PretrainedFSMTModel (line 4185) | class PretrainedFSMTModel(metaclass=DummyObject): method __init__ (line 4188) | def __init__(self, *args, **kwargs): class FunnelBaseModel (line 4192) | class FunnelBaseModel(metaclass=DummyObject): method __init__ (line 4195) | def __init__(self, *args, **kwargs): class FunnelForMaskedLM (line 4199) | class FunnelForMaskedLM(metaclass=DummyObject): method __init__ (line 4202) | def __init__(self, *args, **kwargs): class FunnelForMultipleChoice (line 4206) | class FunnelForMultipleChoice(metaclass=DummyObject): method __init__ (line 4209) | def __init__(self, *args, **kwargs): class FunnelForPreTraining (line 4213) | class FunnelForPreTraining(metaclass=DummyObject): method __init__ (line 4216) | def __init__(self, *args, **kwargs): class FunnelForQuestionAnswering (line 4220) | class FunnelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4223) | def __init__(self, *args, **kwargs): class FunnelForSequenceClassification (line 4227) | class FunnelForSequenceClassification(metaclass=DummyObject): method __init__ (line 4230) | def __init__(self, *args, **kwargs): class FunnelForTokenClassification (line 4234) | class FunnelForTokenClassification(metaclass=DummyObject): method __init__ (line 4237) | def __init__(self, *args, **kwargs): class FunnelModel (line 4241) | class FunnelModel(metaclass=DummyObject): method __init__ (line 4244) | def __init__(self, *args, **kwargs): class FunnelPreTrainedModel (line 4248) | class FunnelPreTrainedModel(metaclass=DummyObject): method __init__ (line 4251) | def __init__(self, *args, **kwargs): function load_tf_weights_in_funnel (line 4255) | def load_tf_weights_in_funnel(*args, **kwargs): class FuyuForCausalLM (line 4259) | class FuyuForCausalLM(metaclass=DummyObject): method __init__ (line 4262) | def __init__(self, *args, **kwargs): class FuyuPreTrainedModel (line 4266) | class FuyuPreTrainedModel(metaclass=DummyObject): method __init__ (line 4269) | def __init__(self, *args, **kwargs): class GemmaForCausalLM (line 4273) | class GemmaForCausalLM(metaclass=DummyObject): method __init__ (line 4276) | def __init__(self, *args, **kwargs): class GemmaForSequenceClassification (line 4280) | class GemmaForSequenceClassification(metaclass=DummyObject): method __init__ (line 4283) | def __init__(self, *args, **kwargs): class GemmaForTokenClassification (line 4287) | class GemmaForTokenClassification(metaclass=DummyObject): method __init__ (line 4290) | def __init__(self, *args, **kwargs): class GemmaModel (line 4294) | class GemmaModel(metaclass=DummyObject): method __init__ (line 4297) | def __init__(self, *args, **kwargs): class GemmaPreTrainedModel (line 4301) | class GemmaPreTrainedModel(metaclass=DummyObject): method __init__ (line 4304) | def __init__(self, *args, **kwargs): class Gemma2ForCausalLM (line 4308) | class Gemma2ForCausalLM(metaclass=DummyObject): method __init__ (line 4311) | def __init__(self, *args, **kwargs): class Gemma2ForSequenceClassification (line 4315) | class Gemma2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 4318) | def __init__(self, *args, **kwargs): class Gemma2ForTokenClassification (line 4322) | class Gemma2ForTokenClassification(metaclass=DummyObject): method __init__ (line 4325) | def __init__(self, *args, **kwargs): class Gemma2Model (line 4329) | class Gemma2Model(metaclass=DummyObject): method __init__ (line 4332) | def __init__(self, *args, **kwargs): class Gemma2PreTrainedModel (line 4336) | class Gemma2PreTrainedModel(metaclass=DummyObject): method __init__ (line 4339) | def __init__(self, *args, **kwargs): class GitForCausalLM (line 4343) | class GitForCausalLM(metaclass=DummyObject): method __init__ (line 4346) | def __init__(self, *args, **kwargs): class GitModel (line 4350) | class GitModel(metaclass=DummyObject): method __init__ (line 4353) | def __init__(self, *args, **kwargs): class GitPreTrainedModel (line 4357) | class GitPreTrainedModel(metaclass=DummyObject): method __init__ (line 4360) | def __init__(self, *args, **kwargs): class GitVisionModel (line 4364) | class GitVisionModel(metaclass=DummyObject): method __init__ (line 4367) | def __init__(self, *args, **kwargs): class GLPNForDepthEstimation (line 4371) | class GLPNForDepthEstimation(metaclass=DummyObject): method __init__ (line 4374) | def __init__(self, *args, **kwargs): class GLPNModel (line 4378) | class GLPNModel(metaclass=DummyObject): method __init__ (line 4381) | def __init__(self, *args, **kwargs): class GLPNPreTrainedModel (line 4385) | class GLPNPreTrainedModel(metaclass=DummyObject): method __init__ (line 4388) | def __init__(self, *args, **kwargs): class GPT2DoubleHeadsModel (line 4392) | class GPT2DoubleHeadsModel(metaclass=DummyObject): method __init__ (line 4395) | def __init__(self, *args, **kwargs): class GPT2ForQuestionAnswering (line 4399) | class GPT2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4402) | def __init__(self, *args, **kwargs): class GPT2ForSequenceClassification (line 4406) | class GPT2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 4409) | def __init__(self, *args, **kwargs): class GPT2ForTokenClassification (line 4413) | class GPT2ForTokenClassification(metaclass=DummyObject): method __init__ (line 4416) | def __init__(self, *args, **kwargs): class GPT2LMHeadModel (line 4420) | class GPT2LMHeadModel(metaclass=DummyObject): method __init__ (line 4423) | def __init__(self, *args, **kwargs): class GPT2Model (line 4427) | class GPT2Model(metaclass=DummyObject): method __init__ (line 4430) | def __init__(self, *args, **kwargs): class GPT2PreTrainedModel (line 4434) | class GPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 4437) | def __init__(self, *args, **kwargs): function load_tf_weights_in_gpt2 (line 4441) | def load_tf_weights_in_gpt2(*args, **kwargs): class GPTBigCodeForCausalLM (line 4445) | class GPTBigCodeForCausalLM(metaclass=DummyObject): method __init__ (line 4448) | def __init__(self, *args, **kwargs): class GPTBigCodeForSequenceClassification (line 4452) | class GPTBigCodeForSequenceClassification(metaclass=DummyObject): method __init__ (line 4455) | def __init__(self, *args, **kwargs): class GPTBigCodeForTokenClassification (line 4459) | class GPTBigCodeForTokenClassification(metaclass=DummyObject): method __init__ (line 4462) | def __init__(self, *args, **kwargs): class GPTBigCodeModel (line 4466) | class GPTBigCodeModel(metaclass=DummyObject): method __init__ (line 4469) | def __init__(self, *args, **kwargs): class GPTBigCodePreTrainedModel (line 4473) | class GPTBigCodePreTrainedModel(metaclass=DummyObject): method __init__ (line 4476) | def __init__(self, *args, **kwargs): class GPTNeoForCausalLM (line 4480) | class GPTNeoForCausalLM(metaclass=DummyObject): method __init__ (line 4483) | def __init__(self, *args, **kwargs): class GPTNeoForQuestionAnswering (line 4487) | class GPTNeoForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4490) | def __init__(self, *args, **kwargs): class GPTNeoForSequenceClassification (line 4494) | class GPTNeoForSequenceClassification(metaclass=DummyObject): method __init__ (line 4497) | def __init__(self, *args, **kwargs): class GPTNeoForTokenClassification (line 4501) | class GPTNeoForTokenClassification(metaclass=DummyObject): method __init__ (line 4504) | def __init__(self, *args, **kwargs): class GPTNeoModel (line 4508) | class GPTNeoModel(metaclass=DummyObject): method __init__ (line 4511) | def __init__(self, *args, **kwargs): class GPTNeoPreTrainedModel (line 4515) | class GPTNeoPreTrainedModel(metaclass=DummyObject): method __init__ (line 4518) | def __init__(self, *args, **kwargs): function load_tf_weights_in_gpt_neo (line 4522) | def load_tf_weights_in_gpt_neo(*args, **kwargs): class GPTNeoXForCausalLM (line 4526) | class GPTNeoXForCausalLM(metaclass=DummyObject): method __init__ (line 4529) | def __init__(self, *args, **kwargs): class GPTNeoXForQuestionAnswering (line 4533) | class GPTNeoXForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4536) | def __init__(self, *args, **kwargs): class GPTNeoXForSequenceClassification (line 4540) | class GPTNeoXForSequenceClassification(metaclass=DummyObject): method __init__ (line 4543) | def __init__(self, *args, **kwargs): class GPTNeoXForTokenClassification (line 4547) | class GPTNeoXForTokenClassification(metaclass=DummyObject): method __init__ (line 4550) | def __init__(self, *args, **kwargs): class GPTNeoXLayer (line 4554) | class GPTNeoXLayer(metaclass=DummyObject): method __init__ (line 4557) | def __init__(self, *args, **kwargs): class GPTNeoXModel (line 4561) | class GPTNeoXModel(metaclass=DummyObject): method __init__ (line 4564) | def __init__(self, *args, **kwargs): class GPTNeoXPreTrainedModel (line 4568) | class GPTNeoXPreTrainedModel(metaclass=DummyObject): method __init__ (line 4571) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseForCausalLM (line 4575) | class GPTNeoXJapaneseForCausalLM(metaclass=DummyObject): method __init__ (line 4578) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseLayer (line 4582) | class GPTNeoXJapaneseLayer(metaclass=DummyObject): method __init__ (line 4585) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseModel (line 4589) | class GPTNeoXJapaneseModel(metaclass=DummyObject): method __init__ (line 4592) | def __init__(self, *args, **kwargs): class GPTNeoXJapanesePreTrainedModel (line 4596) | class GPTNeoXJapanesePreTrainedModel(metaclass=DummyObject): method __init__ (line 4599) | def __init__(self, *args, **kwargs): class GPTJForCausalLM (line 4603) | class GPTJForCausalLM(metaclass=DummyObject): method __init__ (line 4606) | def __init__(self, *args, **kwargs): class GPTJForQuestionAnswering (line 4610) | class GPTJForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4613) | def __init__(self, *args, **kwargs): class GPTJForSequenceClassification (line 4617) | class GPTJForSequenceClassification(metaclass=DummyObject): method __init__ (line 4620) | def __init__(self, *args, **kwargs): class GPTJModel (line 4624) | class GPTJModel(metaclass=DummyObject): method __init__ (line 4627) | def __init__(self, *args, **kwargs): class GPTJPreTrainedModel (line 4631) | class GPTJPreTrainedModel(metaclass=DummyObject): method __init__ (line 4634) | def __init__(self, *args, **kwargs): class GroundingDinoForObjectDetection (line 4638) | class GroundingDinoForObjectDetection(metaclass=DummyObject): method __init__ (line 4641) | def __init__(self, *args, **kwargs): class GroundingDinoModel (line 4645) | class GroundingDinoModel(metaclass=DummyObject): method __init__ (line 4648) | def __init__(self, *args, **kwargs): class GroundingDinoPreTrainedModel (line 4652) | class GroundingDinoPreTrainedModel(metaclass=DummyObject): method __init__ (line 4655) | def __init__(self, *args, **kwargs): class GroupViTModel (line 4659) | class GroupViTModel(metaclass=DummyObject): method __init__ (line 4662) | def __init__(self, *args, **kwargs): class GroupViTPreTrainedModel (line 4666) | class GroupViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 4669) | def __init__(self, *args, **kwargs): class GroupViTTextModel (line 4673) | class GroupViTTextModel(metaclass=DummyObject): method __init__ (line 4676) | def __init__(self, *args, **kwargs): class GroupViTVisionModel (line 4680) | class GroupViTVisionModel(metaclass=DummyObject): method __init__ (line 4683) | def __init__(self, *args, **kwargs): class HieraBackbone (line 4687) | class HieraBackbone(metaclass=DummyObject): method __init__ (line 4690) | def __init__(self, *args, **kwargs): class HieraForImageClassification (line 4694) | class HieraForImageClassification(metaclass=DummyObject): method __init__ (line 4697) | def __init__(self, *args, **kwargs): class HieraForPreTraining (line 4701) | class HieraForPreTraining(metaclass=DummyObject): method __init__ (line 4704) | def __init__(self, *args, **kwargs): class HieraModel (line 4708) | class HieraModel(metaclass=DummyObject): method __init__ (line 4711) | def __init__(self, *args, **kwargs): class HieraPreTrainedModel (line 4715) | class HieraPreTrainedModel(metaclass=DummyObject): method __init__ (line 4718) | def __init__(self, *args, **kwargs): class HubertForCTC (line 4722) | class HubertForCTC(metaclass=DummyObject): method __init__ (line 4725) | def __init__(self, *args, **kwargs): class HubertForSequenceClassification (line 4729) | class HubertForSequenceClassification(metaclass=DummyObject): method __init__ (line 4732) | def __init__(self, *args, **kwargs): class HubertModel (line 4736) | class HubertModel(metaclass=DummyObject): method __init__ (line 4739) | def __init__(self, *args, **kwargs): class HubertPreTrainedModel (line 4743) | class HubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4746) | def __init__(self, *args, **kwargs): class IBertForMaskedLM (line 4750) | class IBertForMaskedLM(metaclass=DummyObject): method __init__ (line 4753) | def __init__(self, *args, **kwargs): class IBertForMultipleChoice (line 4757) | class IBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 4760) | def __init__(self, *args, **kwargs): class IBertForQuestionAnswering (line 4764) | class IBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4767) | def __init__(self, *args, **kwargs): class IBertForSequenceClassification (line 4771) | class IBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 4774) | def __init__(self, *args, **kwargs): class IBertForTokenClassification (line 4778) | class IBertForTokenClassification(metaclass=DummyObject): method __init__ (line 4781) | def __init__(self, *args, **kwargs): class IBertModel (line 4785) | class IBertModel(metaclass=DummyObject): method __init__ (line 4788) | def __init__(self, *args, **kwargs): class IBertPreTrainedModel (line 4792) | class IBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4795) | def __init__(self, *args, **kwargs): class IdeficsForVisionText2Text (line 4799) | class IdeficsForVisionText2Text(metaclass=DummyObject): method __init__ (line 4802) | def __init__(self, *args, **kwargs): class IdeficsModel (line 4806) | class IdeficsModel(metaclass=DummyObject): method __init__ (line 4809) | def __init__(self, *args, **kwargs): class IdeficsPreTrainedModel (line 4813) | class IdeficsPreTrainedModel(metaclass=DummyObject): method __init__ (line 4816) | def __init__(self, *args, **kwargs): class IdeficsProcessor (line 4820) | class IdeficsProcessor(metaclass=DummyObject): method __init__ (line 4823) | def __init__(self, *args, **kwargs): class Idefics2ForConditionalGeneration (line 4827) | class Idefics2ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4830) | def __init__(self, *args, **kwargs): class Idefics2Model (line 4834) | class Idefics2Model(metaclass=DummyObject): method __init__ (line 4837) | def __init__(self, *args, **kwargs): class Idefics2PreTrainedModel (line 4841) | class Idefics2PreTrainedModel(metaclass=DummyObject): method __init__ (line 4844) | def __init__(self, *args, **kwargs): class Idefics2Processor (line 4848) | class Idefics2Processor(metaclass=DummyObject): method __init__ (line 4851) | def __init__(self, *args, **kwargs): class ImageGPTForCausalImageModeling (line 4855) | class ImageGPTForCausalImageModeling(metaclass=DummyObject): method __init__ (line 4858) | def __init__(self, *args, **kwargs): class ImageGPTForImageClassification (line 4862) | class ImageGPTForImageClassification(metaclass=DummyObject): method __init__ (line 4865) | def __init__(self, *args, **kwargs): class ImageGPTModel (line 4869) | class ImageGPTModel(metaclass=DummyObject): method __init__ (line 4872) | def __init__(self, *args, **kwargs): class ImageGPTPreTrainedModel (line 4876) | class ImageGPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 4879) | def __init__(self, *args, **kwargs): function load_tf_weights_in_imagegpt (line 4883) | def load_tf_weights_in_imagegpt(*args, **kwargs): class InformerForPrediction (line 4887) | class InformerForPrediction(metaclass=DummyObject): method __init__ (line 4890) | def __init__(self, *args, **kwargs): class InformerModel (line 4894) | class InformerModel(metaclass=DummyObject): method __init__ (line 4897) | def __init__(self, *args, **kwargs): class InformerPreTrainedModel (line 4901) | class InformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4904) | def __init__(self, *args, **kwargs): class InstructBlipForConditionalGeneration (line 4908) | class InstructBlipForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4911) | def __init__(self, *args, **kwargs): class InstructBlipPreTrainedModel (line 4915) | class InstructBlipPreTrainedModel(metaclass=DummyObject): method __init__ (line 4918) | def __init__(self, *args, **kwargs): class InstructBlipQFormerModel (line 4922) | class InstructBlipQFormerModel(metaclass=DummyObject): method __init__ (line 4925) | def __init__(self, *args, **kwargs): class InstructBlipVisionModel (line 4929) | class InstructBlipVisionModel(metaclass=DummyObject): method __init__ (line 4932) | def __init__(self, *args, **kwargs): class InstructBlipVideoForConditionalGeneration (line 4936) | class InstructBlipVideoForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4939) | def __init__(self, *args, **kwargs): class InstructBlipVideoPreTrainedModel (line 4943) | class InstructBlipVideoPreTrainedModel(metaclass=DummyObject): method __init__ (line 4946) | def __init__(self, *args, **kwargs): class InstructBlipVideoQFormerModel (line 4950) | class InstructBlipVideoQFormerModel(metaclass=DummyObject): method __init__ (line 4953) | def __init__(self, *args, **kwargs): class InstructBlipVideoVisionModel (line 4957) | class InstructBlipVideoVisionModel(metaclass=DummyObject): method __init__ (line 4960) | def __init__(self, *args, **kwargs): class JambaForCausalLM (line 4964) | class JambaForCausalLM(metaclass=DummyObject): method __init__ (line 4967) | def __init__(self, *args, **kwargs): class JambaForSequenceClassification (line 4971) | class JambaForSequenceClassification(metaclass=DummyObject): method __init__ (line 4974) | def __init__(self, *args, **kwargs): class JambaModel (line 4978) | class JambaModel(metaclass=DummyObject): method __init__ (line 4981) | def __init__(self, *args, **kwargs): class JambaPreTrainedModel (line 4985) | class JambaPreTrainedModel(metaclass=DummyObject): method __init__ (line 4988) | def __init__(self, *args, **kwargs): class JetMoeForCausalLM (line 4992) | class JetMoeForCausalLM(metaclass=DummyObject): method __init__ (line 4995) | def __init__(self, *args, **kwargs): class JetMoeForSequenceClassification (line 4999) | class JetMoeForSequenceClassification(metaclass=DummyObject): method __init__ (line 5002) | def __init__(self, *args, **kwargs): class JetMoeModel (line 5006) | class JetMoeModel(metaclass=DummyObject): method __init__ (line 5009) | def __init__(self, *args, **kwargs): class JetMoePreTrainedModel (line 5013) | class JetMoePreTrainedModel(metaclass=DummyObject): method __init__ (line 5016) | def __init__(self, *args, **kwargs): class Kosmos2ForConditionalGeneration (line 5020) | class Kosmos2ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5023) | def __init__(self, *args, **kwargs): class Kosmos2Model (line 5027) | class Kosmos2Model(metaclass=DummyObject): method __init__ (line 5030) | def __init__(self, *args, **kwargs): class Kosmos2PreTrainedModel (line 5034) | class Kosmos2PreTrainedModel(metaclass=DummyObject): method __init__ (line 5037) | def __init__(self, *args, **kwargs): class LayoutLMForMaskedLM (line 5041) | class LayoutLMForMaskedLM(metaclass=DummyObject): method __init__ (line 5044) | def __init__(self, *args, **kwargs): class LayoutLMForQuestionAnswering (line 5048) | class LayoutLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5051) | def __init__(self, *args, **kwargs): class LayoutLMForSequenceClassification (line 5055) | class LayoutLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 5058) | def __init__(self, *args, **kwargs): class LayoutLMForTokenClassification (line 5062) | class LayoutLMForTokenClassification(metaclass=DummyObject): method __init__ (line 5065) | def __init__(self, *args, **kwargs): class LayoutLMModel (line 5069) | class LayoutLMModel(metaclass=DummyObject): method __init__ (line 5072) | def __init__(self, *args, **kwargs): class LayoutLMPreTrainedModel (line 5076) | class LayoutLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 5079) | def __init__(self, *args, **kwargs): class LayoutLMv2ForQuestionAnswering (line 5083) | class LayoutLMv2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5086) | def __init__(self, *args, **kwargs): class LayoutLMv2ForSequenceClassification (line 5090) | class LayoutLMv2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 5093) | def __init__(self, *args, **kwargs): class LayoutLMv2ForTokenClassification (line 5097) | class LayoutLMv2ForTokenClassification(metaclass=DummyObject): method __init__ (line 5100) | def __init__(self, *args, **kwargs): class LayoutLMv2Model (line 5104) | class LayoutLMv2Model(metaclass=DummyObject): method __init__ (line 5107) | def __init__(self, *args, **kwargs): class LayoutLMv2PreTrainedModel (line 5111) | class LayoutLMv2PreTrainedModel(metaclass=DummyObject): method __init__ (line 5114) | def __init__(self, *args, **kwargs): class LayoutLMv3ForQuestionAnswering (line 5118) | class LayoutLMv3ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5121) | def __init__(self, *args, **kwargs): class LayoutLMv3ForSequenceClassification (line 5125) | class LayoutLMv3ForSequenceClassification(metaclass=DummyObject): method __init__ (line 5128) | def __init__(self, *args, **kwargs): class LayoutLMv3ForTokenClassification (line 5132) | class LayoutLMv3ForTokenClassification(metaclass=DummyObject): method __init__ (line 5135) | def __init__(self, *args, **kwargs): class LayoutLMv3Model (line 5139) | class LayoutLMv3Model(metaclass=DummyObject): method __init__ (line 5142) | def __init__(self, *args, **kwargs): class LayoutLMv3PreTrainedModel (line 5146) | class LayoutLMv3PreTrainedModel(metaclass=DummyObject): method __init__ (line 5149) | def __init__(self, *args, **kwargs): class LEDForConditionalGeneration (line 5153) | class LEDForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5156) | def __init__(self, *args, **kwargs): class LEDForQuestionAnswering (line 5160) | class LEDForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5163) | def __init__(self, *args, **kwargs): class LEDForSequenceClassification (line 5167) | class LEDForSequenceClassification(metaclass=DummyObject): method __init__ (line 5170) | def __init__(self, *args, **kwargs): class LEDModel (line 5174) | class LEDModel(metaclass=DummyObject): method __init__ (line 5177) | def __init__(self, *args, **kwargs): class LEDPreTrainedModel (line 5181) | class LEDPreTrainedModel(metaclass=DummyObject): method __init__ (line 5184) | def __init__(self, *args, **kwargs): class LevitForImageClassification (line 5188) | class LevitForImageClassification(metaclass=DummyObject): method __init__ (line 5191) | def __init__(self, *args, **kwargs): class LevitForImageClassificationWithTeacher (line 5195) | class LevitForImageClassificationWithTeacher(metaclass=DummyObject): method __init__ (line 5198) | def __init__(self, *args, **kwargs): class LevitModel (line 5202) | class LevitModel(metaclass=DummyObject): method __init__ (line 5205) | def __init__(self, *args, **kwargs): class LevitPreTrainedModel (line 5209) | class LevitPreTrainedModel(metaclass=DummyObject): method __init__ (line 5212) | def __init__(self, *args, **kwargs): class LiltForQuestionAnswering (line 5216) | class LiltForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5219) | def __init__(self, *args, **kwargs): class LiltForSequenceClassification (line 5223) | class LiltForSequenceClassification(metaclass=DummyObject): method __init__ (line 5226) | def __init__(self, *args, **kwargs): class LiltForTokenClassification (line 5230) | class LiltForTokenClassification(metaclass=DummyObject): method __init__ (line 5233) | def __init__(self, *args, **kwargs): class LiltModel (line 5237) | class LiltModel(metaclass=DummyObject): method __init__ (line 5240) | def __init__(self, *args, **kwargs): class LiltPreTrainedModel (line 5244) | class LiltPreTrainedModel(metaclass=DummyObject): method __init__ (line 5247) | def __init__(self, *args, **kwargs): class LlamaForCausalLM (line 5251) | class LlamaForCausalLM(metaclass=DummyObject): method __init__ (line 5254) | def __init__(self, *args, **kwargs): class LlamaForQuestionAnswering (line 5258) | class LlamaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5261) | def __init__(self, *args, **kwargs): class LlamaForSequenceClassification (line 5265) | class LlamaForSequenceClassification(metaclass=DummyObject): method __init__ (line 5268) | def __init__(self, *args, **kwargs): class LlamaForTokenClassification (line 5272) | class LlamaForTokenClassification(metaclass=DummyObject): method __init__ (line 5275) | def __init__(self, *args, **kwargs): class LlamaModel (line 5279) | class LlamaModel(metaclass=DummyObject): method __init__ (line 5282) | def __init__(self, *args, **kwargs): class LlamaPreTrainedModel (line 5286) | class LlamaPreTrainedModel(metaclass=DummyObject): method __init__ (line 5289) | def __init__(self, *args, **kwargs): class LlavaForConditionalGeneration (line 5293) | class LlavaForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5296) | def __init__(self, *args, **kwargs): class LlavaPreTrainedModel (line 5300) | class LlavaPreTrainedModel(metaclass=DummyObject): method __init__ (line 5303) | def __init__(self, *args, **kwargs): class LlavaNextForConditionalGeneration (line 5307) | class LlavaNextForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5310) | def __init__(self, *args, **kwargs): class LlavaNextPreTrainedModel (line 5314) | class LlavaNextPreTrainedModel(metaclass=DummyObject): method __init__ (line 5317) | def __init__(self, *args, **kwargs): class LlavaNextVideoForConditionalGeneration (line 5321) | class LlavaNextVideoForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5324) | def __init__(self, *args, **kwargs): class LlavaNextVideoPreTrainedModel (line 5328) | class LlavaNextVideoPreTrainedModel(metaclass=DummyObject): method __init__ (line 5331) | def __init__(self, *args, **kwargs): class LongformerForMaskedLM (line 5335) | class LongformerForMaskedLM(metaclass=DummyObject): method __init__ (line 5338) | def __init__(self, *args, **kwargs): class LongformerForMultipleChoice (line 5342) | class LongformerForMultipleChoice(metaclass=DummyObject): method __init__ (line 5345) | def __init__(self, *args, **kwargs): class LongformerForQuestionAnswering (line 5349) | class LongformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5352) | def __init__(self, *args, **kwargs): class LongformerForSequenceClassification (line 5356) | class LongformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 5359) | def __init__(self, *args, **kwargs): class LongformerForTokenClassification (line 5363) | class LongformerForTokenClassification(metaclass=DummyObject): method __init__ (line 5366) | def __init__(self, *args, **kwargs): class LongformerModel (line 5370) | class LongformerModel(metaclass=DummyObject): method __init__ (line 5373) | def __init__(self, *args, **kwargs): class LongformerPreTrainedModel (line 5377) | class LongformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 5380) | def __init__(self, *args, **kwargs): class LongformerSelfAttention (line 5384) | class LongformerSelfAttention(metaclass=DummyObject): method __init__ (line 5387) | def __init__(self, *args, **kwargs): class LongT5EncoderModel (line 5391) | class LongT5EncoderModel(metaclass=DummyObject): method __init__ (line 5394) | def __init__(self, *args, **kwargs): class LongT5ForConditionalGeneration (line 5398) | class LongT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5401) | def __init__(self, *args, **kwargs): class LongT5Model (line 5405) | class LongT5Model(metaclass=DummyObject): method __init__ (line 5408) | def __init__(self, *args, **kwargs): class LongT5PreTrainedModel (line 5412) | class LongT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 5415) | def __init__(self, *args, **kwargs): class LukeForEntityClassification (line 5419) | class LukeForEntityClassification(metaclass=DummyObject): method __init__ (line 5422) | def __init__(self, *args, **kwargs): class LukeForEntityPairClassification (line 5426) | class LukeForEntityPairClassification(metaclass=DummyObject): method __init__ (line 5429) | def __init__(self, *args, **kwargs): class LukeForEntitySpanClassification (line 5433) | class LukeForEntitySpanClassification(metaclass=DummyObject): method __init__ (line 5436) | def __init__(self, *args, **kwargs): class LukeForMaskedLM (line 5440) | class LukeForMaskedLM(metaclass=DummyObject): method __init__ (line 5443) | def __init__(self, *args, **kwargs): class LukeForMultipleChoice (line 5447) | class LukeForMultipleChoice(metaclass=DummyObject): method __init__ (line 5450) | def __init__(self, *args, **kwargs): class LukeForQuestionAnswering (line 5454) | class LukeForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5457) | def __init__(self, *args, **kwargs): class LukeForSequenceClassification (line 5461) | class LukeForSequenceClassification(metaclass=DummyObject): method __init__ (line 5464) | def __init__(self, *args, **kwargs): class LukeForTokenClassification (line 5468) | class LukeForTokenClassification(metaclass=DummyObject): method __init__ (line 5471) | def __init__(self, *args, **kwargs): class LukeModel (line 5475) | class LukeModel(metaclass=DummyObject): method __init__ (line 5478) | def __init__(self, *args, **kwargs): class LukePreTrainedModel (line 5482) | class LukePreTrainedModel(metaclass=DummyObject): method __init__ (line 5485) | def __init__(self, *args, **kwargs): class LxmertEncoder (line 5489) | class LxmertEncoder(metaclass=DummyObject): method __init__ (line 5492) | def __init__(self, *args, **kwargs): class LxmertForPreTraining (line 5496) | class LxmertForPreTraining(metaclass=DummyObject): method __init__ (line 5499) | def __init__(self, *args, **kwargs): class LxmertForQuestionAnswering (line 5503) | class LxmertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5506) | def __init__(self, *args, **kwargs): class LxmertModel (line 5510) | class LxmertModel(metaclass=DummyObject): method __init__ (line 5513) | def __init__(self, *args, **kwargs): class LxmertPreTrainedModel (line 5517) | class LxmertPreTrainedModel(metaclass=DummyObject): method __init__ (line 5520) | def __init__(self, *args, **kwargs): class LxmertVisualFeatureEncoder (line 5524) | class LxmertVisualFeatureEncoder(metaclass=DummyObject): method __init__ (line 5527) | def __init__(self, *args, **kwargs): class LxmertXLayer (line 5531) | class LxmertXLayer(metaclass=DummyObject): method __init__ (line 5534) | def __init__(self, *args, **kwargs): class M2M100ForConditionalGeneration (line 5538) | class M2M100ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5541) | def __init__(self, *args, **kwargs): class M2M100Model (line 5545) | class M2M100Model(metaclass=DummyObject): method __init__ (line 5548) | def __init__(self, *args, **kwargs): class M2M100PreTrainedModel (line 5552) | class M2M100PreTrainedModel(metaclass=DummyObject): method __init__ (line 5555) | def __init__(self, *args, **kwargs): class MambaForCausalLM (line 5559) | class MambaForCausalLM(metaclass=DummyObject): method __init__ (line 5562) | def __init__(self, *args, **kwargs): class MambaModel (line 5566) | class MambaModel(metaclass=DummyObject): method __init__ (line 5569) | def __init__(self, *args, **kwargs): class MambaPreTrainedModel (line 5573) | class MambaPreTrainedModel(metaclass=DummyObject): method __init__ (line 5576) | def __init__(self, *args, **kwargs): class Mamba2ForCausalLM (line 5580) | class Mamba2ForCausalLM(metaclass=DummyObject): method __init__ (line 5583) | def __init__(self, *args, **kwargs): class Mamba2Model (line 5587) | class Mamba2Model(metaclass=DummyObject): method __init__ (line 5590) | def __init__(self, *args, **kwargs): class Mamba2PreTrainedModel (line 5594) | class Mamba2PreTrainedModel(metaclass=DummyObject): method __init__ (line 5597) | def __init__(self, *args, **kwargs): class MarianForCausalLM (line 5601) | class MarianForCausalLM(metaclass=DummyObject): method __init__ (line 5604) | def __init__(self, *args, **kwargs): class MarianModel (line 5608) | class MarianModel(metaclass=DummyObject): method __init__ (line 5611) | def __init__(self, *args, **kwargs): class MarianMTModel (line 5615) | class MarianMTModel(metaclass=DummyObject): method __init__ (line 5618) | def __init__(self, *args, **kwargs): class MarkupLMForQuestionAnswering (line 5622) | class MarkupLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5625) | def __init__(self, *args, **kwargs): class MarkupLMForSequenceClassification (line 5629) | class MarkupLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 5632) | def __init__(self, *args, **kwargs): class MarkupLMForTokenClassification (line 5636) | class MarkupLMForTokenClassification(metaclass=DummyObject): method __init__ (line 5639) | def __init__(self, *args, **kwargs): class MarkupLMModel (line 5643) | class MarkupLMModel(metaclass=DummyObject): method __init__ (line 5646) | def __init__(self, *args, **kwargs): class MarkupLMPreTrainedModel (line 5650) | class MarkupLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 5653) | def __init__(self, *args, **kwargs): class Mask2FormerForUniversalSegmentation (line 5657) | class Mask2FormerForUniversalSegmentation(metaclass=DummyObject): method __init__ (line 5660) | def __init__(self, *args, **kwargs): class Mask2FormerModel (line 5664) | class Mask2FormerModel(metaclass=DummyObject): method __init__ (line 5667) | def __init__(self, *args, **kwargs): class Mask2FormerPreTrainedModel (line 5671) | class Mask2FormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 5674) | def __init__(self, *args, **kwargs): class MaskFormerForInstanceSegmentation (line 5678) | class MaskFormerForInstanceSegmentation(metaclass=DummyObject): method __init__ (line 5681) | def __init__(self, *args, **kwargs): class MaskFormerModel (line 5685) | class MaskFormerModel(metaclass=DummyObject): method __init__ (line 5688) | def __init__(self, *args, **kwargs): class MaskFormerPreTrainedModel (line 5692) | class MaskFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 5695) | def __init__(self, *args, **kwargs): class MaskFormerSwinBackbone (line 5699) | class MaskFormerSwinBackbone(metaclass=DummyObject): method __init__ (line 5702) | def __init__(self, *args, **kwargs): class MBartForCausalLM (line 5706) | class MBartForCausalLM(metaclass=DummyObject): method __init__ (line 5709) | def __init__(self, *args, **kwargs): class MBartForConditionalGeneration (line 5713) | class MBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5716) | def __init__(self, *args, **kwargs): class MBartForQuestionAnswering (line 5720) | class MBartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5723) | def __init__(self, *args, **kwargs): class MBartForSequenceClassification (line 5727) | class MBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 5730) | def __init__(self, *args, **kwargs): class MBartModel (line 5734) | class MBartModel(metaclass=DummyObject): method __init__ (line 5737) | def __init__(self, *args, **kwargs): class MBartPreTrainedModel (line 5741) | class MBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 5744) | def __init__(self, *args, **kwargs): class MegatronBertForCausalLM (line 5748) | class MegatronBertForCausalLM(metaclass=DummyObject): method __init__ (line 5751) | def __init__(self, *args, **kwargs): class MegatronBertForMaskedLM (line 5755) | class MegatronBertForMaskedLM(metaclass=DummyObject): method __init__ (line 5758) | def __init__(self, *args, **kwargs): class MegatronBertForMultipleChoice (line 5762) | class MegatronBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 5765) | def __init__(self, *args, **kwargs): class MegatronBertForNextSentencePrediction (line 5769) | class MegatronBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 5772) | def __init__(self, *args, **kwargs): class MegatronBertForPreTraining (line 5776) | class MegatronBertForPreTraining(metaclass=DummyObject): method __init__ (line 5779) | def __init__(self, *args, **kwargs): class MegatronBertForQuestionAnswering (line 5783) | class MegatronBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5786) | def __init__(self, *args, **kwargs): class MegatronBertForSequenceClassification (line 5790) | class MegatronBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 5793) | def __init__(self, *args, **kwargs): class MegatronBertForTokenClassification (line 5797) | class MegatronBertForTokenClassification(metaclass=DummyObject): method __init__ (line 5800) | def __init__(self, *args, **kwargs): class MegatronBertModel (line 5804) | class MegatronBertModel(metaclass=DummyObject): method __init__ (line 5807) | def __init__(self, *args, **kwargs): class MegatronBertPreTrainedModel (line 5811) | class MegatronBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 5814) | def __init__(self, *args, **kwargs): class MgpstrForSceneTextRecognition (line 5818) | class MgpstrForSceneTextRecognition(metaclass=DummyObject): method __init__ (line 5821) | def __init__(self, *args, **kwargs): class MgpstrModel (line 5825) | class MgpstrModel(metaclass=DummyObject): method __init__ (line 5828) | def __init__(self, *args, **kwargs): class MgpstrPreTrainedModel (line 5832) | class MgpstrPreTrainedModel(metaclass=DummyObject): method __init__ (line 5835) | def __init__(self, *args, **kwargs): class MistralForCausalLM (line 5839) | class MistralForCausalLM(metaclass=DummyObject): method __init__ (line 5842) | def __init__(self, *args, **kwargs): class MistralForSequenceClassification (line 5846) | class MistralForSequenceClassification(metaclass=DummyObject): method __init__ (line 5849) | def __init__(self, *args, **kwargs): class MistralForTokenClassification (line 5853) | class MistralForTokenClassification(metaclass=DummyObject): method __init__ (line 5856) | def __init__(self, *args, **kwargs): class MistralModel (line 5860) | class MistralModel(metaclass=DummyObject): method __init__ (line 5863) | def __init__(self, *args, **kwargs): class MistralPreTrainedModel (line 5867) | class MistralPreTrainedModel(metaclass=DummyObject): method __init__ (line 5870) | def __init__(self, *args, **kwargs): class MixtralForCausalLM (line 5874) | class MixtralForCausalLM(metaclass=DummyObject): method __init__ (line 5877) | def __init__(self, *args, **kwargs): class MixtralForSequenceClassification (line 5881) | class MixtralForSequenceClassification(metaclass=DummyObject): method __init__ (line 5884) | def __init__(self, *args, **kwargs): class MixtralForTokenClassification (line 5888) | class MixtralForTokenClassification(metaclass=DummyObject): method __init__ (line 5891) | def __init__(self, *args, **kwargs): class MixtralModel (line 5895) | class MixtralModel(metaclass=DummyObject): method __init__ (line 5898) | def __init__(self, *args, **kwargs): class MixtralPreTrainedModel (line 5902) | class MixtralPreTrainedModel(metaclass=DummyObject): method __init__ (line 5905) | def __init__(self, *args, **kwargs): class MobileBertForMaskedLM (line 5909) | class MobileBertForMaskedLM(metaclass=DummyObject): method __init__ (line 5912) | def __init__(self, *args, **kwargs): class MobileBertForMultipleChoice (line 5916) | class MobileBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 5919) | def __init__(self, *args, **kwargs): class MobileBertForNextSentencePrediction (line 5923) | class MobileBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 5926) | def __init__(self, *args, **kwargs): class MobileBertForPreTraining (line 5930) | class MobileBertForPreTraining(metaclass=DummyObject): method __init__ (line 5933) | def __init__(self, *args, **kwargs): class MobileBertForQuestionAnswering (line 5937) | class MobileBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5940) | def __init__(self, *args, **kwargs): class MobileBertForSequenceClassification (line 5944) | class MobileBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 5947) | def __init__(self, *args, **kwargs): class MobileBertForTokenClassification (line 5951) | class MobileBertForTokenClassification(metaclass=DummyObject): method __init__ (line 5954) | def __init__(self, *args, **kwargs): class MobileBertLayer (line 5958) | class MobileBertLayer(metaclass=DummyObject): method __init__ (line 5961) | def __init__(self, *args, **kwargs): class MobileBertModel (line 5965) | class MobileBertModel(metaclass=DummyObject): method __init__ (line 5968) | def __init__(self, *args, **kwargs): class MobileBertPreTrainedModel (line 5972) | class MobileBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 5975) | def __init__(self, *args, **kwargs): function load_tf_weights_in_mobilebert (line 5979) | def load_tf_weights_in_mobilebert(*args, **kwargs): class MobileNetV1ForImageClassification (line 5983) | class MobileNetV1ForImageClassification(metaclass=DummyObject): method __init__ (line 5986) | def __init__(self, *args, **kwargs): class MobileNetV1Model (line 5990) | class MobileNetV1Model(metaclass=DummyObject): method __init__ (line 5993) | def __init__(self, *args, **kwargs): class MobileNetV1PreTrainedModel (line 5997) | class MobileNetV1PreTrainedModel(metaclass=DummyObject): method __init__ (line 6000) | def __init__(self, *args, **kwargs): function load_tf_weights_in_mobilenet_v1 (line 6004) | def load_tf_weights_in_mobilenet_v1(*args, **kwargs): class MobileNetV2ForImageClassification (line 6008) | class MobileNetV2ForImageClassification(metaclass=DummyObject): method __init__ (line 6011) | def __init__(self, *args, **kwargs): class MobileNetV2ForSemanticSegmentation (line 6015) | class MobileNetV2ForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 6018) | def __init__(self, *args, **kwargs): class MobileNetV2Model (line 6022) | class MobileNetV2Model(metaclass=DummyObject): method __init__ (line 6025) | def __init__(self, *args, **kwargs): class MobileNetV2PreTrainedModel (line 6029) | class MobileNetV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 6032) | def __init__(self, *args, **kwargs): function load_tf_weights_in_mobilenet_v2 (line 6036) | def load_tf_weights_in_mobilenet_v2(*args, **kwargs): class MobileViTForImageClassification (line 6040) | class MobileViTForImageClassification(metaclass=DummyObject): method __init__ (line 6043) | def __init__(self, *args, **kwargs): class MobileViTForSemanticSegmentation (line 6047) | class MobileViTForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 6050) | def __init__(self, *args, **kwargs): class MobileViTModel (line 6054) | class MobileViTModel(metaclass=DummyObject): method __init__ (line 6057) | def __init__(self, *args, **kwargs): class MobileViTPreTrainedModel (line 6061) | class MobileViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 6064) | def __init__(self, *args, **kwargs): class MobileViTV2ForImageClassification (line 6068) | class MobileViTV2ForImageClassification(metaclass=DummyObject): method __init__ (line 6071) | def __init__(self, *args, **kwargs): class MobileViTV2ForSemanticSegmentation (line 6075) | class MobileViTV2ForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 6078) | def __init__(self, *args, **kwargs): class MobileViTV2Model (line 6082) | class MobileViTV2Model(metaclass=DummyObject): method __init__ (line 6085) | def __init__(self, *args, **kwargs): class MobileViTV2PreTrainedModel (line 6089) | class MobileViTV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 6092) | def __init__(self, *args, **kwargs): class MPNetForMaskedLM (line 6096) | class MPNetForMaskedLM(metaclass=DummyObject): method __init__ (line 6099) | def __init__(self, *args, **kwargs): class MPNetForMultipleChoice (line 6103) | class MPNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 6106) | def __init__(self, *args, **kwargs): class MPNetForQuestionAnswering (line 6110) | class MPNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6113) | def __init__(self, *args, **kwargs): class MPNetForSequenceClassification (line 6117) | class MPNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 6120) | def __init__(self, *args, **kwargs): class MPNetForTokenClassification (line 6124) | class MPNetForTokenClassification(metaclass=DummyObject): method __init__ (line 6127) | def __init__(self, *args, **kwargs): class MPNetLayer (line 6131) | class MPNetLayer(metaclass=DummyObject): method __init__ (line 6134) | def __init__(self, *args, **kwargs): class MPNetModel (line 6138) | class MPNetModel(metaclass=DummyObject): method __init__ (line 6141) | def __init__(self, *args, **kwargs): class MPNetPreTrainedModel (line 6145) | class MPNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 6148) | def __init__(self, *args, **kwargs): class MptForCausalLM (line 6152) | class MptForCausalLM(metaclass=DummyObject): method __init__ (line 6155) | def __init__(self, *args, **kwargs): class MptForQuestionAnswering (line 6159) | class MptForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6162) | def __init__(self, *args, **kwargs): class MptForSequenceClassification (line 6166) | class MptForSequenceClassification(metaclass=DummyObject): method __init__ (line 6169) | def __init__(self, *args, **kwargs): class MptForTokenClassification (line 6173) | class MptForTokenClassification(metaclass=DummyObject): method __init__ (line 6176) | def __init__(self, *args, **kwargs): class MptModel (line 6180) | class MptModel(metaclass=DummyObject): method __init__ (line 6183) | def __init__(self, *args, **kwargs): class MptPreTrainedModel (line 6187) | class MptPreTrainedModel(metaclass=DummyObject): method __init__ (line 6190) | def __init__(self, *args, **kwargs): class MraForMaskedLM (line 6194) | class MraForMaskedLM(metaclass=DummyObject): method __init__ (line 6197) | def __init__(self, *args, **kwargs): class MraForMultipleChoice (line 6201) | class MraForMultipleChoice(metaclass=DummyObject): method __init__ (line 6204) | def __init__(self, *args, **kwargs): class MraForQuestionAnswering (line 6208) | class MraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6211) | def __init__(self, *args, **kwargs): class MraForSequenceClassification (line 6215) | class MraForSequenceClassification(metaclass=DummyObject): method __init__ (line 6218) | def __init__(self, *args, **kwargs): class MraForTokenClassification (line 6222) | class MraForTokenClassification(metaclass=DummyObject): method __init__ (line 6225) | def __init__(self, *args, **kwargs): class MraModel (line 6229) | class MraModel(metaclass=DummyObject): method __init__ (line 6232) | def __init__(self, *args, **kwargs): class MraPreTrainedModel (line 6236) | class MraPreTrainedModel(metaclass=DummyObject): method __init__ (line 6239) | def __init__(self, *args, **kwargs): class MT5EncoderModel (line 6243) | class MT5EncoderModel(metaclass=DummyObject): method __init__ (line 6246) | def __init__(self, *args, **kwargs): class MT5ForConditionalGeneration (line 6250) | class MT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6253) | def __init__(self, *args, **kwargs): class MT5ForQuestionAnswering (line 6257) | class MT5ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6260) | def __init__(self, *args, **kwargs): class MT5ForSequenceClassification (line 6264) | class MT5ForSequenceClassification(metaclass=DummyObject): method __init__ (line 6267) | def __init__(self, *args, **kwargs): class MT5ForTokenClassification (line 6271) | class MT5ForTokenClassification(metaclass=DummyObject): method __init__ (line 6274) | def __init__(self, *args, **kwargs): class MT5Model (line 6278) | class MT5Model(metaclass=DummyObject): method __init__ (line 6281) | def __init__(self, *args, **kwargs): class MT5PreTrainedModel (line 6285) | class MT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 6288) | def __init__(self, *args, **kwargs): class MusicgenForCausalLM (line 6292) | class MusicgenForCausalLM(metaclass=DummyObject): method __init__ (line 6295) | def __init__(self, *args, **kwargs): class MusicgenForConditionalGeneration (line 6299) | class MusicgenForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6302) | def __init__(self, *args, **kwargs): class MusicgenModel (line 6306) | class MusicgenModel(metaclass=DummyObject): method __init__ (line 6309) | def __init__(self, *args, **kwargs): class MusicgenPreTrainedModel (line 6313) | class MusicgenPreTrainedModel(metaclass=DummyObject): method __init__ (line 6316) | def __init__(self, *args, **kwargs): class MusicgenProcessor (line 6320) | class MusicgenProcessor(metaclass=DummyObject): method __init__ (line 6323) | def __init__(self, *args, **kwargs): class MusicgenMelodyForCausalLM (line 6327) | class MusicgenMelodyForCausalLM(metaclass=DummyObject): method __init__ (line 6330) | def __init__(self, *args, **kwargs): class MusicgenMelodyForConditionalGeneration (line 6334) | class MusicgenMelodyForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6337) | def __init__(self, *args, **kwargs): class MusicgenMelodyModel (line 6341) | class MusicgenMelodyModel(metaclass=DummyObject): method __init__ (line 6344) | def __init__(self, *args, **kwargs): class MusicgenMelodyPreTrainedModel (line 6348) | class MusicgenMelodyPreTrainedModel(metaclass=DummyObject): method __init__ (line 6351) | def __init__(self, *args, **kwargs): class MvpForCausalLM (line 6355) | class MvpForCausalLM(metaclass=DummyObject): method __init__ (line 6358) | def __init__(self, *args, **kwargs): class MvpForConditionalGeneration (line 6362) | class MvpForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6365) | def __init__(self, *args, **kwargs): class MvpForQuestionAnswering (line 6369) | class MvpForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6372) | def __init__(self, *args, **kwargs): class MvpForSequenceClassification (line 6376) | class MvpForSequenceClassification(metaclass=DummyObject): method __init__ (line 6379) | def __init__(self, *args, **kwargs): class MvpModel (line 6383) | class MvpModel(metaclass=DummyObject): method __init__ (line 6386) | def __init__(self, *args, **kwargs): class MvpPreTrainedModel (line 6390) | class MvpPreTrainedModel(metaclass=DummyObject): method __init__ (line 6393) | def __init__(self, *args, **kwargs): class NemotronForCausalLM (line 6397) | class NemotronForCausalLM(metaclass=DummyObject): method __init__ (line 6400) | def __init__(self, *args, **kwargs): class NemotronForQuestionAnswering (line 6404) | class NemotronForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6407) | def __init__(self, *args, **kwargs): class NemotronForSequenceClassification (line 6411) | class NemotronForSequenceClassification(metaclass=DummyObject): method __init__ (line 6414) | def __init__(self, *args, **kwargs): class NemotronForTokenClassification (line 6418) | class NemotronForTokenClassification(metaclass=DummyObject): method __init__ (line 6421) | def __init__(self, *args, **kwargs): class NemotronModel (line 6425) | class NemotronModel(metaclass=DummyObject): method __init__ (line 6428) | def __init__(self, *args, **kwargs): class NemotronPreTrainedModel (line 6432) | class NemotronPreTrainedModel(metaclass=DummyObject): method __init__ (line 6435) | def __init__(self, *args, **kwargs): class NllbMoeForConditionalGeneration (line 6439) | class NllbMoeForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6442) | def __init__(self, *args, **kwargs): class NllbMoeModel (line 6446) | class NllbMoeModel(metaclass=DummyObject): method __init__ (line 6449) | def __init__(self, *args, **kwargs): class NllbMoePreTrainedModel (line 6453) | class NllbMoePreTrainedModel(metaclass=DummyObject): method __init__ (line 6456) | def __init__(self, *args, **kwargs): class NllbMoeSparseMLP (line 6460) | class NllbMoeSparseMLP(metaclass=DummyObject): method __init__ (line 6463) | def __init__(self, *args, **kwargs): class NllbMoeTop2Router (line 6467) | class NllbMoeTop2Router(metaclass=DummyObject): method __init__ (line 6470) | def __init__(self, *args, **kwargs): class NystromformerForMaskedLM (line 6474) | class NystromformerForMaskedLM(metaclass=DummyObject): method __init__ (line 6477) | def __init__(self, *args, **kwargs): class NystromformerForMultipleChoice (line 6481) | class NystromformerForMultipleChoice(metaclass=DummyObject): method __init__ (line 6484) | def __init__(self, *args, **kwargs): class NystromformerForQuestionAnswering (line 6488) | class NystromformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6491) | def __init__(self, *args, **kwargs): class NystromformerForSequenceClassification (line 6495) | class NystromformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 6498) | def __init__(self, *args, **kwargs): class NystromformerForTokenClassification (line 6502) | class NystromformerForTokenClassification(metaclass=DummyObject): method __init__ (line 6505) | def __init__(self, *args, **kwargs): class NystromformerLayer (line 6509) | class NystromformerLayer(metaclass=DummyObject): method __init__ (line 6512) | def __init__(self, *args, **kwargs): class NystromformerModel (line 6516) | class NystromformerModel(metaclass=DummyObject): method __init__ (line 6519) | def __init__(self, *args, **kwargs): class NystromformerPreTrainedModel (line 6523) | class NystromformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6526) | def __init__(self, *args, **kwargs): class OlmoForCausalLM (line 6530) | class OlmoForCausalLM(metaclass=DummyObject): method __init__ (line 6533) | def __init__(self, *args, **kwargs): class OlmoModel (line 6537) | class OlmoModel(metaclass=DummyObject): method __init__ (line 6540) | def __init__(self, *args, **kwargs): class OlmoPreTrainedModel (line 6544) | class OlmoPreTrainedModel(metaclass=DummyObject): method __init__ (line 6547) | def __init__(self, *args, **kwargs): class OneFormerForUniversalSegmentation (line 6551) | class OneFormerForUniversalSegmentation(metaclass=DummyObject): method __init__ (line 6554) | def __init__(self, *args, **kwargs): class OneFormerModel (line 6558) | class OneFormerModel(metaclass=DummyObject): method __init__ (line 6561) | def __init__(self, *args, **kwargs): class OneFormerPreTrainedModel (line 6565) | class OneFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6568) | def __init__(self, *args, **kwargs): class OpenAIGPTDoubleHeadsModel (line 6572) | class OpenAIGPTDoubleHeadsModel(metaclass=DummyObject): method __init__ (line 6575) | def __init__(self, *args, **kwargs): class OpenAIGPTForSequenceClassification (line 6579) | class OpenAIGPTForSequenceClassification(metaclass=DummyObject): method __init__ (line 6582) | def __init__(self, *args, **kwargs): class OpenAIGPTLMHeadModel (line 6586) | class OpenAIGPTLMHeadModel(metaclass=DummyObject): method __init__ (line 6589) | def __init__(self, *args, **kwargs): class OpenAIGPTModel (line 6593) | class OpenAIGPTModel(metaclass=DummyObject): method __init__ (line 6596) | def __init__(self, *args, **kwargs): class OpenAIGPTPreTrainedModel (line 6600) | class OpenAIGPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 6603) | def __init__(self, *args, **kwargs): function load_tf_weights_in_openai_gpt (line 6607) | def load_tf_weights_in_openai_gpt(*args, **kwargs): class OPTForCausalLM (line 6611) | class OPTForCausalLM(metaclass=DummyObject): method __init__ (line 6614) | def __init__(self, *args, **kwargs): class OPTForQuestionAnswering (line 6618) | class OPTForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6621) | def __init__(self, *args, **kwargs): class OPTForSequenceClassification (line 6625) | class OPTForSequenceClassification(metaclass=DummyObject): method __init__ (line 6628) | def __init__(self, *args, **kwargs): class OPTModel (line 6632) | class OPTModel(metaclass=DummyObject): method __init__ (line 6635) | def __init__(self, *args, **kwargs): class OPTPreTrainedModel (line 6639) | class OPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 6642) | def __init__(self, *args, **kwargs): class Owlv2ForObjectDetection (line 6646) | class Owlv2ForObjectDetection(metaclass=DummyObject): method __init__ (line 6649) | def __init__(self, *args, **kwargs): class Owlv2Model (line 6653) | class Owlv2Model(metaclass=DummyObject): method __init__ (line 6656) | def __init__(self, *args, **kwargs): class Owlv2PreTrainedModel (line 6660) | class Owlv2PreTrainedModel(metaclass=DummyObject): method __init__ (line 6663) | def __init__(self, *args, **kwargs): class Owlv2TextModel (line 6667) | class Owlv2TextModel(metaclass=DummyObject): method __init__ (line 6670) | def __init__(self, *args, **kwargs): class Owlv2VisionModel (line 6674) | class Owlv2VisionModel(metaclass=DummyObject): method __init__ (line 6677) | def __init__(self, *args, **kwargs): class OwlViTForObjectDetection (line 6681) | class OwlViTForObjectDetection(metaclass=DummyObject): method __init__ (line 6684) | def __init__(self, *args, **kwargs): class OwlViTModel (line 6688) | class OwlViTModel(metaclass=DummyObject): method __init__ (line 6691) | def __init__(self, *args, **kwargs): class OwlViTPreTrainedModel (line 6695) | class OwlViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 6698) | def __init__(self, *args, **kwargs): class OwlViTTextModel (line 6702) | class OwlViTTextModel(metaclass=DummyObject): method __init__ (line 6705) | def __init__(self, *args, **kwargs): class OwlViTVisionModel (line 6709) | class OwlViTVisionModel(metaclass=DummyObject): method __init__ (line 6712) | def __init__(self, *args, **kwargs): class PaliGemmaForConditionalGeneration (line 6716) | class PaliGemmaForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6719) | def __init__(self, *args, **kwargs): class PaliGemmaPreTrainedModel (line 6723) | class PaliGemmaPreTrainedModel(metaclass=DummyObject): method __init__ (line 6726) | def __init__(self, *args, **kwargs): class PaliGemmaProcessor (line 6730) | class PaliGemmaProcessor(metaclass=DummyObject): method __init__ (line 6733) | def __init__(self, *args, **kwargs): class PatchTSMixerForPrediction (line 6737) | class PatchTSMixerForPrediction(metaclass=DummyObject): method __init__ (line 6740) | def __init__(self, *args, **kwargs): class PatchTSMixerForPretraining (line 6744) | class PatchTSMixerForPretraining(metaclass=DummyObject): method __init__ (line 6747) | def __init__(self, *args, **kwargs): class PatchTSMixerForRegression (line 6751) | class PatchTSMixerForRegression(metaclass=DummyObject): method __init__ (line 6754) | def __init__(self, *args, **kwargs): class PatchTSMixerForTimeSeriesClassification (line 6758) | class PatchTSMixerForTimeSeriesClassification(metaclass=DummyObject): method __init__ (line 6761) | def __init__(self, *args, **kwargs): class PatchTSMixerModel (line 6765) | class PatchTSMixerModel(metaclass=DummyObject): method __init__ (line 6768) | def __init__(self, *args, **kwargs): class PatchTSMixerPreTrainedModel (line 6772) | class PatchTSMixerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6775) | def __init__(self, *args, **kwargs): class PatchTSTForClassification (line 6779) | class PatchTSTForClassification(metaclass=DummyObject): method __init__ (line 6782) | def __init__(self, *args, **kwargs): class PatchTSTForPrediction (line 6786) | class PatchTSTForPrediction(metaclass=DummyObject): method __init__ (line 6789) | def __init__(self, *args, **kwargs): class PatchTSTForPretraining (line 6793) | class PatchTSTForPretraining(metaclass=DummyObject): method __init__ (line 6796) | def __init__(self, *args, **kwargs): class PatchTSTForRegression (line 6800) | class PatchTSTForRegression(metaclass=DummyObject): method __init__ (line 6803) | def __init__(self, *args, **kwargs): class PatchTSTModel (line 6807) | class PatchTSTModel(metaclass=DummyObject): method __init__ (line 6810) | def __init__(self, *args, **kwargs): class PatchTSTPreTrainedModel (line 6814) | class PatchTSTPreTrainedModel(metaclass=DummyObject): method __init__ (line 6817) | def __init__(self, *args, **kwargs): class PegasusForCausalLM (line 6821) | class PegasusForCausalLM(metaclass=DummyObject): method __init__ (line 6824) | def __init__(self, *args, **kwargs): class PegasusForConditionalGeneration (line 6828) | class PegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6831) | def __init__(self, *args, **kwargs): class PegasusModel (line 6835) | class PegasusModel(metaclass=DummyObject): method __init__ (line 6838) | def __init__(self, *args, **kwargs): class PegasusPreTrainedModel (line 6842) | class PegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 6845) | def __init__(self, *args, **kwargs): class PegasusXForConditionalGeneration (line 6849) | class PegasusXForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6852) | def __init__(self, *args, **kwargs): class PegasusXModel (line 6856) | class PegasusXModel(metaclass=DummyObject): method __init__ (line 6859) | def __init__(self, *args, **kwargs): class PegasusXPreTrainedModel (line 6863) | class PegasusXPreTrainedModel(metaclass=DummyObject): method __init__ (line 6866) | def __init__(self, *args, **kwargs): class PerceiverForImageClassificationConvProcessing (line 6870) | class PerceiverForImageClassificationConvProcessing(metaclass=DummyObject): method __init__ (line 6873) | def __init__(self, *args, **kwargs): class PerceiverForImageClassificationFourier (line 6877) | class PerceiverForImageClassificationFourier(metaclass=DummyObject): method __init__ (line 6880) | def __init__(self, *args, **kwargs): class PerceiverForImageClassificationLearned (line 6884) | class PerceiverForImageClassificationLearned(metaclass=DummyObject): method __init__ (line 6887) | def __init__(self, *args, **kwargs): class PerceiverForMaskedLM (line 6891) | class PerceiverForMaskedLM(metaclass=DummyObject): method __init__ (line 6894) | def __init__(self, *args, **kwargs): class PerceiverForMultimodalAutoencoding (line 6898) | class PerceiverForMultimodalAutoencoding(metaclass=DummyObject): method __init__ (line 6901) | def __init__(self, *args, **kwargs): class PerceiverForOpticalFlow (line 6905) | class PerceiverForOpticalFlow(metaclass=DummyObject): method __init__ (line 6908) | def __init__(self, *args, **kwargs): class PerceiverForSequenceClassification (line 6912) | class PerceiverForSequenceClassification(metaclass=DummyObject): method __init__ (line 6915) | def __init__(self, *args, **kwargs): class PerceiverLayer (line 6919) | class PerceiverLayer(metaclass=DummyObject): method __init__ (line 6922) | def __init__(self, *args, **kwargs): class PerceiverModel (line 6926) | class PerceiverModel(metaclass=DummyObject): method __init__ (line 6929) | def __init__(self, *args, **kwargs): class PerceiverPreTrainedModel (line 6933) | class PerceiverPreTrainedModel(metaclass=DummyObject): method __init__ (line 6936) | def __init__(self, *args, **kwargs): class PersimmonForCausalLM (line 6940) | class PersimmonForCausalLM(metaclass=DummyObject): method __init__ (line 6943) | def __init__(self, *args, **kwargs): class PersimmonForSequenceClassification (line 6947) | class PersimmonForSequenceClassification(metaclass=DummyObject): method __init__ (line 6950) | def __init__(self, *args, **kwargs): class PersimmonForTokenClassification (line 6954) | class PersimmonForTokenClassification(metaclass=DummyObject): method __init__ (line 6957) | def __init__(self, *args, **kwargs): class PersimmonModel (line 6961) | class PersimmonModel(metaclass=DummyObject): method __init__ (line 6964) | def __init__(self, *args, **kwargs): class PersimmonPreTrainedModel (line 6968) | class PersimmonPreTrainedModel(metaclass=DummyObject): method __init__ (line 6971) | def __init__(self, *args, **kwargs): class PhiForCausalLM (line 6975) | class PhiForCausalLM(metaclass=DummyObject): method __init__ (line 6978) | def __init__(self, *args, **kwargs): class PhiForSequenceClassification (line 6982) | class PhiForSequenceClassification(metaclass=DummyObject): method __init__ (line 6985) | def __init__(self, *args, **kwargs): class PhiForTokenClassification (line 6989) | class PhiForTokenClassification(metaclass=DummyObject): method __init__ (line 6992) | def __init__(self, *args, **kwargs): class PhiModel (line 6996) | class PhiModel(metaclass=DummyObject): method __init__ (line 6999) | def __init__(self, *args, **kwargs): class PhiPreTrainedModel (line 7003) | class PhiPreTrainedModel(metaclass=DummyObject): method __init__ (line 7006) | def __init__(self, *args, **kwargs): class Phi3ForCausalLM (line 7010) | class Phi3ForCausalLM(metaclass=DummyObject): method __init__ (line 7013) | def __init__(self, *args, **kwargs): class Phi3ForSequenceClassification (line 7017) | class Phi3ForSequenceClassification(metaclass=DummyObject): method __init__ (line 7020) | def __init__(self, *args, **kwargs): class Phi3ForTokenClassification (line 7024) | class Phi3ForTokenClassification(metaclass=DummyObject): method __init__ (line 7027) | def __init__(self, *args, **kwargs): class Phi3Model (line 7031) | class Phi3Model(metaclass=DummyObject): method __init__ (line 7034) | def __init__(self, *args, **kwargs): class Phi3PreTrainedModel (line 7038) | class Phi3PreTrainedModel(metaclass=DummyObject): method __init__ (line 7041) | def __init__(self, *args, **kwargs): class Pix2StructForConditionalGeneration (line 7045) | class Pix2StructForConditionalGeneration(metaclass=DummyObject): method __init__ (line 7048) | def __init__(self, *args, **kwargs): class Pix2StructPreTrainedModel (line 7052) | class Pix2StructPreTrainedModel(metaclass=DummyObject): method __init__ (line 7055) | def __init__(self, *args, **kwargs): class Pix2StructTextModel (line 7059) | class Pix2StructTextModel(metaclass=DummyObject): method __init__ (line 7062) | def __init__(self, *args, **kwargs): class Pix2StructVisionModel (line 7066) | class Pix2StructVisionModel(metaclass=DummyObject): method __init__ (line 7069) | def __init__(self, *args, **kwargs): class PLBartForCausalLM (line 7073) | class PLBartForCausalLM(metaclass=DummyObject): method __init__ (line 7076) | def __init__(self, *args, **kwargs): class PLBartForConditionalGeneration (line 7080) | class PLBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 7083) | def __init__(self, *args, **kwargs): class PLBartForSequenceClassification (line 7087) | class PLBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 7090) | def __init__(self, *args, **kwargs): class PLBartModel (line 7094) | class PLBartModel(metaclass=DummyObject): method __init__ (line 7097) | def __init__(self, *args, **kwargs): class PLBartPreTrainedModel (line 7101) | class PLBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 7104) | def __init__(self, *args, **kwargs): class PoolFormerForImageClassification (line 7108) | class PoolFormerForImageClassification(metaclass=DummyObject): method __init__ (line 7111) | def __init__(self, *args, **kwargs): class PoolFormerModel (line 7115) | class PoolFormerModel(metaclass=DummyObject): method __init__ (line 7118) | def __init__(self, *args, **kwargs): class PoolFormerPreTrainedModel (line 7122) | class PoolFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 7125) | def __init__(self, *args, **kwargs): class Pop2PianoForConditionalGeneration (line 7129) | class Pop2PianoForConditionalGeneration(metaclass=DummyObject): method __init__ (line 7132) | def __init__(self, *args, **kwargs): class Pop2PianoPreTrainedModel (line 7136) | class Pop2PianoPreTrainedModel(metaclass=DummyObject): method __init__ (line 7139) | def __init__(self, *args, **kwargs): class ProphetNetDecoder (line 7143) | class ProphetNetDecoder(metaclass=DummyObject): method __init__ (line 7146) | def __init__(self, *args, **kwargs): class ProphetNetEncoder (line 7150) | class ProphetNetEncoder(metaclass=DummyObject): method __init__ (line 7153) | def __init__(self, *args, **kwargs): class ProphetNetForCausalLM (line 7157) | class ProphetNetForCausalLM(metaclass=DummyObject): method __init__ (line 7160) | def __init__(self, *args, **kwargs): class ProphetNetForConditionalGeneration (line 7164) | class ProphetNetForConditionalGeneration(metaclass=DummyObject): method __init__ (line 7167) | def __init__(self, *args, **kwargs): class ProphetNetModel (line 7171) | class ProphetNetModel(metaclass=DummyObject): method __init__ (line 7174) | def __init__(self, *args, **kwargs): class ProphetNetPreTrainedModel (line 7178) | class ProphetNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 7181) | def __init__(self, *args, **kwargs): class PvtForImageClassification (line 7185) | class PvtForImageClassification(metaclass=DummyObject): method __init__ (line 7188) | def __init__(self, *args, **kwargs): class PvtModel (line 7192) | class PvtModel(metaclass=DummyObject): method __init__ (line 7195) | def __init__(self, *args, **kwargs): class PvtPreTrainedModel (line 7199) | class PvtPreTrainedModel(metaclass=DummyObject): method __init__ (line 7202) | def __init__(self, *args, **kwargs): class PvtV2Backbone (line 7206) | class PvtV2Backbone(metaclass=DummyObject): method __init__ (line 7209) | def __init__(self, *args, **kwargs): class PvtV2ForImageClassification (line 7213) | class PvtV2ForImageClassification(metaclass=DummyObject): method __init__ (line 7216) | def __init__(self, *args, **kwargs): class PvtV2Model (line 7220) | class PvtV2Model(metaclass=DummyObject): method __init__ (line 7223) | def __init__(self, *args, **kwargs): class PvtV2PreTrainedModel (line 7227) | class PvtV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 7230) | def __init__(self, *args, **kwargs): class Qwen2ForCausalLM (line 7234) | class Qwen2ForCausalLM(metaclass=DummyObject): method __init__ (line 7237) | def __init__(self, *args, **kwargs): class Qwen2ForSequenceClassification (line 7241) | class Qwen2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 7244) | def __init__(self, *args, **kwargs): class Qwen2ForTokenClassification (line 7248) | class Qwen2ForTokenClassification(metaclass=DummyObject): method __init__ (line 7251) | def __init__(self, *args, **kwargs): class Qwen2Model (line 7255) | class Qwen2Model(metaclass=DummyObject): method __init__ (line 7258) | def __init__(self, *args, **kwargs): class Qwen2PreTrainedModel (line 7262) | class Qwen2PreTrainedModel(metaclass=DummyObject): method __init__ (line 7265) | def __init__(self, *args, **kwargs): class Qwen2AudioEncoder (line 7269) | class Qwen2AudioEncoder(metaclass=DummyObject): method __init__ (line 7272) | def __init__(self, *args, **kwargs): class Qwen2AudioForConditionalGeneration (line 7276) | class Qwen2AudioForConditionalGeneration(metaclass=DummyObject): method __init__ (line 7279) | def __init__(self, *args, **kwargs): class Qwen2AudioPreTrainedModel (line 7283) | class Qwen2AudioPreTrainedModel(metaclass=DummyObject): method __init__ (line 7286) | def __init__(self, *args, **kwargs): class Qwen2MoeForCausalLM (line 7290) | class Qwen2MoeForCausalLM(metaclass=DummyObject): method __init__ (line 7293) | def __init__(self, *args, **kwargs): class Qwen2MoeForSequenceClassification (line 7297) | class Qwen2MoeForSequenceClassification(metaclass=DummyObject): method __init__ (line 7300) | def __init__(self, *args, **kwargs): class Qwen2MoeForTokenClassification (line 7304) | class Qwen2MoeForTokenClassification(metaclass=DummyObject): method __init__ (line 7307) | def __init__(self, *args, **kwargs): class Qwen2MoeModel (line 7311) | class Qwen2MoeModel(metaclass=DummyObject): method __init__ (line 7314) | def __init__(self, *args, **kwargs): class Qwen2MoePreTrainedModel (line 7318) | class Qwen2MoePreTrainedModel(metaclass=DummyObject): method __init__ (line 7321) | def __init__(self, *args, **kwargs): class RagModel (line 7325) | class RagModel(metaclass=DummyObject): method __init__ (line 7328) | def __init__(self, *args, **kwargs): class RagPreTrainedModel (line 7332) | class RagPreTrainedModel(metaclass=DummyObject): method __init__ (line 7335) | def __init__(self, *args, **kwargs): class RagSequenceForGeneration (line 7339) | class RagSequenceForGeneration(metaclass=DummyObject): method __init__ (line 7342) | def __init__(self, *args, **kwargs): class RagTokenForGeneration (line 7346) | class RagTokenForGeneration(metaclass=DummyObject): method __init__ (line 7349) | def __init__(self, *args, **kwargs): class RecurrentGemmaForCausalLM (line 7353) | class RecurrentGemmaForCausalLM(metaclass=DummyObject): method __init__ (line 7356) | def __init__(self, *args, **kwargs): class RecurrentGemmaModel (line 7360) | class RecurrentGemmaModel(metaclass=DummyObject): method __init__ (line 7363) | def __init__(self, *args, **kwargs): class RecurrentGemmaPreTrainedModel (line 7367) | class RecurrentGemmaPreTrainedModel(metaclass=DummyObject): method __init__ (line 7370) | def __init__(self, *args, **kwargs): class ReformerAttention (line 7374) | class ReformerAttention(metaclass=DummyObject): method __init__ (line 7377) | def __init__(self, *args, **kwargs): class ReformerForMaskedLM (line 7381) | class ReformerForMaskedLM(metaclass=DummyObject): method __init__ (line 7384) | def __init__(self, *args, **kwargs): class ReformerForQuestionAnswering (line 7388) | class ReformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7391) | def __init__(self, *args, **kwargs): class ReformerForSequenceClassification (line 7395) | class ReformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 7398) | def __init__(self, *args, **kwargs): class ReformerLayer (line 7402) | class ReformerLayer(metaclass=DummyObject): method __init__ (line 7405) | def __init__(self, *args, **kwargs): class ReformerModel (line 7409) | class ReformerModel(metaclass=DummyObject): method __init__ (line 7412) | def __init__(self, *args, **kwargs): class ReformerModelWithLMHead (line 7416) | class ReformerModelWithLMHead(metaclass=DummyObject): method __init__ (line 7419) | def __init__(self, *args, **kwargs): class ReformerPreTrainedModel (line 7423) | class ReformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 7426) | def __init__(self, *args, **kwargs): class RegNetForImageClassification (line 7430) | class RegNetForImageClassification(metaclass=DummyObject): method __init__ (line 7433) | def __init__(self, *args, **kwargs): class RegNetModel (line 7437) | class RegNetModel(metaclass=DummyObject): method __init__ (line 7440) | def __init__(self, *args, **kwargs): class RegNetPreTrainedModel (line 7444) | class RegNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 7447) | def __init__(self, *args, **kwargs): class RemBertForCausalLM (line 7451) | class RemBertForCausalLM(metaclass=DummyObject): method __init__ (line 7454) | def __init__(self, *args, **kwargs): class RemBertForMaskedLM (line 7458) | class RemBertForMaskedLM(metaclass=DummyObject): method __init__ (line 7461) | def __init__(self, *args, **kwargs): class RemBertForMultipleChoice (line 7465) | class RemBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 7468) | def __init__(self, *args, **kwargs): class RemBertForQuestionAnswering (line 7472) | class RemBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7475) | def __init__(self, *args, **kwargs): class RemBertForSequenceClassification (line 7479) | class RemBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 7482) | def __init__(self, *args, **kwargs): class RemBertForTokenClassification (line 7486) | class RemBertForTokenClassification(metaclass=DummyObject): method __init__ (line 7489) | def __init__(self, *args, **kwargs): class RemBertLayer (line 7493) | class RemBertLayer(metaclass=DummyObject): method __init__ (line 7496) | def __init__(self, *args, **kwargs): class RemBertModel (line 7500) | class RemBertModel(metaclass=DummyObject): method __init__ (line 7503) | def __init__(self, *args, **kwargs): class RemBertPreTrainedModel (line 7507) | class RemBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 7510) | def __init__(self, *args, **kwargs): function load_tf_weights_in_rembert (line 7514) | def load_tf_weights_in_rembert(*args, **kwargs): class ResNetBackbone (line 7518) | class ResNetBackbone(metaclass=DummyObject): method __init__ (line 7521) | def __init__(self, *args, **kwargs): class ResNetForImageClassification (line 7525) | class ResNetForImageClassification(metaclass=DummyObject): method __init__ (line 7528) | def __init__(self, *args, **kwargs): class ResNetModel (line 7532) | class ResNetModel(metaclass=DummyObject): method __init__ (line 7535) | def __init__(self, *args, **kwargs): class ResNetPreTrainedModel (line 7539) | class ResNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 7542) | def __init__(self, *args, **kwargs): class RobertaForCausalLM (line 7546) | class RobertaForCausalLM(metaclass=DummyObject): method __init__ (line 7549) | def __init__(self, *args, **kwargs): class RobertaForMaskedLM (line 7553) | class RobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 7556) | def __init__(self, *args, **kwargs): class RobertaForMultipleChoice (line 7560) | class RobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 7563) | def __init__(self, *args, **kwargs): class RobertaForQuestionAnswering (line 7567) | class RobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7570) | def __init__(self, *args, **kwargs): class RobertaForSequenceClassification (line 7574) | class RobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 7577) | def __init__(self, *args, **kwargs): class RobertaForTokenClassification (line 7581) | class RobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 7584) | def __init__(self, *args, **kwargs): class RobertaModel (line 7588) | class RobertaModel(metaclass=DummyObject): method __init__ (line 7591) | def __init__(self, *args, **kwargs): class RobertaPreTrainedModel (line 7595) | class RobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 7598) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForCausalLM (line 7602) | class RobertaPreLayerNormForCausalLM(metaclass=DummyObject): method __init__ (line 7605) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForMaskedLM (line 7609) | class RobertaPreLayerNormForMaskedLM(metaclass=DummyObject): method __init__ (line 7612) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForMultipleChoice (line 7616) | class RobertaPreLayerNormForMultipleChoice(metaclass=DummyObject): method __init__ (line 7619) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForQuestionAnswering (line 7623) | class RobertaPreLayerNormForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7626) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForSequenceClassification (line 7630) | class RobertaPreLayerNormForSequenceClassification(metaclass=DummyObject): method __init__ (line 7633) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForTokenClassification (line 7637) | class RobertaPreLayerNormForTokenClassification(metaclass=DummyObject): method __init__ (line 7640) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormModel (line 7644) | class RobertaPreLayerNormModel(metaclass=DummyObject): method __init__ (line 7647) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormPreTrainedModel (line 7651) | class RobertaPreLayerNormPreTrainedModel(metaclass=DummyObject): method __init__ (line 7654) | def __init__(self, *args, **kwargs): class RoCBertForCausalLM (line 7658) | class RoCBertForCausalLM(metaclass=DummyObject): method __init__ (line 7661) | def __init__(self, *args, **kwargs): class RoCBertForMaskedLM (line 7665) | class RoCBertForMaskedLM(metaclass=DummyObject): method __init__ (line 7668) | def __init__(self, *args, **kwargs): class RoCBertForMultipleChoice (line 7672) | class RoCBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 7675) | def __init__(self, *args, **kwargs): class RoCBertForPreTraining (line 7679) | class RoCBertForPreTraining(metaclass=DummyObject): method __init__ (line 7682) | def __init__(self, *args, **kwargs): class RoCBertForQuestionAnswering (line 7686) | class RoCBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7689) | def __init__(self, *args, **kwargs): class RoCBertForSequenceClassification (line 7693) | class RoCBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 7696) | def __init__(self, *args, **kwargs): class RoCBertForTokenClassification (line 7700) | class RoCBertForTokenClassification(metaclass=DummyObject): method __init__ (line 7703) | def __init__(self, *args, **kwargs): class RoCBertLayer (line 7707) | class RoCBertLayer(metaclass=DummyObject): method __init__ (line 7710) | def __init__(self, *args, **kwargs): class RoCBertModel (line 7714) | class RoCBertModel(metaclass=DummyObject): method __init__ (line 7717) | def __init__(self, *args, **kwargs): class RoCBertPreTrainedModel (line 7721) | class RoCBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 7724) | def __init__(self, *args, **kwargs): function load_tf_weights_in_roc_bert (line 7728) | def load_tf_weights_in_roc_bert(*args, **kwargs): class RoFormerForCausalLM (line 7732) | class RoFormerForCausalLM(metaclass=DummyObject): method __init__ (line 7735) | def __init__(self, *args, **kwargs): class RoFormerForMaskedLM (line 7739) | class RoFormerForMaskedLM(metaclass=DummyObject): method __init__ (line 7742) | def __init__(self, *args, **kwargs): class RoFormerForMultipleChoice (line 7746) | class RoFormerForMultipleChoice(metaclass=DummyObject): method __init__ (line 7749) | def __init__(self, *args, **kwargs): class RoFormerForQuestionAnswering (line 7753) | class RoFormerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7756) | def __init__(self, *args, **kwargs): class RoFormerForSequenceClassification (line 7760) | class RoFormerForSequenceClassification(metaclass=DummyObject): method __init__ (line 7763) | def __init__(self, *args, **kwargs): class RoFormerForTokenClassification (line 7767) | class RoFormerForTokenClassification(metaclass=DummyObject): method __init__ (line 7770) | def __init__(self, *args, **kwargs): class RoFormerLayer (line 7774) | class RoFormerLayer(metaclass=DummyObject): method __init__ (line 7777) | def __init__(self, *args, **kwargs): class RoFormerModel (line 7781) | class RoFormerModel(metaclass=DummyObject): method __init__ (line 7784) | def __init__(self, *args, **kwargs): class RoFormerPreTrainedModel (line 7788) | class RoFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 7791) | def __init__(self, *args, **kwargs): function load_tf_weights_in_roformer (line 7795) | def load_tf_weights_in_roformer(*args, **kwargs): class RTDetrForObjectDetection (line 7799) | class RTDetrForObjectDetection(metaclass=DummyObject): method __init__ (line 7802) | def __init__(self, *args, **kwargs): class RTDetrModel (line 7806) | class RTDetrModel(metaclass=DummyObject): method __init__ (line 7809) | def __init__(self, *args, **kwargs): class RTDetrPreTrainedModel (line 7813) | class RTDetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 7816) | def __init__(self, *args, **kwargs): class RTDetrResNetBackbone (line 7820) | class RTDetrResNetBackbone(metaclass=DummyObject): method __init__ (line 7823) | def __init__(self, *args, **kwargs): class RTDetrResNetPreTrainedModel (line 7827) | class RTDetrResNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 7830) | def __init__(self, *args, **kwargs): class RwkvForCausalLM (line 7834) | class RwkvForCausalLM(metaclass=DummyObject): method __init__ (line 7837) | def __init__(self, *args, **kwargs): class RwkvModel (line 7841) | class RwkvModel(metaclass=DummyObject): method __init__ (line 7844) | def __init__(self, *args, **kwargs): class RwkvPreTrainedModel (line 7848) | class RwkvPreTrainedModel(metaclass=DummyObject): method __init__ (line 7851) | def __init__(self, *args, **kwargs): class SamModel (line 7855) | class SamModel(metaclass=DummyObject): method __init__ (line 7858) | def __init__(self, *args, **kwargs): class SamPreTrainedModel (line 7862) | class SamPreTrainedModel(metaclass=DummyObject): method __init__ (line 7865) | def __init__(self, *args, **kwargs): class SeamlessM4TCodeHifiGan (line 7869) | class SeamlessM4TCodeHifiGan(metaclass=DummyObject): method __init__ (line 7872) | def __init__(self, *args, **kwargs): class SeamlessM4TForSpeechToSpeech (line 7876) | class SeamlessM4TForSpeechToSpeech(metaclass=DummyObject): method __init__ (line 7879) | def __init__(self, *args, **kwargs): class SeamlessM4TForSpeechToText (line 7883) | class SeamlessM4TForSpeechToText(metaclass=DummyObject): method __init__ (line 7886) | def __init__(self, *args, **kwargs): class SeamlessM4TForTextToSpeech (line 7890) | class SeamlessM4TForTextToSpeech(metaclass=DummyObject): method __init__ (line 7893) | def __init__(self, *args, **kwargs): class SeamlessM4TForTextToText (line 7897) | class SeamlessM4TForTextToText(metaclass=DummyObject): method __init__ (line 7900) | def __init__(self, *args, **kwargs): class SeamlessM4THifiGan (line 7904) | class SeamlessM4THifiGan(metaclass=DummyObject): method __init__ (line 7907) | def __init__(self, *args, **kwargs): class SeamlessM4TModel (line 7911) | class SeamlessM4TModel(metaclass=DummyObject): method __init__ (line 7914) | def __init__(self, *args, **kwargs): class SeamlessM4TPreTrainedModel (line 7918) | class SeamlessM4TPreTrainedModel(metaclass=DummyObject): method __init__ (line 7921) | def __init__(self, *args, **kwargs): class SeamlessM4TTextToUnitForConditionalGeneration (line 7925) | class SeamlessM4TTextToUnitForConditionalGeneration(metaclass=DummyObject): method __init__ (line 7928) | def __init__(self, *args, **kwargs): class SeamlessM4TTextToUnitModel (line 7932) | class SeamlessM4TTextToUnitModel(metaclass=DummyObject): method __init__ (line 7935) | def __init__(self, *args, **kwargs): class SeamlessM4Tv2ForSpeechToSpeech (line 7939) | class SeamlessM4Tv2ForSpeechToSpeech(metaclass=DummyObject): method __init__ (line 7942) | def __init__(self, *args, **kwargs): class SeamlessM4Tv2ForSpeechToText (line 7946) | class SeamlessM4Tv2ForSpeechToText(metaclass=DummyObject): method __init__ (line 7949) | def __init__(self, *args, **kwargs): class SeamlessM4Tv2ForTextToSpeech (line 7953) | class SeamlessM4Tv2ForTextToSpeech(metaclass=DummyObject): method __init__ (line 7956) | def __init__(self, *args, **kwargs): class SeamlessM4Tv2ForTextToText (line 7960) | class SeamlessM4Tv2ForTextToText(metaclass=DummyObject): method __init__ (line 7963) | def __init__(self, *args, **kwargs): class SeamlessM4Tv2Model (line 7967) | class SeamlessM4Tv2Model(metaclass=DummyObject): method __init__ (line 7970) | def __init__(self, *args, **kwargs): class SeamlessM4Tv2PreTrainedModel (line 7974) | class SeamlessM4Tv2PreTrainedModel(metaclass=DummyObject): method __init__ (line 7977) | def __init__(self, *args, **kwargs): class SegformerDecodeHead (line 7981) | class SegformerDecodeHead(metaclass=DummyObject): method __init__ (line 7984) | def __init__(self, *args, **kwargs): class SegformerForImageClassification (line 7988) | class SegformerForImageClassification(metaclass=DummyObject): method __init__ (line 7991) | def __init__(self, *args, **kwargs): class SegformerForSemanticSegmentation (line 7995) | class SegformerForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 7998) | def __init__(self, *args, **kwargs): class SegformerLayer (line 8002) | class SegformerLayer(metaclass=DummyObject): method __init__ (line 8005) | def __init__(self, *args, **kwargs): class SegformerModel (line 8009) | class SegformerModel(metaclass=DummyObject): method __init__ (line 8012) | def __init__(self, *args, **kwargs): class SegformerPreTrainedModel (line 8016) | class SegformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 8019) | def __init__(self, *args, **kwargs): class SegGptForImageSegmentation (line 8023) | class SegGptForImageSegmentation(metaclass=DummyObject): method __init__ (line 8026) | def __init__(self, *args, **kwargs): class SegGptModel (line 8030) | class SegGptModel(metaclass=DummyObject): method __init__ (line 8033) | def __init__(self, *args, **kwargs): class SegGptPreTrainedModel (line 8037) | class SegGptPreTrainedModel(metaclass=DummyObject): method __init__ (line 8040) | def __init__(self, *args, **kwargs): class SEWForCTC (line 8044) | class SEWForCTC(metaclass=DummyObject): method __init__ (line 8047) | def __init__(self, *args, **kwargs): class SEWForSequenceClassification (line 8051) | class SEWForSequenceClassification(metaclass=DummyObject): method __init__ (line 8054) | def __init__(self, *args, **kwargs): class SEWModel (line 8058) | class SEWModel(metaclass=DummyObject): method __init__ (line 8061) | def __init__(self, *args, **kwargs): class SEWPreTrainedModel (line 8065) | class SEWPreTrainedModel(metaclass=DummyObject): method __init__ (line 8068) | def __init__(self, *args, **kwargs): class SEWDForCTC (line 8072) | class SEWDForCTC(metaclass=DummyObject): method __init__ (line 8075) | def __init__(self, *args, **kwargs): class SEWDForSequenceClassification (line 8079) | class SEWDForSequenceClassification(metaclass=DummyObject): method __init__ (line 8082) | def __init__(self, *args, **kwargs): class SEWDModel (line 8086) | class SEWDModel(metaclass=DummyObject): method __init__ (line 8089) | def __init__(self, *args, **kwargs): class SEWDPreTrainedModel (line 8093) | class SEWDPreTrainedModel(metaclass=DummyObject): method __init__ (line 8096) | def __init__(self, *args, **kwargs): class SiglipForImageClassification (line 8100) | class SiglipForImageClassification(metaclass=DummyObject): method __init__ (line 8103) | def __init__(self, *args, **kwargs): class SiglipModel (line 8107) | class SiglipModel(metaclass=DummyObject): method __init__ (line 8110) | def __init__(self, *args, **kwargs): class SiglipPreTrainedModel (line 8114) | class SiglipPreTrainedModel(metaclass=DummyObject): method __init__ (line 8117) | def __init__(self, *args, **kwargs): class SiglipTextModel (line 8121) | class SiglipTextModel(metaclass=DummyObject): method __init__ (line 8124) | def __init__(self, *args, **kwargs): class SiglipVisionModel (line 8128) | class SiglipVisionModel(metaclass=DummyObject): method __init__ (line 8131) | def __init__(self, *args, **kwargs): class SpeechEncoderDecoderModel (line 8135) | class SpeechEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 8138) | def __init__(self, *args, **kwargs): class Speech2TextForConditionalGeneration (line 8142) | class Speech2TextForConditionalGeneration(metaclass=DummyObject): method __init__ (line 8145) | def __init__(self, *args, **kwargs): class Speech2TextModel (line 8149) | class Speech2TextModel(metaclass=DummyObject): method __init__ (line 8152) | def __init__(self, *args, **kwargs): class Speech2TextPreTrainedModel (line 8156) | class Speech2TextPreTrainedModel(metaclass=DummyObject): method __init__ (line 8159) | def __init__(self, *args, **kwargs): class SpeechT5ForSpeechToSpeech (line 8163) | class SpeechT5ForSpeechToSpeech(metaclass=DummyObject): method __init__ (line 8166) | def __init__(self, *args, **kwargs): class SpeechT5ForSpeechToText (line 8170) | class SpeechT5ForSpeechToText(metaclass=DummyObject): method __init__ (line 8173) | def __init__(self, *args, **kwargs): class SpeechT5ForTextToSpeech (line 8177) | class SpeechT5ForTextToSpeech(metaclass=DummyObject): method __init__ (line 8180) | def __init__(self, *args, **kwargs): class SpeechT5HifiGan (line 8184) | class SpeechT5HifiGan(metaclass=DummyObject): method __init__ (line 8187) | def __init__(self, *args, **kwargs): class SpeechT5Model (line 8191) | class SpeechT5Model(metaclass=DummyObject): method __init__ (line 8194) | def __init__(self, *args, **kwargs): class SpeechT5PreTrainedModel (line 8198) | class SpeechT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 8201) | def __init__(self, *args, **kwargs): class SplinterForPreTraining (line 8205) | class SplinterForPreTraining(metaclass=DummyObject): method __init__ (line 8208) | def __init__(self, *args, **kwargs): class SplinterForQuestionAnswering (line 8212) | class SplinterForQuestionAnswering(metaclass=DummyObject): method __init__ (line 8215) | def __init__(self, *args, **kwargs): class SplinterLayer (line 8219) | class SplinterLayer(metaclass=DummyObject): method __init__ (line 8222) | def __init__(self, *args, **kwargs): class SplinterModel (line 8226) | class SplinterModel(metaclass=DummyObject): method __init__ (line 8229) | def __init__(self, *args, **kwargs): class SplinterPreTrainedModel (line 8233) | class SplinterPreTrainedModel(metaclass=DummyObject): method __init__ (line 8236) | def __init__(self, *args, **kwargs): class SqueezeBertForMaskedLM (line 8240) | class SqueezeBertForMaskedLM(metaclass=DummyObject): method __init__ (line 8243) | def __init__(self, *args, **kwargs): class SqueezeBertForMultipleChoice (line 8247) | class SqueezeBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 8250) | def __init__(self, *args, **kwargs): class SqueezeBertForQuestionAnswering (line 8254) | class SqueezeBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 8257) | def __init__(self, *args, **kwargs): class SqueezeBertForSequenceClassification (line 8261) | class SqueezeBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 8264) | def __init__(self, *args, **kwargs): class SqueezeBertForTokenClassification (line 8268) | class SqueezeBertForTokenClassification(metaclass=DummyObject): method __init__ (line 8271) | def __init__(self, *args, **kwargs): class SqueezeBertModel (line 8275) | class SqueezeBertModel(metaclass=DummyObject): method __init__ (line 8278) | def __init__(self, *args, **kwargs): class SqueezeBertModule (line 8282) | class SqueezeBertModule(metaclass=DummyObject): method __init__ (line 8285) | def __init__(self, *args, **kwargs): class SqueezeBertPreTrainedModel (line 8289) | class SqueezeBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 8292) | def __init__(self, *args, **kwargs): class StableLmForCausalLM (line 8296) | class StableLmForCausalLM(metaclass=DummyObject): method __init__ (line 8299) | def __init__(self, *args, **kwargs): class StableLmForSequenceClassification (line 8303) | class StableLmForSequenceClassification(metaclass=DummyObject): method __init__ (line 8306) | def __init__(self, *args, **kwargs): class StableLmForTokenClassification (line 8310) | class StableLmForTokenClassification(metaclass=DummyObject): method __init__ (line 8313) | def __init__(self, *args, **kwargs): class StableLmModel (line 8317) | class StableLmModel(metaclass=DummyObject): method __init__ (line 8320) | def __init__(self, *args, **kwargs): class StableLmPreTrainedModel (line 8324) | class StableLmPreTrainedModel(metaclass=DummyObject): method __init__ (line 8327) | def __init__(self, *args, **kwargs): class Starcoder2ForCausalLM (line 8331) | class Starcoder2ForCausalLM(metaclass=DummyObject): method __init__ (line 8334) | def __init__(self, *args, **kwargs): class Starcoder2ForSequenceClassification (line 8338) | class Starcoder2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 8341) | def __init__(self, *args, **kwargs): class Starcoder2ForTokenClassification (line 8345) | class Starcoder2ForTokenClassification(metaclass=DummyObject): method __init__ (line 8348) | def __init__(self, *args, **kwargs): class Starcoder2Model (line 8352) | class Starcoder2Model(metaclass=DummyObject): method __init__ (line 8355) | def __init__(self, *args, **kwargs): class Starcoder2PreTrainedModel (line 8359) | class Starcoder2PreTrainedModel(metaclass=DummyObject): method __init__ (line 8362) | def __init__(self, *args, **kwargs): class SuperPointForKeypointDetection (line 8366) | class SuperPointForKeypointDetection(metaclass=DummyObject): method __init__ (line 8369) | def __init__(self, *args, **kwargs): class SuperPointPreTrainedModel (line 8373) | class SuperPointPreTrainedModel(metaclass=DummyObject): method __init__ (line 8376) | def __init__(self, *args, **kwargs): class SwiftFormerForImageClassification (line 8380) | class SwiftFormerForImageClassification(metaclass=DummyObject): method __init__ (line 8383) | def __init__(self, *args, **kwargs): class SwiftFormerModel (line 8387) | class SwiftFormerModel(metaclass=DummyObject): method __init__ (line 8390) | def __init__(self, *args, **kwargs): class SwiftFormerPreTrainedModel (line 8394) | class SwiftFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 8397) | def __init__(self, *args, **kwargs): class SwinBackbone (line 8401) | class SwinBackbone(metaclass=DummyObject): method __init__ (line 8404) | def __init__(self, *args, **kwargs): class SwinForImageClassification (line 8408) | class SwinForImageClassification(metaclass=DummyObject): method __init__ (line 8411) | def __init__(self, *args, **kwargs): class SwinForMaskedImageModeling (line 8415) | class SwinForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 8418) | def __init__(self, *args, **kwargs): class SwinModel (line 8422) | class SwinModel(metaclass=DummyObject): method __init__ (line 8425) | def __init__(self, *args, **kwargs): class SwinPreTrainedModel (line 8429) | class SwinPreTrainedModel(metaclass=DummyObject): method __init__ (line 8432) | def __init__(self, *args, **kwargs): class Swin2SRForImageSuperResolution (line 8436) | class Swin2SRForImageSuperResolution(metaclass=DummyObject): method __init__ (line 8439) | def __init__(self, *args, **kwargs): class Swin2SRModel (line 8443) | class Swin2SRModel(metaclass=DummyObject): method __init__ (line 8446) | def __init__(self, *args, **kwargs): class Swin2SRPreTrainedModel (line 8450) | class Swin2SRPreTrainedModel(metaclass=DummyObject): method __init__ (line 8453) | def __init__(self, *args, **kwargs): class Swinv2Backbone (line 8457) | class Swinv2Backbone(metaclass=DummyObject): method __init__ (line 8460) | def __init__(self, *args, **kwargs): class Swinv2ForImageClassification (line 8464) | class Swinv2ForImageClassification(metaclass=DummyObject): method __init__ (line 8467) | def __init__(self, *args, **kwargs): class Swinv2ForMaskedImageModeling (line 8471) | class Swinv2ForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 8474) | def __init__(self, *args, **kwargs): class Swinv2Model (line 8478) | class Swinv2Model(metaclass=DummyObject): method __init__ (line 8481) | def __init__(self, *args, **kwargs): class Swinv2PreTrainedModel (line 8485) | class Swinv2PreTrainedModel(metaclass=DummyObject): method __init__ (line 8488) | def __init__(self, *args, **kwargs): class SwitchTransformersEncoderModel (line 8492) | class SwitchTransformersEncoderModel(metaclass=DummyObject): method __init__ (line 8495) | def __init__(self, *args, **kwargs): class SwitchTransformersForConditionalGeneration (line 8499) | class SwitchTransformersForConditionalGeneration(metaclass=DummyObject): method __init__ (line 8502) | def __init__(self, *args, **kwargs): class SwitchTransformersModel (line 8506) | class SwitchTransformersModel(metaclass=DummyObject): method __init__ (line 8509) | def __init__(self, *args, **kwargs): class SwitchTransformersPreTrainedModel (line 8513) | class SwitchTransformersPreTrainedModel(metaclass=DummyObject): method __init__ (line 8516) | def __init__(self, *args, **kwargs): class SwitchTransformersSparseMLP (line 8520) | class SwitchTransformersSparseMLP(metaclass=DummyObject): method __init__ (line 8523) | def __init__(self, *args, **kwargs): class SwitchTransformersTop1Router (line 8527) | class SwitchTransformersTop1Router(metaclass=DummyObject): method __init__ (line 8530) | def __init__(self, *args, **kwargs): class T5EncoderModel (line 8534) | class T5EncoderModel(metaclass=DummyObject): method __init__ (line 8537) | def __init__(self, *args, **kwargs): class T5ForConditionalGeneration (line 8541) | class T5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 8544) | def __init__(self, *args, **kwargs): class T5ForQuestionAnswering (line 8548) | class T5ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 8551) | def __init__(self, *args, **kwargs): class T5ForSequenceClassification (line 8555) | class T5ForSequenceClassification(metaclass=DummyObject): method __init__ (line 8558) | def __init__(self, *args, **kwargs): class T5ForTokenClassification (line 8562) | class T5ForTokenClassification(metaclass=DummyObject): method __init__ (line 8565) | def __init__(self, *args, **kwargs): class T5Model (line 8569) | class T5Model(metaclass=DummyObject): method __init__ (line 8572) | def __init__(self, *args, **kwargs): class T5PreTrainedModel (line 8576) | class T5PreTrainedModel(metaclass=DummyObject): method __init__ (line 8579) | def __init__(self, *args, **kwargs): function load_tf_weights_in_t5 (line 8583) | def load_tf_weights_in_t5(*args, **kwargs): class TableTransformerForObjectDetection (line 8587) | class TableTransformerForObjectDetection(metaclass=DummyObject): method __init__ (line 8590) | def __init__(self, *args, **kwargs): class TableTransformerModel (line 8594) | class TableTransformerModel(metaclass=DummyObject): method __init__ (line 8597) | def __init__(self, *args, **kwargs): class TableTransformerPreTrainedModel (line 8601) | class TableTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 8604) | def __init__(self, *args, **kwargs): class TapasForMaskedLM (line 8608) | class TapasForMaskedLM(metaclass=DummyObject): method __init__ (line 8611) | def __init__(self, *args, **kwargs): class TapasForQuestionAnswering (line 8615) | class TapasForQuestionAnswering(metaclass=DummyObject): method __init__ (line 8618) | def __init__(self, *args, **kwargs): class TapasForSequenceClassification (line 8622) | class TapasForSequenceClassification(metaclass=DummyObject): method __init__ (line 8625) | def __init__(self, *args, **kwargs): class TapasModel (line 8629) | class TapasModel(metaclass=DummyObject): method __init__ (line 8632) | def __init__(self, *args, **kwargs): class TapasPreTrainedModel (line 8636) | class TapasPreTrainedModel(metaclass=DummyObject): method __init__ (line 8639) | def __init__(self, *args, **kwargs): function load_tf_weights_in_tapas (line 8643) | def load_tf_weights_in_tapas(*args, **kwargs): class TimeSeriesTransformerForPrediction (line 8647) | class TimeSeriesTransformerForPrediction(metaclass=DummyObject): method __init__ (line 8650) | def __init__(self, *args, **kwargs): class TimeSeriesTransformerModel (line 8654) | class TimeSeriesTransformerModel(metaclass=DummyObject): method __init__ (line 8657) | def __init__(self, *args, **kwargs): class TimeSeriesTransformerPreTrainedModel (line 8661) | class TimeSeriesTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 8664) | def __init__(self, *args, **kwargs): class TimesformerForVideoClassification (line 8668) | class TimesformerForVideoClassification(metaclass=DummyObject): method __init__ (line 8671) | def __init__(self, *args, **kwargs): class TimesformerModel (line 8675) | class TimesformerModel(metaclass=DummyObject): method __init__ (line 8678) | def __init__(self, *args, **kwargs): class TimesformerPreTrainedModel (line 8682) | class TimesformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 8685) | def __init__(self, *args, **kwargs): class TimmBackbone (line 8689) | class TimmBackbone(metaclass=DummyObject): method __init__ (line 8692) | def __init__(self, *args, **kwargs): class TrOCRForCausalLM (line 8696) | class TrOCRForCausalLM(metaclass=DummyObject): method __init__ (line 8699) | def __init__(self, *args, **kwargs): class TrOCRPreTrainedModel (line 8703) | class TrOCRPreTrainedModel(metaclass=DummyObject): method __init__ (line 8706) | def __init__(self, *args, **kwargs): class TvpForVideoGrounding (line 8710) | class TvpForVideoGrounding(metaclass=DummyObject): method __init__ (line 8713) | def __init__(self, *args, **kwargs): class TvpModel (line 8717) | class TvpModel(metaclass=DummyObject): method __init__ (line 8720) | def __init__(self, *args, **kwargs): class TvpPreTrainedModel (line 8724) | class TvpPreTrainedModel(metaclass=DummyObject): method __init__ (line 8727) | def __init__(self, *args, **kwargs): class UdopEncoderModel (line 8731) | class UdopEncoderModel(metaclass=DummyObject): method __init__ (line 8734) | def __init__(self, *args, **kwargs): class UdopForConditionalGeneration (line 8738) | class UdopForConditionalGeneration(metaclass=DummyObject): method __init__ (line 8741) | def __init__(self, *args, **kwargs): class UdopModel (line 8745) | class UdopModel(metaclass=DummyObject): method __init__ (line 8748) | def __init__(self, *args, **kwargs): class UdopPreTrainedModel (line 8752) | class UdopPreTrainedModel(metaclass=DummyObject): method __init__ (line 8755) | def __init__(self, *args, **kwargs): class UMT5EncoderModel (line 8759) | class UMT5EncoderModel(metaclass=DummyObject): method __init__ (line 8762) | def __init__(self, *args, **kwargs): class UMT5ForConditionalGeneration (line 8766) | class UMT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 8769) | def __init__(self, *args, **kwargs): class UMT5ForQuestionAnswering (line 8773) | class UMT5ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 8776) | def __init__(self, *args, **kwargs): class UMT5ForSequenceClassification (line 8780) | class UMT5ForSequenceClassification(metaclass=DummyObject): method __init__ (line 8783) | def __init__(self, *args, **kwargs): class UMT5ForTokenClassification (line 8787) | class UMT5ForTokenClassification(metaclass=DummyObject): method __init__ (line 8790) | def __init__(self, *args, **kwargs): class UMT5Model (line 8794) | class UMT5Model(metaclass=DummyObject): method __init__ (line 8797) | def __init__(self, *args, **kwargs): class UMT5PreTrainedModel (line 8801) | class UMT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 8804) | def __init__(self, *args, **kwargs): class UniSpeechForCTC (line 8808) | class UniSpeechForCTC(metaclass=DummyObject): method __init__ (line 8811) | def __init__(self, *args, **kwargs): class UniSpeechForPreTraining (line 8815) | class UniSpeechForPreTraining(metaclass=DummyObject): method __init__ (line 8818) | def __init__(self, *args, **kwargs): class UniSpeechForSequenceClassification (line 8822) | class UniSpeechForSequenceClassification(metaclass=DummyObject): method __init__ (line 8825) | def __init__(self, *args, **kwargs): class UniSpeechModel (line 8829) | class UniSpeechModel(metaclass=DummyObject): method __init__ (line 8832) | def __init__(self, *args, **kwargs): class UniSpeechPreTrainedModel (line 8836) | class UniSpeechPreTrainedModel(metaclass=DummyObject): method __init__ (line 8839) | def __init__(self, *args, **kwargs): class UniSpeechSatForAudioFrameClassification (line 8843) | class UniSpeechSatForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 8846) | def __init__(self, *args, **kwargs): class UniSpeechSatForCTC (line 8850) | class UniSpeechSatForCTC(metaclass=DummyObject): method __init__ (line 8853) | def __init__(self, *args, **kwargs): class UniSpeechSatForPreTraining (line 8857) | class UniSpeechSatForPreTraining(metaclass=DummyObject): method __init__ (line 8860) | def __init__(self, *args, **kwargs): class UniSpeechSatForSequenceClassification (line 8864) | class UniSpeechSatForSequenceClassification(metaclass=DummyObject): method __init__ (line 8867) | def __init__(self, *args, **kwargs): class UniSpeechSatForXVector (line 8871) | class UniSpeechSatForXVector(metaclass=DummyObject): method __init__ (line 8874) | def __init__(self, *args, **kwargs): class UniSpeechSatModel (line 8878) | class UniSpeechSatModel(metaclass=DummyObject): method __init__ (line 8881) | def __init__(self, *args, **kwargs): class UniSpeechSatPreTrainedModel (line 8885) | class UniSpeechSatPreTrainedModel(metaclass=DummyObject): method __init__ (line 8888) | def __init__(self, *args, **kwargs): class UnivNetModel (line 8892) | class UnivNetModel(metaclass=DummyObject): method __init__ (line 8895) | def __init__(self, *args, **kwargs): class UperNetForSemanticSegmentation (line 8899) | class UperNetForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 8902) | def __init__(self, *args, **kwargs): class UperNetPreTrainedModel (line 8906) | class UperNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 8909) | def __init__(self, *args, **kwargs): class VideoLlavaForConditionalGeneration (line 8913) | class VideoLlavaForConditionalGeneration(metaclass=DummyObject): method __init__ (line 8916) | def __init__(self, *args, **kwargs): class VideoLlavaPreTrainedModel (line 8920) | class VideoLlavaPreTrainedModel(metaclass=DummyObject): method __init__ (line 8923) | def __init__(self, *args, **kwargs): class VideoLlavaProcessor (line 8927) | class VideoLlavaProcessor(metaclass=DummyObject): method __init__ (line 8930) | def __init__(self, *args, **kwargs): class VideoMAEForPreTraining (line 8934) | class VideoMAEForPreTraining(metaclass=DummyObject): method __init__ (line 8937) | def __init__(self, *args, **kwargs): class VideoMAEForVideoClassification (line 8941) | class VideoMAEForVideoClassification(metaclass=DummyObject): method __init__ (line 8944) | def __init__(self, *args, **kwargs): class VideoMAEModel (line 8948) | class VideoMAEModel(metaclass=DummyObject): method __init__ (line 8951) | def __init__(self, *args, **kwargs): class VideoMAEPreTrainedModel (line 8955) | class VideoMAEPreTrainedModel(metaclass=DummyObject): method __init__ (line 8958) | def __init__(self, *args, **kwargs): class ViltForImageAndTextRetrieval (line 8962) | class ViltForImageAndTextRetrieval(metaclass=DummyObject): method __init__ (line 8965) | def __init__(self, *args, **kwargs): class ViltForImagesAndTextClassification (line 8969) | class ViltForImagesAndTextClassification(metaclass=DummyObject): method __init__ (line 8972) | def __init__(self, *args, **kwargs): class ViltForMaskedLM (line 8976) | class ViltForMaskedLM(metaclass=DummyObject): method __init__ (line 8979) | def __init__(self, *args, **kwargs): class ViltForQuestionAnswering (line 8983) | class ViltForQuestionAnswering(metaclass=DummyObject): method __init__ (line 8986) | def __init__(self, *args, **kwargs): class ViltForTokenClassification (line 8990) | class ViltForTokenClassification(metaclass=DummyObject): method __init__ (line 8993) | def __init__(self, *args, **kwargs): class ViltLayer (line 8997) | class ViltLayer(metaclass=DummyObject): method __init__ (line 9000) | def __init__(self, *args, **kwargs): class ViltModel (line 9004) | class ViltModel(metaclass=DummyObject): method __init__ (line 9007) | def __init__(self, *args, **kwargs): class ViltPreTrainedModel (line 9011) | class ViltPreTrainedModel(metaclass=DummyObject): method __init__ (line 9014) | def __init__(self, *args, **kwargs): class VipLlavaForConditionalGeneration (line 9018) | class VipLlavaForConditionalGeneration(metaclass=DummyObject): method __init__ (line 9021) | def __init__(self, *args, **kwargs): class VipLlavaPreTrainedModel (line 9025) | class VipLlavaPreTrainedModel(metaclass=DummyObject): method __init__ (line 9028) | def __init__(self, *args, **kwargs): class VisionEncoderDecoderModel (line 9032) | class VisionEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 9035) | def __init__(self, *args, **kwargs): class VisionTextDualEncoderModel (line 9039) | class VisionTextDualEncoderModel(metaclass=DummyObject): method __init__ (line 9042) | def __init__(self, *args, **kwargs): class VisualBertForMultipleChoice (line 9046) | class VisualBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 9049) | def __init__(self, *args, **kwargs): class VisualBertForPreTraining (line 9053) | class VisualBertForPreTraining(metaclass=DummyObject): method __init__ (line 9056) | def __init__(self, *args, **kwargs): class VisualBertForQuestionAnswering (line 9060) | class VisualBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 9063) | def __init__(self, *args, **kwargs): class VisualBertForRegionToPhraseAlignment (line 9067) | class VisualBertForRegionToPhraseAlignment(metaclass=DummyObject): method __init__ (line 9070) | def __init__(self, *args, **kwargs): class VisualBertForVisualReasoning (line 9074) | class VisualBertForVisualReasoning(metaclass=DummyObject): method __init__ (line 9077) | def __init__(self, *args, **kwargs): class VisualBertLayer (line 9081) | class VisualBertLayer(metaclass=DummyObject): method __init__ (line 9084) | def __init__(self, *args, **kwargs): class VisualBertModel (line 9088) | class VisualBertModel(metaclass=DummyObject): method __init__ (line 9091) | def __init__(self, *args, **kwargs): class VisualBertPreTrainedModel (line 9095) | class VisualBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 9098) | def __init__(self, *args, **kwargs): class ViTForImageClassification (line 9102) | class ViTForImageClassification(metaclass=DummyObject): method __init__ (line 9105) | def __init__(self, *args, **kwargs): class ViTForMaskedImageModeling (line 9109) | class ViTForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 9112) | def __init__(self, *args, **kwargs): class ViTModel (line 9116) | class ViTModel(metaclass=DummyObject): method __init__ (line 9119) | def __init__(self, *args, **kwargs): class ViTPreTrainedModel (line 9123) | class ViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 9126) | def __init__(self, *args, **kwargs): class ViTMAEForPreTraining (line 9130) | class ViTMAEForPreTraining(metaclass=DummyObject): method __init__ (line 9133) | def __init__(self, *args, **kwargs): class ViTMAELayer (line 9137) | class ViTMAELayer(metaclass=DummyObject): method __init__ (line 9140) | def __init__(self, *args, **kwargs): class ViTMAEModel (line 9144) | class ViTMAEModel(metaclass=DummyObject): method __init__ (line 9147) | def __init__(self, *args, **kwargs): class ViTMAEPreTrainedModel (line 9151) | class ViTMAEPreTrainedModel(metaclass=DummyObject): method __init__ (line 9154) | def __init__(self, *args, **kwargs): class ViTMSNForImageClassification (line 9158) | class ViTMSNForImageClassification(metaclass=DummyObject): method __init__ (line 9161) | def __init__(self, *args, **kwargs): class ViTMSNModel (line 9165) | class ViTMSNModel(metaclass=DummyObject): method __init__ (line 9168) | def __init__(self, *args, **kwargs): class ViTMSNPreTrainedModel (line 9172) | class ViTMSNPreTrainedModel(metaclass=DummyObject): method __init__ (line 9175) | def __init__(self, *args, **kwargs): class VitDetBackbone (line 9179) | class VitDetBackbone(metaclass=DummyObject): method __init__ (line 9182) | def __init__(self, *args, **kwargs): class VitDetModel (line 9186) | class VitDetModel(metaclass=DummyObject): method __init__ (line 9189) | def __init__(self, *args, **kwargs): class VitDetPreTrainedModel (line 9193) | class VitDetPreTrainedModel(metaclass=DummyObject): method __init__ (line 9196) | def __init__(self, *args, **kwargs): class VitMatteForImageMatting (line 9200) | class VitMatteForImageMatting(metaclass=DummyObject): method __init__ (line 9203) | def __init__(self, *args, **kwargs): class VitMattePreTrainedModel (line 9207) | class VitMattePreTrainedModel(metaclass=DummyObject): method __init__ (line 9210) | def __init__(self, *args, **kwargs): class VitsModel (line 9214) | class VitsModel(metaclass=DummyObject): method __init__ (line 9217) | def __init__(self, *args, **kwargs): class VitsPreTrainedModel (line 9221) | class VitsPreTrainedModel(metaclass=DummyObject): method __init__ (line 9224) | def __init__(self, *args, **kwargs): class VivitForVideoClassification (line 9228) | class VivitForVideoClassification(metaclass=DummyObject): method __init__ (line 9231) | def __init__(self, *args, **kwargs): class VivitModel (line 9235) | class VivitModel(metaclass=DummyObject): method __init__ (line 9238) | def __init__(self, *args, **kwargs): class VivitPreTrainedModel (line 9242) | class VivitPreTrainedModel(metaclass=DummyObject): method __init__ (line 9245) | def __init__(self, *args, **kwargs): class Wav2Vec2ForAudioFrameClassification (line 9249) | class Wav2Vec2ForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 9252) | def __init__(self, *args, **kwargs): class Wav2Vec2ForCTC (line 9256) | class Wav2Vec2ForCTC(metaclass=DummyObject): method __init__ (line 9259) | def __init__(self, *args, **kwargs): class Wav2Vec2ForMaskedLM (line 9263) | class Wav2Vec2ForMaskedLM(metaclass=DummyObject): method __init__ (line 9266) | def __init__(self, *args, **kwargs): class Wav2Vec2ForPreTraining (line 9270) | class Wav2Vec2ForPreTraining(metaclass=DummyObject): method __init__ (line 9273) | def __init__(self, *args, **kwargs): class Wav2Vec2ForSequenceClassification (line 9277) | class Wav2Vec2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 9280) | def __init__(self, *args, **kwargs): class Wav2Vec2ForXVector (line 9284) | class Wav2Vec2ForXVector(metaclass=DummyObject): method __init__ (line 9287) | def __init__(self, *args, **kwargs): class Wav2Vec2Model (line 9291) | class Wav2Vec2Model(metaclass=DummyObject): method __init__ (line 9294) | def __init__(self, *args, **kwargs): class Wav2Vec2PreTrainedModel (line 9298) | class Wav2Vec2PreTrainedModel(metaclass=DummyObject): method __init__ (line 9301) | def __init__(self, *args, **kwargs): class Wav2Vec2BertForAudioFrameClassification (line 9305) | class Wav2Vec2BertForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 9308) | def __init__(self, *args, **kwargs): class Wav2Vec2BertForCTC (line 9312) | class Wav2Vec2BertForCTC(metaclass=DummyObject): method __init__ (line 9315) | def __init__(self, *args, **kwargs): class Wav2Vec2BertForSequenceClassification (line 9319) | class Wav2Vec2BertForSequenceClassification(metaclass=DummyObject): method __init__ (line 9322) | def __init__(self, *args, **kwargs): class Wav2Vec2BertForXVector (line 9326) | class Wav2Vec2BertForXVector(metaclass=DummyObject): method __init__ (line 9329) | def __init__(self, *args, **kwargs): class Wav2Vec2BertModel (line 9333) | class Wav2Vec2BertModel(metaclass=DummyObject): method __init__ (line 9336) | def __init__(self, *args, **kwargs): class Wav2Vec2BertPreTrainedModel (line 9340) | class Wav2Vec2BertPreTrainedModel(metaclass=DummyObject): method __init__ (line 9343) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForAudioFrameClassification (line 9347) | class Wav2Vec2ConformerForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 9350) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForCTC (line 9354) | class Wav2Vec2ConformerForCTC(metaclass=DummyObject): method __init__ (line 9357) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForPreTraining (line 9361) | class Wav2Vec2ConformerForPreTraining(metaclass=DummyObject): method __init__ (line 9364) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForSequenceClassification (line 9368) | class Wav2Vec2ConformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 9371) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForXVector (line 9375) | class Wav2Vec2ConformerForXVector(metaclass=DummyObject): method __init__ (line 9378) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerModel (line 9382) | class Wav2Vec2ConformerModel(metaclass=DummyObject): method __init__ (line 9385) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerPreTrainedModel (line 9389) | class Wav2Vec2ConformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 9392) | def __init__(self, *args, **kwargs): class WavLMForAudioFrameClassification (line 9396) | class WavLMForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 9399) | def __init__(self, *args, **kwargs): class WavLMForCTC (line 9403) | class WavLMForCTC(metaclass=DummyObject): method __init__ (line 9406) | def __init__(self, *args, **kwargs): class WavLMForSequenceClassification (line 9410) | class WavLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 9413) | def __init__(self, *args, **kwargs): class WavLMForXVector (line 9417) | class WavLMForXVector(metaclass=DummyObject): method __init__ (line 9420) | def __init__(self, *args, **kwargs): class WavLMModel (line 9424) | class WavLMModel(metaclass=DummyObject): method __init__ (line 9427) | def __init__(self, *args, **kwargs): class WavLMPreTrainedModel (line 9431) | class WavLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 9434) | def __init__(self, *args, **kwargs): class WhisperForAudioClassification (line 9438) | class WhisperForAudioClassification(metaclass=DummyObject): method __init__ (line 9441) | def __init__(self, *args, **kwargs): class WhisperForCausalLM (line 9445) | class WhisperForCausalLM(metaclass=DummyObject): method __init__ (line 9448) | def __init__(self, *args, **kwargs): class WhisperForConditionalGeneration (line 9452) | class WhisperForConditionalGeneration(metaclass=DummyObject): method __init__ (line 9455) | def __init__(self, *args, **kwargs): class WhisperModel (line 9459) | class WhisperModel(metaclass=DummyObject): method __init__ (line 9462) | def __init__(self, *args, **kwargs): class WhisperPreTrainedModel (line 9466) | class WhisperPreTrainedModel(metaclass=DummyObject): method __init__ (line 9469) | def __init__(self, *args, **kwargs): class XCLIPModel (line 9473) | class XCLIPModel(metaclass=DummyObject): method __init__ (line 9476) | def __init__(self, *args, **kwargs): class XCLIPPreTrainedModel (line 9480) | class XCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 9483) | def __init__(self, *args, **kwargs): class XCLIPTextModel (line 9487) | class XCLIPTextModel(metaclass=DummyObject): method __init__ (line 9490) | def __init__(self, *args, **kwargs): class XCLIPVisionModel (line 9494) | class XCLIPVisionModel(metaclass=DummyObject): method __init__ (line 9497) | def __init__(self, *args, **kwargs): class XGLMForCausalLM (line 9501) | class XGLMForCausalLM(metaclass=DummyObject): method __init__ (line 9504) | def __init__(self, *args, **kwargs): class XGLMModel (line 9508) | class XGLMModel(metaclass=DummyObject): method __init__ (line 9511) | def __init__(self, *args, **kwargs): class XGLMPreTrainedModel (line 9515) | class XGLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 9518) | def __init__(self, *args, **kwargs): class XLMForMultipleChoice (line 9522) | class XLMForMultipleChoice(metaclass=DummyObject): method __init__ (line 9525) | def __init__(self, *args, **kwargs): class XLMForQuestionAnswering (line 9529) | class XLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 9532) | def __init__(self, *args, **kwargs): class XLMForQuestionAnsweringSimple (line 9536) | class XLMForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 9539) | def __init__(self, *args, **kwargs): class XLMForSequenceClassification (line 9543) | class XLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 9546) | def __init__(self, *args, **kwargs): class XLMForTokenClassification (line 9550) | class XLMForTokenClassification(metaclass=DummyObject): method __init__ (line 9553) | def __init__(self, *args, **kwargs): class XLMModel (line 9557) | class XLMModel(metaclass=DummyObject): method __init__ (line 9560) | def __init__(self, *args, **kwargs): class XLMPreTrainedModel (line 9564) | class XLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 9567) | def __init__(self, *args, **kwargs): class XLMWithLMHeadModel (line 9571) | class XLMWithLMHeadModel(metaclass=DummyObject): method __init__ (line 9574) | def __init__(self, *args, **kwargs): class XLMRobertaForCausalLM (line 9578) | class XLMRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 9581) | def __init__(self, *args, **kwargs): class XLMRobertaForMaskedLM (line 9585) | class XLMRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 9588) | def __init__(self, *args, **kwargs): class XLMRobertaForMultipleChoice (line 9592) | class XLMRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 9595) | def __init__(self, *args, **kwargs): class XLMRobertaForQuestionAnswering (line 9599) | class XLMRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 9602) | def __init__(self, *args, **kwargs): class XLMRobertaForSequenceClassification (line 9606) | class XLMRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 9609) | def __init__(self, *args, **kwargs): class XLMRobertaForTokenClassification (line 9613) | class XLMRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 9616) | def __init__(self, *args, **kwargs): class XLMRobertaModel (line 9620) | class XLMRobertaModel(metaclass=DummyObject): method __init__ (line 9623) | def __init__(self, *args, **kwargs): class XLMRobertaPreTrainedModel (line 9627) | class XLMRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 9630) | def __init__(self, *args, **kwargs): class XLMRobertaXLForCausalLM (line 9634) | class XLMRobertaXLForCausalLM(metaclass=DummyObject): method __init__ (line 9637) | def __init__(self, *args, **kwargs): class XLMRobertaXLForMaskedLM (line 9641) | class XLMRobertaXLForMaskedLM(metaclass=DummyObject): method __init__ (line 9644) | def __init__(self, *args, **kwargs): class XLMRobertaXLForMultipleChoice (line 9648) | class XLMRobertaXLForMultipleChoice(metaclass=DummyObject): method __init__ (line 9651) | def __init__(self, *args, **kwargs): class XLMRobertaXLForQuestionAnswering (line 9655) | class XLMRobertaXLForQuestionAnswering(metaclass=DummyObject): method __init__ (line 9658) | def __init__(self, *args, **kwargs): class XLMRobertaXLForSequenceClassification (line 9662) | class XLMRobertaXLForSequenceClassification(metaclass=DummyObject): method __init__ (line 9665) | def __init__(self, *args, **kwargs): class XLMRobertaXLForTokenClassification (line 9669) | class XLMRobertaXLForTokenClassification(metaclass=DummyObject): method __init__ (line 9672) | def __init__(self, *args, **kwargs): class XLMRobertaXLModel (line 9676) | class XLMRobertaXLModel(metaclass=DummyObject): method __init__ (line 9679) | def __init__(self, *args, **kwargs): class XLMRobertaXLPreTrainedModel (line 9683) | class XLMRobertaXLPreTrainedModel(metaclass=DummyObject): method __init__ (line 9686) | def __init__(self, *args, **kwargs): class XLNetForMultipleChoice (line 9690) | class XLNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 9693) | def __init__(self, *args, **kwargs): class XLNetForQuestionAnswering (line 9697) | class XLNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 9700) | def __init__(self, *args, **kwargs): class XLNetForQuestionAnsweringSimple (line 9704) | class XLNetForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 9707) | def __init__(self, *args, **kwargs): class XLNetForSequenceClassification (line 9711) | class XLNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 9714) | def __init__(self, *args, **kwargs): class XLNetForTokenClassification (line 9718) | class XLNetForTokenClassification(metaclass=DummyObject): method __init__ (line 9721) | def __init__(self, *args, **kwargs): class XLNetLMHeadModel (line 9725) | class XLNetLMHeadModel(metaclass=DummyObject): method __init__ (line 9728) | def __init__(self, *args, **kwargs): class XLNetModel (line 9732) | class XLNetModel(metaclass=DummyObject): method __init__ (line 9735) | def __init__(self, *args, **kwargs): class XLNetPreTrainedModel (line 9739) | class XLNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 9742) | def __init__(self, *args, **kwargs): function load_tf_weights_in_xlnet (line 9746) | def load_tf_weights_in_xlnet(*args, **kwargs): class XmodForCausalLM (line 9750) | class XmodForCausalLM(metaclass=DummyObject): method __init__ (line 9753) | def __init__(self, *args, **kwargs): class XmodForMaskedLM (line 9757) | class XmodForMaskedLM(metaclass=DummyObject): method __init__ (line 9760) | def __init__(self, *args, **kwargs): class XmodForMultipleChoice (line 9764) | class XmodForMultipleChoice(metaclass=DummyObject): method __init__ (line 9767) | def __init__(self, *args, **kwargs): class XmodForQuestionAnswering (line 9771) | class XmodForQuestionAnswering(metaclass=DummyObject): method __init__ (line 9774) | def __init__(self, *args, **kwargs): class XmodForSequenceClassification (line 9778) | class XmodForSequenceClassification(metaclass=DummyObject): method __init__ (line 9781) | def __init__(self, *args, **kwargs): class XmodForTokenClassification (line 9785) | class XmodForTokenClassification(metaclass=DummyObject): method __init__ (line 9788) | def __init__(self, *args, **kwargs): class XmodModel (line 9792) | class XmodModel(metaclass=DummyObject): method __init__ (line 9795) | def __init__(self, *args, **kwargs): class XmodPreTrainedModel (line 9799) | class XmodPreTrainedModel(metaclass=DummyObject): method __init__ (line 9802) | def __init__(self, *args, **kwargs): class YolosForObjectDetection (line 9806) | class YolosForObjectDetection(metaclass=DummyObject): method __init__ (line 9809) | def __init__(self, *args, **kwargs): class YolosModel (line 9813) | class YolosModel(metaclass=DummyObject): method __init__ (line 9816) | def __init__(self, *args, **kwargs): class YolosPreTrainedModel (line 9820) | class YolosPreTrainedModel(metaclass=DummyObject): method __init__ (line 9823) | def __init__(self, *args, **kwargs): class YosoForMaskedLM (line 9827) | class YosoForMaskedLM(metaclass=DummyObject): method __init__ (line 9830) | def __init__(self, *args, **kwargs): class YosoForMultipleChoice (line 9834) | class YosoForMultipleChoice(metaclass=DummyObject): method __init__ (line 9837) | def __init__(self, *args, **kwargs): class YosoForQuestionAnswering (line 9841) | class YosoForQuestionAnswering(metaclass=DummyObject): method __init__ (line 9844) | def __init__(self, *args, **kwargs): class YosoForSequenceClassification (line 9848) | class YosoForSequenceClassification(metaclass=DummyObject): method __init__ (line 9851) | def __init__(self, *args, **kwargs): class YosoForTokenClassification (line 9855) | class YosoForTokenClassification(metaclass=DummyObject): method __init__ (line 9858) | def __init__(self, *args, **kwargs): class YosoLayer (line 9862) | class YosoLayer(metaclass=DummyObject): method __init__ (line 9865) | def __init__(self, *args, **kwargs): class YosoModel (line 9869) | class YosoModel(metaclass=DummyObject): method __init__ (line 9872) | def __init__(self, *args, **kwargs): class YosoPreTrainedModel (line 9876) | class YosoPreTrainedModel(metaclass=DummyObject): method __init__ (line 9879) | def __init__(self, *args, **kwargs): class ZoeDepthForDepthEstimation (line 9883) | class ZoeDepthForDepthEstimation(metaclass=DummyObject): method __init__ (line 9886) | def __init__(self, *args, **kwargs): class ZoeDepthPreTrainedModel (line 9890) | class ZoeDepthPreTrainedModel(metaclass=DummyObject): method __init__ (line 9893) | def __init__(self, *args, **kwargs): class Adafactor (line 9897) | class Adafactor(metaclass=DummyObject): method __init__ (line 9900) | def __init__(self, *args, **kwargs): class AdamW (line 9904) | class AdamW(metaclass=DummyObject): method __init__ (line 9907) | def __init__(self, *args, **kwargs): function get_constant_schedule (line 9911) | def get_constant_schedule(*args, **kwargs): function get_constant_schedule_with_warmup (line 9915) | def get_constant_schedule_with_warmup(*args, **kwargs): function get_cosine_schedule_with_warmup (line 9919) | def get_cosine_schedule_with_warmup(*args, **kwargs): function get_cosine_with_hard_restarts_schedule_with_warmup (line 9923) | def get_cosine_with_hard_restarts_schedule_with_warmup(*args, **kwargs): function get_inverse_sqrt_schedule (line 9927) | def get_inverse_sqrt_schedule(*args, **kwargs): function get_linear_schedule_with_warmup (line 9931) | def get_linear_schedule_with_warmup(*args, **kwargs): function get_polynomial_decay_schedule_with_warmup (line 9935) | def get_polynomial_decay_schedule_with_warmup(*args, **kwargs): function get_scheduler (line 9939) | def get_scheduler(*args, **kwargs): function get_wsd_schedule (line 9943) | def get_wsd_schedule(*args, **kwargs): class Conv1D (line 9947) | class Conv1D(metaclass=DummyObject): method __init__ (line 9950) | def __init__(self, *args, **kwargs): function apply_chunking_to_forward (line 9954) | def apply_chunking_to_forward(*args, **kwargs): function prune_layer (line 9958) | def prune_layer(*args, **kwargs): class Trainer (line 9962) | class Trainer(metaclass=DummyObject): method __init__ (line 9965) | def __init__(self, *args, **kwargs): function torch_distributed_zero_first (line 9969) | def torch_distributed_zero_first(*args, **kwargs): class Seq2SeqTrainer (line 9973) | class Seq2SeqTrainer(metaclass=DummyObject): method __init__ (line 9976) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/dummy_sentencepiece_and_tokenizers_objects.py function convert_slow_tokenizer (line 8) | def convert_slow_tokenizer(*args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/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 CodeLlamaTokenizer (line 47) | class CodeLlamaTokenizer(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class CpmTokenizer (line 54) | class CpmTokenizer(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class DebertaV2Tokenizer (line 61) | class DebertaV2Tokenizer(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class ErnieMTokenizer (line 68) | class ErnieMTokenizer(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class XLMProphetNetTokenizer (line 75) | class XLMProphetNetTokenizer(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class FNetTokenizer (line 82) | class FNetTokenizer(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class GemmaTokenizer (line 89) | class GemmaTokenizer(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class GPTSw3Tokenizer (line 96) | class GPTSw3Tokenizer(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class LayoutXLMTokenizer (line 103) | class LayoutXLMTokenizer(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class LlamaTokenizer (line 110) | class LlamaTokenizer(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class M2M100Tokenizer (line 117) | class M2M100Tokenizer(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class MarianTokenizer (line 124) | class MarianTokenizer(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class MBart50Tokenizer (line 131) | class MBart50Tokenizer(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class MBartTokenizer (line 138) | class MBartTokenizer(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class MLukeTokenizer (line 145) | class MLukeTokenizer(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class MT5Tokenizer (line 152) | class MT5Tokenizer(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class NllbTokenizer (line 159) | class NllbTokenizer(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): class PegasusTokenizer (line 166) | class PegasusTokenizer(metaclass=DummyObject): method __init__ (line 169) | def __init__(self, *args, **kwargs): class PLBartTokenizer (line 173) | class PLBartTokenizer(metaclass=DummyObject): method __init__ (line 176) | def __init__(self, *args, **kwargs): class ReformerTokenizer (line 180) | class ReformerTokenizer(metaclass=DummyObject): method __init__ (line 183) | def __init__(self, *args, **kwargs): class RemBertTokenizer (line 187) | class RemBertTokenizer(metaclass=DummyObject): method __init__ (line 190) | def __init__(self, *args, **kwargs): class SeamlessM4TTokenizer (line 194) | class SeamlessM4TTokenizer(metaclass=DummyObject): method __init__ (line 197) | def __init__(self, *args, **kwargs): class SiglipTokenizer (line 201) | class SiglipTokenizer(metaclass=DummyObject): method __init__ (line 204) | def __init__(self, *args, **kwargs): class Speech2TextTokenizer (line 208) | class Speech2TextTokenizer(metaclass=DummyObject): method __init__ (line 211) | def __init__(self, *args, **kwargs): class SpeechT5Tokenizer (line 215) | class SpeechT5Tokenizer(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): class T5Tokenizer (line 222) | class T5Tokenizer(metaclass=DummyObject): method __init__ (line 225) | def __init__(self, *args, **kwargs): class UdopTokenizer (line 229) | class UdopTokenizer(metaclass=DummyObject): method __init__ (line 232) | def __init__(self, *args, **kwargs): class XGLMTokenizer (line 236) | class XGLMTokenizer(metaclass=DummyObject): method __init__ (line 239) | def __init__(self, *args, **kwargs): class XLMRobertaTokenizer (line 243) | class XLMRobertaTokenizer(metaclass=DummyObject): method __init__ (line 246) | def __init__(self, *args, **kwargs): class XLNetTokenizer (line 250) | class XLNetTokenizer(metaclass=DummyObject): method __init__ (line 253) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/dummy_speech_objects.py class ASTFeatureExtractor (line 5) | class ASTFeatureExtractor(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class Speech2TextFeatureExtractor (line 12) | class Speech2TextFeatureExtractor(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 TFForceTokensLogitsProcessor (line 33) | class TFForceTokensLogitsProcessor(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class TFGenerationMixin (line 40) | class TFGenerationMixin(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class TFLogitsProcessor (line 47) | class TFLogitsProcessor(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class TFLogitsProcessorList (line 54) | class TFLogitsProcessorList(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class TFLogitsWarper (line 61) | class TFLogitsWarper(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class TFMinLengthLogitsProcessor (line 68) | class TFMinLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class TFNoBadWordsLogitsProcessor (line 75) | class TFNoBadWordsLogitsProcessor(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class TFNoRepeatNGramLogitsProcessor (line 82) | class TFNoRepeatNGramLogitsProcessor(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class TFRepetitionPenaltyLogitsProcessor (line 89) | class TFRepetitionPenaltyLogitsProcessor(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class TFSuppressTokensAtBeginLogitsProcessor (line 96) | class TFSuppressTokensAtBeginLogitsProcessor(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class TFSuppressTokensLogitsProcessor (line 103) | class TFSuppressTokensLogitsProcessor(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class TFTemperatureLogitsWarper (line 110) | class TFTemperatureLogitsWarper(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class TFTopKLogitsWarper (line 117) | class TFTopKLogitsWarper(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class TFTopPLogitsWarper (line 124) | class TFTopPLogitsWarper(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class KerasMetricCallback (line 131) | class KerasMetricCallback(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class PushToHubCallback (line 138) | class PushToHubCallback(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class TFPreTrainedModel (line 145) | class TFPreTrainedModel(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class TFSequenceSummary (line 152) | class TFSequenceSummary(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class TFSharedEmbeddings (line 159) | class TFSharedEmbeddings(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): function shape_list (line 166) | def shape_list(*args, **kwargs): class TFAlbertForMaskedLM (line 170) | class TFAlbertForMaskedLM(metaclass=DummyObject): method __init__ (line 173) | def __init__(self, *args, **kwargs): class TFAlbertForMultipleChoice (line 177) | class TFAlbertForMultipleChoice(metaclass=DummyObject): method __init__ (line 180) | def __init__(self, *args, **kwargs): class TFAlbertForPreTraining (line 184) | class TFAlbertForPreTraining(metaclass=DummyObject): method __init__ (line 187) | def __init__(self, *args, **kwargs): class TFAlbertForQuestionAnswering (line 191) | class TFAlbertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 194) | def __init__(self, *args, **kwargs): class TFAlbertForSequenceClassification (line 198) | class TFAlbertForSequenceClassification(metaclass=DummyObject): method __init__ (line 201) | def __init__(self, *args, **kwargs): class TFAlbertForTokenClassification (line 205) | class TFAlbertForTokenClassification(metaclass=DummyObject): method __init__ (line 208) | def __init__(self, *args, **kwargs): class TFAlbertMainLayer (line 212) | class TFAlbertMainLayer(metaclass=DummyObject): method __init__ (line 215) | def __init__(self, *args, **kwargs): class TFAlbertModel (line 219) | class TFAlbertModel(metaclass=DummyObject): method __init__ (line 222) | def __init__(self, *args, **kwargs): class TFAlbertPreTrainedModel (line 226) | class TFAlbertPreTrainedModel(metaclass=DummyObject): method __init__ (line 229) | def __init__(self, *args, **kwargs): class TFAutoModel (line 299) | class TFAutoModel(metaclass=DummyObject): method __init__ (line 302) | def __init__(self, *args, **kwargs): class TFAutoModelForAudioClassification (line 306) | class TFAutoModelForAudioClassification(metaclass=DummyObject): method __init__ (line 309) | def __init__(self, *args, **kwargs): class TFAutoModelForCausalLM (line 313) | class TFAutoModelForCausalLM(metaclass=DummyObject): method __init__ (line 316) | def __init__(self, *args, **kwargs): class TFAutoModelForDocumentQuestionAnswering (line 320) | class TFAutoModelForDocumentQuestionAnswering(metaclass=DummyObject): method __init__ (line 323) | def __init__(self, *args, **kwargs): class TFAutoModelForImageClassification (line 327) | class TFAutoModelForImageClassification(metaclass=DummyObject): method __init__ (line 330) | def __init__(self, *args, **kwargs): class TFAutoModelForMaskedImageModeling (line 334) | class TFAutoModelForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 337) | def __init__(self, *args, **kwargs): class TFAutoModelForMaskedLM (line 341) | class TFAutoModelForMaskedLM(metaclass=DummyObject): method __init__ (line 344) | def __init__(self, *args, **kwargs): class TFAutoModelForMaskGeneration (line 348) | class TFAutoModelForMaskGeneration(metaclass=DummyObject): method __init__ (line 351) | def __init__(self, *args, **kwargs): class TFAutoModelForMultipleChoice (line 355) | class TFAutoModelForMultipleChoice(metaclass=DummyObject): method __init__ (line 358) | def __init__(self, *args, **kwargs): class TFAutoModelForNextSentencePrediction (line 362) | class TFAutoModelForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 365) | def __init__(self, *args, **kwargs): class TFAutoModelForPreTraining (line 369) | class TFAutoModelForPreTraining(metaclass=DummyObject): method __init__ (line 372) | def __init__(self, *args, **kwargs): class TFAutoModelForQuestionAnswering (line 376) | class TFAutoModelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 379) | def __init__(self, *args, **kwargs): class TFAutoModelForSemanticSegmentation (line 383) | class TFAutoModelForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 386) | def __init__(self, *args, **kwargs): class TFAutoModelForSeq2SeqLM (line 390) | class TFAutoModelForSeq2SeqLM(metaclass=DummyObject): method __init__ (line 393) | def __init__(self, *args, **kwargs): class TFAutoModelForSequenceClassification (line 397) | class TFAutoModelForSequenceClassification(metaclass=DummyObject): method __init__ (line 400) | def __init__(self, *args, **kwargs): class TFAutoModelForSpeechSeq2Seq (line 404) | class TFAutoModelForSpeechSeq2Seq(metaclass=DummyObject): method __init__ (line 407) | def __init__(self, *args, **kwargs): class TFAutoModelForTableQuestionAnswering (line 411) | class TFAutoModelForTableQuestionAnswering(metaclass=DummyObject): method __init__ (line 414) | def __init__(self, *args, **kwargs): class TFAutoModelForTextEncoding (line 418) | class TFAutoModelForTextEncoding(metaclass=DummyObject): method __init__ (line 421) | def __init__(self, *args, **kwargs): class TFAutoModelForTokenClassification (line 425) | class TFAutoModelForTokenClassification(metaclass=DummyObject): method __init__ (line 428) | def __init__(self, *args, **kwargs): class TFAutoModelForVision2Seq (line 432) | class TFAutoModelForVision2Seq(metaclass=DummyObject): method __init__ (line 435) | def __init__(self, *args, **kwargs): class TFAutoModelForZeroShotImageClassification (line 439) | class TFAutoModelForZeroShotImageClassification(metaclass=DummyObject): method __init__ (line 442) | def __init__(self, *args, **kwargs): class TFAutoModelWithLMHead (line 446) | class TFAutoModelWithLMHead(metaclass=DummyObject): method __init__ (line 449) | def __init__(self, *args, **kwargs): class TFBartForConditionalGeneration (line 453) | class TFBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 456) | def __init__(self, *args, **kwargs): class TFBartForSequenceClassification (line 460) | class TFBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 463) | def __init__(self, *args, **kwargs): class TFBartModel (line 467) | class TFBartModel(metaclass=DummyObject): method __init__ (line 470) | def __init__(self, *args, **kwargs): class TFBartPretrainedModel (line 474) | class TFBartPretrainedModel(metaclass=DummyObject): method __init__ (line 477) | def __init__(self, *args, **kwargs): class TFBertEmbeddings (line 481) | class TFBertEmbeddings(metaclass=DummyObject): method __init__ (line 484) | def __init__(self, *args, **kwargs): class TFBertForMaskedLM (line 488) | class TFBertForMaskedLM(metaclass=DummyObject): method __init__ (line 491) | def __init__(self, *args, **kwargs): class TFBertForMultipleChoice (line 495) | class TFBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 498) | def __init__(self, *args, **kwargs): class TFBertForNextSentencePrediction (line 502) | class TFBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 505) | def __init__(self, *args, **kwargs): class TFBertForPreTraining (line 509) | class TFBertForPreTraining(metaclass=DummyObject): method __init__ (line 512) | def __init__(self, *args, **kwargs): class TFBertForQuestionAnswering (line 516) | class TFBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 519) | def __init__(self, *args, **kwargs): class TFBertForSequenceClassification (line 523) | class TFBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 526) | def __init__(self, *args, **kwargs): class TFBertForTokenClassification (line 530) | class TFBertForTokenClassification(metaclass=DummyObject): method __init__ (line 533) | def __init__(self, *args, **kwargs): class TFBertLMHeadModel (line 537) | class TFBertLMHeadModel(metaclass=DummyObject): method __init__ (line 540) | def __init__(self, *args, **kwargs): class TFBertMainLayer (line 544) | class TFBertMainLayer(metaclass=DummyObject): method __init__ (line 547) | def __init__(self, *args, **kwargs): class TFBertModel (line 551) | class TFBertModel(metaclass=DummyObject): method __init__ (line 554) | def __init__(self, *args, **kwargs): class TFBertPreTrainedModel (line 558) | class TFBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 561) | def __init__(self, *args, **kwargs): class TFBlenderbotForConditionalGeneration (line 565) | class TFBlenderbotForConditionalGeneration(metaclass=DummyObject): method __init__ (line 568) | def __init__(self, *args, **kwargs): class TFBlenderbotModel (line 572) | class TFBlenderbotModel(metaclass=DummyObject): method __init__ (line 575) | def __init__(self, *args, **kwargs): class TFBlenderbotPreTrainedModel (line 579) | class TFBlenderbotPreTrainedModel(metaclass=DummyObject): method __init__ (line 582) | def __init__(self, *args, **kwargs): class TFBlenderbotSmallForConditionalGeneration (line 586) | class TFBlenderbotSmallForConditionalGeneration(metaclass=DummyObject): method __init__ (line 589) | def __init__(self, *args, **kwargs): class TFBlenderbotSmallModel (line 593) | class TFBlenderbotSmallModel(metaclass=DummyObject): method __init__ (line 596) | def __init__(self, *args, **kwargs): class TFBlenderbotSmallPreTrainedModel (line 600) | class TFBlenderbotSmallPreTrainedModel(metaclass=DummyObject): method __init__ (line 603) | def __init__(self, *args, **kwargs): class TFBlipForConditionalGeneration (line 607) | class TFBlipForConditionalGeneration(metaclass=DummyObject): method __init__ (line 610) | def __init__(self, *args, **kwargs): class TFBlipForImageTextRetrieval (line 614) | class TFBlipForImageTextRetrieval(metaclass=DummyObject): method __init__ (line 617) | def __init__(self, *args, **kwargs): class TFBlipForQuestionAnswering (line 621) | class TFBlipForQuestionAnswering(metaclass=DummyObject): method __init__ (line 624) | def __init__(self, *args, **kwargs): class TFBlipModel (line 628) | class TFBlipModel(metaclass=DummyObject): method __init__ (line 631) | def __init__(self, *args, **kwargs): class TFBlipPreTrainedModel (line 635) | class TFBlipPreTrainedModel(metaclass=DummyObject): method __init__ (line 638) | def __init__(self, *args, **kwargs): class TFBlipTextModel (line 642) | class TFBlipTextModel(metaclass=DummyObject): method __init__ (line 645) | def __init__(self, *args, **kwargs): class TFBlipVisionModel (line 649) | class TFBlipVisionModel(metaclass=DummyObject): method __init__ (line 652) | def __init__(self, *args, **kwargs): class TFCamembertForCausalLM (line 656) | class TFCamembertForCausalLM(metaclass=DummyObject): method __init__ (line 659) | def __init__(self, *args, **kwargs): class TFCamembertForMaskedLM (line 663) | class TFCamembertForMaskedLM(metaclass=DummyObject): method __init__ (line 666) | def __init__(self, *args, **kwargs): class TFCamembertForMultipleChoice (line 670) | class TFCamembertForMultipleChoice(metaclass=DummyObject): method __init__ (line 673) | def __init__(self, *args, **kwargs): class TFCamembertForQuestionAnswering (line 677) | class TFCamembertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 680) | def __init__(self, *args, **kwargs): class TFCamembertForSequenceClassification (line 684) | class TFCamembertForSequenceClassification(metaclass=DummyObject): method __init__ (line 687) | def __init__(self, *args, **kwargs): class TFCamembertForTokenClassification (line 691) | class TFCamembertForTokenClassification(metaclass=DummyObject): method __init__ (line 694) | def __init__(self, *args, **kwargs): class TFCamembertModel (line 698) | class TFCamembertModel(metaclass=DummyObject): method __init__ (line 701) | def __init__(self, *args, **kwargs): class TFCamembertPreTrainedModel (line 705) | class TFCamembertPreTrainedModel(metaclass=DummyObject): method __init__ (line 708) | def __init__(self, *args, **kwargs): class TFCLIPModel (line 712) | class TFCLIPModel(metaclass=DummyObject): method __init__ (line 715) | def __init__(self, *args, **kwargs): class TFCLIPPreTrainedModel (line 719) | class TFCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 722) | def __init__(self, *args, **kwargs): class TFCLIPTextModel (line 726) | class TFCLIPTextModel(metaclass=DummyObject): method __init__ (line 729) | def __init__(self, *args, **kwargs): class TFCLIPVisionModel (line 733) | class TFCLIPVisionModel(metaclass=DummyObject): method __init__ (line 736) | def __init__(self, *args, **kwargs): class TFConvBertForMaskedLM (line 740) | class TFConvBertForMaskedLM(metaclass=DummyObject): method __init__ (line 743) | def __init__(self, *args, **kwargs): class TFConvBertForMultipleChoice (line 747) | class TFConvBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 750) | def __init__(self, *args, **kwargs): class TFConvBertForQuestionAnswering (line 754) | class TFConvBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 757) | def __init__(self, *args, **kwargs): class TFConvBertForSequenceClassification (line 761) | class TFConvBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 764) | def __init__(self, *args, **kwargs): class TFConvBertForTokenClassification (line 768) | class TFConvBertForTokenClassification(metaclass=DummyObject): method __init__ (line 771) | def __init__(self, *args, **kwargs): class TFConvBertLayer (line 775) | class TFConvBertLayer(metaclass=DummyObject): method __init__ (line 778) | def __init__(self, *args, **kwargs): class TFConvBertModel (line 782) | class TFConvBertModel(metaclass=DummyObject): method __init__ (line 785) | def __init__(self, *args, **kwargs): class TFConvBertPreTrainedModel (line 789) | class TFConvBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 792) | def __init__(self, *args, **kwargs): class TFConvNextForImageClassification (line 796) | class TFConvNextForImageClassification(metaclass=DummyObject): method __init__ (line 799) | def __init__(self, *args, **kwargs): class TFConvNextModel (line 803) | class TFConvNextModel(metaclass=DummyObject): method __init__ (line 806) | def __init__(self, *args, **kwargs): class TFConvNextPreTrainedModel (line 810) | class TFConvNextPreTrainedModel(metaclass=DummyObject): method __init__ (line 813) | def __init__(self, *args, **kwargs): class TFConvNextV2ForImageClassification (line 817) | class TFConvNextV2ForImageClassification(metaclass=DummyObject): method __init__ (line 820) | def __init__(self, *args, **kwargs): class TFConvNextV2Model (line 824) | class TFConvNextV2Model(metaclass=DummyObject): method __init__ (line 827) | def __init__(self, *args, **kwargs): class TFConvNextV2PreTrainedModel (line 831) | class TFConvNextV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 834) | def __init__(self, *args, **kwargs): class TFCTRLForSequenceClassification (line 838) | class TFCTRLForSequenceClassification(metaclass=DummyObject): method __init__ (line 841) | def __init__(self, *args, **kwargs): class TFCTRLLMHeadModel (line 845) | class TFCTRLLMHeadModel(metaclass=DummyObject): method __init__ (line 848) | def __init__(self, *args, **kwargs): class TFCTRLModel (line 852) | class TFCTRLModel(metaclass=DummyObject): method __init__ (line 855) | def __init__(self, *args, **kwargs): class TFCTRLPreTrainedModel (line 859) | class TFCTRLPreTrainedModel(metaclass=DummyObject): method __init__ (line 862) | def __init__(self, *args, **kwargs): class TFCvtForImageClassification (line 866) | class TFCvtForImageClassification(metaclass=DummyObject): method __init__ (line 869) | def __init__(self, *args, **kwargs): class TFCvtModel (line 873) | class TFCvtModel(metaclass=DummyObject): method __init__ (line 876) | def __init__(self, *args, **kwargs): class TFCvtPreTrainedModel (line 880) | class TFCvtPreTrainedModel(metaclass=DummyObject): method __init__ (line 883) | def __init__(self, *args, **kwargs): class TFData2VecVisionForImageClassification (line 887) | class TFData2VecVisionForImageClassification(metaclass=DummyObject): method __init__ (line 890) | def __init__(self, *args, **kwargs): class TFData2VecVisionForSemanticSegmentation (line 894) | class TFData2VecVisionForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 897) | def __init__(self, *args, **kwargs): class TFData2VecVisionModel (line 901) | class TFData2VecVisionModel(metaclass=DummyObject): method __init__ (line 904) | def __init__(self, *args, **kwargs): class TFData2VecVisionPreTrainedModel (line 908) | class TFData2VecVisionPreTrainedModel(metaclass=DummyObject): method __init__ (line 911) | def __init__(self, *args, **kwargs): class TFDebertaForMaskedLM (line 915) | class TFDebertaForMaskedLM(metaclass=DummyObject): method __init__ (line 918) | def __init__(self, *args, **kwargs): class TFDebertaForQuestionAnswering (line 922) | class TFDebertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 925) | def __init__(self, *args, **kwargs): class TFDebertaForSequenceClassification (line 929) | class TFDebertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 932) | def __init__(self, *args, **kwargs): class TFDebertaForTokenClassification (line 936) | class TFDebertaForTokenClassification(metaclass=DummyObject): method __init__ (line 939) | def __init__(self, *args, **kwargs): class TFDebertaModel (line 943) | class TFDebertaModel(metaclass=DummyObject): method __init__ (line 946) | def __init__(self, *args, **kwargs): class TFDebertaPreTrainedModel (line 950) | class TFDebertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 953) | def __init__(self, *args, **kwargs): class TFDebertaV2ForMaskedLM (line 957) | class TFDebertaV2ForMaskedLM(metaclass=DummyObject): method __init__ (line 960) | def __init__(self, *args, **kwargs): class TFDebertaV2ForMultipleChoice (line 964) | class TFDebertaV2ForMultipleChoice(metaclass=DummyObject): method __init__ (line 967) | def __init__(self, *args, **kwargs): class TFDebertaV2ForQuestionAnswering (line 971) | class TFDebertaV2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 974) | def __init__(self, *args, **kwargs): class TFDebertaV2ForSequenceClassification (line 978) | class TFDebertaV2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 981) | def __init__(self, *args, **kwargs): class TFDebertaV2ForTokenClassification (line 985) | class TFDebertaV2ForTokenClassification(metaclass=DummyObject): method __init__ (line 988) | def __init__(self, *args, **kwargs): class TFDebertaV2Model (line 992) | class TFDebertaV2Model(metaclass=DummyObject): method __init__ (line 995) | def __init__(self, *args, **kwargs): class TFDebertaV2PreTrainedModel (line 999) | class TFDebertaV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1002) | def __init__(self, *args, **kwargs): class TFDeiTForImageClassification (line 1006) | class TFDeiTForImageClassification(metaclass=DummyObject): method __init__ (line 1009) | def __init__(self, *args, **kwargs): class TFDeiTForImageClassificationWithTeacher (line 1013) | class TFDeiTForImageClassificationWithTeacher(metaclass=DummyObject): method __init__ (line 1016) | def __init__(self, *args, **kwargs): class TFDeiTForMaskedImageModeling (line 1020) | class TFDeiTForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 1023) | def __init__(self, *args, **kwargs): class TFDeiTModel (line 1027) | class TFDeiTModel(metaclass=DummyObject): method __init__ (line 1030) | def __init__(self, *args, **kwargs): class TFDeiTPreTrainedModel (line 1034) | class TFDeiTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1037) | def __init__(self, *args, **kwargs): class TFEfficientFormerForImageClassification (line 1041) | class TFEfficientFormerForImageClassification(metaclass=DummyObject): method __init__ (line 1044) | def __init__(self, *args, **kwargs): class TFEfficientFormerForImageClassificationWithTeacher (line 1048) | class TFEfficientFormerForImageClassificationWithTeacher(metaclass=Dummy... method __init__ (line 1051) | def __init__(self, *args, **kwargs): class TFEfficientFormerModel (line 1055) | class TFEfficientFormerModel(metaclass=DummyObject): method __init__ (line 1058) | def __init__(self, *args, **kwargs): class TFEfficientFormerPreTrainedModel (line 1062) | class TFEfficientFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1065) | def __init__(self, *args, **kwargs): class TFAdaptiveEmbedding (line 1069) | class TFAdaptiveEmbedding(metaclass=DummyObject): method __init__ (line 1072) | def __init__(self, *args, **kwargs): class TFTransfoXLForSequenceClassification (line 1076) | class TFTransfoXLForSequenceClassification(metaclass=DummyObject): method __init__ (line 1079) | def __init__(self, *args, **kwargs): class TFTransfoXLLMHeadModel (line 1083) | class TFTransfoXLLMHeadModel(metaclass=DummyObject): method __init__ (line 1086) | def __init__(self, *args, **kwargs): class TFTransfoXLMainLayer (line 1090) | class TFTransfoXLMainLayer(metaclass=DummyObject): method __init__ (line 1093) | def __init__(self, *args, **kwargs): class TFTransfoXLModel (line 1097) | class TFTransfoXLModel(metaclass=DummyObject): method __init__ (line 1100) | def __init__(self, *args, **kwargs): class TFTransfoXLPreTrainedModel (line 1104) | class TFTransfoXLPreTrainedModel(metaclass=DummyObject): method __init__ (line 1107) | def __init__(self, *args, **kwargs): class TFDistilBertForMaskedLM (line 1111) | class TFDistilBertForMaskedLM(metaclass=DummyObject): method __init__ (line 1114) | def __init__(self, *args, **kwargs): class TFDistilBertForMultipleChoice (line 1118) | class TFDistilBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1121) | def __init__(self, *args, **kwargs): class TFDistilBertForQuestionAnswering (line 1125) | class TFDistilBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1128) | def __init__(self, *args, **kwargs): class TFDistilBertForSequenceClassification (line 1132) | class TFDistilBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1135) | def __init__(self, *args, **kwargs): class TFDistilBertForTokenClassification (line 1139) | class TFDistilBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1142) | def __init__(self, *args, **kwargs): class TFDistilBertMainLayer (line 1146) | class TFDistilBertMainLayer(metaclass=DummyObject): method __init__ (line 1149) | def __init__(self, *args, **kwargs): class TFDistilBertModel (line 1153) | class TFDistilBertModel(metaclass=DummyObject): method __init__ (line 1156) | def __init__(self, *args, **kwargs): class TFDistilBertPreTrainedModel (line 1160) | class TFDistilBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1163) | def __init__(self, *args, **kwargs): class TFDPRContextEncoder (line 1167) | class TFDPRContextEncoder(metaclass=DummyObject): method __init__ (line 1170) | def __init__(self, *args, **kwargs): class TFDPRPretrainedContextEncoder (line 1174) | class TFDPRPretrainedContextEncoder(metaclass=DummyObject): method __init__ (line 1177) | def __init__(self, *args, **kwargs): class TFDPRPretrainedQuestionEncoder (line 1181) | class TFDPRPretrainedQuestionEncoder(metaclass=DummyObject): method __init__ (line 1184) | def __init__(self, *args, **kwargs): class TFDPRPretrainedReader (line 1188) | class TFDPRPretrainedReader(metaclass=DummyObject): method __init__ (line 1191) | def __init__(self, *args, **kwargs): class TFDPRQuestionEncoder (line 1195) | class TFDPRQuestionEncoder(metaclass=DummyObject): method __init__ (line 1198) | def __init__(self, *args, **kwargs): class TFDPRReader (line 1202) | class TFDPRReader(metaclass=DummyObject): method __init__ (line 1205) | def __init__(self, *args, **kwargs): class TFElectraForMaskedLM (line 1209) | class TFElectraForMaskedLM(metaclass=DummyObject): method __init__ (line 1212) | def __init__(self, *args, **kwargs): class TFElectraForMultipleChoice (line 1216) | class TFElectraForMultipleChoice(metaclass=DummyObject): method __init__ (line 1219) | def __init__(self, *args, **kwargs): class TFElectraForPreTraining (line 1223) | class TFElectraForPreTraining(metaclass=DummyObject): method __init__ (line 1226) | def __init__(self, *args, **kwargs): class TFElectraForQuestionAnswering (line 1230) | class TFElectraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1233) | def __init__(self, *args, **kwargs): class TFElectraForSequenceClassification (line 1237) | class TFElectraForSequenceClassification(metaclass=DummyObject): method __init__ (line 1240) | def __init__(self, *args, **kwargs): class TFElectraForTokenClassification (line 1244) | class TFElectraForTokenClassification(metaclass=DummyObject): method __init__ (line 1247) | def __init__(self, *args, **kwargs): class TFElectraModel (line 1251) | class TFElectraModel(metaclass=DummyObject): method __init__ (line 1254) | def __init__(self, *args, **kwargs): class TFElectraPreTrainedModel (line 1258) | class TFElectraPreTrainedModel(metaclass=DummyObject): method __init__ (line 1261) | def __init__(self, *args, **kwargs): class TFEncoderDecoderModel (line 1265) | class TFEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 1268) | def __init__(self, *args, **kwargs): class TFEsmForMaskedLM (line 1272) | class TFEsmForMaskedLM(metaclass=DummyObject): method __init__ (line 1275) | def __init__(self, *args, **kwargs): class TFEsmForSequenceClassification (line 1279) | class TFEsmForSequenceClassification(metaclass=DummyObject): method __init__ (line 1282) | def __init__(self, *args, **kwargs): class TFEsmForTokenClassification (line 1286) | class TFEsmForTokenClassification(metaclass=DummyObject): method __init__ (line 1289) | def __init__(self, *args, **kwargs): class TFEsmModel (line 1293) | class TFEsmModel(metaclass=DummyObject): method __init__ (line 1296) | def __init__(self, *args, **kwargs): class TFEsmPreTrainedModel (line 1300) | class TFEsmPreTrainedModel(metaclass=DummyObject): method __init__ (line 1303) | def __init__(self, *args, **kwargs): class TFFlaubertForMultipleChoice (line 1307) | class TFFlaubertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1310) | def __init__(self, *args, **kwargs): class TFFlaubertForQuestionAnsweringSimple (line 1314) | class TFFlaubertForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 1317) | def __init__(self, *args, **kwargs): class TFFlaubertForSequenceClassification (line 1321) | class TFFlaubertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1324) | def __init__(self, *args, **kwargs): class TFFlaubertForTokenClassification (line 1328) | class TFFlaubertForTokenClassification(metaclass=DummyObject): method __init__ (line 1331) | def __init__(self, *args, **kwargs): class TFFlaubertModel (line 1335) | class TFFlaubertModel(metaclass=DummyObject): method __init__ (line 1338) | def __init__(self, *args, **kwargs): class TFFlaubertPreTrainedModel (line 1342) | class TFFlaubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1345) | def __init__(self, *args, **kwargs): class TFFlaubertWithLMHeadModel (line 1349) | class TFFlaubertWithLMHeadModel(metaclass=DummyObject): method __init__ (line 1352) | def __init__(self, *args, **kwargs): class TFFunnelBaseModel (line 1356) | class TFFunnelBaseModel(metaclass=DummyObject): method __init__ (line 1359) | def __init__(self, *args, **kwargs): class TFFunnelForMaskedLM (line 1363) | class TFFunnelForMaskedLM(metaclass=DummyObject): method __init__ (line 1366) | def __init__(self, *args, **kwargs): class TFFunnelForMultipleChoice (line 1370) | class TFFunnelForMultipleChoice(metaclass=DummyObject): method __init__ (line 1373) | def __init__(self, *args, **kwargs): class TFFunnelForPreTraining (line 1377) | class TFFunnelForPreTraining(metaclass=DummyObject): method __init__ (line 1380) | def __init__(self, *args, **kwargs): class TFFunnelForQuestionAnswering (line 1384) | class TFFunnelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1387) | def __init__(self, *args, **kwargs): class TFFunnelForSequenceClassification (line 1391) | class TFFunnelForSequenceClassification(metaclass=DummyObject): method __init__ (line 1394) | def __init__(self, *args, **kwargs): class TFFunnelForTokenClassification (line 1398) | class TFFunnelForTokenClassification(metaclass=DummyObject): method __init__ (line 1401) | def __init__(self, *args, **kwargs): class TFFunnelModel (line 1405) | class TFFunnelModel(metaclass=DummyObject): method __init__ (line 1408) | def __init__(self, *args, **kwargs): class TFFunnelPreTrainedModel (line 1412) | class TFFunnelPreTrainedModel(metaclass=DummyObject): method __init__ (line 1415) | def __init__(self, *args, **kwargs): class TFGPT2DoubleHeadsModel (line 1419) | class TFGPT2DoubleHeadsModel(metaclass=DummyObject): method __init__ (line 1422) | def __init__(self, *args, **kwargs): class TFGPT2ForSequenceClassification (line 1426) | class TFGPT2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 1429) | def __init__(self, *args, **kwargs): class TFGPT2LMHeadModel (line 1433) | class TFGPT2LMHeadModel(metaclass=DummyObject): method __init__ (line 1436) | def __init__(self, *args, **kwargs): class TFGPT2MainLayer (line 1440) | class TFGPT2MainLayer(metaclass=DummyObject): method __init__ (line 1443) | def __init__(self, *args, **kwargs): class TFGPT2Model (line 1447) | class TFGPT2Model(metaclass=DummyObject): method __init__ (line 1450) | def __init__(self, *args, **kwargs): class TFGPT2PreTrainedModel (line 1454) | class TFGPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1457) | def __init__(self, *args, **kwargs): class TFGPTJForCausalLM (line 1461) | class TFGPTJForCausalLM(metaclass=DummyObject): method __init__ (line 1464) | def __init__(self, *args, **kwargs): class TFGPTJForQuestionAnswering (line 1468) | class TFGPTJForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1471) | def __init__(self, *args, **kwargs): class TFGPTJForSequenceClassification (line 1475) | class TFGPTJForSequenceClassification(metaclass=DummyObject): method __init__ (line 1478) | def __init__(self, *args, **kwargs): class TFGPTJModel (line 1482) | class TFGPTJModel(metaclass=DummyObject): method __init__ (line 1485) | def __init__(self, *args, **kwargs): class TFGPTJPreTrainedModel (line 1489) | class TFGPTJPreTrainedModel(metaclass=DummyObject): method __init__ (line 1492) | def __init__(self, *args, **kwargs): class TFGroupViTModel (line 1496) | class TFGroupViTModel(metaclass=DummyObject): method __init__ (line 1499) | def __init__(self, *args, **kwargs): class TFGroupViTPreTrainedModel (line 1503) | class TFGroupViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1506) | def __init__(self, *args, **kwargs): class TFGroupViTTextModel (line 1510) | class TFGroupViTTextModel(metaclass=DummyObject): method __init__ (line 1513) | def __init__(self, *args, **kwargs): class TFGroupViTVisionModel (line 1517) | class TFGroupViTVisionModel(metaclass=DummyObject): method __init__ (line 1520) | def __init__(self, *args, **kwargs): class TFHubertForCTC (line 1524) | class TFHubertForCTC(metaclass=DummyObject): method __init__ (line 1527) | def __init__(self, *args, **kwargs): class TFHubertModel (line 1531) | class TFHubertModel(metaclass=DummyObject): method __init__ (line 1534) | def __init__(self, *args, **kwargs): class TFHubertPreTrainedModel (line 1538) | class TFHubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1541) | def __init__(self, *args, **kwargs): class TFIdeficsForVisionText2Text (line 1545) | class TFIdeficsForVisionText2Text(metaclass=DummyObject): method __init__ (line 1548) | def __init__(self, *args, **kwargs): class TFIdeficsModel (line 1552) | class TFIdeficsModel(metaclass=DummyObject): method __init__ (line 1555) | def __init__(self, *args, **kwargs): class TFIdeficsPreTrainedModel (line 1559) | class TFIdeficsPreTrainedModel(metaclass=DummyObject): method __init__ (line 1562) | def __init__(self, *args, **kwargs): class TFLayoutLMForMaskedLM (line 1566) | class TFLayoutLMForMaskedLM(metaclass=DummyObject): method __init__ (line 1569) | def __init__(self, *args, **kwargs): class TFLayoutLMForQuestionAnswering (line 1573) | class TFLayoutLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1576) | def __init__(self, *args, **kwargs): class TFLayoutLMForSequenceClassification (line 1580) | class TFLayoutLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 1583) | def __init__(self, *args, **kwargs): class TFLayoutLMForTokenClassification (line 1587) | class TFLayoutLMForTokenClassification(metaclass=DummyObject): method __init__ (line 1590) | def __init__(self, *args, **kwargs): class TFLayoutLMMainLayer (line 1594) | class TFLayoutLMMainLayer(metaclass=DummyObject): method __init__ (line 1597) | def __init__(self, *args, **kwargs): class TFLayoutLMModel (line 1601) | class TFLayoutLMModel(metaclass=DummyObject): method __init__ (line 1604) | def __init__(self, *args, **kwargs): class TFLayoutLMPreTrainedModel (line 1608) | class TFLayoutLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 1611) | def __init__(self, *args, **kwargs): class TFLayoutLMv3ForQuestionAnswering (line 1615) | class TFLayoutLMv3ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1618) | def __init__(self, *args, **kwargs): class TFLayoutLMv3ForSequenceClassification (line 1622) | class TFLayoutLMv3ForSequenceClassification(metaclass=DummyObject): method __init__ (line 1625) | def __init__(self, *args, **kwargs): class TFLayoutLMv3ForTokenClassification (line 1629) | class TFLayoutLMv3ForTokenClassification(metaclass=DummyObject): method __init__ (line 1632) | def __init__(self, *args, **kwargs): class TFLayoutLMv3Model (line 1636) | class TFLayoutLMv3Model(metaclass=DummyObject): method __init__ (line 1639) | def __init__(self, *args, **kwargs): class TFLayoutLMv3PreTrainedModel (line 1643) | class TFLayoutLMv3PreTrainedModel(metaclass=DummyObject): method __init__ (line 1646) | def __init__(self, *args, **kwargs): class TFLEDForConditionalGeneration (line 1650) | class TFLEDForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1653) | def __init__(self, *args, **kwargs): class TFLEDModel (line 1657) | class TFLEDModel(metaclass=DummyObject): method __init__ (line 1660) | def __init__(self, *args, **kwargs): class TFLEDPreTrainedModel (line 1664) | class TFLEDPreTrainedModel(metaclass=DummyObject): method __init__ (line 1667) | def __init__(self, *args, **kwargs): class TFLongformerForMaskedLM (line 1671) | class TFLongformerForMaskedLM(metaclass=DummyObject): method __init__ (line 1674) | def __init__(self, *args, **kwargs): class TFLongformerForMultipleChoice (line 1678) | class TFLongformerForMultipleChoice(metaclass=DummyObject): method __init__ (line 1681) | def __init__(self, *args, **kwargs): class TFLongformerForQuestionAnswering (line 1685) | class TFLongformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1688) | def __init__(self, *args, **kwargs): class TFLongformerForSequenceClassification (line 1692) | class TFLongformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 1695) | def __init__(self, *args, **kwargs): class TFLongformerForTokenClassification (line 1699) | class TFLongformerForTokenClassification(metaclass=DummyObject): method __init__ (line 1702) | def __init__(self, *args, **kwargs): class TFLongformerModel (line 1706) | class TFLongformerModel(metaclass=DummyObject): method __init__ (line 1709) | def __init__(self, *args, **kwargs): class TFLongformerPreTrainedModel (line 1713) | class TFLongformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1716) | def __init__(self, *args, **kwargs): class TFLongformerSelfAttention (line 1720) | class TFLongformerSelfAttention(metaclass=DummyObject): method __init__ (line 1723) | def __init__(self, *args, **kwargs): class TFLxmertForPreTraining (line 1727) | class TFLxmertForPreTraining(metaclass=DummyObject): method __init__ (line 1730) | def __init__(self, *args, **kwargs): class TFLxmertMainLayer (line 1734) | class TFLxmertMainLayer(metaclass=DummyObject): method __init__ (line 1737) | def __init__(self, *args, **kwargs): class TFLxmertModel (line 1741) | class TFLxmertModel(metaclass=DummyObject): method __init__ (line 1744) | def __init__(self, *args, **kwargs): class TFLxmertPreTrainedModel (line 1748) | class TFLxmertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1751) | def __init__(self, *args, **kwargs): class TFLxmertVisualFeatureEncoder (line 1755) | class TFLxmertVisualFeatureEncoder(metaclass=DummyObject): method __init__ (line 1758) | def __init__(self, *args, **kwargs): class TFMarianModel (line 1762) | class TFMarianModel(metaclass=DummyObject): method __init__ (line 1765) | def __init__(self, *args, **kwargs): class TFMarianMTModel (line 1769) | class TFMarianMTModel(metaclass=DummyObject): method __init__ (line 1772) | def __init__(self, *args, **kwargs): class TFMarianPreTrainedModel (line 1776) | class TFMarianPreTrainedModel(metaclass=DummyObject): method __init__ (line 1779) | def __init__(self, *args, **kwargs): class TFMBartForConditionalGeneration (line 1783) | class TFMBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1786) | def __init__(self, *args, **kwargs): class TFMBartModel (line 1790) | class TFMBartModel(metaclass=DummyObject): method __init__ (line 1793) | def __init__(self, *args, **kwargs): class TFMBartPreTrainedModel (line 1797) | class TFMBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 1800) | def __init__(self, *args, **kwargs): class TFMistralForCausalLM (line 1804) | class TFMistralForCausalLM(metaclass=DummyObject): method __init__ (line 1807) | def __init__(self, *args, **kwargs): class TFMistralForSequenceClassification (line 1811) | class TFMistralForSequenceClassification(metaclass=DummyObject): method __init__ (line 1814) | def __init__(self, *args, **kwargs): class TFMistralModel (line 1818) | class TFMistralModel(metaclass=DummyObject): method __init__ (line 1821) | def __init__(self, *args, **kwargs): class TFMistralPreTrainedModel (line 1825) | class TFMistralPreTrainedModel(metaclass=DummyObject): method __init__ (line 1828) | def __init__(self, *args, **kwargs): class TFMobileBertForMaskedLM (line 1832) | class TFMobileBertForMaskedLM(metaclass=DummyObject): method __init__ (line 1835) | def __init__(self, *args, **kwargs): class TFMobileBertForMultipleChoice (line 1839) | class TFMobileBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1842) | def __init__(self, *args, **kwargs): class TFMobileBertForNextSentencePrediction (line 1846) | class TFMobileBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 1849) | def __init__(self, *args, **kwargs): class TFMobileBertForPreTraining (line 1853) | class TFMobileBertForPreTraining(metaclass=DummyObject): method __init__ (line 1856) | def __init__(self, *args, **kwargs): class TFMobileBertForQuestionAnswering (line 1860) | class TFMobileBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1863) | def __init__(self, *args, **kwargs): class TFMobileBertForSequenceClassification (line 1867) | class TFMobileBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1870) | def __init__(self, *args, **kwargs): class TFMobileBertForTokenClassification (line 1874) | class TFMobileBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1877) | def __init__(self, *args, **kwargs): class TFMobileBertMainLayer (line 1881) | class TFMobileBertMainLayer(metaclass=DummyObject): method __init__ (line 1884) | def __init__(self, *args, **kwargs): class TFMobileBertModel (line 1888) | class TFMobileBertModel(metaclass=DummyObject): method __init__ (line 1891) | def __init__(self, *args, **kwargs): class TFMobileBertPreTrainedModel (line 1895) | class TFMobileBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1898) | def __init__(self, *args, **kwargs): class TFMobileViTForImageClassification (line 1902) | class TFMobileViTForImageClassification(metaclass=DummyObject): method __init__ (line 1905) | def __init__(self, *args, **kwargs): class TFMobileViTForSemanticSegmentation (line 1909) | class TFMobileViTForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 1912) | def __init__(self, *args, **kwargs): class TFMobileViTModel (line 1916) | class TFMobileViTModel(metaclass=DummyObject): method __init__ (line 1919) | def __init__(self, *args, **kwargs): class TFMobileViTPreTrainedModel (line 1923) | class TFMobileViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1926) | def __init__(self, *args, **kwargs): class TFMPNetForMaskedLM (line 1930) | class TFMPNetForMaskedLM(metaclass=DummyObject): method __init__ (line 1933) | def __init__(self, *args, **kwargs): class TFMPNetForMultipleChoice (line 1937) | class TFMPNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 1940) | def __init__(self, *args, **kwargs): class TFMPNetForQuestionAnswering (line 1944) | class TFMPNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1947) | def __init__(self, *args, **kwargs): class TFMPNetForSequenceClassification (line 1951) | class TFMPNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 1954) | def __init__(self, *args, **kwargs): class TFMPNetForTokenClassification (line 1958) | class TFMPNetForTokenClassification(metaclass=DummyObject): method __init__ (line 1961) | def __init__(self, *args, **kwargs): class TFMPNetMainLayer (line 1965) | class TFMPNetMainLayer(metaclass=DummyObject): method __init__ (line 1968) | def __init__(self, *args, **kwargs): class TFMPNetModel (line 1972) | class TFMPNetModel(metaclass=DummyObject): method __init__ (line 1975) | def __init__(self, *args, **kwargs): class TFMPNetPreTrainedModel (line 1979) | class TFMPNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 1982) | def __init__(self, *args, **kwargs): class TFMT5EncoderModel (line 1986) | class TFMT5EncoderModel(metaclass=DummyObject): method __init__ (line 1989) | def __init__(self, *args, **kwargs): class TFMT5ForConditionalGeneration (line 1993) | class TFMT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1996) | def __init__(self, *args, **kwargs): class TFMT5Model (line 2000) | class TFMT5Model(metaclass=DummyObject): method __init__ (line 2003) | def __init__(self, *args, **kwargs): class TFOpenAIGPTDoubleHeadsModel (line 2007) | class TFOpenAIGPTDoubleHeadsModel(metaclass=DummyObject): method __init__ (line 2010) | def __init__(self, *args, **kwargs): class TFOpenAIGPTForSequenceClassification (line 2014) | class TFOpenAIGPTForSequenceClassification(metaclass=DummyObject): method __init__ (line 2017) | def __init__(self, *args, **kwargs): class TFOpenAIGPTLMHeadModel (line 2021) | class TFOpenAIGPTLMHeadModel(metaclass=DummyObject): method __init__ (line 2024) | def __init__(self, *args, **kwargs): class TFOpenAIGPTMainLayer (line 2028) | class TFOpenAIGPTMainLayer(metaclass=DummyObject): method __init__ (line 2031) | def __init__(self, *args, **kwargs): class TFOpenAIGPTModel (line 2035) | class TFOpenAIGPTModel(metaclass=DummyObject): method __init__ (line 2038) | def __init__(self, *args, **kwargs): class TFOpenAIGPTPreTrainedModel (line 2042) | class TFOpenAIGPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2045) | def __init__(self, *args, **kwargs): class TFOPTForCausalLM (line 2049) | class TFOPTForCausalLM(metaclass=DummyObject): method __init__ (line 2052) | def __init__(self, *args, **kwargs): class TFOPTModel (line 2056) | class TFOPTModel(metaclass=DummyObject): method __init__ (line 2059) | def __init__(self, *args, **kwargs): class TFOPTPreTrainedModel (line 2063) | class TFOPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2066) | def __init__(self, *args, **kwargs): class TFPegasusForConditionalGeneration (line 2070) | class TFPegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2073) | def __init__(self, *args, **kwargs): class TFPegasusModel (line 2077) | class TFPegasusModel(metaclass=DummyObject): method __init__ (line 2080) | def __init__(self, *args, **kwargs): class TFPegasusPreTrainedModel (line 2084) | class TFPegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 2087) | def __init__(self, *args, **kwargs): class TFRagModel (line 2091) | class TFRagModel(metaclass=DummyObject): method __init__ (line 2094) | def __init__(self, *args, **kwargs): class TFRagPreTrainedModel (line 2098) | class TFRagPreTrainedModel(metaclass=DummyObject): method __init__ (line 2101) | def __init__(self, *args, **kwargs): class TFRagSequenceForGeneration (line 2105) | class TFRagSequenceForGeneration(metaclass=DummyObject): method __init__ (line 2108) | def __init__(self, *args, **kwargs): class TFRagTokenForGeneration (line 2112) | class TFRagTokenForGeneration(metaclass=DummyObject): method __init__ (line 2115) | def __init__(self, *args, **kwargs): class TFRegNetForImageClassification (line 2119) | class TFRegNetForImageClassification(metaclass=DummyObject): method __init__ (line 2122) | def __init__(self, *args, **kwargs): class TFRegNetModel (line 2126) | class TFRegNetModel(metaclass=DummyObject): method __init__ (line 2129) | def __init__(self, *args, **kwargs): class TFRegNetPreTrainedModel (line 2133) | class TFRegNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2136) | def __init__(self, *args, **kwargs): class TFRemBertForCausalLM (line 2140) | class TFRemBertForCausalLM(metaclass=DummyObject): method __init__ (line 2143) | def __init__(self, *args, **kwargs): class TFRemBertForMaskedLM (line 2147) | class TFRemBertForMaskedLM(metaclass=DummyObject): method __init__ (line 2150) | def __init__(self, *args, **kwargs): class TFRemBertForMultipleChoice (line 2154) | class TFRemBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 2157) | def __init__(self, *args, **kwargs): class TFRemBertForQuestionAnswering (line 2161) | class TFRemBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2164) | def __init__(self, *args, **kwargs): class TFRemBertForSequenceClassification (line 2168) | class TFRemBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 2171) | def __init__(self, *args, **kwargs): class TFRemBertForTokenClassification (line 2175) | class TFRemBertForTokenClassification(metaclass=DummyObject): method __init__ (line 2178) | def __init__(self, *args, **kwargs): class TFRemBertLayer (line 2182) | class TFRemBertLayer(metaclass=DummyObject): method __init__ (line 2185) | def __init__(self, *args, **kwargs): class TFRemBertModel (line 2189) | class TFRemBertModel(metaclass=DummyObject): method __init__ (line 2192) | def __init__(self, *args, **kwargs): class TFRemBertPreTrainedModel (line 2196) | class TFRemBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 2199) | def __init__(self, *args, **kwargs): class TFResNetForImageClassification (line 2203) | class TFResNetForImageClassification(metaclass=DummyObject): method __init__ (line 2206) | def __init__(self, *args, **kwargs): class TFResNetModel (line 2210) | class TFResNetModel(metaclass=DummyObject): method __init__ (line 2213) | def __init__(self, *args, **kwargs): class TFResNetPreTrainedModel (line 2217) | class TFResNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2220) | def __init__(self, *args, **kwargs): class TFRobertaForCausalLM (line 2224) | class TFRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 2227) | def __init__(self, *args, **kwargs): class TFRobertaForMaskedLM (line 2231) | class TFRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 2234) | def __init__(self, *args, **kwargs): class TFRobertaForMultipleChoice (line 2238) | class TFRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 2241) | def __init__(self, *args, **kwargs): class TFRobertaForQuestionAnswering (line 2245) | class TFRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2248) | def __init__(self, *args, **kwargs): class TFRobertaForSequenceClassification (line 2252) | class TFRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 2255) | def __init__(self, *args, **kwargs): class TFRobertaForTokenClassification (line 2259) | class TFRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 2262) | def __init__(self, *args, **kwargs): class TFRobertaMainLayer (line 2266) | class TFRobertaMainLayer(metaclass=DummyObject): method __init__ (line 2269) | def __init__(self, *args, **kwargs): class TFRobertaModel (line 2273) | class TFRobertaModel(metaclass=DummyObject): method __init__ (line 2276) | def __init__(self, *args, **kwargs): class TFRobertaPreTrainedModel (line 2280) | class TFRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2283) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForCausalLM (line 2287) | class TFRobertaPreLayerNormForCausalLM(metaclass=DummyObject): method __init__ (line 2290) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForMaskedLM (line 2294) | class TFRobertaPreLayerNormForMaskedLM(metaclass=DummyObject): method __init__ (line 2297) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForMultipleChoice (line 2301) | class TFRobertaPreLayerNormForMultipleChoice(metaclass=DummyObject): method __init__ (line 2304) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForQuestionAnswering (line 2308) | class TFRobertaPreLayerNormForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2311) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForSequenceClassification (line 2315) | class TFRobertaPreLayerNormForSequenceClassification(metaclass=DummyObje... method __init__ (line 2318) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForTokenClassification (line 2322) | class TFRobertaPreLayerNormForTokenClassification(metaclass=DummyObject): method __init__ (line 2325) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormMainLayer (line 2329) | class TFRobertaPreLayerNormMainLayer(metaclass=DummyObject): method __init__ (line 2332) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormModel (line 2336) | class TFRobertaPreLayerNormModel(metaclass=DummyObject): method __init__ (line 2339) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormPreTrainedModel (line 2343) | class TFRobertaPreLayerNormPreTrainedModel(metaclass=DummyObject): method __init__ (line 2346) | def __init__(self, *args, **kwargs): class TFRoFormerForCausalLM (line 2350) | class TFRoFormerForCausalLM(metaclass=DummyObject): method __init__ (line 2353) | def __init__(self, *args, **kwargs): class TFRoFormerForMaskedLM (line 2357) | class TFRoFormerForMaskedLM(metaclass=DummyObject): method __init__ (line 2360) | def __init__(self, *args, **kwargs): class TFRoFormerForMultipleChoice (line 2364) | class TFRoFormerForMultipleChoice(metaclass=DummyObject): method __init__ (line 2367) | def __init__(self, *args, **kwargs): class TFRoFormerForQuestionAnswering (line 2371) | class TFRoFormerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2374) | def __init__(self, *args, **kwargs): class TFRoFormerForSequenceClassification (line 2378) | class TFRoFormerForSequenceClassification(metaclass=DummyObject): method __init__ (line 2381) | def __init__(self, *args, **kwargs): class TFRoFormerForTokenClassification (line 2385) | class TFRoFormerForTokenClassification(metaclass=DummyObject): method __init__ (line 2388) | def __init__(self, *args, **kwargs): class TFRoFormerLayer (line 2392) | class TFRoFormerLayer(metaclass=DummyObject): method __init__ (line 2395) | def __init__(self, *args, **kwargs): class TFRoFormerModel (line 2399) | class TFRoFormerModel(metaclass=DummyObject): method __init__ (line 2402) | def __init__(self, *args, **kwargs): class TFRoFormerPreTrainedModel (line 2406) | class TFRoFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2409) | def __init__(self, *args, **kwargs): class TFSamModel (line 2413) | class TFSamModel(metaclass=DummyObject): method __init__ (line 2416) | def __init__(self, *args, **kwargs): class TFSamPreTrainedModel (line 2420) | class TFSamPreTrainedModel(metaclass=DummyObject): method __init__ (line 2423) | def __init__(self, *args, **kwargs): class TFSegformerDecodeHead (line 2427) | class TFSegformerDecodeHead(metaclass=DummyObject): method __init__ (line 2430) | def __init__(self, *args, **kwargs): class TFSegformerForImageClassification (line 2434) | class TFSegformerForImageClassification(metaclass=DummyObject): method __init__ (line 2437) | def __init__(self, *args, **kwargs): class TFSegformerForSemanticSegmentation (line 2441) | class TFSegformerForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 2444) | def __init__(self, *args, **kwargs): class TFSegformerModel (line 2448) | class TFSegformerModel(metaclass=DummyObject): method __init__ (line 2451) | def __init__(self, *args, **kwargs): class TFSegformerPreTrainedModel (line 2455) | class TFSegformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2458) | def __init__(self, *args, **kwargs): class TFSpeech2TextForConditionalGeneration (line 2462) | class TFSpeech2TextForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2465) | def __init__(self, *args, **kwargs): class TFSpeech2TextModel (line 2469) | class TFSpeech2TextModel(metaclass=DummyObject): method __init__ (line 2472) | def __init__(self, *args, **kwargs): class TFSpeech2TextPreTrainedModel (line 2476) | class TFSpeech2TextPreTrainedModel(metaclass=DummyObject): method __init__ (line 2479) | def __init__(self, *args, **kwargs): class TFSwiftFormerForImageClassification (line 2483) | class TFSwiftFormerForImageClassification(metaclass=DummyObject): method __init__ (line 2486) | def __init__(self, *args, **kwargs): class TFSwiftFormerModel (line 2490) | class TFSwiftFormerModel(metaclass=DummyObject): method __init__ (line 2493) | def __init__(self, *args, **kwargs): class TFSwiftFormerPreTrainedModel (line 2497) | class TFSwiftFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2500) | def __init__(self, *args, **kwargs): class TFSwinForImageClassification (line 2504) | class TFSwinForImageClassification(metaclass=DummyObject): method __init__ (line 2507) | def __init__(self, *args, **kwargs): class TFSwinForMaskedImageModeling (line 2511) | class TFSwinForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 2514) | def __init__(self, *args, **kwargs): class TFSwinModel (line 2518) | class TFSwinModel(metaclass=DummyObject): method __init__ (line 2521) | def __init__(self, *args, **kwargs): class TFSwinPreTrainedModel (line 2525) | class TFSwinPreTrainedModel(metaclass=DummyObject): method __init__ (line 2528) | def __init__(self, *args, **kwargs): class TFT5EncoderModel (line 2532) | class TFT5EncoderModel(metaclass=DummyObject): method __init__ (line 2535) | def __init__(self, *args, **kwargs): class TFT5ForConditionalGeneration (line 2539) | class TFT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2542) | def __init__(self, *args, **kwargs): class TFT5Model (line 2546) | class TFT5Model(metaclass=DummyObject): method __init__ (line 2549) | def __init__(self, *args, **kwargs): class TFT5PreTrainedModel (line 2553) | class TFT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 2556) | def __init__(self, *args, **kwargs): class TFTapasForMaskedLM (line 2560) | class TFTapasForMaskedLM(metaclass=DummyObject): method __init__ (line 2563) | def __init__(self, *args, **kwargs): class TFTapasForQuestionAnswering (line 2567) | class TFTapasForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2570) | def __init__(self, *args, **kwargs): class TFTapasForSequenceClassification (line 2574) | class TFTapasForSequenceClassification(metaclass=DummyObject): method __init__ (line 2577) | def __init__(self, *args, **kwargs): class TFTapasModel (line 2581) | class TFTapasModel(metaclass=DummyObject): method __init__ (line 2584) | def __init__(self, *args, **kwargs): class TFTapasPreTrainedModel (line 2588) | class TFTapasPreTrainedModel(metaclass=DummyObject): method __init__ (line 2591) | def __init__(self, *args, **kwargs): class TFVisionEncoderDecoderModel (line 2595) | class TFVisionEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 2598) | def __init__(self, *args, **kwargs): class TFVisionTextDualEncoderModel (line 2602) | class TFVisionTextDualEncoderModel(metaclass=DummyObject): method __init__ (line 2605) | def __init__(self, *args, **kwargs): class TFViTForImageClassification (line 2609) | class TFViTForImageClassification(metaclass=DummyObject): method __init__ (line 2612) | def __init__(self, *args, **kwargs): class TFViTModel (line 2616) | class TFViTModel(metaclass=DummyObject): method __init__ (line 2619) | def __init__(self, *args, **kwargs): class TFViTPreTrainedModel (line 2623) | class TFViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2626) | def __init__(self, *args, **kwargs): class TFViTMAEForPreTraining (line 2630) | class TFViTMAEForPreTraining(metaclass=DummyObject): method __init__ (line 2633) | def __init__(self, *args, **kwargs): class TFViTMAEModel (line 2637) | class TFViTMAEModel(metaclass=DummyObject): method __init__ (line 2640) | def __init__(self, *args, **kwargs): class TFViTMAEPreTrainedModel (line 2644) | class TFViTMAEPreTrainedModel(metaclass=DummyObject): method __init__ (line 2647) | def __init__(self, *args, **kwargs): class TFWav2Vec2ForCTC (line 2651) | class TFWav2Vec2ForCTC(metaclass=DummyObject): method __init__ (line 2654) | def __init__(self, *args, **kwargs): class TFWav2Vec2ForSequenceClassification (line 2658) | class TFWav2Vec2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 2661) | def __init__(self, *args, **kwargs): class TFWav2Vec2Model (line 2665) | class TFWav2Vec2Model(metaclass=DummyObject): method __init__ (line 2668) | def __init__(self, *args, **kwargs): class TFWav2Vec2PreTrainedModel (line 2672) | class TFWav2Vec2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2675) | def __init__(self, *args, **kwargs): class TFWhisperForConditionalGeneration (line 2679) | class TFWhisperForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2682) | def __init__(self, *args, **kwargs): class TFWhisperModel (line 2686) | class TFWhisperModel(metaclass=DummyObject): method __init__ (line 2689) | def __init__(self, *args, **kwargs): class TFWhisperPreTrainedModel (line 2693) | class TFWhisperPreTrainedModel(metaclass=DummyObject): method __init__ (line 2696) | def __init__(self, *args, **kwargs): class TFXGLMForCausalLM (line 2700) | class TFXGLMForCausalLM(metaclass=DummyObject): method __init__ (line 2703) | def __init__(self, *args, **kwargs): class TFXGLMModel (line 2707) | class TFXGLMModel(metaclass=DummyObject): method __init__ (line 2710) | def __init__(self, *args, **kwargs): class TFXGLMPreTrainedModel (line 2714) | class TFXGLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 2717) | def __init__(self, *args, **kwargs): class TFXLMForMultipleChoice (line 2721) | class TFXLMForMultipleChoice(metaclass=DummyObject): method __init__ (line 2724) | def __init__(self, *args, **kwargs): class TFXLMForQuestionAnsweringSimple (line 2728) | class TFXLMForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 2731) | def __init__(self, *args, **kwargs): class TFXLMForSequenceClassification (line 2735) | class TFXLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 2738) | def __init__(self, *args, **kwargs): class TFXLMForTokenClassification (line 2742) | class TFXLMForTokenClassification(metaclass=DummyObject): method __init__ (line 2745) | def __init__(self, *args, **kwargs): class TFXLMMainLayer (line 2749) | class TFXLMMainLayer(metaclass=DummyObject): method __init__ (line 2752) | def __init__(self, *args, **kwargs): class TFXLMModel (line 2756) | class TFXLMModel(metaclass=DummyObject): method __init__ (line 2759) | def __init__(self, *args, **kwargs): class TFXLMPreTrainedModel (line 2763) | class TFXLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 2766) | def __init__(self, *args, **kwargs): class TFXLMWithLMHeadModel (line 2770) | class TFXLMWithLMHeadModel(metaclass=DummyObject): method __init__ (line 2773) | def __init__(self, *args, **kwargs): class TFXLMRobertaForCausalLM (line 2777) | class TFXLMRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 2780) | def __init__(self, *args, **kwargs): class TFXLMRobertaForMaskedLM (line 2784) | class TFXLMRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 2787) | def __init__(self, *args, **kwargs): class TFXLMRobertaForMultipleChoice (line 2791) | class TFXLMRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 2794) | def __init__(self, *args, **kwargs): class TFXLMRobertaForQuestionAnswering (line 2798) | class TFXLMRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2801) | def __init__(self, *args, **kwargs): class TFXLMRobertaForSequenceClassification (line 2805) | class TFXLMRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 2808) | def __init__(self, *args, **kwargs): class TFXLMRobertaForTokenClassification (line 2812) | class TFXLMRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 2815) | def __init__(self, *args, **kwargs): class TFXLMRobertaModel (line 2819) | class TFXLMRobertaModel(metaclass=DummyObject): method __init__ (line 2822) | def __init__(self, *args, **kwargs): class TFXLMRobertaPreTrainedModel (line 2826) | class TFXLMRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2829) | def __init__(self, *args, **kwargs): class TFXLNetForMultipleChoice (line 2833) | class TFXLNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 2836) | def __init__(self, *args, **kwargs): class TFXLNetForQuestionAnsweringSimple (line 2840) | class TFXLNetForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 2843) | def __init__(self, *args, **kwargs): class TFXLNetForSequenceClassification (line 2847) | class TFXLNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 2850) | def __init__(self, *args, **kwargs): class TFXLNetForTokenClassification (line 2854) | class TFXLNetForTokenClassification(metaclass=DummyObject): method __init__ (line 2857) | def __init__(self, *args, **kwargs): class TFXLNetLMHeadModel (line 2861) | class TFXLNetLMHeadModel(metaclass=DummyObject): method __init__ (line 2864) | def __init__(self, *args, **kwargs): class TFXLNetMainLayer (line 2868) | class TFXLNetMainLayer(metaclass=DummyObject): method __init__ (line 2871) | def __init__(self, *args, **kwargs): class TFXLNetModel (line 2875) | class TFXLNetModel(metaclass=DummyObject): method __init__ (line 2878) | def __init__(self, *args, **kwargs): class TFXLNetPreTrainedModel (line 2882) | class TFXLNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2885) | def __init__(self, *args, **kwargs): class AdamWeightDecay (line 2889) | class AdamWeightDecay(metaclass=DummyObject): method __init__ (line 2892) | def __init__(self, *args, **kwargs): class GradientAccumulator (line 2896) | class GradientAccumulator(metaclass=DummyObject): method __init__ (line 2899) | def __init__(self, *args, **kwargs): class WarmUp (line 2903) | class WarmUp(metaclass=DummyObject): method __init__ (line 2906) | def __init__(self, *args, **kwargs): function create_optimizer (line 2910) | def create_optimizer(*args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/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 CodeLlamaTokenizerFast (line 75) | class CodeLlamaTokenizerFast(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class CodeGenTokenizerFast (line 82) | class CodeGenTokenizerFast(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class CohereTokenizerFast (line 89) | class CohereTokenizerFast(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class ConvBertTokenizerFast (line 96) | class ConvBertTokenizerFast(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class CpmTokenizerFast (line 103) | class CpmTokenizerFast(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class DebertaTokenizerFast (line 110) | class DebertaTokenizerFast(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class DebertaV2TokenizerFast (line 117) | class DebertaV2TokenizerFast(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class RealmTokenizerFast (line 124) | class RealmTokenizerFast(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class RetriBertTokenizerFast (line 131) | class RetriBertTokenizerFast(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class DistilBertTokenizerFast (line 138) | class DistilBertTokenizerFast(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class DPRContextEncoderTokenizerFast (line 145) | class DPRContextEncoderTokenizerFast(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class DPRQuestionEncoderTokenizerFast (line 152) | class DPRQuestionEncoderTokenizerFast(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class DPRReaderTokenizerFast (line 159) | class DPRReaderTokenizerFast(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): class ElectraTokenizerFast (line 166) | class ElectraTokenizerFast(metaclass=DummyObject): method __init__ (line 169) | def __init__(self, *args, **kwargs): class FNetTokenizerFast (line 173) | class FNetTokenizerFast(metaclass=DummyObject): method __init__ (line 176) | def __init__(self, *args, **kwargs): class FunnelTokenizerFast (line 180) | class FunnelTokenizerFast(metaclass=DummyObject): method __init__ (line 183) | def __init__(self, *args, **kwargs): class GemmaTokenizerFast (line 187) | class GemmaTokenizerFast(metaclass=DummyObject): method __init__ (line 190) | def __init__(self, *args, **kwargs): class GPT2TokenizerFast (line 194) | class GPT2TokenizerFast(metaclass=DummyObject): method __init__ (line 197) | def __init__(self, *args, **kwargs): class GPTNeoXTokenizerFast (line 201) | class GPTNeoXTokenizerFast(metaclass=DummyObject): method __init__ (line 204) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseTokenizer (line 208) | class GPTNeoXJapaneseTokenizer(metaclass=DummyObject): method __init__ (line 211) | def __init__(self, *args, **kwargs): class HerbertTokenizerFast (line 215) | class HerbertTokenizerFast(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): class LayoutLMTokenizerFast (line 222) | class LayoutLMTokenizerFast(metaclass=DummyObject): method __init__ (line 225) | def __init__(self, *args, **kwargs): class LayoutLMv2TokenizerFast (line 229) | class LayoutLMv2TokenizerFast(metaclass=DummyObject): method __init__ (line 232) | def __init__(self, *args, **kwargs): class LayoutLMv3TokenizerFast (line 236) | class LayoutLMv3TokenizerFast(metaclass=DummyObject): method __init__ (line 239) | def __init__(self, *args, **kwargs): class LayoutXLMTokenizerFast (line 243) | class LayoutXLMTokenizerFast(metaclass=DummyObject): method __init__ (line 246) | def __init__(self, *args, **kwargs): class LEDTokenizerFast (line 250) | class LEDTokenizerFast(metaclass=DummyObject): method __init__ (line 253) | def __init__(self, *args, **kwargs): class LlamaTokenizerFast (line 257) | class LlamaTokenizerFast(metaclass=DummyObject): method __init__ (line 260) | def __init__(self, *args, **kwargs): class LongformerTokenizerFast (line 264) | class LongformerTokenizerFast(metaclass=DummyObject): method __init__ (line 267) | def __init__(self, *args, **kwargs): class LxmertTokenizerFast (line 271) | class LxmertTokenizerFast(metaclass=DummyObject): method __init__ (line 274) | def __init__(self, *args, **kwargs): class MarkupLMTokenizerFast (line 278) | class MarkupLMTokenizerFast(metaclass=DummyObject): method __init__ (line 281) | def __init__(self, *args, **kwargs): class MBartTokenizerFast (line 285) | class MBartTokenizerFast(metaclass=DummyObject): method __init__ (line 288) | def __init__(self, *args, **kwargs): class MBart50TokenizerFast (line 292) | class MBart50TokenizerFast(metaclass=DummyObject): method __init__ (line 295) | def __init__(self, *args, **kwargs): class MobileBertTokenizerFast (line 299) | class MobileBertTokenizerFast(metaclass=DummyObject): method __init__ (line 302) | def __init__(self, *args, **kwargs): class MPNetTokenizerFast (line 306) | class MPNetTokenizerFast(metaclass=DummyObject): method __init__ (line 309) | def __init__(self, *args, **kwargs): class MT5TokenizerFast (line 313) | class MT5TokenizerFast(metaclass=DummyObject): method __init__ (line 316) | def __init__(self, *args, **kwargs): class MvpTokenizerFast (line 320) | class MvpTokenizerFast(metaclass=DummyObject): method __init__ (line 323) | def __init__(self, *args, **kwargs): class NllbTokenizerFast (line 327) | class NllbTokenizerFast(metaclass=DummyObject): method __init__ (line 330) | def __init__(self, *args, **kwargs): class NougatTokenizerFast (line 334) | class NougatTokenizerFast(metaclass=DummyObject): method __init__ (line 337) | def __init__(self, *args, **kwargs): class OpenAIGPTTokenizerFast (line 341) | class OpenAIGPTTokenizerFast(metaclass=DummyObject): method __init__ (line 344) | def __init__(self, *args, **kwargs): class PegasusTokenizerFast (line 348) | class PegasusTokenizerFast(metaclass=DummyObject): method __init__ (line 351) | def __init__(self, *args, **kwargs): class Qwen2TokenizerFast (line 355) | class Qwen2TokenizerFast(metaclass=DummyObject): method __init__ (line 358) | def __init__(self, *args, **kwargs): class ReformerTokenizerFast (line 362) | class ReformerTokenizerFast(metaclass=DummyObject): method __init__ (line 365) | def __init__(self, *args, **kwargs): class RemBertTokenizerFast (line 369) | class RemBertTokenizerFast(metaclass=DummyObject): method __init__ (line 372) | def __init__(self, *args, **kwargs): class RobertaTokenizerFast (line 376) | class RobertaTokenizerFast(metaclass=DummyObject): method __init__ (line 379) | def __init__(self, *args, **kwargs): class RoFormerTokenizerFast (line 383) | class RoFormerTokenizerFast(metaclass=DummyObject): method __init__ (line 386) | def __init__(self, *args, **kwargs): class SeamlessM4TTokenizerFast (line 390) | class SeamlessM4TTokenizerFast(metaclass=DummyObject): method __init__ (line 393) | def __init__(self, *args, **kwargs): class SplinterTokenizerFast (line 397) | class SplinterTokenizerFast(metaclass=DummyObject): method __init__ (line 400) | def __init__(self, *args, **kwargs): class SqueezeBertTokenizerFast (line 404) | class SqueezeBertTokenizerFast(metaclass=DummyObject): method __init__ (line 407) | def __init__(self, *args, **kwargs): class T5TokenizerFast (line 411) | class T5TokenizerFast(metaclass=DummyObject): method __init__ (line 414) | def __init__(self, *args, **kwargs): class UdopTokenizerFast (line 418) | class UdopTokenizerFast(metaclass=DummyObject): method __init__ (line 421) | def __init__(self, *args, **kwargs): class WhisperTokenizerFast (line 425) | class WhisperTokenizerFast(metaclass=DummyObject): method __init__ (line 428) | def __init__(self, *args, **kwargs): class XGLMTokenizerFast (line 432) | class XGLMTokenizerFast(metaclass=DummyObject): method __init__ (line 435) | def __init__(self, *args, **kwargs): class XLMRobertaTokenizerFast (line 439) | class XLMRobertaTokenizerFast(metaclass=DummyObject): method __init__ (line 442) | def __init__(self, *args, **kwargs): class XLNetTokenizerFast (line 446) | class XLNetTokenizerFast(metaclass=DummyObject): method __init__ (line 449) | def __init__(self, *args, **kwargs): class PreTrainedTokenizerFast (line 453) | class PreTrainedTokenizerFast(metaclass=DummyObject): method __init__ (line 456) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/dummy_torchaudio_objects.py class MusicgenMelodyFeatureExtractor (line 5) | class MusicgenMelodyFeatureExtractor(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class MusicgenMelodyProcessor (line 12) | class MusicgenMelodyProcessor(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/dummy_torchvision_objects.py class BaseImageProcessorFast (line 5) | class BaseImageProcessorFast(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class ViTImageProcessorFast (line 12) | class ViTImageProcessorFast(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/dummy_vision_objects.py class ImageProcessingMixin (line 5) | class ImageProcessingMixin(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class BaseImageProcessor (line 12) | class BaseImageProcessor(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): class ImageFeatureExtractionMixin (line 19) | class ImageFeatureExtractionMixin(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class BeitFeatureExtractor (line 26) | class BeitFeatureExtractor(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class BeitImageProcessor (line 33) | class BeitImageProcessor(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class BitImageProcessor (line 40) | class BitImageProcessor(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class BlipImageProcessor (line 47) | class BlipImageProcessor(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class BridgeTowerImageProcessor (line 54) | class BridgeTowerImageProcessor(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class ChameleonImageProcessor (line 61) | class ChameleonImageProcessor(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class ChineseCLIPFeatureExtractor (line 68) | class ChineseCLIPFeatureExtractor(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class ChineseCLIPImageProcessor (line 75) | class ChineseCLIPImageProcessor(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class CLIPFeatureExtractor (line 82) | class CLIPFeatureExtractor(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class CLIPImageProcessor (line 89) | class CLIPImageProcessor(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class ConditionalDetrFeatureExtractor (line 96) | class ConditionalDetrFeatureExtractor(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class ConditionalDetrImageProcessor (line 103) | class ConditionalDetrImageProcessor(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class ConvNextFeatureExtractor (line 110) | class ConvNextFeatureExtractor(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class ConvNextImageProcessor (line 117) | class ConvNextImageProcessor(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class DeformableDetrFeatureExtractor (line 124) | class DeformableDetrFeatureExtractor(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class DeformableDetrImageProcessor (line 131) | class DeformableDetrImageProcessor(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class DeiTFeatureExtractor (line 138) | class DeiTFeatureExtractor(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class DeiTImageProcessor (line 145) | class DeiTImageProcessor(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class DetaImageProcessor (line 152) | class DetaImageProcessor(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class EfficientFormerImageProcessor (line 159) | class EfficientFormerImageProcessor(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): class TvltImageProcessor (line 166) | class TvltImageProcessor(metaclass=DummyObject): method __init__ (line 169) | def __init__(self, *args, **kwargs): class ViTHybridImageProcessor (line 173) | class ViTHybridImageProcessor(metaclass=DummyObject): method __init__ (line 176) | def __init__(self, *args, **kwargs): class DetrFeatureExtractor (line 180) | class DetrFeatureExtractor(metaclass=DummyObject): method __init__ (line 183) | def __init__(self, *args, **kwargs): class DetrImageProcessor (line 187) | class DetrImageProcessor(metaclass=DummyObject): method __init__ (line 190) | def __init__(self, *args, **kwargs): class DonutFeatureExtractor (line 194) | class DonutFeatureExtractor(metaclass=DummyObject): method __init__ (line 197) | def __init__(self, *args, **kwargs): class DonutImageProcessor (line 201) | class DonutImageProcessor(metaclass=DummyObject): method __init__ (line 204) | def __init__(self, *args, **kwargs): class DPTFeatureExtractor (line 208) | class DPTFeatureExtractor(metaclass=DummyObject): method __init__ (line 211) | def __init__(self, *args, **kwargs): class DPTImageProcessor (line 215) | class DPTImageProcessor(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): class EfficientNetImageProcessor (line 222) | class EfficientNetImageProcessor(metaclass=DummyObject): method __init__ (line 225) | def __init__(self, *args, **kwargs): class FlavaFeatureExtractor (line 229) | class FlavaFeatureExtractor(metaclass=DummyObject): method __init__ (line 232) | def __init__(self, *args, **kwargs): class FlavaImageProcessor (line 236) | class FlavaImageProcessor(metaclass=DummyObject): method __init__ (line 239) | def __init__(self, *args, **kwargs): class FlavaProcessor (line 243) | class FlavaProcessor(metaclass=DummyObject): method __init__ (line 246) | def __init__(self, *args, **kwargs): class FuyuImageProcessor (line 250) | class FuyuImageProcessor(metaclass=DummyObject): method __init__ (line 253) | def __init__(self, *args, **kwargs): class FuyuProcessor (line 257) | class FuyuProcessor(metaclass=DummyObject): method __init__ (line 260) | def __init__(self, *args, **kwargs): class GLPNFeatureExtractor (line 264) | class GLPNFeatureExtractor(metaclass=DummyObject): method __init__ (line 267) | def __init__(self, *args, **kwargs): class GLPNImageProcessor (line 271) | class GLPNImageProcessor(metaclass=DummyObject): method __init__ (line 274) | def __init__(self, *args, **kwargs): class GroundingDinoImageProcessor (line 278) | class GroundingDinoImageProcessor(metaclass=DummyObject): method __init__ (line 281) | def __init__(self, *args, **kwargs): class IdeficsImageProcessor (line 285) | class IdeficsImageProcessor(metaclass=DummyObject): method __init__ (line 288) | def __init__(self, *args, **kwargs): class Idefics2ImageProcessor (line 292) | class Idefics2ImageProcessor(metaclass=DummyObject): method __init__ (line 295) | def __init__(self, *args, **kwargs): class ImageGPTFeatureExtractor (line 299) | class ImageGPTFeatureExtractor(metaclass=DummyObject): method __init__ (line 302) | def __init__(self, *args, **kwargs): class ImageGPTImageProcessor (line 306) | class ImageGPTImageProcessor(metaclass=DummyObject): method __init__ (line 309) | def __init__(self, *args, **kwargs): class InstructBlipVideoImageProcessor (line 313) | class InstructBlipVideoImageProcessor(metaclass=DummyObject): method __init__ (line 316) | def __init__(self, *args, **kwargs): class LayoutLMv2FeatureExtractor (line 320) | class LayoutLMv2FeatureExtractor(metaclass=DummyObject): method __init__ (line 323) | def __init__(self, *args, **kwargs): class LayoutLMv2ImageProcessor (line 327) | class LayoutLMv2ImageProcessor(metaclass=DummyObject): method __init__ (line 330) | def __init__(self, *args, **kwargs): class LayoutLMv3FeatureExtractor (line 334) | class LayoutLMv3FeatureExtractor(metaclass=DummyObject): method __init__ (line 337) | def __init__(self, *args, **kwargs): class LayoutLMv3ImageProcessor (line 341) | class LayoutLMv3ImageProcessor(metaclass=DummyObject): method __init__ (line 344) | def __init__(self, *args, **kwargs): class LevitFeatureExtractor (line 348) | class LevitFeatureExtractor(metaclass=DummyObject): method __init__ (line 351) | def __init__(self, *args, **kwargs): class LevitImageProcessor (line 355) | class LevitImageProcessor(metaclass=DummyObject): method __init__ (line 358) | def __init__(self, *args, **kwargs): class LlavaNextImageProcessor (line 362) | class LlavaNextImageProcessor(metaclass=DummyObject): method __init__ (line 365) | def __init__(self, *args, **kwargs): class LlavaNextVideoImageProcessor (line 369) | class LlavaNextVideoImageProcessor(metaclass=DummyObject): method __init__ (line 372) | def __init__(self, *args, **kwargs): class Mask2FormerImageProcessor (line 376) | class Mask2FormerImageProcessor(metaclass=DummyObject): method __init__ (line 379) | def __init__(self, *args, **kwargs): class MaskFormerFeatureExtractor (line 383) | class MaskFormerFeatureExtractor(metaclass=DummyObject): method __init__ (line 386) | def __init__(self, *args, **kwargs): class MaskFormerImageProcessor (line 390) | class MaskFormerImageProcessor(metaclass=DummyObject): method __init__ (line 393) | def __init__(self, *args, **kwargs): class MobileNetV1FeatureExtractor (line 397) | class MobileNetV1FeatureExtractor(metaclass=DummyObject): method __init__ (line 400) | def __init__(self, *args, **kwargs): class MobileNetV1ImageProcessor (line 404) | class MobileNetV1ImageProcessor(metaclass=DummyObject): method __init__ (line 407) | def __init__(self, *args, **kwargs): class MobileNetV2FeatureExtractor (line 411) | class MobileNetV2FeatureExtractor(metaclass=DummyObject): method __init__ (line 414) | def __init__(self, *args, **kwargs): class MobileNetV2ImageProcessor (line 418) | class MobileNetV2ImageProcessor(metaclass=DummyObject): method __init__ (line 421) | def __init__(self, *args, **kwargs): class MobileViTFeatureExtractor (line 425) | class MobileViTFeatureExtractor(metaclass=DummyObject): method __init__ (line 428) | def __init__(self, *args, **kwargs): class MobileViTImageProcessor (line 432) | class MobileViTImageProcessor(metaclass=DummyObject): method __init__ (line 435) | def __init__(self, *args, **kwargs): class NougatImageProcessor (line 439) | class NougatImageProcessor(metaclass=DummyObject): method __init__ (line 442) | def __init__(self, *args, **kwargs): class OneFormerImageProcessor (line 446) | class OneFormerImageProcessor(metaclass=DummyObject): method __init__ (line 449) | def __init__(self, *args, **kwargs): class Owlv2ImageProcessor (line 453) | class Owlv2ImageProcessor(metaclass=DummyObject): method __init__ (line 456) | def __init__(self, *args, **kwargs): class OwlViTFeatureExtractor (line 460) | class OwlViTFeatureExtractor(metaclass=DummyObject): method __init__ (line 463) | def __init__(self, *args, **kwargs): class OwlViTImageProcessor (line 467) | class OwlViTImageProcessor(metaclass=DummyObject): method __init__ (line 470) | def __init__(self, *args, **kwargs): class PerceiverFeatureExtractor (line 474) | class PerceiverFeatureExtractor(metaclass=DummyObject): method __init__ (line 477) | def __init__(self, *args, **kwargs): class PerceiverImageProcessor (line 481) | class PerceiverImageProcessor(metaclass=DummyObject): method __init__ (line 484) | def __init__(self, *args, **kwargs): class Pix2StructImageProcessor (line 488) | class Pix2StructImageProcessor(metaclass=DummyObject): method __init__ (line 491) | def __init__(self, *args, **kwargs): class PoolFormerFeatureExtractor (line 495) | class PoolFormerFeatureExtractor(metaclass=DummyObject): method __init__ (line 498) | def __init__(self, *args, **kwargs): class PoolFormerImageProcessor (line 502) | class PoolFormerImageProcessor(metaclass=DummyObject): method __init__ (line 505) | def __init__(self, *args, **kwargs): class PvtImageProcessor (line 509) | class PvtImageProcessor(metaclass=DummyObject): method __init__ (line 512) | def __init__(self, *args, **kwargs): class RTDetrImageProcessor (line 516) | class RTDetrImageProcessor(metaclass=DummyObject): method __init__ (line 519) | def __init__(self, *args, **kwargs): class SamImageProcessor (line 523) | class SamImageProcessor(metaclass=DummyObject): method __init__ (line 526) | def __init__(self, *args, **kwargs): class SegformerFeatureExtractor (line 530) | class SegformerFeatureExtractor(metaclass=DummyObject): method __init__ (line 533) | def __init__(self, *args, **kwargs): class SegformerImageProcessor (line 537) | class SegformerImageProcessor(metaclass=DummyObject): method __init__ (line 540) | def __init__(self, *args, **kwargs): class SegGptImageProcessor (line 544) | class SegGptImageProcessor(metaclass=DummyObject): method __init__ (line 547) | def __init__(self, *args, **kwargs): class SiglipImageProcessor (line 551) | class SiglipImageProcessor(metaclass=DummyObject): method __init__ (line 554) | def __init__(self, *args, **kwargs): class SuperPointImageProcessor (line 558) | class SuperPointImageProcessor(metaclass=DummyObject): method __init__ (line 561) | def __init__(self, *args, **kwargs): class Swin2SRImageProcessor (line 565) | class Swin2SRImageProcessor(metaclass=DummyObject): method __init__ (line 568) | def __init__(self, *args, **kwargs): class TvpImageProcessor (line 572) | class TvpImageProcessor(metaclass=DummyObject): method __init__ (line 575) | def __init__(self, *args, **kwargs): class VideoLlavaImageProcessor (line 579) | class VideoLlavaImageProcessor(metaclass=DummyObject): method __init__ (line 582) | def __init__(self, *args, **kwargs): class VideoMAEFeatureExtractor (line 586) | class VideoMAEFeatureExtractor(metaclass=DummyObject): method __init__ (line 589) | def __init__(self, *args, **kwargs): class VideoMAEImageProcessor (line 593) | class VideoMAEImageProcessor(metaclass=DummyObject): method __init__ (line 596) | def __init__(self, *args, **kwargs): class ViltFeatureExtractor (line 600) | class ViltFeatureExtractor(metaclass=DummyObject): method __init__ (line 603) | def __init__(self, *args, **kwargs): class ViltImageProcessor (line 607) | class ViltImageProcessor(metaclass=DummyObject): method __init__ (line 610) | def __init__(self, *args, **kwargs): class ViltProcessor (line 614) | class ViltProcessor(metaclass=DummyObject): method __init__ (line 617) | def __init__(self, *args, **kwargs): class ViTFeatureExtractor (line 621) | class ViTFeatureExtractor(metaclass=DummyObject): method __init__ (line 624) | def __init__(self, *args, **kwargs): class ViTImageProcessor (line 628) | class ViTImageProcessor(metaclass=DummyObject): method __init__ (line 631) | def __init__(self, *args, **kwargs): class VitMatteImageProcessor (line 635) | class VitMatteImageProcessor(metaclass=DummyObject): method __init__ (line 638) | def __init__(self, *args, **kwargs): class VivitImageProcessor (line 642) | class VivitImageProcessor(metaclass=DummyObject): method __init__ (line 645) | def __init__(self, *args, **kwargs): class YolosFeatureExtractor (line 649) | class YolosFeatureExtractor(metaclass=DummyObject): method __init__ (line 652) | def __init__(self, *args, **kwargs): class YolosImageProcessor (line 656) | class YolosImageProcessor(metaclass=DummyObject): method __init__ (line 659) | def __init__(self, *args, **kwargs): class ZoeDepthImageProcessor (line 663) | class ZoeDepthImageProcessor(metaclass=DummyObject): method __init__ (line 666) | def __init__(self, *args, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/fx.py function _generate_supported_model_class_names (line 81) | def _generate_supported_model_class_names( function torch_nn_embedding (line 205) | def torch_nn_embedding(self, input): function torch_nn_functional_embedding (line 209) | def torch_nn_functional_embedding( function torch_nn_layernorm (line 215) | def torch_nn_layernorm(self, input): function torch_nn_groupnorm (line 219) | def torch_nn_groupnorm(self, input): function torch_nn_linear (line 223) | def torch_nn_linear(self, input): function torch_relu (line 227) | def torch_relu(x): function torch_nn_relu (line 231) | def torch_nn_relu(self, x): function torch_nn_functional_relu (line 235) | def torch_nn_functional_relu(x, inplace=False): function torch_where (line 241) | def torch_where(condition, x, y): function torch_abs (line 247) | def torch_abs(input, *, out=None): function torch_arange (line 253) | def torch_arange(*args, **kwargs): function torch_full (line 274) | def torch_full(*args, **kwargs): function torch_cat (line 286) | def torch_cat(tensors, dim=None, axis=None, *, out=None): function torch_stack (line 300) | def torch_stack(tensors, dim=None, axis=None, *, out=None): function torch_add (line 312) | def torch_add(input, other, *, alpha=1, out=None): function torch_mul (line 326) | def torch_mul(input, other, *, out=None): function torch_tensor_mul (line 330) | def torch_tensor_mul(self, other): function torch_matmul (line 334) | def torch_matmul(input, other, *, out=None): function torch_bmm (line 370) | def torch_bmm(input, mat2, *, out=None): function torch_baddbmm (line 378) | def torch_baddbmm(input, batch1, batch2, *, beta=1, alpha=1, out=None): function torch_tensor_baddbmm (line 384) | def torch_tensor_baddbmm(self, batch1, batch2, *, beta=1, alpha=1, out=N... function torch_einsum (line 388) | def torch_einsum(equation, *operands): function torch_tensor_repeat (line 394) | def torch_tensor_repeat(self, *sizes): function torch_repeat_interleave (line 401) | def torch_repeat_interleave(*args, dim=None, output_size=None): function torch_index_select (line 421) | def torch_index_select(input, dim, index, *, out=None): function torch_tensor_index_select (line 427) | def torch_tensor_index_select(self, dim, index): function torch_gather (line 431) | def torch_gather(input, dim, index, *, sparse_grad=False, out=None): function torch_tensor_gather (line 437) | def torch_tensor_gather(self, dim, index): function torch_roll (line 441) | def torch_roll(input, shifts, dims=None): function torch_flip (line 445) | def torch_flip(input, dims): function torch_tensor_flip (line 449) | def torch_tensor_flip(self, dims): function torch_nn_conv1d (line 453) | def torch_nn_conv1d(self, input): function torch_nn_conv2d (line 471) | def torch_nn_conv2d(self, input): function torch_squeeze (line 492) | def torch_squeeze(input, dim=None): function torch_tensor_squeeze (line 509) | def torch_tensor_squeeze(self, dim=None): function torch_unsqueeze (line 513) | def torch_unsqueeze(input, dim): function torch_tensor_unsqueeze (line 521) | def torch_tensor_unsqueeze(self, dim): function torch_unique_consecutive (line 525) | def torch_unique_consecutive(input, **kwargs): function torch_nn_functional_one_hot (line 533) | def torch_nn_functional_one_hot(tensor, num_classes=-1): function torch_nn_functional_scaled_dot_product_attention (line 540) | def torch_nn_functional_scaled_dot_product_attention( function torch_nn_mseloss (line 548) | def torch_nn_mseloss(self, input, target): function torch_nn_crossentropyloss (line 556) | def torch_nn_crossentropyloss(self, input, target): function torch_nn_bcewithlogitsloss (line 564) | def torch_nn_bcewithlogitsloss(self, input, target): function operator_getitem (line 572) | def operator_getitem(a, b): class HFProxy (line 643) | class HFProxy(Proxy): method install_metadata (line 648) | def install_metadata(self, metadata): method shape (line 652) | def shape(self): method device (line 656) | def device(self): method __len__ (line 661) | def __len__(self): method __bool__ (line 666) | def __bool__(self): method __getattr__ (line 671) | def __getattr__(self, k): method __setitem__ (line 678) | def __setitem__(self, indices, values): method __contains__ (line 681) | def __contains__(self, key): class HFAttribute (line 687) | class HFAttribute(HFProxy): method __init__ (line 688) | def __init__(self, root, attr: str): method node (line 698) | def node(self): method __call__ (line 705) | def __call__(self, *args, **kwargs): class MetaDeviceAttribute (line 709) | class MetaDeviceAttribute(HFAttribute): class HFCacheProxy (line 713) | class HFCacheProxy(HFProxy): method install_orig_cache_cls (line 718) | def install_orig_cache_cls(self, orig_cache_cls: Type[Cache]): method __class__ (line 722) | def __class__(self): function create_wrapper (line 728) | def create_wrapper( class HFProxyableClassMeta (line 764) | class HFProxyableClassMeta(type): method __new__ (line 769) | def __new__( function gen_constructor_wrapper (line 796) | def gen_constructor_wrapper(target: Callable) -> Tuple[Callable, Callable]: function _proxies_to_metas (line 804) | def _proxies_to_metas(v): function create_cache_proxy_factory_fn (line 815) | def create_cache_proxy_factory_fn(orig_cache_cls: Type[Cache]) -> Callab... function _generate_random_int (line 851) | def _generate_random_int(low: int = 10, high: int = 20, forbidden_values... class HFTracer (line 860) | class HFTracer(Tracer): method __init__ (line 891) | def __init__(self, autowrap_modules=(math,), autowrap_functions=()): method _generate_dummy_input (line 900) | def _generate_dummy_input( method create_proxy (line 1075) | def create_proxy(self, kind, target, args, kwargs, name=None, type_exp... method _module_getattr (line 1145) | def _module_getattr(self, attr, attr_val, parameter_proxy_cache): method getattr (line 1183) | def getattr(self, attr: str, attr_val: Any, parameter_proxy_cache: Dic... method call_module (line 1186) | def call_module(self, m, forward, args, kwargs): method proxy (line 1192) | def proxy(self, node): method patch_for_tracing (line 1196) | def patch_for_tracing(self, root: Union[torch.nn.Module, Callable[...,... method trace (line 1232) | def trace( method _stateless_mod_instanciation_depends_on_proxies (line 1359) | def _stateless_mod_instanciation_depends_on_proxies(self, mod: nn.Modu... method _insert_module_as_submodule (line 1366) | def _insert_module_as_submodule(self, mod: nn.Module) -> str: method path_of_module (line 1390) | def path_of_module(self, mod: nn.Module) -> str: method is_leaf_module (line 1407) | def is_leaf_module(self, m: torch.nn.Module, module_qualified_name: st... method keys (line 1413) | def keys(self, obj: "Proxy") -> Any: function get_concrete_args (line 1424) | def get_concrete_args(model: nn.Module, input_names: List[str]): function is_model_supported (line 1438) | def is_model_supported(model: "PreTrainedModel"): function check_if_model_is_supported (line 1442) | def check_if_model_is_supported(model: "PreTrainedModel"): function symbolic_trace (line 1450) | def symbolic_trace( FILE: mplsandbox_for_rl/transformers/src/transformers/utils/generic.py class cached_property (line 42) | class cached_property(property): method __get__ (line 51) | def __get__(self, obj, objtype=None): function strtobool (line 66) | def strtobool(val): function infer_framework_from_repr (line 80) | def infer_framework_from_repr(x): function _get_frameworks_and_test_func (line 98) | def _get_frameworks_and_test_func(x): function is_tensor (line 119) | def is_tensor(x): function _is_numpy (line 143) | def _is_numpy(x): function is_numpy_array (line 147) | def is_numpy_array(x): function _is_torch (line 154) | def _is_torch(x): function is_torch_tensor (line 160) | def is_torch_tensor(x): function _is_torch_device (line 167) | def _is_torch_device(x): function is_torch_device (line 173) | def is_torch_device(x): function _is_torch_dtype (line 180) | def _is_torch_dtype(x): function is_torch_dtype (line 191) | def is_torch_dtype(x): function _is_tensorflow (line 198) | def _is_tensorflow(x): function is_tf_tensor (line 204) | def is_tf_tensor(x): function _is_tf_symbolic_tensor (line 211) | def _is_tf_symbolic_tensor(x): function is_tf_symbolic_tensor (line 220) | def is_tf_symbolic_tensor(x): function _is_jax (line 228) | def _is_jax(x): function is_jax_tensor (line 234) | def is_jax_tensor(x): function _is_mlx (line 241) | def _is_mlx(x): function is_mlx_array (line 247) | def is_mlx_array(x): function to_py_obj (line 254) | def to_py_obj(obj): function to_numpy (line 284) | def to_numpy(obj): class ModelOutput (line 310) | class ModelOutput(OrderedDict): method __init_subclass__ (line 324) | def __init_subclass__(cls) -> None: method __init__ (line 345) | def __init__(self, *args, **kwargs): method __post_init__ (line 360) | def __post_init__(self): method __delitem__ (line 416) | def __delitem__(self, *args, **kwargs): method setdefault (line 419) | def setdefault(self, *args, **kwargs): method pop (line 422) | def pop(self, *args, **kwargs): method update (line 425) | def update(self, *args, **kwargs): method __getitem__ (line 428) | def __getitem__(self, k): method __setattr__ (line 435) | def __setattr__(self, name, value): method __setitem__ (line 441) | def __setitem__(self, key, value): method __reduce__ (line 447) | def __reduce__(self): method to_tuple (line 454) | def to_tuple(self) -> Tuple[Any]: function _model_output_flatten (line 464) | def _model_output_flatten(output: ModelOutput) -> Tuple[List[Any], "_tor... function _model_output_unflatten (line 467) | def _model_output_unflatten( class ExplicitEnum (line 489) | class ExplicitEnum(str, Enum): method _missing_ (line 495) | def _missing_(cls, value): class PaddingStrategy (line 501) | class PaddingStrategy(ExplicitEnum): class TensorType (line 512) | class TensorType(ExplicitEnum): class ContextManagers (line 525) | class ContextManagers: method __init__ (line 531) | def __init__(self, context_managers: List[ContextManager]): method __enter__ (line 535) | def __enter__(self): method __exit__ (line 539) | def __exit__(self, *args, **kwargs): function can_return_loss (line 543) | def can_return_loss(model_class): function find_labels (line 565) | def find_labels(model_class): function flatten_dict (line 587) | def flatten_dict(d: MutableMapping, parent_key: str = "", delimiter: str... function working_or_temp_dir (line 602) | def working_or_temp_dir(working_dir, use_temp_dir: bool = False): function transpose (line 610) | def transpose(array, axes=None): function reshape (line 631) | def reshape(array, newshape): function squeeze (line 652) | def squeeze(array, axis=None): function expand_dims (line 673) | def expand_dims(array, axis): function tensor_size (line 694) | def tensor_size(array): function add_model_info_to_auto_map (line 712) | def add_model_info_to_auto_map(auto_map, repo_id): function add_model_info_to_custom_pipelines (line 725) | def add_model_info_to_custom_pipelines(custom_pipeline, repo_id): function infer_framework (line 738) | def infer_framework(model_class): function torch_int (line 756) | def torch_int(x): function torch_float (line 768) | def torch_float(x): function filter_out_non_signature_kwargs (line 780) | def filter_out_non_signature_kwargs(extra: Optional[list] = None): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/transformers/utils/hub.py function is_offline_mode (line 84) | def is_offline_mode(): function _get_cache_file_to_return (line 153) | def _get_cache_file_to_return( function is_remote_url (line 163) | def is_remote_url(url_or_filename): function get_cached_models (line 172) | def get_cached_models(cache_dir: Union[str, Path] = None) -> List[Tuple]: function define_sagemaker_information (line 207) | def define_sagemaker_information(): function http_user_agent (line 233) | def http_user_agent(user_agent: Union[Dict, str, None] = None) -> str: function extract_commit_hash (line 256) | def extract_commit_hash(resolved_file: Optional[str], commit_hash: Optio... function cached_file (line 270) | def cached_file( function get_file_from_repo (line 477) | def get_file_from_repo( function download_url (line 572) | def download_url(url, proxies=None): function has_file (line 599) | def has_file( class PushToHubMixin (line 694) | class PushToHubMixin: method _create_repo (line 699) | def _create_repo( method _get_files_timestamps (line 734) | def _get_files_timestamps(self, working_dir: Union[str, os.PathLike]): method _upload_modified_files (line 740) | def _upload_modified_files( method push_to_hub (line 819) | def push_to_hub( function send_example_telemetry (line 957) | def send_example_telemetry(example_name, *example_args, framework="pytor... function convert_file_size_to_int (line 992) | def convert_file_size_to_int(size: Union[int, str]): function get_checkpoint_shard_files (line 1025) | def get_checkpoint_shard_files( function get_all_cached_files (line 1124) | def get_all_cached_files(cache_dir=None): function extract_info_from_url (line 1150) | def extract_info_from_url(url): function create_and_tag_model_card (line 1162) | def create_and_tag_model_card( function clean_files_for (line 1199) | def clean_files_for(file): function move_to_new_cache (line 1208) | def move_to_new_cache(file, repo, filename, revision, etag, commit_hash): function move_cache (line 1234) | def move_cache(cache_dir=None, new_cache_dir=None, token=None): class PushInProgress (line 1281) | class PushInProgress: method __init__ (line 1286) | def __init__(self, jobs: Optional[futures.Future] = None) -> None: method is_done (line 1289) | def is_done(self): method wait_until_done (line 1292) | def wait_until_done(self): method cancel (line 1295) | def cancel(self) -> None: FILE: mplsandbox_for_rl/transformers/src/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 290) | def is_kenlm_available(): function is_cv2_available (line 294) | def is_cv2_available(): function is_torch_available (line 298) | def is_torch_available(): function is_accelerate_available (line 302) | def is_accelerate_available(min_version: str = ACCELERATE_MIN_VERSION): function is_torch_deterministic (line 306) | def is_torch_deterministic(): function is_hqq_available (line 318) | def is_hqq_available(): function is_pygments_available (line 322) | def is_pygments_available(): function get_torch_version (line 326) | def get_torch_version(): function is_torch_sdpa_available (line 330) | def is_torch_sdpa_available(): function is_torchvision_available (line 346) | def is_torchvision_available(): function is_galore_torch_available (line 350) | def is_galore_torch_available(): function is_lomo_available (line 354) | def is_lomo_available(): function is_grokadamw_available (line 358) | def is_grokadamw_available(): function is_pyctcdecode_available (line 362) | def is_pyctcdecode_available(): function is_librosa_available (line 366) | def is_librosa_available(): function is_essentia_available (line 370) | def is_essentia_available(): function is_pretty_midi_available (line 374) | def is_pretty_midi_available(): function is_torch_cuda_available (line 378) | def is_torch_cuda_available(): function is_mamba_ssm_available (line 387) | def is_mamba_ssm_available(): function is_mamba_2_ssm_available (line 398) | def is_mamba_2_ssm_available(): function is_causal_conv1d_available (line 413) | def is_causal_conv1d_available(): function is_mambapy_available (line 423) | def is_mambapy_available(): function is_torch_mps_available (line 429) | def is_torch_mps_available(min_version: Optional[str] = None): function is_torch_bf16_gpu_available (line 442) | def is_torch_bf16_gpu_available(): function is_torch_bf16_cpu_available (line 451) | def is_torch_bf16_cpu_available(): function is_torch_bf16_available (line 466) | def is_torch_bf16_available(): function is_torch_fp16_available_on_device (line 478) | def is_torch_fp16_available_on_device(device): function is_torch_bf16_available_on_device (line 504) | def is_torch_bf16_available_on_device(device): function is_torch_tf32_available (line 524) | def is_torch_tf32_available(): function is_torch_fx_available (line 542) | def is_torch_fx_available(): function is_peft_available (line 546) | def is_peft_available(): function is_bs4_available (line 550) | def is_bs4_available(): function is_tf_available (line 554) | def is_tf_available(): function is_coloredlogs_available (line 558) | def is_coloredlogs_available(): function is_tf2onnx_available (line 562) | def is_tf2onnx_available(): function is_onnx_available (line 566) | def is_onnx_available(): function is_openai_available (line 570) | def is_openai_available(): function is_flax_available (line 574) | def is_flax_available(): function is_ftfy_available (line 578) | def is_ftfy_available(): function is_g2p_en_available (line 582) | def is_g2p_en_available(): function is_torch_tpu_available (line 587) | def is_torch_tpu_available(check_device=True): function is_torch_xla_available (line 612) | def is_torch_xla_available(check_is_tpu=False, check_is_gpu=False): function is_torch_neuroncore_available (line 633) | def is_torch_neuroncore_available(check_device=True): function is_torch_npu_available (line 640) | def is_torch_npu_available(check_device=False): function is_torch_mlu_available (line 659) | def is_torch_mlu_available(check_device=False): function is_torch_musa_available (line 682) | def is_torch_musa_available(check_device=False): function is_torchdynamo_available (line 704) | def is_torchdynamo_available(): function is_torch_compile_available (line 711) | def is_torch_compile_available(): function is_torchdynamo_compiling (line 722) | def is_torchdynamo_compiling(): function is_torch_tensorrt_fx_available (line 741) | def is_torch_tensorrt_fx_available(): function is_datasets_available (line 747) | def is_datasets_available(): function is_detectron2_available (line 751) | def is_detectron2_available(): function is_rjieba_available (line 755) | def is_rjieba_available(): function is_psutil_available (line 759) | def is_psutil_available(): function is_py3nvml_available (line 763) | def is_py3nvml_available(): function is_sacremoses_available (line 767) | def is_sacremoses_available(): function is_apex_available (line 771) | def is_apex_available(): function is_aqlm_available (line 775) | def is_aqlm_available(): function is_av_available (line 779) | def is_av_available(): function is_ninja_available (line 783) | def is_ninja_available(): function is_ipex_available (line 796) | def is_ipex_available(): function is_torch_xpu_available (line 815) | def is_torch_xpu_available(check_device=False): function is_bitsandbytes_available (line 841) | def is_bitsandbytes_available(): function is_flash_attn_2_available (line 852) | def is_flash_attn_2_available(): function is_flash_attn_greater_or_equal_2_10 (line 876) | def is_flash_attn_greater_or_equal_2_10(): function is_flash_attn_greater_or_equal (line 884) | def is_flash_attn_greater_or_equal(library_version: str): function is_torchdistx_available (line 891) | def is_torchdistx_available(): function is_faiss_available (line 895) | def is_faiss_available(): function is_scipy_available (line 899) | def is_scipy_available(): function is_sklearn_available (line 903) | def is_sklearn_available(): function is_sentencepiece_available (line 907) | def is_sentencepiece_available(): function is_seqio_available (line 911) | def is_seqio_available(): function is_gguf_available (line 915) | def is_gguf_available(): function is_protobuf_available (line 919) | def is_protobuf_available(): function is_fsdp_available (line 925) | def is_fsdp_available(min_version: str = FSDP_MIN_VERSION): function is_optimum_available (line 929) | def is_optimum_available(): function is_auto_awq_available (line 933) | def is_auto_awq_available(): function is_quanto_available (line 937) | def is_quanto_available(): function is_auto_gptq_available (line 941) | def is_auto_gptq_available(): function is_eetq_available (line 945) | def is_eetq_available(): function is_fbgemm_gpu_available (line 949) | def is_fbgemm_gpu_available(): function is_levenshtein_available (line 953) | def is_levenshtein_available(): function is_optimum_neuron_available (line 957) | def is_optimum_neuron_available(): function is_safetensors_available (line 961) | def is_safetensors_available(): function is_tokenizers_available (line 965) | def is_tokenizers_available(): function is_vision_available (line 970) | def is_vision_available(): function is_pytesseract_available (line 984) | def is_pytesseract_available(): function is_pytest_available (line 988) | def is_pytest_available(): function is_spacy_available (line 992) | def is_spacy_available(): function is_tensorflow_text_available (line 996) | def is_tensorflow_text_available(): function is_keras_nlp_available (line 1000) | def is_keras_nlp_available(): function is_in_notebook (line 1004) | def is_in_notebook(): function is_pytorch_quantization_available (line 1022) | def is_pytorch_quantization_available(): function is_tensorflow_probability_available (line 1026) | def is_tensorflow_probability_available(): function is_pandas_available (line 1030) | def is_pandas_available(): function is_sagemaker_dp_enabled (line 1034) | def is_sagemaker_dp_enabled(): function is_sagemaker_mp_enabled (line 1048) | def is_sagemaker_mp_enabled(): function is_training_run_on_sagemaker (line 1072) | def is_training_run_on_sagemaker(): function is_soundfile_availble (line 1076) | def is_soundfile_availble(): function is_timm_available (line 1080) | def is_timm_available(): function is_natten_available (line 1084) | def is_natten_available(): function is_nltk_available (line 1088) | def is_nltk_available(): function is_torchaudio_available (line 1092) | def is_torchaudio_available(): function is_torchao_available (line 1096) | def is_torchao_available(): function is_speech_available (line 1100) | def is_speech_available(): function is_phonemizer_available (line 1105) | def is_phonemizer_available(): function torch_only_method (line 1109) | def torch_only_method(fn): function is_ccl_available (line 1122) | def is_ccl_available(): function is_decord_available (line 1126) | def is_decord_available(): function is_sudachi_available (line 1130) | def is_sudachi_available(): function get_sudachi_version (line 1134) | def get_sudachi_version(): function is_sudachi_projection_available (line 1138) | def is_sudachi_projection_available(): function is_jumanpp_available (line 1147) | def is_jumanpp_available(): function is_cython_available (line 1151) | def is_cython_available(): function is_jieba_available (line 1155) | def is_jieba_available(): function is_jinja_available (line 1159) | def is_jinja_available(): function is_mlx_available (line 1163) | def is_mlx_available(): function requires_backends (line 1551) | def requires_backends(obj, backends): class DummyObject (line 1571) | class DummyObject(type): method __getattribute__ (line 1577) | def __getattribute__(cls, key): function is_torch_fx_proxy (line 1583) | def is_torch_fx_proxy(x): class _LazyModule (line 1591) | class _LazyModule(ModuleType): method __init__ (line 1598) | def __init__(self, name, module_file, import_structure, module_spec=No... method __dir__ (line 1615) | def __dir__(self): method __getattr__ (line 1624) | def __getattr__(self, name: str) -> Any: method _get_module (line 1638) | def _get_module(self, module_name: str): method __reduce__ (line 1647) | def __reduce__(self): class OptionalDependencyNotAvailable (line 1651) | class OptionalDependencyNotAvailable(BaseException): function direct_transformers_import (line 1655) | def direct_transformers_import(path: str, file="__init__.py") -> ModuleT... FILE: mplsandbox_for_rl/transformers/src/transformers/utils/logging.py function _get_default_logging_level (line 56) | def _get_default_logging_level(): function _get_library_name (line 73) | def _get_library_name() -> str: function _get_library_root_logger (line 77) | def _get_library_root_logger() -> logging.Logger: function _configure_library_root_logger (line 81) | def _configure_library_root_logger() -> None: function _reset_library_root_logger (line 107) | def _reset_library_root_logger() -> None: function get_log_levels_dict (line 120) | def get_log_levels_dict(): function captureWarnings (line 124) | def captureWarnings(capture): function get_logger (line 147) | def get_logger(name: Optional[str] = None) -> logging.Logger: function get_verbosity (line 161) | def get_verbosity() -> int: function set_verbosity (line 184) | def set_verbosity(verbosity: int) -> None: function set_verbosity_info (line 203) | def set_verbosity_info(): function set_verbosity_warning (line 208) | def set_verbosity_warning(): function set_verbosity_debug (line 213) | def set_verbosity_debug(): function set_verbosity_error (line 218) | def set_verbosity_error(): function disable_default_handler (line 223) | def disable_default_handler() -> None: function enable_default_handler (line 232) | def enable_default_handler() -> None: function add_handler (line 241) | def add_handler(handler: logging.Handler) -> None: function remove_handler (line 250) | def remove_handler(handler: logging.Handler) -> None: function disable_propagation (line 259) | def disable_propagation() -> None: function enable_propagation (line 268) | def enable_propagation() -> None: function enable_explicit_format (line 278) | def enable_explicit_format() -> None: function reset_format (line 293) | def reset_format() -> None: function warning_advice (line 305) | def warning_advice(self, *args, **kwargs): function warning_once (line 320) | def warning_once(self, *args, **kwargs): function info_once (line 335) | def info_once(self, *args, **kwargs): class EmptyTqdm (line 349) | class EmptyTqdm: method __init__ (line 352) | def __init__(self, *args, **kwargs): # pylint: disable=unused-argument method __iter__ (line 355) | def __iter__(self): method __getattr__ (line 358) | def __getattr__(self, _): method __enter__ (line 366) | def __enter__(self): method __exit__ (line 369) | def __exit__(self, type_, value, traceback): class _tqdm_cls (line 373) | class _tqdm_cls: method __call__ (line 374) | def __call__(self, *args, **kwargs): method set_lock (line 380) | def set_lock(self, *args, **kwargs): method get_lock (line 385) | def get_lock(self): function is_progress_bar_enabled (line 393) | def is_progress_bar_enabled() -> bool: function enable_progress_bar (line 399) | def enable_progress_bar(): function disable_progress_bar (line 406) | def disable_progress_bar(): FILE: mplsandbox_for_rl/transformers/src/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: mplsandbox_for_rl/transformers/src/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 188) | def display(self): method close (line 199) | def close(self): class NotebookTrainingTracker (line 205) | class NotebookTrainingTracker(NotebookProgressBar): method __init__ (line 215) | def __init__(self, num_steps, column_names=None): method display (line 220) | def display(self): method write_line (line 231) | def write_line(self, values): method add_child (line 262) | def add_child(self, total, prefix=None, width=300): method remove_child (line 275) | def remove_child(self): class NotebookProgressCallback (line 283) | class NotebookProgressCallback(TrainerCallback): method __init__ (line 289) | def __init__(self): method on_train_begin (line 294) | def on_train_begin(self, args, state, control, **kwargs): method on_step_end (line 303) | def on_step_end(self, args, state, control, **kwargs): method on_prediction_step (line 312) | def on_prediction_step(self, args, state, control, eval_dataloader=Non... method on_predict (line 324) | def on_predict(self, args, state, control, **kwargs): method on_log (line 329) | def on_log(self, args, state, control, logs=None, **kwargs): method on_evaluate (line 337) | def on_evaluate(self, args, state, control, metrics=None, **kwargs): method on_train_end (line 372) | def on_train_end(self, args, state, control, **kwargs): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/peft_utils.py function find_adapter_config_file (line 29) | def find_adapter_config_file( function check_peft_version (line 108) | def check_peft_version(min_version: str) -> None: FILE: mplsandbox_for_rl/transformers/src/transformers/utils/quantization_config.py class QuantizationMethod (line 37) | class QuantizationMethod(str, Enum): class AWQLinearVersion (line 49) | class AWQLinearVersion(str, Enum): method from_str (line 55) | def from_str(version: str): class AwqBackendPackingMethod (line 67) | class AwqBackendPackingMethod(str, Enum): class QuantizationConfigMixin (line 73) | class QuantizationConfigMixin: method from_dict (line 81) | def from_dict(cls, config_dict, return_unused_kwargs=False, **kwargs): method to_json_file (line 113) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method to_dict (line 130) | def to_dict(self) -> Dict[str, Any]: method __iter__ (line 137) | def __iter__(self): method __repr__ (line 142) | def __repr__(self): method to_json_string (line 145) | def to_json_string(self, use_diff: bool = True) -> str: method update (line 163) | def update(self, **kwargs): class HqqConfig (line 187) | class HqqConfig(QuantizationConfigMixin): method __init__ (line 215) | def __init__( method post_init (line 256) | def post_init(self): method to_dict (line 262) | def to_dict(self) -> Dict[str, Any]: method __repr__ (line 269) | def __repr__(self): method to_diff_dict (line 273) | def to_diff_dict(self) -> Dict[str, Any]: class BitsAndBytesConfig (line 296) | class BitsAndBytesConfig(QuantizationConfigMixin): method __init__ (line 348) | def __init__( method load_in_4bit (line 404) | def load_in_4bit(self): method load_in_4bit (line 408) | def load_in_4bit(self, value: bool): method load_in_8bit (line 417) | def load_in_8bit(self): method load_in_8bit (line 421) | def load_in_8bit(self, value: bool): method post_init (line 429) | def post_init(self): method is_quantizable (line 466) | def is_quantizable(self): method quantization_method (line 472) | def quantization_method(self): method to_dict (line 486) | def to_dict(self) -> Dict[str, Any]: method __repr__ (line 499) | def __repr__(self): method to_diff_dict (line 503) | def to_diff_dict(self) -> Dict[str, Any]: class ExllamaVersion (line 526) | class ExllamaVersion(int, Enum): class GPTQConfig (line 532) | class GPTQConfig(QuantizationConfigMixin): method __init__ (line 593) | def __init__( method get_loading_attributes (line 639) | def get_loading_attributes(self): method post_init (line 645) | def post_init(self): method to_dict (line 719) | def to_dict(self): method to_dict_optimum (line 724) | def to_dict_optimum(self): method from_dict_optimum (line 734) | def from_dict_optimum(cls, config_dict): class AwqConfig (line 749) | class AwqConfig(QuantizationConfigMixin): method __init__ (line 783) | def __init__( method post_init (line 817) | def post_init(self): method get_loading_attributes (line 912) | def get_loading_attributes(self): class AqlmConfig (line 920) | class AqlmConfig(QuantizationConfigMixin): method __init__ (line 939) | def __init__( method post_init (line 957) | def post_init(self): class QuantoConfig (line 980) | class QuantoConfig(QuantizationConfigMixin): method __init__ (line 995) | def __init__( method post_init (line 1008) | def post_init(self): class EetqConfig (line 1021) | class EetqConfig(QuantizationConfigMixin): method __init__ (line 1034) | def __init__( method post_init (line 1045) | def post_init(self): class FbgemmFp8Config (line 1055) | class FbgemmFp8Config(QuantizationConfigMixin): method __init__ (line 1068) | def __init__( method get_loading_attributes (line 1078) | def get_loading_attributes(self): class TorchAoConfig (line 1086) | class TorchAoConfig(QuantizationConfigMixin): method __init__ (line 1109) | def __init__(self, quant_type: str, modules_to_not_convert: Optional[L... method post_init (line 1134) | def post_init(self): method get_apply_tensor_subclass (line 1159) | def get_apply_tensor_subclass(self): method __repr__ (line 1162) | def __repr__(self): FILE: mplsandbox_for_rl/transformers/src/transformers/utils/versions.py function _compare_versions (line 37) | def _compare_versions(op, got_ver, want_ver, requirement, pkg, hint): function require_version (line 49) | def require_version(requirement: str, hint: Optional[str] = None) -> None: function require_version_core (line 114) | def require_version_core(requirement): FILE: mplsandbox_for_rl/transformers/templates/adding_a_new_example_script/{{cookiecutter.directory_name}}/run_{{cookiecutter.example_shortcut}}.py class ModelArguments (line 62) | class ModelArguments: class ModelArguments (line 93) | class ModelArguments: class DataTrainingArguments (line 141) | class DataTrainingArguments: method __post_init__ (line 190) | def __post_init__(self): function main (line 210) | def main(): function tokenize_function (line 390) | def tokenize_function(examples): function _mp_fn (line 512) | def _mp_fn(index): function parse_args (line 561) | def parse_args(): function main (line 699) | def main(): function tokenize_function (line 813) | def tokenize_function(examples): FILE: mplsandbox_for_rl/transformers/tests/agents/test_agent_types.py function get_new_path (line 36) | def get_new_path(suffix="") -> str: class AgentAudioTests (line 43) | class AgentAudioTests(unittest.TestCase): method test_from_tensor (line 44) | def test_from_tensor(self): method test_from_string (line 61) | def test_from_string(self): class AgentImageTests (line 74) | class AgentImageTests(unittest.TestCase): method test_from_tensor (line 75) | def test_from_tensor(self): method test_from_string (line 89) | def test_from_string(self): method test_from_image (line 101) | def test_from_image(self): class AgentTextTests (line 114) | class AgentTextTests(unittest.TestCase): method test_from_string (line 115) | def test_from_string(self): FILE: mplsandbox_for_rl/transformers/tests/agents/test_agents.py function get_new_path (line 28) | def get_new_path(suffix="") -> str: function fake_react_json_llm (line 33) | def fake_react_json_llm(messages, stop_sequences=None, grammar=None) -> ... function fake_react_code_llm (line 56) | def fake_react_code_llm(messages, stop_sequences=None, grammar=None) -> ... function fake_react_code_llm_error (line 77) | def fake_react_code_llm_error(messages, stop_sequences=None) -> str: function fake_react_code_functiondef (line 97) | def fake_react_code_functiondef(messages, stop_sequences=None) -> str: function fake_code_llm_oneshot (line 122) | def fake_code_llm_oneshot(messages, stop_sequences=None, grammar=None) -... function fake_code_llm_no_return (line 133) | def fake_code_llm_no_return(messages, stop_sequences=None, grammar=None)... class AgentTests (line 144) | class AgentTests(unittest.TestCase): method test_fake_code_agent (line 145) | def test_fake_code_agent(self): method test_fake_react_json_agent (line 151) | def test_fake_react_json_agent(self): method test_fake_react_code_agent (line 171) | def test_fake_react_code_agent(self): method test_react_code_agent_code_errors_show_offending_lines (line 183) | def test_react_code_agent_code_errors_show_offending_lines(self): method test_setup_agent_with_empty_toolbox (line 190) | def test_setup_agent_with_empty_toolbox(self): method test_react_fails_max_iterations (line 193) | def test_react_fails_max_iterations(self): method test_init_agent_with_different_toolsets (line 204) | def test_init_agent_with_different_toolsets(self): method test_function_persistence_across_steps (line 232) | def test_function_persistence_across_steps(self): FILE: mplsandbox_for_rl/transformers/tests/agents/test_document_question_answering.py class DocumentQuestionAnsweringToolTester (line 25) | class DocumentQuestionAnsweringToolTester(unittest.TestCase, ToolTesterM... method setUp (line 26) | def setUp(self): method test_exact_match_arg (line 30) | def test_exact_match_arg(self): method test_exact_match_kwarg (line 37) | def test_exact_match_kwarg(self): FILE: mplsandbox_for_rl/transformers/tests/agents/test_final_answer.py class FinalAnswerToolTester (line 33) | class FinalAnswerToolTester(unittest.TestCase, ToolTesterMixin): method setUp (line 34) | def setUp(self): method test_exact_match_arg (line 39) | def test_exact_match_arg(self): method test_exact_match_kwarg (line 43) | def test_exact_match_kwarg(self): method create_inputs (line 47) | def create_inputs(self): method test_agent_type_output (line 58) | def test_agent_type_output(self): method test_agent_types_inputs (line 66) | def test_agent_types_inputs(self): FILE: mplsandbox_for_rl/transformers/tests/agents/test_image_question_answering.py class ImageQuestionAnsweringToolTester (line 29) | class ImageQuestionAnsweringToolTester(unittest.TestCase, ToolTesterMixin): method setUp (line 30) | def setUp(self): method test_exact_match_arg (line 34) | def test_exact_match_arg(self): method test_exact_match_kwarg (line 39) | def test_exact_match_kwarg(self): FILE: mplsandbox_for_rl/transformers/tests/agents/test_python_interpreter.py function add_two (line 30) | def add_two(x): class PythonInterpreterToolTester (line 34) | class PythonInterpreterToolTester(unittest.TestCase, ToolTesterMixin): method setUp (line 35) | def setUp(self): method test_exact_match_arg (line 39) | def test_exact_match_arg(self): method test_exact_match_kwarg (line 43) | def test_exact_match_kwarg(self): method test_agent_type_output (line 47) | def test_agent_type_output(self): method test_agent_types_inputs (line 53) | def test_agent_types_inputs(self): class PythonInterpreterTester (line 70) | class PythonInterpreterTester(unittest.TestCase): method test_evaluate_assign (line 71) | def test_evaluate_assign(self): method test_assignment_cannot_overwrite_tool (line 90) | def test_assignment_cannot_overwrite_tool(self): method test_evaluate_call (line 96) | def test_evaluate_call(self): method test_evaluate_constant (line 108) | def test_evaluate_constant(self): method test_evaluate_dict (line 115) | def test_evaluate_dict(self): method test_evaluate_expression (line 122) | def test_evaluate_expression(self): method test_evaluate_f_string (line 130) | def test_evaluate_f_string(self): method test_evaluate_if (line 138) | def test_evaluate_if(self): method test_evaluate_list (line 152) | def test_evaluate_list(self): method test_evaluate_name (line 159) | def test_evaluate_name(self): method test_evaluate_subscript (line 166) | def test_evaluate_subscript(self): method test_evaluate_for (line 179) | def test_evaluate_for(self): method test_evaluate_binop (line 186) | def test_evaluate_binop(self): method test_recursive_function (line 193) | def test_recursive_function(self): method test_evaluate_string_methods (line 204) | def test_evaluate_string_methods(self): method test_evaluate_slicing (line 209) | def test_evaluate_slicing(self): method test_access_attributes (line 214) | def test_access_attributes(self): method test_list_comprehension (line 219) | def test_list_comprehension(self): method test_string_indexing (line 224) | def test_string_indexing(self): method test_tuples (line 237) | def test_tuples(self): method test_listcomp (line 281) | def test_listcomp(self): method test_break_continue (line 286) | def test_break_continue(self): method test_call_int (line 295) | def test_call_int(self): method test_lambda (line 300) | def test_lambda(self): method test_dictcomp (line 305) | def test_dictcomp(self): method test_tuple_assignment (line 321) | def test_tuple_assignment(self): method test_while (line 326) | def test_while(self): method test_generator (line 347) | def test_generator(self): method test_boolops (line 352) | def test_boolops(self): method test_if_conditions (line 373) | def test_if_conditions(self): method test_imports (line 380) | def test_imports(self): method test_additional_imports (line 424) | def test_additional_imports(self): method test_multiple_comparators (line 434) | def test_multiple_comparators(self): method test_print_output (line 451) | def test_print_output(self): method test_tuple_target_in_iterator (line 468) | def test_tuple_target_in_iterator(self): method test_classes (line 473) | def test_classes(self): method test_variable_args (line 551) | def test_variable_args(self): method test_exceptions (line 562) | def test_exceptions(self): method test_subscript (line 576) | def test_subscript(self): method test_print (line 583) | def test_print(self): method test_types_as_objects (line 590) | def test_types_as_objects(self): method test_tuple_id (line 596) | def test_tuple_id(self): method test_nonsimple_augassign (line 605) | def test_nonsimple_augassign(self): method test_adding_int_to_list_raises_error (line 624) | def test_adding_int_to_list_raises_error(self): method test_error_highlights_correct_line_of_code (line 632) | def test_error_highlights_correct_line_of_code(self): method test_assert (line 646) | def test_assert(self): method test_with_context_manager (line 655) | def test_with_context_manager(self): method test_default_arg_in_function (line 679) | def test_default_arg_in_function(self): method test_set (line 688) | def test_set(self): method test_break (line 700) | def test_break(self): method test_return (line 713) | def test_return(self): method test_nested_for_loop (line 738) | def test_nested_for_loop(self): method test_pandas (line 754) | def test_pandas(self): method test_starred (line 792) | def test_starred(self): method test_for (line 814) | def test_for(self): FILE: mplsandbox_for_rl/transformers/tests/agents/test_speech_to_text.py class SpeechToTextToolTester (line 25) | class SpeechToTextToolTester(unittest.TestCase, ToolTesterMixin): method setUp (line 26) | def setUp(self): method test_exact_match_arg (line 30) | def test_exact_match_arg(self): method test_exact_match_kwarg (line 34) | def test_exact_match_kwarg(self): FILE: mplsandbox_for_rl/transformers/tests/agents/test_text_to_speech.py class TextToSpeechToolTester (line 31) | class TextToSpeechToolTester(unittest.TestCase, ToolTesterMixin): method setUp (line 32) | def setUp(self): method test_exact_match_arg (line 36) | def test_exact_match_arg(self): method test_exact_match_kwarg (line 44) | def test_exact_match_kwarg(self): FILE: mplsandbox_for_rl/transformers/tests/agents/test_tools_common.py function create_inputs (line 35) | def create_inputs(tool_inputs: Dict[str, Dict[Union[str, type], str]]): function output_type (line 55) | def output_type(output): class ToolTesterMixin (line 67) | class ToolTesterMixin: method test_inputs_output (line 68) | def test_inputs_output(self): method test_common_attributes (line 84) | def test_common_attributes(self): method test_agent_type_output (line 90) | def test_agent_type_output(self): method test_agent_types_inputs (line 96) | def test_agent_types_inputs(self): FILE: mplsandbox_for_rl/transformers/tests/agents/test_translation.py class TranslationToolTester (line 24) | class TranslationToolTester(unittest.TestCase, ToolTesterMixin): method setUp (line 25) | def setUp(self): method test_exact_match_arg (line 30) | def test_exact_match_arg(self): method test_exact_match_kwarg (line 34) | def test_exact_match_kwarg(self): method test_call (line 38) | def test_call(self): method test_agent_type_output (line 44) | def test_agent_type_output(self): method test_agent_types_inputs (line 51) | def test_agent_types_inputs(self): FILE: mplsandbox_for_rl/transformers/tests/benchmark/test_benchmark.py class BenchmarkTest (line 29) | class BenchmarkTest(unittest.TestCase): method check_results_dict_not_empty (line 30) | def check_results_dict_not_empty(self, results): method test_inference_no_configs (line 36) | def test_inference_no_configs(self): method test_inference_no_configs_only_pretrain (line 51) | def test_inference_no_configs_only_pretrain(self): method test_inference_torchscript (line 67) | def test_inference_torchscript(self): method test_inference_fp16 (line 84) | def test_inference_fp16(self): method test_inference_no_model_no_architectures (line 100) | def test_inference_no_model_no_architectures(self): method test_train_no_configs (line 118) | def test_train_no_configs(self): method test_train_no_configs_fp16 (line 134) | def test_train_no_configs_fp16(self): method test_inference_with_configs (line 150) | def test_inference_with_configs(self): method test_inference_encoder_decoder_with_configs (line 166) | def test_inference_encoder_decoder_with_configs(self): method test_train_with_configs (line 182) | def test_train_with_configs(self): method test_train_encoder_decoder_with_configs (line 198) | def test_train_encoder_decoder_with_configs(self): method test_save_csv_files (line 214) | def test_save_csv_files(self): method test_trace_memory (line 239) | def test_trace_memory(self): FILE: mplsandbox_for_rl/transformers/tests/benchmark/test_benchmark_tf.py class TFBenchmarkTest (line 31) | class TFBenchmarkTest(unittest.TestCase): method check_results_dict_not_empty (line 32) | def check_results_dict_not_empty(self, results): method test_inference_no_configs_eager (line 38) | def test_inference_no_configs_eager(self): method test_inference_no_configs_only_pretrain (line 54) | def test_inference_no_configs_only_pretrain(self): method test_inference_no_configs_graph (line 70) | def test_inference_no_configs_graph(self): method test_inference_with_configs_eager (line 85) | def test_inference_with_configs_eager(self): method test_inference_with_configs_graph (line 102) | def test_inference_with_configs_graph(self): method test_train_no_configs (line 118) | def test_train_no_configs(self): method test_train_with_configs (line 133) | def test_train_with_configs(self): method test_inference_encoder_decoder_with_configs (line 149) | def test_inference_encoder_decoder_with_configs(self): method test_inference_no_configs_xla (line 166) | def test_inference_no_configs_xla(self): method test_save_csv_files (line 182) | def test_save_csv_files(self): method test_trace_memory (line 202) | def test_trace_memory(self): FILE: mplsandbox_for_rl/transformers/tests/bettertransformer/test_integration.py class BetterTransformerIntegrationTest (line 35) | class BetterTransformerIntegrationTest(unittest.TestCase): method test_transform_and_reverse (line 39) | def test_transform_and_reverse(self): method test_error_save_pretrained (line 71) | def test_error_save_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/deepspeed/test_deepspeed.py function load_json (line 79) | def load_json(path): function get_master_port (line 84) | def get_master_port(real_launcher=False): function require_deepspeed_aio (line 106) | def require_deepspeed_aio(test_case): function get_launcher (line 128) | def get_launcher(distributed=False): function parameterized_custom_name_func (line 159) | def parameterized_custom_name_func(func, param_num, param): class CoreIntegrationDeepSpeed (line 174) | class CoreIntegrationDeepSpeed(TestCasePlus, TrainerIntegrationCommon): method setUp (line 179) | def setUp(self): method tearDown (line 191) | def tearDown(self): method test_init_zero3_fp16 (line 197) | def test_init_zero3_fp16(self): method test_init_zero3_missing_params (line 232) | def test_init_zero3_missing_params(self): method test_arange_bf16 (line 304) | def test_arange_bf16(self): class TrainerIntegrationDeepSpeedWithCustomConfig (line 373) | class TrainerIntegrationDeepSpeedWithCustomConfig(TestCasePlus): method setUp (line 374) | def setUp(self): method tearDown (line 409) | def tearDown(self): method get_config_dict (line 415) | def get_config_dict(self, stage): class TrainerIntegrationDeepSpeed (line 422) | class TrainerIntegrationDeepSpeed(TrainerIntegrationDeepSpeedWithCustomC... method test_hf_ds_config_mismatch (line 444) | def test_hf_ds_config_mismatch(self): method test_hf_scheduler_hf_optimizer (line 501) | def test_hf_scheduler_hf_optimizer(self): method test_ds_scheduler_hf_optimizer (line 514) | def test_ds_scheduler_hf_optimizer(self): method test_hf_scheduler_ds_optimizer (line 526) | def test_hf_scheduler_ds_optimizer(self): method test_stage3_nvme_offload (line 539) | def test_stage3_nvme_offload(self): method test_hyperparameter_search (line 555) | def test_hyperparameter_search(self): method test_hf_optimizer_with_offload (line 583) | def test_hf_optimizer_with_offload(self, stage, dtype): method test_fake_notebook_no_launcher (line 599) | def test_fake_notebook_no_launcher(self, stage, dtype): method test_early_get_last_lr (line 616) | def test_early_get_last_lr(self, stage, dtype): method test_gradient_accumulation (line 654) | def test_gradient_accumulation(self, stage, dtype): method check_saved_checkpoints_deepspeed (line 741) | def check_saved_checkpoints_deepspeed(self, output_dir, freq, total, s... method test_save_checkpoints (line 772) | def test_save_checkpoints(self, stage, dtype): method test_can_resume_training_errors (line 799) | def test_can_resume_training_errors(self, stage, dtype): method test_can_resume_training_normal (line 821) | def test_can_resume_training_normal(self, stage, dtype, optim, schedul... method test_load_state_dict_from_zero_checkpoint (line 890) | def test_load_state_dict_from_zero_checkpoint(self, stage, dtype): method test_ds_config_object (line 924) | def test_ds_config_object(self): method test_load_best_model (line 959) | def test_load_best_model(self, stage, dtype): class TestDeepSpeedWithLauncher (line 1051) | class TestDeepSpeedWithLauncher(TestCasePlus): method test_basic_distributed (line 1072) | def test_basic_distributed(self, stage, dtype): method test_do_eval_no_train (line 1075) | def test_do_eval_no_train(self): method test_fp32_non_distributed (line 1087) | def test_fp32_non_distributed(self, stage, dtype): method test_fp32_distributed (line 1103) | def test_fp32_distributed(self, stage, dtype): method test_resume_train_not_from_ds_checkpoint (line 1118) | def test_resume_train_not_from_ds_checkpoint(self, stage, dtype): method test_inference (line 1144) | def test_inference(self, dtype): method do_checks (line 1162) | def do_checks(self, output_dir, do_train=True, do_eval=True, quality_c... method run_and_check (line 1176) | def run_and_check( method run_trainer (line 1209) | def run_trainer( method test_clm (line 1295) | def test_clm(self, stage, dtype): method test_clm_from_config_zero3_fp16 (line 1330) | def test_clm_from_config_zero3_fp16(self): FILE: mplsandbox_for_rl/transformers/tests/deepspeed/test_model_zoo.py function get_launcher (line 142) | def get_launcher(distributed=False): function make_task_cmds (line 152) | def make_task_cmds(): function parameterized_custom_name_func (line 318) | def parameterized_custom_name_func(func, param_num, param): class TestDeepSpeedModelZoo (line 332) | class TestDeepSpeedModelZoo(TestCasePlus): method get_task_cmd (line 335) | def get_task_cmd(self, task, stage): method test_zero_to_fp32 (line 351) | def test_zero_to_fp32(self, stage, task): FILE: mplsandbox_for_rl/transformers/tests/extended/test_trainer_ext.py class TestTrainerExt (line 56) | class TestTrainerExt(TestCasePlus): method run_seq2seq_quick (line 57) | def run_seq2seq_quick( method test_run_seq2seq_no_dist (line 96) | def test_run_seq2seq_no_dist(self): method test_run_seq2seq_dp (line 101) | def test_run_seq2seq_dp(self): method test_run_seq2seq_ddp (line 106) | def test_run_seq2seq_ddp(self): method test_run_seq2seq_apex (line 111) | def test_run_seq2seq_apex(self): method test_trainer_log_level_replica (line 127) | def test_trainer_log_level_replica(self, experiment_id): method test_run_seq2seq (line 157) | def test_run_seq2seq(self): method test_run_seq2seq_bnb (line 184) | def test_run_seq2seq_bnb(self): method run_trainer (line 264) | def run_trainer( FILE: mplsandbox_for_rl/transformers/tests/fsdp/test_fsdp.py function get_master_port (line 62) | def get_master_port(real_launcher=False): function get_launcher (line 103) | def get_launcher(distributed=False, use_accelerate=False): function _parameterized_custom_name_func (line 121) | def _parameterized_custom_name_func(func, param_num, param): class TrainerIntegrationFSDP (line 131) | class TrainerIntegrationFSDP(TestCasePlus, TrainerIntegrationCommon): method setUp (line 132) | def setUp(self): method tearDown (line 154) | def tearDown(self): method test_fsdp_config (line 158) | def test_fsdp_config(self, sharding_strategy, dtype): method test_fsdp_config_transformers_auto_wrap (line 179) | def test_fsdp_config_transformers_auto_wrap(self, sharding_strategy, d... method test_basic_run (line 218) | def test_basic_run(self, sharding_strategy, dtype): method test_basic_run_with_cpu_offload (line 231) | def test_basic_run_with_cpu_offload(self, dtype): method test_training_and_can_resume_normally (line 243) | def test_training_and_can_resume_normally(self, state_dict_type): method test_fsdp_cpu_offloading (line 281) | def test_fsdp_cpu_offloading(self): method run_cmd_and_get_logs (line 291) | def run_cmd_and_get_logs(self, use_accelerate, sharding_strategy, laun... method get_base_args (line 312) | def get_base_args(self, output_dir, num_epochs, logging_steps): FILE: mplsandbox_for_rl/transformers/tests/generation/test_beam_constraints.py class ConstraintTest (line 30) | class ConstraintTest(unittest.TestCase): method test_input_types (line 31) | def test_input_types(self): method test_check_illegal_input (line 45) | def test_check_illegal_input(self): method test_example_progression (line 56) | def test_example_progression(self): method test_example_progression_unequal_three_mid_and_reset (line 79) | def test_example_progression_unequal_three_mid_and_reset(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_beam_search.py class BeamSearchTester (line 37) | class BeamSearchTester: method __init__ (line 38) | def __init__( method prepare_beam_scorer (line 65) | def prepare_beam_scorer(self, **kwargs): method prepare_inputs (line 75) | def prepare_inputs(self): method check_beam_hypotheses (line 82) | def check_beam_hypotheses(self, input_ids, *args): method check_beam_scorer_update (line 119) | def check_beam_scorer_update(self, input_ids, next_tokens, next_indice... method check_beam_scores_finalize (line 184) | def check_beam_scores_finalize(self, input_ids, next_tokens, next_indi... class ConstrainedBeamSearchTester (line 254) | class ConstrainedBeamSearchTester: method __init__ (line 255) | def __init__( method prepare_constrained_beam_scorer (line 289) | def prepare_constrained_beam_scorer(self, **kwargs): method prepare_inputs (line 300) | def prepare_inputs(self): method check_beam_hypotheses (line 310) | def check_beam_hypotheses(self, input_ids, *args): method check_constrained_beam_scorer_update (line 347) | def check_constrained_beam_scorer_update( method check_constrained_beam_scorer_finalize (line 418) | def check_constrained_beam_scorer_finalize( method _check_sequence_inside_sequence (line 520) | def _check_sequence_inside_sequence(self, tensor_1, tensor_2): class BeamSearchTest (line 545) | class BeamSearchTest(unittest.TestCase): method setUp (line 546) | def setUp(self): method test_beam_hypotheses (line 549) | def test_beam_hypotheses(self): method test_beam_scorer_update (line 553) | def test_beam_scorer_update(self): method test_beam_scorer_finalize (line 557) | def test_beam_scorer_finalize(self): class ConstrainedBeamSearchTest (line 563) | class ConstrainedBeamSearchTest(unittest.TestCase): method setUp (line 564) | def setUp(self): method test_constrained_beam_hypotheses (line 567) | def test_constrained_beam_hypotheses(self): method test_constrained_beam_scorer_update (line 571) | def test_constrained_beam_scorer_update(self): method test_constrained_beam_scorer_finalize (line 575) | def test_constrained_beam_scorer_finalize(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_configuration_utils.py class GenerationConfigTest (line 31) | class GenerationConfigTest(unittest.TestCase): method test_save_load_config (line 33) | def test_save_load_config(self, config_name): method test_from_model_config (line 55) | def test_from_model_config(self): method test_update (line 67) | def test_update(self): method test_initialize_new_kwargs (line 85) | def test_initialize_new_kwargs(self): method test_kwarg_init (line 99) | def test_kwarg_init(self): method test_validate (line 124) | def test_validate(self): method test_refuse_to_save (line 175) | def test_refuse_to_save(self): method test_generation_mode (line 206) | def test_generation_mode(self): class ConfigPushToHubTester (line 225) | class ConfigPushToHubTester(unittest.TestCase): method setUpClass (line 227) | def setUpClass(cls): method _try_delete_repo (line 232) | def _try_delete_repo(repo_id, token): method test_push_to_hub (line 239) | def test_push_to_hub(self): method test_push_to_hub_via_save_pretrained (line 258) | def test_push_to_hub_via_save_pretrained(self): method test_push_to_hub_in_organization (line 278) | def test_push_to_hub_in_organization(self): method test_push_to_hub_in_organization_via_save_pretrained (line 297) | def test_push_to_hub_in_organization_via_save_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_flax_logits_process.py class LogitsProcessorTest (line 44) | class LogitsProcessorTest(unittest.TestCase): method _get_uniform_logits (line 45) | def _get_uniform_logits(self, batch_size: int, length: int): method test_temperature_dist_warper (line 49) | def test_temperature_dist_warper(self): method test_top_k_dist_warper (line 80) | def test_top_k_dist_warper(self): method test_top_p_dist_warper (line 107) | def test_top_p_dist_warper(self): method test_min_length_dist_processor (line 138) | def test_min_length_dist_processor(self): method test_forced_bos_token_logits_processor (line 158) | def test_forced_bos_token_logits_processor(self): method test_forced_eos_token_logits_processor (line 179) | def test_forced_eos_token_logits_processor(self): method test_no_repeat_ngram_dist_processor (line 201) | def test_no_repeat_ngram_dist_processor(self): method test_processor_list (line 221) | def test_processor_list(self): method test_processor_list_jitted (line 278) | def test_processor_list_jitted(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_flax_utils.py function ids_tensor (line 41) | def ids_tensor(shape, vocab_size, rng=None): function random_attention_mask (line 59) | def random_attention_mask(shape, rng=None): class FlaxGenerationTesterMixin (line 67) | class FlaxGenerationTesterMixin: method _get_input_ids_and_config (line 71) | def _get_input_ids_and_config(self): method test_greedy_generate_pt_fx (line 90) | def test_greedy_generate_pt_fx(self): method test_greedy_generate (line 112) | def test_greedy_generate(self): method test_sample_generate (line 128) | def test_sample_generate(self): method test_beam_search_generate (line 144) | def test_beam_search_generate(self): method test_beam_search_generate_num_return_sequences (line 161) | def test_beam_search_generate_num_return_sequences(self): method test_sample_generate_logits_warper (line 174) | def test_sample_generate_logits_warper(self): method test_greedy_generate_logits_warper (line 196) | def test_greedy_generate_logits_warper(self): method test_beam_search_generate_logits_warper (line 214) | def test_beam_search_generate_logits_warper(self): method test_greedy_generate_attn_mask (line 233) | def test_greedy_generate_attn_mask(self): method test_sample_generate_attn_mask (line 253) | def test_sample_generate_attn_mask(self): method test_beam_search_generate_attn_mask (line 273) | def test_beam_search_generate_attn_mask(self): class FlaxGenerationIntegrationTests (line 295) | class FlaxGenerationIntegrationTests(unittest.TestCase): method test_validate_generation_inputs (line 296) | def test_validate_generation_inputs(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_framework_agnostic.py class GenerationIntegrationTestsMixin (line 11) | class GenerationIntegrationTestsMixin: method test_validate_generation_inputs (line 26) | def test_validate_generation_inputs(self): method test_custom_logits_processor (line 50) | def test_custom_logits_processor(self): method test_max_new_tokens_encoder_decoder (line 70) | def test_max_new_tokens_encoder_decoder(self): method test_max_new_tokens_decoder_only (line 106) | def test_max_new_tokens_decoder_only(self): method test_encoder_decoder_generate_with_inputs_embeds (line 137) | def test_encoder_decoder_generate_with_inputs_embeds(self): method test_transition_scores_greedy_search (line 154) | def test_transition_scores_greedy_search(self): method test_transition_scores_greedy_search_normalized (line 190) | def test_transition_scores_greedy_search_normalized(self): method test_transition_scores_beam_search_encoder_decoder (line 226) | def test_transition_scores_beam_search_encoder_decoder(self): method test_transition_scores_beam_search_encoder_decoder_with_eos (line 261) | def test_transition_scores_beam_search_encoder_decoder_with_eos(self): method test_transition_scores_beam_search_decoder_only (line 295) | def test_transition_scores_beam_search_decoder_only(self): method test_transition_scores_beam_sample_encoder_decoder (line 332) | def test_transition_scores_beam_sample_encoder_decoder(self): method test_transition_scores_early_stopping (line 369) | def test_transition_scores_early_stopping(self): method test_encoder_decoder_generate_attention_mask (line 404) | def test_encoder_decoder_generate_attention_mask(self): method test_generate_input_ids_as_kwarg (line 438) | def test_generate_input_ids_as_kwarg(self): method test_generate_input_ids_as_encoder_kwarg (line 460) | def test_generate_input_ids_as_encoder_kwarg(self): method test_generate_inputs_and_encoder_kwargs (line 483) | def test_generate_inputs_and_encoder_kwargs(self): method test_generate_too_many_encoder_kwargs (line 494) | def test_generate_too_many_encoder_kwargs(self): method test_generate_input_features_as_encoder_kwarg (line 505) | def test_generate_input_features_as_encoder_kwarg(self): method test_generate_pixel_values_as_encoder_kwarg (line 525) | def test_generate_pixel_values_as_encoder_kwarg(self): method test_generate_encoder_outputs_attention_mask (line 546) | def test_generate_encoder_outputs_attention_mask(self): method test_eos_token_id_int_and_list_greedy_search (line 571) | def test_eos_token_id_int_and_list_greedy_search(self): method test_eos_token_id_int_and_list_contrastive_search (line 598) | def test_eos_token_id_int_and_list_contrastive_search(self): method test_eos_token_id_int_and_list_beam_search (line 627) | def test_eos_token_id_int_and_list_beam_search(self): method test_generate_vision2text_conditioning (line 662) | def test_generate_vision2text_conditioning(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_logits_process.py class LogitsProcessorTest (line 62) | class LogitsProcessorTest(unittest.TestCase): method _get_uniform_logits (line 63) | def _get_uniform_logits(self, batch_size: int, length: int): method test_min_length_dist_processor (line 67) | def test_min_length_dist_processor(self): method test_new_min_length_dist_processor (line 87) | def test_new_min_length_dist_processor(self, eos_token_id: Union[int, ... method test_temperature_dist_warper (line 146) | def test_temperature_dist_warper(self): method test_repetition_penalty_dist_process (line 181) | def test_repetition_penalty_dist_process(self): method test_encoder_repetition_penalty_dist_process (line 205) | def test_encoder_repetition_penalty_dist_process(self): method test_top_k_dist_warper (line 233) | def test_top_k_dist_warper(self): method test_top_p_dist_warper (line 271) | def test_top_p_dist_warper(self): method test_min_p_dist_warper (line 309) | def test_min_p_dist_warper(self): method test_typical_dist_warper (line 355) | def test_typical_dist_warper(self): method test_epsilon_dist_warper (line 403) | def test_epsilon_dist_warper(self): method test_eta_dist_warper (line 443) | def test_eta_dist_warper(self): method test_no_repeat_ngram_dist_processor (line 483) | def test_no_repeat_ngram_dist_processor(self): method test_encoder_no_repeat_ngram_dist_processor (line 508) | def test_encoder_no_repeat_ngram_dist_processor(self): method test_no_bad_words_dist_processor (line 574) | def test_no_bad_words_dist_processor(self): method test_bias_dist_processor (line 602) | def test_bias_dist_processor(self): method test_processor_list (line 629) | def test_processor_list(self): method test_prefix_constrained_logits_processor (line 680) | def test_prefix_constrained_logits_processor(self): method test_hamming_diversity (line 710) | def test_hamming_diversity(self): method test_forced_bos_token_logits_processor (line 740) | def test_forced_bos_token_logits_processor(self): method test_forced_eos_token_logits_processor (line 764) | def test_forced_eos_token_logits_processor(self): method test_remove_nan_inf_logits_processor (line 791) | def test_remove_nan_inf_logits_processor(self): method test_exponential_decay_length_penalty (line 818) | def test_exponential_decay_length_penalty(self): method test_normalization (line 855) | def test_normalization(self): method test_classifier_free_guidance (line 873) | def test_classifier_free_guidance(self): method test_early_stop_processor (line 924) | def test_early_stop_processor(self): method test_early_stop_processor_multi_eos (line 940) | def test_early_stop_processor_multi_eos(self): method test_watermarking_processor (line 956) | def test_watermarking_processor(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_stopping_criteria.py class StoppingCriteriaTestCase (line 40) | class StoppingCriteriaTestCase(unittest.TestCase): method _get_tensors (line 41) | def _get_tensors(self, length): method test_list_criteria (line 49) | def test_list_criteria(self): method test_max_length_criteria (line 67) | def test_max_length_criteria(self): method test_max_new_tokens_criteria (line 79) | def test_max_new_tokens_criteria(self): method test_max_time_criteria (line 94) | def test_max_time_criteria(self): method test_eos_token_criteria (line 103) | def test_eos_token_criteria(self): method test_validate_stopping_criteria (line 119) | def test_validate_stopping_criteria(self): method test_stop_string_criteria (line 129) | def test_stop_string_criteria(self): method test_stop_string_matching_positions (line 177) | def test_stop_string_matching_positions(self): method test_stop_string_embedding_vecs (line 191) | def test_stop_string_embedding_vecs(self): method test_single_letter_stop_string (line 211) | def test_single_letter_stop_string(self): method test_criterias_per_row (line 229) | def test_criterias_per_row(self): method test_criterias_per_row_batched (line 251) | def test_criterias_per_row_batched(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_streamers.py class StreamerTester (line 33) | class StreamerTester(unittest.TestCase): method test_text_streamer_matches_non_streaming (line 34) | def test_text_streamer_matches_non_streaming(self): method test_iterator_streamer_matches_non_streaming (line 51) | def test_iterator_streamer_matches_non_streaming(self): method test_text_streamer_skip_prompt (line 70) | def test_text_streamer_skip_prompt(self): method test_text_streamer_decode_kwargs (line 88) | def test_text_streamer_decode_kwargs(self): method test_iterator_streamer_timeout (line 107) | def test_iterator_streamer_timeout(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_tf_logits_process.py class TFLogitsProcessorTest (line 51) | class TFLogitsProcessorTest(unittest.TestCase): method _get_uniform_logits (line 52) | def _get_uniform_logits(self, batch_size: int, length: int): method test_min_length_dist_processor (line 57) | def test_min_length_dist_processor(self, use_xla): method test_temperature_dist_warper (line 81) | def test_temperature_dist_warper(self, use_xla): method test_repetition_penalty_dist_process (line 119) | def test_repetition_penalty_dist_process(self, use_xla): method test_top_k_dist_warper (line 149) | def test_top_k_dist_warper(self, use_xla): method test_top_p_dist_warper (line 188) | def test_top_p_dist_warper(self, use_xla): method test_no_repeat_ngram_dist_processor (line 230) | def test_no_repeat_ngram_dist_processor(self): method test_no_bad_words_dist_processor (line 257) | def test_no_bad_words_dist_processor(self, use_xla): method test_forced_bos_token_logits_processor (line 283) | def test_forced_bos_token_logits_processor(self, use_xla): method test_forced_eos_token_logits_processor (line 310) | def test_forced_eos_token_logits_processor(self, use_xla): method test_suppress_tokens_at_begin_logits_processor (line 340) | def test_suppress_tokens_at_begin_logits_processor(self, use_xla): method test_suppress_tokens_logits_processor (line 368) | def test_suppress_tokens_logits_processor(self, use_xla): method test_force_tokens_logits_processor (line 388) | def test_force_tokens_logits_processor(self, use_xla): method test_processor_list (line 420) | def test_processor_list(self, use_xla): FILE: mplsandbox_for_rl/transformers/tests/generation/test_tf_utils.py class TFGenerationIntegrationTests (line 52) | class TFGenerationIntegrationTests(unittest.TestCase, GenerationIntegrat... method test_generate_tf_function_export_fixed_input_length (line 68) | def test_generate_tf_function_export_fixed_input_length(self): method test_generate_tf_function_export_fixed_batch_size (line 111) | def test_generate_tf_function_export_fixed_batch_size(self): method test_generate_tf_function_export_with_tf_tokenizer (line 155) | def test_generate_tf_function_export_with_tf_tokenizer(self): method test_eos_token_id_int_and_list_top_k_top_sampling (line 183) | def test_eos_token_id_int_and_list_top_k_top_sampling(self): method test_model_kwarg_encoder_signature_filtering (line 212) | def test_model_kwarg_encoder_signature_filtering(self): FILE: mplsandbox_for_rl/transformers/tests/generation/test_utils.py class GenerationTesterMixin (line 91) | class GenerationTesterMixin: method _get_input_ids_and_config (line 97) | def _get_input_ids_and_config(self, batch_size=2): method _get_logits_processor_kwargs (line 121) | def _get_logits_processor_kwargs(self, do_sample=False): method _get_beam_kwargs (line 138) | def _get_beam_kwargs(self, num_return_sequences=1): method _get_diverse_beam_kwargs (line 147) | def _get_diverse_beam_kwargs(self, num_return_sequences=1): method _get_constrained_beam_kwargs (line 158) | def _get_constrained_beam_kwargs(self, num_return_sequences=1): method _get_encoder_outputs (line 168) | def _get_encoder_outputs( method _greedy_generate (line 187) | def _greedy_generate( method _sample_generate (line 216) | def _sample_generate( method _beam_search_generate (line 248) | def _beam_search_generate( method _beam_sample_generate (line 278) | def _beam_sample_generate( method _group_beam_search_generate (line 309) | def _group_beam_search_generate( method _constrained_beam_search_generate (line 339) | def _constrained_beam_search_generate( method _contrastive_generate (line 371) | def _contrastive_generate( method test_greedy_generate (line 406) | def test_greedy_generate(self): method test_greedy_generate_dict_outputs (line 418) | def test_greedy_generate_dict_outputs(self): method test_greedy_generate_dict_outputs_use_cache (line 448) | def test_greedy_generate_dict_outputs_use_cache(self): method test_sample_generate (line 477) | def test_sample_generate(self): method test_sample_generate_dict_output (line 494) | def test_sample_generate_dict_output(self): method test_beam_search_generate (line 525) | def test_beam_search_generate(self): method test_beam_search_generate_dict_output (line 544) | def test_beam_search_generate_dict_output(self): method test_beam_search_generate_dict_outputs_use_cache (line 579) | def test_beam_search_generate_dict_outputs_use_cache(self): method test_model_parallel_beam_search (line 617) | def test_model_parallel_beam_search(self): method test_beam_sample_generate (line 639) | def test_beam_sample_generate(self): method test_beam_sample_generate_dict_output (line 675) | def test_beam_sample_generate_dict_output(self): method test_generate_without_input_ids (line 712) | def test_generate_without_input_ids(self): method test_group_beam_search_generate (line 732) | def test_group_beam_search_generate(self): method test_group_beam_search_generate_dict_output (line 764) | def test_group_beam_search_generate_dict_output(self): method test_constrained_beam_search_generate (line 799) | def test_constrained_beam_search_generate(self): method test_constrained_beam_search_generate_dict_output (line 856) | def test_constrained_beam_search_generate_dict_output(self): method test_contrastive_generate (line 902) | def test_contrastive_generate(self): method test_contrastive_generate_dict_outputs_use_cache (line 929) | def test_contrastive_generate_dict_outputs_use_cache(self): method test_contrastive_generate_low_memory (line 964) | def test_contrastive_generate_low_memory(self): method test_beam_search_low_memory (line 1006) | def test_beam_search_low_memory(self): method test_assisted_decoding_matches_greedy_search (line 1043) | def test_assisted_decoding_matches_greedy_search(self, assistant_type): method test_prompt_lookup_decoding_matches_greedy_search (line 1122) | def test_prompt_lookup_decoding_matches_greedy_search(self): method test_dola_decoding_sample (line 1184) | def test_dola_decoding_sample(self): method test_assisted_decoding_sample (line 1233) | def test_assisted_decoding_sample(self): method test_prompt_lookup_decoding_stops_at_eos (line 1292) | def test_prompt_lookup_decoding_stops_at_eos(self): method test_generate_with_head_masking (line 1320) | def test_generate_with_head_masking(self): method test_left_padding_compatibility (line 1359) | def test_left_padding_compatibility(self): method test_past_key_values_format (line 1427) | def test_past_key_values_format(self): method test_generate_from_inputs_embeds_decoder_only (line 1498) | def test_generate_from_inputs_embeds_decoder_only(self): method test_generate_continue_from_past_key_values (line 1548) | def test_generate_continue_from_past_key_values(self): method test_new_cache_format (line 1625) | def test_new_cache_format(self, num_beams, do_sample): method test_generate_with_static_cache (line 1689) | def test_generate_with_static_cache(self): method test_generate_with_quant_cache (line 1737) | def test_generate_with_quant_cache(self): method test_generate_compile_fullgraph (line 1772) | def test_generate_compile_fullgraph(self): method _check_outputs (line 1821) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method _check_scores (line 1910) | def _check_scores(self, batch_size, scores, length, config): method _check_logits (line 1916) | def _check_logits(self, batch_size, scores, config): method _check_attentions_for_generate (line 1924) | def _check_attentions_for_generate( method _check_encoder_attention_for_generate (line 1948) | def _check_encoder_attention_for_generate(self, attentions, batch_size... method _check_hidden_states_for_generate (line 1956) | def _check_hidden_states_for_generate( method _check_encoder_hidden_states_for_generate (line 1975) | def _check_encoder_hidden_states_for_generate(self, hidden_states, bat... method _check_past_key_values_for_generate (line 1983) | def _check_past_key_values_for_generate(self, batch_size, past_key_val... method _check_sequence_inside_sequence (line 2007) | def _check_sequence_inside_sequence(self, tensor_1, tensor_2): class UtilsFunctionsTest (line 2032) | class UtilsFunctionsTest(unittest.TestCase): method test_speculative_sampling (line 2033) | def test_speculative_sampling(self): class GenerationIntegrationTests (line 2070) | class GenerationIntegrationTests(unittest.TestCase, GenerationIntegratio... method test_diverse_beam_search (line 2086) | def test_diverse_beam_search(self): method test_max_length_if_input_embeds (line 2120) | def test_max_length_if_input_embeds(self): method test_min_length_if_input_embeds (line 2134) | def test_min_length_if_input_embeds(self): method test_custom_stopping_criteria_overload_error (line 2148) | def test_custom_stopping_criteria_overload_error(self): method test_custom_stopping_criteria (line 2162) | def test_custom_stopping_criteria(self): method test_stop_sequence_stopping_criteria (line 2186) | def test_stop_sequence_stopping_criteria(self): method test_generate_non_nlp_input_ids_as_kwarg (line 2199) | def test_generate_non_nlp_input_ids_as_kwarg(self): method test_generate_input_values_as_encoder_kwarg (line 2212) | def test_generate_input_values_as_encoder_kwarg(self): method test_transition_scores_group_beam_search_encoder_decoder (line 2223) | def test_transition_scores_group_beam_search_encoder_decoder(self): method test_beam_search_low_memory (line 2252) | def test_beam_search_low_memory(self): method test_watermark_generation (line 2266) | def test_watermark_generation(self): method test_beam_search_example_integration (line 2298) | def test_beam_search_example_integration(self): method test_constrained_beam_search (line 2325) | def test_constrained_beam_search(self): method test_constrained_beam_search_mixed (line 2363) | def test_constrained_beam_search_mixed(self): method test_constrained_beam_search_mixed_mixin (line 2404) | def test_constrained_beam_search_mixed_mixin(self): method test_cfg_mixin (line 2442) | def test_cfg_mixin(self): method test_constrained_beam_search_example_translation_mixin (line 2482) | def test_constrained_beam_search_example_translation_mixin(self): method test_constrained_beam_search_example_integration (line 2507) | def test_constrained_beam_search_example_integration(self): method test_per_row_stopping_criteria (line 2540) | def test_per_row_stopping_criteria(self): method test_constrained_beam_search_mixin_type_checks (line 2576) | def test_constrained_beam_search_mixin_type_checks(self): method test_batched_decoder_start_id (line 2617) | def test_batched_decoder_start_id(self): method test_decoder_start_id_from_config (line 2637) | def test_decoder_start_id_from_config(self): method test_contrastive_search_batched (line 2666) | def test_contrastive_search_batched(self): method test_logits_processor_not_inplace (line 2692) | def test_logits_processor_not_inplace(self): method test_eos_token_id_int_and_list_top_k_top_sampling (line 2713) | def test_eos_token_id_int_and_list_top_k_top_sampling(self): method test_model_kwarg_encoder_signature_filtering (line 2741) | def test_model_kwarg_encoder_signature_filtering(self): method test_default_max_length_warning (line 2778) | def test_default_max_length_warning(self): method test_length_warning_assisted_generation (line 2803) | def test_length_warning_assisted_generation(self): method test_generated_length_assisted_generation (line 2825) | def test_generated_length_assisted_generation(self): method test_model_kwarg_assisted_decoding_decoder_only (line 2853) | def test_model_kwarg_assisted_decoding_decoder_only(self): method test_model_kwarg_assisted_decoding_encoder_decoder (line 2887) | def test_model_kwarg_assisted_decoding_encoder_decoder(self): method test_assisted_decoding_encoder_decoder_shared_encoder (line 2953) | def test_assisted_decoding_encoder_decoder_shared_encoder(self): method test_assisted_decoding_num_assistant_tokens_heuristic_schedule (line 3031) | def test_assisted_decoding_num_assistant_tokens_heuristic_schedule(self): method test_assisted_decoding_num_assistant_tokens_heuristic_transient_schedule (line 3054) | def test_assisted_decoding_num_assistant_tokens_heuristic_transient_sc... method test_validate_assistant (line 3078) | def test_validate_assistant(self): method test_compare_unprocessed_logit_scores (line 3138) | def test_compare_unprocessed_logit_scores(self): method test_return_unprocessed_logit_scores (line 3166) | def test_return_unprocessed_logit_scores(self): method test_assisted_decoding_in_different_gpu (line 3197) | def test_assisted_decoding_in_different_gpu(self): method test_assisted_decoding_in_gpu_cpu (line 3221) | def test_assisted_decoding_in_gpu_cpu(self): method test_special_tokens_fall_back_to_model_default (line 3243) | def test_special_tokens_fall_back_to_model_default(self): class TokenHealingTestCase (line 3279) | class TokenHealingTestCase(unittest.TestCase): method test_prompts (line 3297) | def test_prompts(self, name, input, expected): method test_generate_from_inputs_embeds_with_bos_token_id_is_none (line 3314) | def test_generate_from_inputs_embeds_with_bos_token_id_is_none(self): FILE: mplsandbox_for_rl/transformers/tests/models/albert/test_modeling_albert.py class AlbertModelTester (line 43) | class AlbertModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 97) | def prepare_config_and_inputs(self): method get_config (line 120) | def get_config(self): method create_and_check_model (line 136) | def create_and_check_model( method create_and_check_for_pretraining (line 148) | def create_and_check_for_pretraining( method create_and_check_for_masked_lm (line 164) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 173) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 189) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 199) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 209) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 227) | def prepare_config_and_inputs_for_common(self): class AlbertModelTest (line 243) | class AlbertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method _prepare_for_class (line 272) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 285) | def setUp(self): method test_config (line 289) | def test_config(self): method test_model (line 292) | def test_model(self): method test_for_pretraining (line 296) | def test_for_pretraining(self): method test_for_masked_lm (line 300) | def test_for_masked_lm(self): method test_for_multiple_choice (line 304) | def test_for_multiple_choice(self): method test_for_question_answering (line 308) | def test_for_question_answering(self): method test_for_sequence_classification (line 312) | def test_for_sequence_classification(self): method test_model_various_embeddings (line 316) | def test_model_various_embeddings(self): method test_model_from_pretrained (line 323) | def test_model_from_pretrained(self): class AlbertModelIntegrationTest (line 330) | class AlbertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 332) | def test_inference_no_head_absolute_embedding(self): FILE: mplsandbox_for_rl/transformers/tests/models/albert/test_modeling_flax_albert.py class FlaxAlbertModelTester (line 39) | class FlaxAlbertModelTester(unittest.TestCase): method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 84) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 112) | def prepare_config_and_inputs_for_common(self): class FlaxAlbertModelTest (line 120) | class FlaxAlbertModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 136) | def setUp(self): method test_model_from_pretrained (line 140) | def test_model_from_pretrained(self): class FlaxAlbertModelIntegrationTest (line 148) | class FlaxAlbertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 150) | def test_inference_no_head_absolute_embedding(self): FILE: mplsandbox_for_rl/transformers/tests/models/albert/test_modeling_tf_albert.py class TFAlbertModelTester (line 45) | class TFAlbertModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method create_and_check_albert_model (line 132) | def create_and_check_albert_model( method create_and_check_albert_for_pretraining (line 151) | def create_and_check_albert_for_pretraining( method create_and_check_albert_for_masked_lm (line 161) | def create_and_check_albert_for_masked_lm( method create_and_check_albert_for_sequence_classification (line 169) | def create_and_check_albert_for_sequence_classification( method create_and_check_albert_for_question_answering (line 178) | def create_and_check_albert_for_question_answering( method create_and_check_albert_for_multiple_choice (line 187) | def create_and_check_albert_for_multiple_choice( method create_and_check_albert_for_token_classification (line 203) | def create_and_check_albert_for_token_classification( method prepare_config_and_inputs_for_common (line 216) | def prepare_config_and_inputs_for_common(self): class TFAlbertModelTest (line 232) | class TFAlbertModelTest(TFModelTesterMixin, PipelineTesterMixin, unittes... method _prepare_for_class (line 262) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 271) | def setUp(self): method test_config (line 275) | def test_config(self): method test_albert_model (line 278) | def test_albert_model(self): method test_for_pretraining (line 282) | def test_for_pretraining(self): method test_for_masked_lm (line 286) | def test_for_masked_lm(self): method test_for_multiple_choice (line 290) | def test_for_multiple_choice(self): method test_for_sequence_classification (line 294) | def test_for_sequence_classification(self): method test_for_question_answering (line 298) | def test_for_question_answering(self): method test_model_from_pretrained (line 303) | def test_model_from_pretrained(self): class TFAlbertModelIntegrationTest (line 310) | class TFAlbertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 312) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/albert/test_tokenization_albert.py class AlbertTokenizationTest (line 29) | class AlbertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 37) | def setUp(self): method get_input_output_texts (line 44) | def get_input_output_texts(self, tokenizer): method test_convert_token_and_id (line 49) | def test_convert_token_and_id(self): method test_get_vocab (line 57) | def test_get_vocab(self): method test_vocab_size (line 65) | def test_vocab_size(self): method test_rust_and_python_full_tokenizers (line 68) | def test_rust_and_python_full_tokenizers(self): method test_full_tokenizer (line 90) | def test_full_tokenizer(self): method test_sequence_builders (line 111) | def test_sequence_builders(self): method test_tokenizer_integration (line 126) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/align/test_modeling_align.py class AlignVisionModelTester (line 58) | class AlignVisionModelTester: method __init__ (line 59) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 95) | def get_config(self): method create_and_check_model (line 108) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 121) | def prepare_config_and_inputs_for_common(self): class AlignVisionModelTest (line 129) | class AlignVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 142) | def setUp(self): method test_config (line 152) | def test_config(self): method test_inputs_embeds (line 156) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 160) | def test_inputs_embeds_matches_input_ids(self): method test_model_get_set_embeddings (line 164) | def test_model_get_set_embeddings(self): method test_forward_signature (line 167) | def test_forward_signature(self): method test_model (line 179) | def test_model(self): method test_hidden_states_output (line 183) | def test_hidden_states_output(self): method test_training (line 214) | def test_training(self): method test_training_gradient_checkpointing (line 218) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 224) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 230) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_from_pretrained (line 234) | def test_model_from_pretrained(self): class AlignTextModelTester (line 240) | class AlignTextModelTester: method __init__ (line 241) | def __init__( method prepare_config_and_inputs (line 283) | def prepare_config_and_inputs(self): method get_config (line 298) | def get_config(self): method create_and_check_model (line 314) | def create_and_check_model(self, config, input_ids, token_type_ids, in... method prepare_config_and_inputs_for_common (line 325) | def prepare_config_and_inputs_for_common(self): class AlignTextModelTest (line 338) | class AlignTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 344) | def setUp(self): method test_config (line 348) | def test_config(self): method test_model (line 351) | def test_model(self): method test_training (line 356) | def test_training(self): method test_training_gradient_checkpointing (line 360) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 366) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 372) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 376) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 380) | def test_inputs_embeds_matches_input_ids(self): method test_save_load_fast_init_from_base (line 384) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 388) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 392) | def test_model_from_pretrained(self): class AlignModelTester (line 398) | class AlignModelTester: method __init__ (line 399) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 411) | def prepare_config_and_inputs(self): method get_config (line 419) | def get_config(self): method create_and_check_model (line 424) | def create_and_check_model(self, config, input_ids, token_type_ids, at... method prepare_config_and_inputs_for_common (line 435) | def prepare_config_and_inputs_for_common(self): class AlignModelTest (line 449) | class AlignModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 458) | def setUp(self): method test_model (line 461) | def test_model(self): method test_multi_gpu_data_parallel_forward (line 466) | def test_multi_gpu_data_parallel_forward(self): method test_hidden_states_output (line 470) | def test_hidden_states_output(self): method test_inputs_embeds (line 474) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 478) | def test_inputs_embeds_matches_input_ids(self): method test_retain_grad_hidden_states_attentions (line 482) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 486) | def test_model_get_set_embeddings(self): method test_initialization (line 490) | def test_initialization(self): method _create_and_check_torchscript (line 518) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 589) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 605) | def test_model_from_pretrained(self): function prepare_img (line 612) | def prepare_img(): class AlignModelIntegrationTest (line 620) | class AlignModelIntegrationTest(unittest.TestCase): method test_inference (line 622) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/align/test_processor_align.py class AlignProcessorTest (line 39) | class AlignProcessorTest(ProcessorTesterMixin, unittest.TestCase): method setUp (line 42) | def setUp(self): method get_tokenizer (line 77) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 80) | def get_rust_tokenizer(self, **kwargs): method get_image_processor (line 83) | def get_image_processor(self, **kwargs): method tearDown (line 86) | def tearDown(self): method prepare_image_inputs (line 89) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 98) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 122) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 139) | def test_image_processor(self): method test_tokenizer (line 153) | def test_tokenizer(self): method test_processor (line 167) | def test_processor(self): method test_tokenizer_decode (line 184) | def test_tokenizer_decode(self): method test_model_input_names (line 197) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/altclip/test_modeling_altclip.py class AltCLIPVisionModelTester (line 50) | class AltCLIPVisionModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 95) | def get_config(self): method create_and_check_model (line 110) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 123) | def prepare_config_and_inputs_for_common(self): class AltCLIPVisionModelTest (line 131) | class AltCLIPVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 143) | def setUp(self): method test_config (line 149) | def test_config(self): method test_inputs_embeds (line 153) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 156) | def test_model_get_set_embeddings(self): method test_forward_signature (line 165) | def test_forward_signature(self): method test_model (line 177) | def test_model(self): method test_training (line 182) | def test_training(self): method test_training_gradient_checkpointing (line 186) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 192) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 198) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 202) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 206) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 210) | def test_model_from_pretrained(self): class AltCLIPTextModelTester (line 214) | class AltCLIPTextModelTester: method __init__ (line 215) | def __init__( method prepare_config_and_inputs (line 255) | def prepare_config_and_inputs(self): method get_config (line 273) | def get_config(self): method create_and_check_model (line 289) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 299) | def prepare_config_and_inputs_for_common(self): class AltCLIPTextModelTest (line 307) | class AltCLIPTextModelTest(ModelTesterMixin, unittest.TestCase): method test_resize_tokens_embeddings (line 315) | def test_resize_tokens_embeddings(self): method setUp (line 318) | def setUp(self): method test_config (line 322) | def test_config(self): method test_model (line 325) | def test_model(self): method test_training (line 330) | def test_training(self): method test_training_gradient_checkpointing (line 334) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 340) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 346) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_outputs_equivalence (line 349) | def test_model_outputs_equivalence(self): method test_hidden_states_output (line 353) | def test_hidden_states_output(self): method test_inputs_embeds (line 357) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 361) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 365) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 369) | def test_model_from_pretrained(self): class AltCLIPModelTester (line 375) | class AltCLIPModelTester: method __init__ (line 376) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 388) | def prepare_config_and_inputs(self): method get_config (line 395) | def get_config(self): method create_and_check_model (line 400) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 408) | def prepare_config_and_inputs_for_common(self): function prepare_img (line 421) | def prepare_img(): class AltCLIPModelTest (line 428) | class AltCLIPModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method is_pipeline_test_to_skip (line 438) | def is_pipeline_test_to_skip( method setUp (line 446) | def setUp(self): method test_model (line 449) | def test_model(self): method test_hidden_states_output (line 454) | def test_hidden_states_output(self): method test_inputs_embeds (line 458) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 462) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 466) | def test_model_get_set_embeddings(self): method test_initialization (line 470) | def test_initialization(self): method _create_and_check_torchscript (line 492) | def _create_and_check_torchscript(self, config, inputs_dict): method test_model_from_pretrained (line 564) | def test_model_from_pretrained(self): class AltCLIPModelIntegrationTest (line 572) | class AltCLIPModelIntegrationTest(unittest.TestCase): method test_inference (line 574) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/audio_spectrogram_transformer/test_feature_extraction_audio_spectrogram_transformer.py function floats_list (line 39) | def floats_list(shape, scale=1.0, rng=None, name=None): class ASTFeatureExtractionTester (line 53) | class ASTFeatureExtractionTester(unittest.TestCase): method __init__ (line 54) | def __init__( method prepare_feat_extract_dict (line 77) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 86) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class ASTFeatureExtractionTest (line 107) | class ASTFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unitt... method setUp (line 110) | def setUp(self): method test_call (line 113) | def test_call(self): method test_double_precision_pad (line 140) | def test_double_precision_pad(self): method _load_datasamples (line 153) | def _load_datasamples(self, num_samples): method test_integration (line 163) | def test_integration(self): method test_feat_extract_from_and_save_pretrained (line 179) | def test_feat_extract_from_and_save_pretrained(self): method test_feat_extract_to_json_file (line 191) | def test_feat_extract_to_json_file(self): class ASTFeatureExtractionWithoutTorchaudioTest (line 210) | class ASTFeatureExtractionWithoutTorchaudioTest(ASTFeatureExtractionTest): method test_using_audio_utils (line 211) | def test_using_audio_utils(self): FILE: mplsandbox_for_rl/transformers/tests/models/audio_spectrogram_transformer/test_modeling_audio_spectrogram_transformer.py class ASTModelTester (line 44) | class ASTModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method get_config (line 106) | def get_config(self): method create_and_check_model (line 125) | def create_and_check_model(self, config, input_values, labels): method prepare_config_and_inputs_for_common (line 132) | def prepare_config_and_inputs_for_common(self): class ASTModelTest (line 144) | class ASTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method is_pipeline_test_to_skip (line 169) | def is_pipeline_test_to_skip( method setUp (line 177) | def setUp(self): method test_config (line 181) | def test_config(self): method test_inputs_embeds (line 185) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 188) | def test_model_get_set_embeddings(self): method test_forward_signature (line 197) | def test_forward_signature(self): method test_model (line 209) | def test_model(self): method test_model_from_pretrained (line 214) | def test_model_from_pretrained(self): function prepare_audio (line 221) | def prepare_audio(): class ASTModelIntegrationTest (line 233) | class ASTModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 235) | def default_feature_extractor(self): method test_inference_audio_classification (line 243) | def test_inference_audio_classification(self): FILE: mplsandbox_for_rl/transformers/tests/models/auto/test_configuration_auto.py class AutoConfigTest (line 40) | class AutoConfigTest(unittest.TestCase): method setUp (line 41) | def setUp(self): method test_module_spec (line 44) | def test_module_spec(self): method test_config_from_model_shortcut (line 48) | def test_config_from_model_shortcut(self): method test_config_model_type_from_local_file (line 52) | def test_config_model_type_from_local_file(self): method test_config_model_type_from_model_identifier (line 56) | def test_config_model_type_from_model_identifier(self): method test_config_for_model_str (line 60) | def test_config_for_model_str(self): method test_pattern_matching_fallback (line 64) | def test_pattern_matching_fallback(self): method test_new_config_registration (line 74) | def test_new_config_registration(self): method test_repo_not_found (line 95) | def test_repo_not_found(self): method test_revision_not_found (line 101) | def test_revision_not_found(self): method test_configuration_not_found (line 107) | def test_configuration_not_found(self): method test_from_pretrained_dynamic_config (line 114) | def test_from_pretrained_dynamic_config(self): method test_from_pretrained_dynamic_config_conflict (line 131) | def test_from_pretrained_dynamic_config_conflict(self): FILE: mplsandbox_for_rl/transformers/tests/models/auto/test_feature_extraction_auto.py class AutoFeatureExtractorTest (line 45) | class AutoFeatureExtractorTest(unittest.TestCase): method setUp (line 46) | def setUp(self): method test_feature_extractor_from_model_shortcut (line 49) | def test_feature_extractor_from_model_shortcut(self): method test_feature_extractor_from_local_directory_from_key (line 53) | def test_feature_extractor_from_local_directory_from_key(self): method test_feature_extractor_from_local_directory_from_config (line 57) | def test_feature_extractor_from_local_directory_from_config(self): method test_feature_extractor_from_local_file (line 79) | def test_feature_extractor_from_local_file(self): method test_repo_not_found (line 83) | def test_repo_not_found(self): method test_revision_not_found (line 89) | def test_revision_not_found(self): method test_feature_extractor_not_found (line 95) | def test_feature_extractor_not_found(self): method test_from_pretrained_dynamic_feature_extractor (line 102) | def test_from_pretrained_dynamic_feature_extractor(self): method test_new_feature_extractor_registration (line 125) | def test_new_feature_extractor_registration(self): method test_from_pretrained_dynamic_feature_extractor_conflict (line 146) | def test_from_pretrained_dynamic_feature_extractor_conflict(self): FILE: mplsandbox_for_rl/transformers/tests/models/auto/test_image_processing_auto.py class AutoImageProcessorTest (line 42) | class AutoImageProcessorTest(unittest.TestCase): method setUp (line 43) | def setUp(self): method test_image_processor_from_model_shortcut (line 46) | def test_image_processor_from_model_shortcut(self): method test_image_processor_from_local_directory_from_key (line 50) | def test_image_processor_from_local_directory_from_key(self): method test_image_processor_from_local_directory_from_feature_extractor_key (line 63) | def test_image_processor_from_local_directory_from_feature_extractor_k... method test_image_processor_from_local_directory_from_config (line 77) | def test_image_processor_from_local_directory_from_config(self): method test_image_processor_from_local_file (line 108) | def test_image_processor_from_local_file(self): method test_repo_not_found (line 119) | def test_repo_not_found(self): method test_revision_not_found (line 125) | def test_revision_not_found(self): method test_image_processor_not_found (line 131) | def test_image_processor_not_found(self): method test_use_fast_selection (line 140) | def test_use_fast_selection(self): method test_from_pretrained_dynamic_image_processor (line 155) | def test_from_pretrained_dynamic_image_processor(self): method test_new_image_processor_registration (line 176) | def test_new_image_processor_registration(self): method test_from_pretrained_dynamic_image_processor_conflict (line 207) | def test_from_pretrained_dynamic_image_processor_conflict(self): FILE: mplsandbox_for_rl/transformers/tests/models/auto/test_modeling_auto.py class AutoModelTest (line 91) | class AutoModelTest(unittest.TestCase): method setUp (line 92) | def setUp(self): method test_model_from_pretrained (line 96) | def test_model_from_pretrained(self): method test_model_for_pretraining_from_pretrained (line 116) | def test_model_for_pretraining_from_pretrained(self): method test_lmhead_model_from_pretrained (line 131) | def test_lmhead_model_from_pretrained(self): method test_model_for_causal_lm (line 143) | def test_model_for_causal_lm(self): method test_model_for_masked_lm (line 155) | def test_model_for_masked_lm(self): method test_model_for_encoder_decoder_lm (line 167) | def test_model_for_encoder_decoder_lm(self): method test_sequence_classification_model_from_pretrained (line 179) | def test_sequence_classification_model_from_pretrained(self): method test_question_answering_model_from_pretrained (line 191) | def test_question_answering_model_from_pretrained(self): method test_table_question_answering_model_from_pretrained (line 203) | def test_table_question_answering_model_from_pretrained(self): method test_token_classification_model_from_pretrained (line 215) | def test_token_classification_model_from_pretrained(self): method test_auto_backbone_timm_model_from_pretrained (line 227) | def test_auto_backbone_timm_model_from_pretrained(self): method test_auto_backbone_from_pretrained (line 247) | def test_auto_backbone_from_pretrained(self): method test_from_pretrained_identifier (line 262) | def test_from_pretrained_identifier(self): method test_from_identifier_from_model_type (line 268) | def test_from_identifier_from_model_type(self): method test_from_pretrained_with_tuple_values (line 274) | def test_from_pretrained_with_tuple_values(self): method test_from_pretrained_dynamic_model_local (line 289) | def test_from_pretrained_dynamic_model_local(self): method test_from_pretrained_dynamic_model_distant (line 310) | def test_from_pretrained_dynamic_model_distant(self): method test_from_pretrained_dynamic_model_distant_with_ref (line 343) | def test_from_pretrained_dynamic_model_distant_with_ref(self): method test_from_pretrained_dynamic_model_with_period (line 371) | def test_from_pretrained_dynamic_model_with_period(self): method test_new_model_registration (line 392) | def test_new_model_registration(self): method test_from_pretrained_dynamic_model_conflict (line 443) | def test_from_pretrained_dynamic_model_conflict(self): method test_repo_not_found (line 471) | def test_repo_not_found(self): method test_revision_not_found (line 477) | def test_revision_not_found(self): method test_model_file_not_found (line 483) | def test_model_file_not_found(self): method test_model_from_tf_suggestion (line 490) | def test_model_from_tf_suggestion(self): method test_model_from_flax_suggestion (line 494) | def test_model_from_flax_suggestion(self): method test_cached_model_has_minimum_calls_to_head (line 498) | def test_cached_model_has_minimum_calls_to_head(self): method test_attr_not_existing (line 515) | def test_attr_not_existing(self): FILE: mplsandbox_for_rl/transformers/tests/models/auto/test_modeling_flax_auto.py class FlaxAutoModelTest (line 30) | class FlaxAutoModelTest(unittest.TestCase): method test_bert_from_pretrained (line 32) | def test_bert_from_pretrained(self): method test_roberta_from_pretrained (line 44) | def test_roberta_from_pretrained(self): method test_bert_jax_jit (line 56) | def test_bert_jax_jit(self): method test_roberta_jax_jit (line 69) | def test_roberta_jax_jit(self): method test_repo_not_found (line 81) | def test_repo_not_found(self): method test_revision_not_found (line 87) | def test_revision_not_found(self): method test_model_file_not_found (line 93) | def test_model_file_not_found(self): method test_model_from_pt_suggestion (line 100) | def test_model_from_pt_suggestion(self): FILE: mplsandbox_for_rl/transformers/tests/models/auto/test_modeling_tf_auto.py class NewModelConfig (line 70) | class NewModelConfig(BertConfig): class TFNewModel (line 76) | class TFNewModel(TFBertModel): class TFAutoModelTest (line 81) | class TFAutoModelTest(unittest.TestCase): method test_model_from_pretrained (line 83) | def test_model_from_pretrained(self): method test_model_for_pretraining_from_pretrained (line 94) | def test_model_for_pretraining_from_pretrained(self): method test_model_for_causal_lm (line 105) | def test_model_for_causal_lm(self): method test_lmhead_model_from_pretrained (line 117) | def test_lmhead_model_from_pretrained(self): method test_model_for_masked_lm (line 128) | def test_model_for_masked_lm(self): method test_model_for_encoder_decoder_lm (line 140) | def test_model_for_encoder_decoder_lm(self): method test_sequence_classification_model_from_pretrained (line 152) | def test_sequence_classification_model_from_pretrained(self): method test_question_answering_model_from_pretrained (line 164) | def test_question_answering_model_from_pretrained(self): method test_table_question_answering_model_from_pretrained (line 177) | def test_table_question_answering_model_from_pretrained(self): method test_from_pretrained_identifier (line 190) | def test_from_pretrained_identifier(self): method test_from_identifier_from_model_type (line 196) | def test_from_identifier_from_model_type(self): method test_from_pretrained_with_tuple_values (line 202) | def test_from_pretrained_with_tuple_values(self): method test_new_model_registration (line 219) | def test_new_model_registration(self): method test_repo_not_found (line 272) | def test_repo_not_found(self): method test_revision_not_found (line 278) | def test_revision_not_found(self): method test_model_file_not_found (line 284) | def test_model_file_not_found(self): method test_model_from_pt_suggestion (line 291) | def test_model_from_pt_suggestion(self): method test_cached_model_has_minimum_calls_to_head (line 295) | def test_cached_model_has_minimum_calls_to_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/auto/test_modeling_tf_pytorch.py class TFPTAutoModelTest (line 71) | class TFPTAutoModelTest(unittest.TestCase): method test_model_from_pretrained (line 73) | def test_model_from_pretrained(self): method test_model_for_pretraining_from_pretrained (line 89) | def test_model_for_pretraining_from_pretrained(self): method test_model_for_causal_lm (line 105) | def test_model_for_causal_lm(self): method test_lmhead_model_from_pretrained (line 124) | def test_lmhead_model_from_pretrained(self): method test_model_for_masked_lm (line 139) | def test_model_for_masked_lm(self): method test_model_for_encoder_decoder_lm (line 158) | def test_model_for_encoder_decoder_lm(self): method test_sequence_classification_model_from_pretrained (line 177) | def test_sequence_classification_model_from_pretrained(self): method test_question_answering_model_from_pretrained (line 193) | def test_question_answering_model_from_pretrained(self): method test_from_pretrained_identifier (line 208) | def test_from_pretrained_identifier(self): method test_from_identifier_from_model_type (line 219) | def test_from_identifier_from_model_type(self): FILE: mplsandbox_for_rl/transformers/tests/models/auto/test_processor_auto.py class AutoFeatureExtractorTest (line 60) | class AutoFeatureExtractorTest(unittest.TestCase): method setUp (line 63) | def setUp(self): method test_processor_from_model_shortcut (line 66) | def test_processor_from_model_shortcut(self): method test_processor_from_local_directory_from_repo (line 70) | def test_processor_from_local_directory_from_repo(self): method test_processor_from_local_directory_from_extractor_config (line 83) | def test_processor_from_local_directory_from_extractor_config(self): method test_processor_from_processor_class (line 93) | def test_processor_from_processor_class(self): method test_processor_from_feat_extr_processor_class (line 121) | def test_processor_from_feat_extr_processor_class(self): method test_processor_from_tokenizer_processor_class (line 152) | def test_processor_from_tokenizer_processor_class(self): method test_processor_from_local_directory_from_model_config (line 183) | def test_processor_from_local_directory_from_model_config(self): method test_from_pretrained_dynamic_processor (line 197) | def test_from_pretrained_dynamic_processor(self): method test_new_processor_registration (line 230) | def test_new_processor_registration(self): method test_from_pretrained_dynamic_processor_conflict (line 266) | def test_from_pretrained_dynamic_processor_conflict(self): method test_from_pretrained_dynamic_processor_with_extra_attributes (line 318) | def test_from_pretrained_dynamic_processor_with_extra_attributes(self): method test_auto_processor_creates_tokenizer (line 357) | def test_auto_processor_creates_tokenizer(self): method test_auto_processor_creates_image_processor (line 361) | def test_auto_processor_creates_image_processor(self): class ProcessorPushToHubTester (line 367) | class ProcessorPushToHubTester(unittest.TestCase): method setUpClass (line 371) | def setUpClass(cls): method _try_delete_repo (line 376) | def _try_delete_repo(repo_id, token): method test_push_to_hub_via_save_pretrained (line 383) | def test_push_to_hub_via_save_pretrained(self): method test_push_to_hub_in_organization_via_save_pretrained (line 399) | def test_push_to_hub_in_organization_via_save_pretrained(self): method test_push_to_hub_dynamic_processor (line 421) | def test_push_to_hub_dynamic_processor(self): FILE: mplsandbox_for_rl/transformers/tests/models/auto/test_tokenization_auto.py class AutoTokenizerTest (line 67) | class AutoTokenizerTest(unittest.TestCase): method setUp (line 68) | def setUp(self): method test_tokenizer_from_pretrained (line 72) | def test_tokenizer_from_pretrained(self): method test_tokenizer_from_pretrained_identifier (line 85) | def test_tokenizer_from_pretrained_identifier(self): method test_tokenizer_from_model_type (line 90) | def test_tokenizer_from_model_type(self): method test_tokenizer_from_tokenizer_class (line 95) | def test_tokenizer_from_tokenizer_class(self): method test_tokenizer_from_type (line 103) | def test_tokenizer_from_type(self): method test_tokenizer_from_type_fast (line 118) | def test_tokenizer_from_type_fast(self): method test_tokenizer_from_type_incorrect_name (line 132) | def test_tokenizer_from_type_incorrect_name(self): method test_tokenizer_identifier_with_correct_config (line 137) | def test_tokenizer_identifier_with_correct_config(self): method test_tokenizer_identifier_non_existent (line 150) | def test_tokenizer_identifier_non_existent(self): method test_model_name_edge_cases_in_mappings (line 158) | def test_model_name_edge_cases_in_mappings(self): method test_from_pretrained_use_fast_toggle (line 177) | def test_from_pretrained_use_fast_toggle(self): method test_do_lower_case (line 184) | def test_do_lower_case(self): method test_PreTrainedTokenizerFast_from_pretrained (line 195) | def test_PreTrainedTokenizerFast_from_pretrained(self): method test_auto_tokenizer_from_local_folder (line 204) | def test_auto_tokenizer_from_local_folder(self): method test_auto_tokenizer_fast_no_slow (line 214) | def test_auto_tokenizer_fast_no_slow(self): method test_get_tokenizer_config (line 219) | def test_get_tokenizer_config(self): method test_new_tokenizer_registration (line 239) | def test_new_tokenizer_registration(self): method test_new_tokenizer_fast_registration (line 262) | def test_new_tokenizer_fast_registration(self): method test_from_pretrained_dynamic_tokenizer (line 305) | def test_from_pretrained_dynamic_tokenizer(self): method test_from_pretrained_dynamic_tokenizer_conflict (line 344) | def test_from_pretrained_dynamic_tokenizer_conflict(self): method test_from_pretrained_dynamic_tokenizer_legacy_format (line 394) | def test_from_pretrained_dynamic_tokenizer_legacy_format(self): method test_repo_not_found (line 411) | def test_repo_not_found(self): method test_revision_not_found (line 417) | def test_revision_not_found(self): method test_cached_tokenizer_has_minimum_calls_to_head (line 423) | def test_cached_tokenizer_has_minimum_calls_to_head(self): method test_init_tokenizer_with_trust (line 432) | def test_init_tokenizer_with_trust(self): FILE: mplsandbox_for_rl/transformers/tests/models/autoformer/test_modeling_autoformer.py class AutoformerModelTester (line 41) | class AutoformerModelTester: method __init__ (line 42) | def __init__( method get_config (line 90) | def get_config(self): method prepare_autoformer_inputs_dict (line 113) | def prepare_autoformer_inputs_dict(self, config): method prepare_config_and_inputs (line 135) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 140) | def prepare_config_and_inputs_for_common(self): method check_encoder_decoder_model_standalone (line 144) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class AutoformerModelTest (line 206) | class AutoformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 216) | def setUp(self): method test_config (line 220) | def test_config(self): method test_save_load_strict (line 223) | def test_save_load_strict(self): method test_encoder_decoder_model_standalone (line 233) | def test_encoder_decoder_model_standalone(self): method test_resize_tokens_embeddings (line 238) | def test_resize_tokens_embeddings(self): method test_training_gradient_checkpointing (line 244) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant_false (line 250) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_training_gradient_checkpointing_use_reentrant (line 256) | def test_training_gradient_checkpointing_use_reentrant(self): method test_model_main_input_name (line 260) | def test_model_main_input_name(self): method test_forward_signature (line 266) | def test_forward_signature(self): method test_attention_outputs (line 305) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 402) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 406) | def test_model_get_set_embeddings(self): function prepare_batch (line 410) | def prepare_batch(filename="train-batch.pt"): class AutoformerModelIntegrationTests (line 418) | class AutoformerModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 419) | def test_inference_no_head(self): method test_inference_head (line 443) | def test_inference_head(self): method test_seq_to_seq_generation (line 461) | def test_seq_to_seq_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/bark/test_modeling_bark.py class BarkSemanticModelTester (line 65) | class BarkSemanticModelTester: method __init__ (line 66) | def __init__( method prepare_config_and_inputs (line 110) | def prepare_config_and_inputs(self): method get_config (line 129) | def get_config(self): method get_pipeline_config (line 143) | def get_pipeline_config(self): method prepare_config_and_inputs_for_common (line 149) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 153) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... class BarkCoarseModelTester (line 201) | class BarkCoarseModelTester: method __init__ (line 202) | def __init__( method prepare_config_and_inputs (line 246) | def prepare_config_and_inputs(self): method get_config (line 265) | def get_config(self): method get_pipeline_config (line 279) | def get_pipeline_config(self): method prepare_config_and_inputs_for_common (line 285) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 289) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... class BarkFineModelTester (line 337) | class BarkFineModelTester: method __init__ (line 338) | def __init__( method prepare_config_and_inputs (line 382) | def prepare_config_and_inputs(self): method get_config (line 405) | def get_config(self): method get_pipeline_config (line 419) | def get_pipeline_config(self): method prepare_config_and_inputs_for_common (line 425) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 429) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... class BarkModelTester (line 477) | class BarkModelTester: method __init__ (line 478) | def __init__( method get_config (line 504) | def get_config(self): method get_pipeline_config (line 512) | def get_pipeline_config(self): class BarkSemanticModelTest (line 528) | class BarkSemanticModelTest(ModelTesterMixin, GenerationTesterMixin, uni... method setUp (line 541) | def setUp(self): method test_config (line 545) | def test_config(self): method test_save_load_strict (line 548) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 558) | def test_decoder_model_past_with_large_inputs(self): method test_inputs_embeds (line 562) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 582) | def test_inputs_embeds_matches_input_ids(self): method test_generate_fp16 (line 605) | def test_generate_fp16(self): class BarkCoarseModelTest (line 616) | class BarkCoarseModelTest(ModelTesterMixin, GenerationTesterMixin, unitt... method setUp (line 630) | def setUp(self): method test_config (line 634) | def test_config(self): method test_save_load_strict (line 637) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 647) | def test_decoder_model_past_with_large_inputs(self): method test_inputs_embeds (line 651) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 671) | def test_inputs_embeds_matches_input_ids(self): method test_generate_fp16 (line 694) | def test_generate_fp16(self): class BarkFineModelTest (line 705) | class BarkFineModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 720) | def setUp(self): method test_config (line 724) | def test_config(self): method test_save_load_strict (line 727) | def test_save_load_strict(self): method test_inputs_embeds (line 737) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 758) | def test_inputs_embeds_matches_input_ids(self): method test_generate_fp16 (line 762) | def test_generate_fp16(self): method test_forward_signature (line 800) | def test_forward_signature(self): method test_model_get_set_embeddings (line 812) | def test_model_get_set_embeddings(self): method test_resize_tokens_embeddings (line 825) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 876) | def test_resize_embeddings_untied(self): method test_flash_attn_2_inference_equivalence (line 931) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 988) | def test_flash_attn_2_inference_equivalence_right_padding(self): class BarkModelIntegrationTests (line 1044) | class BarkModelIntegrationTests(unittest.TestCase): method model (line 1046) | def model(self): method processor (line 1050) | def processor(self): method inputs (line 1054) | def inputs(self): method semantic_generation_config (line 1062) | def semantic_generation_config(self): method coarse_generation_config (line 1067) | def coarse_generation_config(self): method fine_generation_config (line 1072) | def fine_generation_config(self): method test_generate_semantic (line 1077) | def test_generate_semantic(self): method test_generate_semantic_early_stop (line 1094) | def test_generate_semantic_early_stop(self): method test_generate_coarse (line 1137) | def test_generate_coarse(self): method test_generate_fine (line 1166) | def test_generate_fine(self): method test_generate_end_to_end (line 1216) | def test_generate_end_to_end(self): method test_generate_end_to_end_with_args (line 1224) | def test_generate_end_to_end_with_args(self): method test_generate_batching (line 1232) | def test_generate_batching(self): method test_generate_end_to_end_with_sub_models_args (line 1263) | def test_generate_end_to_end_with_sub_models_args(self): method test_generate_end_to_end_with_offload (line 1294) | def test_generate_end_to_end_with_offload(self): method assertListAlmostEqual (line 1331) | def assertListAlmostEqual(self, list1, list2, tol=1e-6): FILE: mplsandbox_for_rl/transformers/tests/models/bark/test_processor_bark.py class BarkProcessorTest (line 27) | class BarkProcessorTest(unittest.TestCase): method setUp (line 28) | def setUp(self): method get_tokenizer (line 36) | def get_tokenizer(self, **kwargs): method tearDown (line 39) | def tearDown(self): method test_save_load_pretrained_default (line 42) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 53) | def test_save_load_pretrained_additional_features(self): method test_speaker_embeddings (line 75) | def test_speaker_embeddings(self): method test_tokenizer (line 110) | def test_tokenizer(self): FILE: mplsandbox_for_rl/transformers/tests/models/bart/test_modeling_bart.py function prepare_bart_inputs_dict (line 56) | def prepare_bart_inputs_dict( class BartModelTester (line 87) | class BartModelTester: method __init__ (line 88) | def __init__( method prepare_config_and_inputs (line 132) | def prepare_config_and_inputs(self): method get_config (line 145) | def get_config(self): method get_pipeline_config (line 165) | def get_pipeline_config(self): method prepare_config_and_inputs_for_common (line 171) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 175) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 209) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class BartHeadTests (line 243) | class BartHeadTests(unittest.TestCase): method _get_config_and_data (line 246) | def _get_config_and_data(self): method test_sequence_classification_forward (line 284) | def test_sequence_classification_forward(self): method test_question_answering_forward (line 294) | def test_question_answering_forward(self): method test_lm_forward (line 310) | def test_lm_forward(self): method test_lm_uneven_forward (line 320) | def test_lm_uneven_forward(self): method test_generate_beam_search (line 341) | def test_generate_beam_search(self): method test_shift_tokens_right (line 371) | def test_shift_tokens_right(self): method test_tokenization (line 381) | def test_tokenization(self): method test_generate_fp16 (line 393) | def test_generate_fp16(self): method test_dummy_inputs (line 401) | def test_dummy_inputs(self): method test_resize_tokens_embeddings_more (line 406) | def test_resize_tokens_embeddings_more(self): class BartModelTest (line 424) | class BartModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method setUp (line 450) | def setUp(self): method test_config (line 454) | def test_config(self): method test_save_load_strict (line 457) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 467) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 471) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 476) | def test_inputs_embeds(self): method test_generate_fp16 (line 506) | def test_generate_fp16(self): method test_load_save_without_tied_weights (line 518) | def test_load_save_without_tied_weights(self): method test_resize_embeddings_persists_embeddings_type (line 521) | def test_resize_embeddings_persists_embeddings_type(self): function assert_tensors_close (line 534) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 553) | def _long_tensor(tok_lst): class FastIntegrationTests (line 559) | class FastIntegrationTests(unittest.TestCase): method tok (line 563) | def tok(self): method xsum_1_1_model (line 567) | def xsum_1_1_model(self): method test_xsum_1_1_generation (line 570) | def test_xsum_1_1_generation(self): method test_xsum_1_1_batch_generation (line 620) | def test_xsum_1_1_batch_generation(self): method test_encoder_equiv (line 753) | def test_encoder_equiv(self): class BartModelIntegrationTests (line 881) | class BartModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 883) | def default_tokenizer(self): method test_inference_no_head (line 887) | def test_inference_no_head(self): method test_base_mask_filling (line 901) | def test_base_mask_filling(self): method test_large_mask_filling (line 908) | def test_large_mask_filling(self): method test_mnli_inference (line 916) | def test_mnli_inference(self): method test_xsum_summarization_same_as_fairseq (line 944) | def test_xsum_summarization_same_as_fairseq(self): method test_xsum_config_generation_params (line 980) | def test_xsum_config_generation_params(self): method test_cnn_summarization_same_as_fairseq (line 987) | def test_cnn_summarization_same_as_fairseq(self): method test_contrastive_search_bart (line 1224) | def test_contrastive_search_bart(self): method test_decoder_attention_mask (line 1270) | def test_decoder_attention_mask(self): class BartStandaloneDecoderModelTester (line 1300) | class BartStandaloneDecoderModelTester: method __init__ (line 1301) | def __init__( method prepare_config_and_inputs (line 1356) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 1391) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_decoder_model_past (line 1411) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 1447) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 1494) | def prepare_config_and_inputs_for_common(self): class BartStandaloneDecoderModelTest (line 1511) | class BartStandaloneDecoderModelTest(ModelTesterMixin, GenerationTesterM... method setUp (line 1519) | def setUp( method test_config (line 1525) | def test_config(self): method test_decoder_model_past (line 1528) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 1532) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 1537) | def test_retain_grad_hidden_states_attentions(self): method test_save_load_fast_init_from_base (line 1541) | def test_save_load_fast_init_from_base(self): method test_inputs_embeds_matches_input_ids_with_generate (line 1545) | def test_inputs_embeds_matches_input_ids_with_generate(self): FILE: mplsandbox_for_rl/transformers/tests/models/bart/test_modeling_flax_bart.py function prepare_bart_inputs_dict (line 46) | def prepare_bart_inputs_dict( class FlaxBartModelTester (line 74) | class FlaxBartModelTester: method __init__ (line 75) | def __init__( method prepare_config_and_inputs (line 115) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 142) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 146) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 186) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class BartHeadTests (line 234) | class BartHeadTests(unittest.TestCase): method _get_config_and_data (line 237) | def _get_config_and_data(self): method test_sequence_classification_forward (line 274) | def test_sequence_classification_forward(self): method test_question_answering_forward (line 281) | def test_question_answering_forward(self): method test_lm_forward (line 290) | def test_lm_forward(self): method test_lm_uneven_forward (line 297) | def test_lm_uneven_forward(self): method test_shift_tokens_right (line 316) | def test_shift_tokens_right(self): class FlaxBartModelTest (line 327) | class FlaxBartModelTest(FlaxModelTesterMixin, unittest.TestCase, FlaxGen... method setUp (line 341) | def setUp(self): method test_use_cache_forward (line 344) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 349) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 354) | def test_encode(self): method test_decode (line 377) | def test_decode(self): method test_model_from_pretrained (line 411) | def test_model_from_pretrained(self): method test_summarization_fast (line 420) | def test_summarization_fast(self): method test_cnn_summarization_same_as_fairseq (line 439) | def test_cnn_summarization_same_as_fairseq(self): class FlaxBartStandaloneDecoderModelTester (line 676) | class FlaxBartStandaloneDecoderModelTester: method __init__ (line 677) | def __init__( method prepare_config_and_inputs (line 719) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 747) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_decoder (line 753) | def prepare_config_and_inputs_for_decoder(self): FILE: mplsandbox_for_rl/transformers/tests/models/bart/test_modeling_tf_bart.py class TFBartModelTester (line 41) | class TFBartModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs_for_common (line 83) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 117) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_bart_inputs_dict (line 156) | def prepare_bart_inputs_dict( class TFBartModelTest (line 194) | class TFBartModelTest(TFModelTesterMixin, TFCoreModelTesterMixin, Pipeli... method setUp (line 216) | def setUp(self): method test_config (line 220) | def test_config(self): method test_decoder_model_past_large_inputs (line 223) | def test_decoder_model_past_large_inputs(self): method test_onnx_compliancy (line 229) | def test_onnx_compliancy(self): method test_inputs_embeds (line 233) | def test_inputs_embeds(self): method test_graph_mode_with_inputs_embeds (line 262) | def test_graph_mode_with_inputs_embeds(self): method test_save_load_after_resize_token_embeddings (line 295) | def test_save_load_after_resize_token_embeddings(self): function _long_tensor (line 346) | def _long_tensor(tok_lst): class TFBartHeadTests (line 351) | class TFBartHeadTests(unittest.TestCase): method _get_config_and_data (line 354) | def _get_config_and_data(self): method test_lm_forward (line 375) | def test_lm_forward(self): method test_lm_uneven_forward (line 383) | def test_lm_uneven_forward(self): class TFBartForSequenceClassificationTest (line 404) | class TFBartForSequenceClassificationTest(unittest.TestCase): method test_model_fails_for_uneven_eos_tokens (line 405) | def test_model_fails_for_uneven_eos_tokens(self): class TFBartModelIntegrationTest (line 418) | class TFBartModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 419) | def test_inference_no_head(self): method test_cnn_summarization_same_as_fairseq_hard (line 432) | def test_cnn_summarization_same_as_fairseq_hard(self): method tok (line 677) | def tok(self): method test_contrastive_search_bart (line 681) | def test_contrastive_search_bart(self): method test_contrastive_search_bart_xla (line 727) | def test_contrastive_search_bart_xla(self): class FasterTFBartModelIntegrationTests (line 777) | class FasterTFBartModelIntegrationTests(unittest.TestCase): method tok (line 781) | def tok(self): method xsum_1_1_model (line 785) | def xsum_1_1_model(self): method test_xsum_1_1_generation (line 788) | def test_xsum_1_1_generation(self): method test_xsum_1_1_xla_generation (line 837) | def test_xsum_1_1_xla_generation(self): method test_xsum_1_1_batch_generation (line 893) | def test_xsum_1_1_batch_generation(self): method test_encoder_equiv (line 1024) | def test_encoder_equiv(self): FILE: mplsandbox_for_rl/transformers/tests/models/bart/test_tokenization_bart.py class TestTokenizationBart (line 27) | class TestTokenizationBart(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_tokenizer (line 70) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 74) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 78) | def get_input_output_texts(self, tokenizer): method default_tokenizer (line 82) | def default_tokenizer(self): method default_tokenizer_fast (line 86) | def default_tokenizer_fast(self): method test_prepare_batch (line 90) | def test_prepare_batch(self): method test_prepare_batch_empty_target_text (line 105) | def test_prepare_batch_empty_target_text(self): method test_tokenizer_as_target_length (line 116) | def test_tokenizer_as_target_length(self): method test_prepare_batch_not_longer_than_maxlen (line 126) | def test_prepare_batch_not_longer_than_maxlen(self): method test_special_tokens (line 135) | def test_special_tokens(self): method test_pretokenized_inputs (line 151) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 154) | def test_embeded_special_tokens(self): FILE: mplsandbox_for_rl/transformers/tests/models/barthez/test_tokenization_barthez.py class BarthezTokenizationTest (line 27) | class BarthezTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 34) | def setUp(self): method test_convert_token_and_id (line 42) | def test_convert_token_and_id(self): method test_get_vocab (line 50) | def test_get_vocab(self): method test_vocab_size (line 58) | def test_vocab_size(self): method test_prepare_batch (line 62) | def test_prepare_batch(self): method test_rust_and_python_full_tokenizers (line 76) | def test_rust_and_python_full_tokenizers(self): method test_tokenizer_integration (line 99) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/bartpho/test_tokenization_bartpho.py class BartphoTokenizerTest (line 28) | class BartphoTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 34) | def setUp(self): method get_tokenizer (line 49) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 53) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 58) | def test_full_tokenizer(self): FILE: mplsandbox_for_rl/transformers/tests/models/beit/test_image_processing_beit.py class BeitImageProcessingTester (line 36) | class BeitImageProcessingTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_image_processor_dict (line 71) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 83) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 86) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... function prepare_semantic_single_inputs (line 98) | def prepare_semantic_single_inputs(): function prepare_semantic_batch_inputs (line 107) | def prepare_semantic_batch_inputs(): class BeitImageProcessingTest (line 120) | class BeitImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 123) | def setUp(self): method image_processor_dict (line 128) | def image_processor_dict(self): method test_image_processor_properties (line 131) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 142) | def test_image_processor_from_dict_with_kwargs(self): method test_call_segmentation_maps (line 155) | def test_call_segmentation_maps(self): method test_reduce_labels (line 261) | def test_reduce_labels(self): method test_removed_deprecated_kwargs (line 276) | def test_removed_deprecated_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/beit/test_modeling_beit.py class BeitModelTester (line 53) | class BeitModelTester: method __init__ (line 54) | def __init__( method prepare_config_and_inputs (line 104) | def prepare_config_and_inputs(self): method get_config (line 117) | def get_config(self): method create_and_check_model (line 136) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_backbone (line 143) | def create_and_check_backbone(self, config, pixel_values, labels, pixe... method create_and_check_for_masked_lm (line 175) | def create_and_check_for_masked_lm(self, config, pixel_values, labels,... method create_and_check_for_image_classification (line 182) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_semantic_segmentation (line 200) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 214) | def prepare_config_and_inputs_for_common(self): class BeitModelTest (line 222) | class BeitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 253) | def setUp(self): method test_config (line 257) | def test_config(self): method test_inputs_embeds (line 261) | def test_inputs_embeds(self): method test_multi_gpu_data_parallel_forward (line 266) | def test_multi_gpu_data_parallel_forward(self): method test_feed_forward_chunking (line 270) | def test_feed_forward_chunking(self): method test_model_get_set_embeddings (line 273) | def test_model_get_set_embeddings(self): method test_model (line 282) | def test_model(self): method test_backbone (line 286) | def test_backbone(self): method test_for_masked_lm (line 290) | def test_for_masked_lm(self): method test_for_image_classification (line 294) | def test_for_image_classification(self): method test_for_semantic_segmentation (line 298) | def test_for_semantic_segmentation(self): method test_training (line 302) | def test_training(self): method test_training_gradient_checkpointing (line 325) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 357) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 363) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_initialization (line 366) | def test_initialization(self): method test_model_from_pretrained (line 385) | def test_model_from_pretrained(self): function prepare_img (line 392) | def prepare_img(): class BeitModelIntegrationTest (line 399) | class BeitModelIntegrationTest(unittest.TestCase): method default_image_processor (line 401) | def default_image_processor(self): method test_inference_masked_image_modeling_head (line 405) | def test_inference_masked_image_modeling_head(self): method test_inference_image_classification_head_imagenet_1k (line 431) | def test_inference_image_classification_head_imagenet_1k(self): method test_inference_image_classification_head_imagenet_22k (line 455) | def test_inference_image_classification_head_imagenet_22k(self): method test_inference_semantic_segmentation (line 481) | def test_inference_semantic_segmentation(self): method test_post_processing_semantic_segmentation (line 524) | def test_post_processing_semantic_segmentation(self): method test_inference_interpolate_pos_encoding (line 549) | def test_inference_interpolate_pos_encoding(self): class BeitBackboneTest (line 575) | class BeitBackboneTest(unittest.TestCase, BackboneTesterMixin): method setUp (line 579) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/beit/test_modeling_flax_beit.py class FlaxBeitModelTester (line 39) | class FlaxBeitModelTester(unittest.TestCase): method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 83) | def prepare_config_and_inputs(self): method create_and_check_model (line 108) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_masked_lm (line 113) | def create_and_check_for_masked_lm(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 118) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 131) | def prepare_config_and_inputs_for_common(self): class FlaxBeitModelTest (line 143) | class FlaxBeitModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 148) | def setUp(self) -> None: method test_config (line 152) | def test_config(self): method test_forward_signature (line 156) | def test_forward_signature(self): method test_jit_compilation (line 169) | def test_jit_compilation(self): method test_model (line 192) | def test_model(self): method test_for_masked_lm (line 196) | def test_for_masked_lm(self): method test_for_image_classification (line 200) | def test_for_image_classification(self): method test_model_from_pretrained (line 205) | def test_model_from_pretrained(self): function prepare_img (line 213) | def prepare_img(): class FlaxBeitModelIntegrationTest (line 220) | class FlaxBeitModelIntegrationTest(unittest.TestCase): method default_image_processor (line 222) | def default_image_processor(self): method test_inference_masked_image_modeling_head (line 226) | def test_inference_masked_image_modeling_head(self): method test_inference_image_classification_head_imagenet_1k (line 251) | def test_inference_image_classification_head_imagenet_1k(self): method test_inference_image_classification_head_imagenet_22k (line 274) | def test_inference_image_classification_head_imagenet_22k(self): FILE: mplsandbox_for_rl/transformers/tests/models/bert/test_modeling_bert.py class BertModelTester (line 54) | class BertModelTester: method __init__ (line 55) | def __init__( method prepare_config_and_inputs (line 103) | def prepare_config_and_inputs(self): method get_config (line 126) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 145) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 172) | def create_and_check_model( method create_and_check_model_as_decoder (line 184) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 217) | def create_and_check_for_causal_lm( method create_and_check_for_masked_lm (line 235) | def create_and_check_for_masked_lm( method create_and_check_model_for_causal_lm_as_decoder (line 244) | def create_and_check_model_for_causal_lm_as_decoder( method create_and_check_decoder_model_past_large_inputs (line 277) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_next_sequence_prediction (line 337) | def create_and_check_for_next_sequence_prediction( method create_and_check_for_pretraining (line 351) | def create_and_check_for_pretraining( method create_and_check_for_question_answering (line 367) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 383) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 393) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 403) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 421) | def prepare_config_and_inputs_for_common(self): class BertModelTest (line 437) | class BertModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method _prepare_for_class (line 471) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 484) | def setUp(self): method test_config (line 488) | def test_config(self): method test_model (line 491) | def test_model(self): method test_model_various_embeddings (line 495) | def test_model_various_embeddings(self): method test_model_as_decoder (line 501) | def test_model_as_decoder(self): method test_inputs_embeds_matches_input_ids_with_generate (line 506) | def test_inputs_embeds_matches_input_ids_with_generate(self): method test_model_as_decoder_with_default_input_mask (line 510) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 538) | def test_for_causal_lm(self): method test_for_masked_lm (line 542) | def test_for_masked_lm(self): method test_for_causal_lm_decoder (line 546) | def test_for_causal_lm_decoder(self): method test_decoder_model_past_with_large_inputs (line 550) | def test_decoder_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs_relative_pos_emb (line 554) | def test_decoder_model_past_with_large_inputs_relative_pos_emb(self): method test_for_multiple_choice (line 559) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 563) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 567) | def test_for_pretraining(self): method test_for_question_answering (line 571) | def test_for_question_answering(self): method test_for_sequence_classification (line 575) | def test_for_sequence_classification(self): method test_for_token_classification (line 579) | def test_for_token_classification(self): method test_for_warning_if_padding_and_no_attention_mask (line 583) | def test_for_warning_if_padding_and_no_attention_mask(self): method test_model_from_pretrained (line 610) | def test_model_from_pretrained(self): method test_torchscript_device_change (line 617) | def test_torchscript_device_change(self): method test_eager_matches_sdpa_generate (line 641) | def test_eager_matches_sdpa_generate(self): class BertModelIntegrationTest (line 712) | class BertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 714) | def test_inference_no_head_absolute_embedding(self): method test_inference_no_head_relative_embedding_key (line 727) | def test_inference_no_head_relative_embedding_key(self): method test_inference_no_head_relative_embedding_key_query (line 742) | def test_inference_no_head_relative_embedding_key_query(self): method test_sdpa_ignored_mask (line 756) | def test_sdpa_ignored_mask(self): FILE: mplsandbox_for_rl/transformers/tests/models/bert/test_modeling_flax_bert.py class FlaxBertModelTester (line 38) | class FlaxBertModelTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 83) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 111) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_decoder (line 117) | def prepare_config_and_inputs_for_decoder(self): class FlaxBertModelTest (line 135) | class FlaxBertModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 154) | def setUp(self): method test_model_from_pretrained (line 158) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/bert/test_modeling_tf_bert.py class TFBertModelTester (line 48) | class TFBertModelTester: method __init__ (line 49) | def __init__( method prepare_config_and_inputs (line 97) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 132) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 159) | def create_and_check_model( method create_and_check_causal_lm_base_model (line 174) | def create_and_check_causal_lm_base_model( method create_and_check_model_as_decoder (line 191) | def create_and_check_model_as_decoder( method create_and_check_causal_lm_model (line 224) | def create_and_check_causal_lm_model( method create_and_check_causal_lm_model_as_decoder (line 240) | def create_and_check_causal_lm_model_as_decoder( method create_and_check_causal_lm_model_past (line 272) | def create_and_check_causal_lm_model_past( method create_and_check_causal_lm_model_past_with_attn_mask (line 315) | def create_and_check_causal_lm_model_past_with_attn_mask( method create_and_check_causal_lm_model_past_large_inputs (line 376) | def create_and_check_causal_lm_model_past_large_inputs( method create_and_check_decoder_model_past_large_inputs (line 428) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 494) | def create_and_check_for_masked_lm( method create_and_check_for_next_sequence_prediction (line 506) | def create_and_check_for_next_sequence_prediction( method create_and_check_for_pretraining (line 514) | def create_and_check_for_pretraining( method create_and_check_for_sequence_classification (line 523) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 537) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 553) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 566) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 580) | def prepare_config_and_inputs_for_common(self): class TFBertModelTest (line 596) | class TFBertModelTest(TFModelTesterMixin, TFCoreModelTesterMixin, Pipeli... method _prepare_for_class (line 630) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 639) | def setUp(self): method test_config (line 643) | def test_config(self): method test_model (line 646) | def test_model(self): method test_causal_lm_base_model (line 651) | def test_causal_lm_base_model(self): method test_model_as_decoder (line 659) | def test_model_as_decoder(self): method test_for_masked_lm (line 667) | def test_for_masked_lm(self): method test_for_causal_lm (line 671) | def test_for_causal_lm(self): method test_causal_lm_model_as_decoder (line 676) | def test_causal_lm_model_as_decoder(self): method test_causal_lm_model_past (line 681) | def test_causal_lm_model_past(self): method test_causal_lm_model_past_with_attn_mask (line 686) | def test_causal_lm_model_past_with_attn_mask(self): method test_causal_lm_model_past_with_large_inputs (line 691) | def test_causal_lm_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs (line 696) | def test_decoder_model_past_with_large_inputs(self): method test_for_multiple_choice (line 701) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 705) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 709) | def test_for_pretraining(self): method test_for_question_answering (line 713) | def test_for_question_answering(self): method test_for_sequence_classification (line 717) | def test_for_sequence_classification(self): method test_for_token_classification (line 721) | def test_for_token_classification(self): method test_model_from_pretrained (line 725) | def test_model_from_pretrained(self): method test_custom_load_tf_weights (line 729) | def test_custom_load_tf_weights(self): method test_onnx_compliancy (line 739) | def test_onnx_compliancy(self): class TFBertModelIntegrationTest (line 744) | class TFBertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 746) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/bert/test_tokenization_bert.py class BertTokenizationTest (line 36) | class BertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 44) | def setUp(self): method get_input_output_texts (line 68) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 73) | def test_full_tokenizer(self): method test_rust_and_python_full_tokenizers (line 80) | def test_rust_and_python_full_tokenizers(self): method test_chinese (line 121) | def test_chinese(self): method test_basic_tokenizer_lower (line 126) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 134) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 142) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 150) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 158) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 165) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 172) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 179) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_basic_tokenizer_splits_on_punctuation (line 186) | def test_basic_tokenizer_splits_on_punctuation(self): method test_wordpiece_tokenizer (line 192) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 206) | def test_is_whitespace(self): method test_is_control (line 216) | def test_is_control(self): method test_is_punctuation (line 224) | def test_is_punctuation(self): method test_clean_text (line 233) | def test_clean_text(self): method test_sequence_builders (line 245) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 257) | def test_offsets_with_special_characters(self): method test_change_tokenize_chinese_chars (line 309) | def test_change_tokenize_chinese_chars(self): FILE: mplsandbox_for_rl/transformers/tests/models/bert/test_tokenization_bert_tf.py class ModelToSave (line 25) | class ModelToSave(keras.Model): method __init__ (line 26) | def __init__(self, tokenizer): method call (line 32) | def call(self, inputs): class BertTokenizationTest (line 40) | class BertTokenizationTest(unittest.TestCase): method setUp (line 44) | def setUp(self): method test_output_equivalence (line 61) | def test_output_equivalence(self): method test_different_pairing_styles (line 72) | def test_different_pairing_styles(self): method test_graph_mode (line 83) | def test_graph_mode(self): method test_export_for_inference (line 95) | def test_export_for_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/bert_generation/test_modeling_bert_generation.py class BertGenerationEncoderTester (line 34) | class BertGenerationEncoderTester: method __init__ (line 35) | def __init__( method prepare_config_and_inputs (line 73) | def prepare_config_and_inputs(self): method get_config (line 87) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 102) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 123) | def create_and_check_model( method create_and_check_model_as_decoder (line 138) | def create_and_check_model_as_decoder( method create_and_check_decoder_model_past_large_inputs (line 165) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_causal_lm (line 223) | def create_and_check_for_causal_lm( method prepare_config_and_inputs_for_common (line 237) | def prepare_config_and_inputs_for_common(self): class BertGenerationEncoderTest (line 244) | class BertGenerationEncoderTest(ModelTesterMixin, GenerationTesterMixin,... method setUp (line 253) | def setUp(self): method test_config (line 257) | def test_config(self): method test_model (line 260) | def test_model(self): method test_model_as_bert (line 264) | def test_model_as_bert(self): method test_model_as_decoder (line 269) | def test_model_as_decoder(self): method test_decoder_model_past_with_large_inputs (line 273) | def test_decoder_model_past_with_large_inputs(self): method test_model_as_decoder_with_default_input_mask (line 277) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 299) | def test_for_causal_lm(self): method test_model_from_pretrained (line 304) | def test_model_from_pretrained(self): class BertGenerationEncoderIntegrationTest (line 310) | class BertGenerationEncoderIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 312) | def test_inference_no_head_absolute_embedding(self): class BertGenerationDecoderIntegrationTest (line 326) | class BertGenerationDecoderIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 328) | def test_inference_no_head_absolute_embedding(self): FILE: mplsandbox_for_rl/transformers/tests/models/bert_generation/test_tokenization_bert_generation.py class BertGenerationTokenizationTest (line 31) | class BertGenerationTokenizationTest(TokenizerTesterMixin, unittest.Test... method setUp (line 37) | def setUp(self): method test_convert_token_and_id (line 43) | def test_convert_token_and_id(self): method test_get_vocab (line 51) | def test_get_vocab(self): method test_vocab_size (line 59) | def test_vocab_size(self): method test_full_tokenizer (line 62) | def test_full_tokenizer(self): method big_tokenizer (line 135) | def big_tokenizer(self): method test_tokenization_base_easy_symbols (line 139) | def test_tokenization_base_easy_symbols(self): method test_tokenization_base_hard_symbols (line 146) | def test_tokenization_base_hard_symbols(self): method test_torch_encode_plus_sent_to_model (line 213) | def test_torch_encode_plus_sent_to_model(self): method test_tokenizer_integration (line 236) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/bert_japanese/test_tokenization_bert_japanese.py class BertJapaneseTokenizationTest (line 38) | class BertJapaneseTokenizationTest(TokenizerTesterMixin, unittest.TestCa... method setUp (line 44) | def setUp(self): method get_input_output_texts (line 79) | def get_input_output_texts(self, tokenizer): method get_clean_sequence (line 84) | def get_clean_sequence(self, tokenizer): method test_pretokenized_inputs (line 90) | def test_pretokenized_inputs(self): method test_maximum_encoding_length_pair_input (line 93) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 96) | def test_maximum_encoding_length_single_input(self): method test_full_tokenizer (line 99) | def test_full_tokenizer(self): method test_pickle_mecab_tokenizer (line 106) | def test_pickle_mecab_tokenizer(self): method test_mecab_full_tokenizer_with_mecab_kwargs (line 126) | def test_mecab_full_tokenizer_with_mecab_kwargs(self): method test_mecab_tokenizer_ipadic (line 135) | def test_mecab_tokenizer_ipadic(self): method test_mecab_tokenizer_unidic_lite (line 143) | def test_mecab_tokenizer_unidic_lite(self): method test_mecab_tokenizer_unidic (line 154) | def test_mecab_tokenizer_unidic(self): method test_mecab_tokenizer_lower (line 171) | def test_mecab_tokenizer_lower(self): method test_mecab_tokenizer_with_option (line 179) | def test_mecab_tokenizer_with_option(self): method test_mecab_tokenizer_no_normalize (line 193) | def test_mecab_tokenizer_no_normalize(self): method test_pickle_sudachi_tokenizer (line 202) | def test_pickle_sudachi_tokenizer(self): method test_sudachi_tokenizer_core (line 223) | def test_sudachi_tokenizer_core(self): method test_sudachi_tokenizer_split_mode_A (line 234) | def test_sudachi_tokenizer_split_mode_A(self): method test_sudachi_tokenizer_split_mode_B (line 240) | def test_sudachi_tokenizer_split_mode_B(self): method test_sudachi_tokenizer_split_mode_C (line 246) | def test_sudachi_tokenizer_split_mode_C(self): method test_sudachi_full_tokenizer_with_sudachi_kwargs_split_mode_B (line 252) | def test_sudachi_full_tokenizer_with_sudachi_kwargs_split_mode_B(self): method test_sudachi_tokenizer_projection (line 260) | def test_sudachi_tokenizer_projection(self): method test_sudachi_full_tokenizer_with_sudachi_kwargs_sudachi_projection (line 268) | def test_sudachi_full_tokenizer_with_sudachi_kwargs_sudachi_projection... method test_sudachi_tokenizer_lower (line 276) | def test_sudachi_tokenizer_lower(self): method test_sudachi_tokenizer_no_normalize (line 282) | def test_sudachi_tokenizer_no_normalize(self): method test_sudachi_tokenizer_trim_whitespace (line 288) | def test_sudachi_tokenizer_trim_whitespace(self): method test_pickle_jumanpp_tokenizer (line 297) | def test_pickle_jumanpp_tokenizer(self): method test_jumanpp_tokenizer (line 318) | def test_jumanpp_tokenizer(self): method test_jumanpp_tokenizer_lower (line 325) | def test_jumanpp_tokenizer_lower(self): method test_jumanpp_tokenizer_no_normalize (line 331) | def test_jumanpp_tokenizer_no_normalize(self): method test_jumanpp_tokenizer_trim_whitespace (line 337) | def test_jumanpp_tokenizer_trim_whitespace(self): method test_jumanpp_full_tokenizer_with_jumanpp_kwargs_trim_whitespace (line 346) | def test_jumanpp_full_tokenizer_with_jumanpp_kwargs_trim_whitespace(se... method test_jumanpp_tokenizer_ext (line 357) | def test_jumanpp_tokenizer_ext(self): method test_wordpiece_tokenizer (line 365) | def test_wordpiece_tokenizer(self): method test_sentencepiece_tokenizer (line 381) | def test_sentencepiece_tokenizer(self): method test_sequence_builders (line 391) | def test_sequence_builders(self): class BertJapaneseCharacterTokenizationTest (line 406) | class BertJapaneseCharacterTokenizationTest(TokenizerTesterMixin, unitte... method setUp (line 411) | def setUp(self): method get_tokenizer (line 420) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 423) | def get_input_output_texts(self, tokenizer): method test_pretokenized_inputs (line 428) | def test_pretokenized_inputs(self): method test_maximum_encoding_length_pair_input (line 431) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 434) | def test_maximum_encoding_length_single_input(self): method test_full_tokenizer (line 437) | def test_full_tokenizer(self): method test_character_tokenizer (line 446) | def test_character_tokenizer(self): method test_sequence_builders (line 460) | def test_sequence_builders(self): class AutoTokenizerCustomTest (line 475) | class AutoTokenizerCustomTest(unittest.TestCase): method test_tokenizer_bert_japanese (line 476) | def test_tokenizer_bert_japanese(self): class BertTokenizerMismatchTest (line 482) | class BertTokenizerMismatchTest(unittest.TestCase): method test_tokenizer_mismatch_warning (line 483) | def test_tokenizer_mismatch_warning(self): FILE: mplsandbox_for_rl/transformers/tests/models/bertweet/test_tokenization_bertweet.py class BertweetTokenizationTest (line 24) | class BertweetTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 29) | def setUp(self): method get_tokenizer (line 46) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 50) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 55) | def test_full_tokenizer(self): FILE: mplsandbox_for_rl/transformers/tests/models/big_bird/test_modeling_big_bird.py class BigBirdModelTester (line 45) | class BigBirdModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 107) | def prepare_config_and_inputs(self): method get_config (line 130) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 152) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 179) | def create_and_check_model( method create_and_check_for_pretraining (line 190) | def create_and_check_for_pretraining( method create_and_check_model_as_decoder (line 206) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 238) | def create_and_check_for_causal_lm( method create_and_check_for_masked_lm (line 256) | def create_and_check_for_masked_lm( method create_and_check_decoder_model_past_large_inputs (line 265) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_question_answering (line 327) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 343) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 353) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 363) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 381) | def prepare_config_and_inputs_for_common(self): method create_and_check_for_auto_padding (line 395) | def create_and_check_for_auto_padding( method create_and_check_for_change_to_full_attn (line 411) | def create_and_check_for_change_to_full_attn( class BigBirdModelTest (line 431) | class BigBirdModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method _prepare_for_class (line 470) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 483) | def setUp(self): method test_config (line 487) | def test_config(self): method test_model (line 490) | def test_model(self): method test_for_pretraining (line 494) | def test_for_pretraining(self): method test_for_masked_lm (line 498) | def test_for_masked_lm(self): method test_for_multiple_choice (line 502) | def test_for_multiple_choice(self): method test_decoder_model_past_with_large_inputs (line 506) | def test_decoder_model_past_with_large_inputs(self): method test_for_question_answering (line 510) | def test_for_question_answering(self): method test_for_sequence_classification (line 514) | def test_for_sequence_classification(self): method test_for_token_classification (line 518) | def test_for_token_classification(self): method test_model_as_decoder (line 522) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 526) | def test_model_as_decoder_with_default_input_mask(self): method test_retain_grad_hidden_states_attentions (line 554) | def test_retain_grad_hidden_states_attentions(self): method test_model_from_pretrained (line 561) | def test_model_from_pretrained(self): method test_model_various_attn_type (line 566) | def test_model_various_attn_type(self): method test_fast_integration (line 572) | def test_fast_integration(self): method test_auto_padding (line 600) | def test_auto_padding(self): method test_for_change_to_full_attn (line 605) | def test_for_change_to_full_attn(self): method test_training_gradient_checkpointing (line 613) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 619) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 625) | def test_training_gradient_checkpointing_use_reentrant_false(self): method check_pt_flax_outputs (line 629) | def check_pt_flax_outputs(self, fx_outputs, pt_outputs, model_class, t... class BigBirdModelIntegrationTest (line 640) | class BigBirdModelIntegrationTest(unittest.TestCase): method _get_dummy_input_ids (line 644) | def _get_dummy_input_ids(self): method test_inference_block_sparse_pretraining (line 654) | def test_inference_block_sparse_pretraining(self): method test_inference_full_pretraining (line 684) | def test_inference_full_pretraining(self): method test_block_sparse_attention_probs (line 713) | def test_block_sparse_attention_probs(self): method test_block_sparse_context_layer (line 778) | def test_block_sparse_context_layer(self): method test_tokenizer_inference (line 827) | def test_tokenizer_inference(self): method test_inference_question_answering (line 876) | def test_inference_question_answering(self): method test_fill_mask (line 938) | def test_fill_mask(self): method test_auto_padding (line 950) | def test_auto_padding(self): FILE: mplsandbox_for_rl/transformers/tests/models/big_bird/test_modeling_flax_big_bird.py class FlaxBigBirdModelTester (line 38) | class FlaxBigBirdModelTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 94) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 127) | def prepare_config_and_inputs_for_common(self): class FlaxBigBirdModelTest (line 139) | class FlaxBigBirdModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 158) | def setUp(self): method test_from_pretrained_save_pretrained (line 163) | def test_from_pretrained_save_pretrained(self): method test_from_pretrained_with_no_automatic_init (line 168) | def test_from_pretrained_with_no_automatic_init(self): method test_no_automatic_init (line 173) | def test_no_automatic_init(self): method test_hidden_states_output (line 178) | def test_hidden_states_output(self): method test_model_from_pretrained (line 182) | def test_model_from_pretrained(self): method test_attention_outputs (line 187) | def test_attention_outputs(self): method test_jit_compilation (line 193) | def test_jit_compilation(self): method check_pt_flax_outputs (line 217) | def check_pt_flax_outputs(self, fx_outputs, pt_outputs, model_class, t... FILE: mplsandbox_for_rl/transformers/tests/models/big_bird/test_tokenization_big_bird.py class BigBirdTokenizationTest (line 32) | class BigBirdTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 39) | def setUp(self): method test_convert_token_and_id (line 45) | def test_convert_token_and_id(self): method test_get_vocab (line 53) | def test_get_vocab(self): method test_vocab_size (line 61) | def test_vocab_size(self): method test_rust_and_python_full_tokenizers (line 64) | def test_rust_and_python_full_tokenizers(self): method test_full_tokenizer (line 86) | def test_full_tokenizer(self): method big_tokenizer (line 159) | def big_tokenizer(self): method test_tokenization_base_easy_symbols (line 163) | def test_tokenization_base_easy_symbols(self): method test_tokenization_base_hard_symbols (line 170) | def test_tokenization_base_hard_symbols(self): method test_torch_encode_plus_sent_to_model (line 180) | def test_torch_encode_plus_sent_to_model(self): method test_special_tokens (line 203) | def test_special_tokens(self): method test_tokenizer_integration (line 226) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/bigbird_pegasus/test_modeling_bigbird_pegasus.py function prepare_bigbird_pegasus_inputs_dict (line 56) | def prepare_bigbird_pegasus_inputs_dict( class BigBirdPegasusModelTester (line 78) | class BigBirdPegasusModelTester: method __init__ (line 79) | def __init__( method prepare_config_and_inputs (line 128) | def prepare_config_and_inputs(self): method get_config (line 141) | def get_config(self): method prepare_config_and_inputs_for_common (line 164) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 168) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 201) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): method create_and_check_model (line 233) | def create_and_check_model(self, config, inputs_dict): class BigBirdPegasusModelTest (line 242) | class BigBirdPegasusModelTest(ModelTesterMixin, GenerationTesterMixin, P... method is_pipeline_test_to_skip (line 278) | def is_pipeline_test_to_skip( method _get_input_ids_and_config (line 288) | def _get_input_ids_and_config(self, batch_size=2): method setUp (line 305) | def setUp(self): method test_config (line 309) | def test_config(self): method test_save_load_strict (line 312) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 322) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 326) | def test_encoder_decoder_model_standalone(self): method test_model_various_attn_type (line 330) | def test_model_various_attn_type(self): method test_generate_without_input_ids (line 336) | def test_generate_without_input_ids(self): method test_retain_grad_hidden_states_attentions (line 343) | def test_retain_grad_hidden_states_attentions(self): method test_inputs_embeds (line 350) | def test_inputs_embeds(self): method test_generate_fp16 (line 384) | def test_generate_fp16(self): method test_batched_forward_original_full (line 394) | def test_batched_forward_original_full(self): method test_batched_forward_block_sparse (line 398) | def test_batched_forward_block_sparse(self): method _check_batched_forward (line 401) | def _check_batched_forward(self, attn_type, tolerance=1e-3): method test_auto_padding (line 440) | def test_auto_padding(self): method test_for_change_to_full_attn (line 462) | def test_for_change_to_full_attn(self): method test_load_save_without_tied_weights (line 482) | def test_load_save_without_tied_weights(self): class BigBirdPegasusModelIntegrationTests (line 490) | class BigBirdPegasusModelIntegrationTests(unittest.TestCase): method _get_dummy_input_ids (line 491) | def _get_dummy_input_ids(self): method _get_dummy_target_ids (line 501) | def _get_dummy_target_ids(self): method test_inference_block_sparse (line 511) | def test_inference_block_sparse(self): method test_inference_full_attn (line 535) | def test_inference_full_attn(self): method test_seq_to_seq_generation (line 556) | def test_seq_to_seq_generation(self): class BigBirdPegasusStandaloneDecoderModelTester (line 603) | class BigBirdPegasusStandaloneDecoderModelTester: method __init__ (line 604) | def __init__( method prepare_config_and_inputs (line 668) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 706) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 742) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 789) | def prepare_config_and_inputs_for_common(self): class BigBirdPegasusStandaloneDecoderModelTest (line 798) | class BigBirdPegasusStandaloneDecoderModelTest(ModelTesterMixin, Generat... method setUp (line 804) | def setUp( method test_config (line 810) | def test_config(self): method test_decoder_model_past (line 813) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 817) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 822) | def test_retain_grad_hidden_states_attentions(self): FILE: mplsandbox_for_rl/transformers/tests/models/biogpt/test_modeling_biogpt.py class BioGptModelTester (line 41) | class BioGptModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 90) | def prepare_config_and_inputs(self): method get_config (line 113) | def get_config(self): method create_and_check_model (line 129) | def create_and_check_model( method create_and_check_for_causal_lm (line 139) | def create_and_check_for_causal_lm( method create_and_check_biogpt_model_attention_mask_past (line 157) | def create_and_check_biogpt_model_attention_mask_past( method create_and_check_biogpt_model_past_large_inputs (line 199) | def create_and_check_biogpt_model_past_large_inputs( method create_and_check_forward_and_backwards (line 234) | def create_and_check_forward_and_backwards( method create_and_check_biogpt_weight_initialization (line 247) | def create_and_check_biogpt_weight_initialization(self, config, *args): method create_and_check_biogpt_for_token_classification (line 255) | def create_and_check_biogpt_for_token_classification( method prepare_config_and_inputs_for_common (line 265) | def prepare_config_and_inputs_for_common(self): class BioGptModelTest (line 281) | class BioGptModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method setUp (line 301) | def setUp(self): method test_config (line 305) | def test_config(self): method test_model (line 308) | def test_model(self): method test_model_various_embeddings (line 312) | def test_model_various_embeddings(self): method test_biogpt_model_att_mask_past (line 318) | def test_biogpt_model_att_mask_past(self): method test_biogpt_gradient_checkpointing (line 322) | def test_biogpt_gradient_checkpointing(self): method test_biogpt_model_past_with_large_inputs (line 326) | def test_biogpt_model_past_with_large_inputs(self): method test_biogpt_weight_initialization (line 330) | def test_biogpt_weight_initialization(self): method test_biogpt_token_classification_model (line 334) | def test_biogpt_token_classification_model(self): method test_batch_generation (line 339) | def test_batch_generation(self): method test_model_from_pretrained (line 383) | def test_model_from_pretrained(self): method test_biogpt_sequence_classification_model (line 389) | def test_biogpt_sequence_classification_model(self): method test_biogpt_sequence_classification_model_for_multi_label (line 402) | def test_biogpt_sequence_classification_model_for_multi_label(self): class BioGptModelIntegrationTest (line 419) | class BioGptModelIntegrationTest(unittest.TestCase): method test_inference_lm_head_model (line 421) | def test_inference_lm_head_model(self): method test_biogpt_generation (line 438) | def test_biogpt_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/biogpt/test_tokenization_biogpt.py class BioGptTokenizationTest (line 28) | class BioGptTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 33) | def setUp(self): method get_input_output_texts (line 70) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 75) | def test_full_tokenizer(self): method test_sequence_builders (line 89) | def test_sequence_builders(self): FILE: mplsandbox_for_rl/transformers/tests/models/bit/test_modeling_bit.py class BitModelTester (line 40) | class BitModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 76) | def prepare_config_and_inputs(self): method get_config (line 87) | def get_config(self): method create_and_check_model (line 100) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 110) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_backbone (line 118) | def create_and_check_backbone(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 147) | def prepare_config_and_inputs_for_common(self): class BitModelTest (line 155) | class BitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 174) | def setUp(self): method test_config (line 180) | def test_config(self): method test_attention_outputs (line 184) | def test_attention_outputs(self): method test_inputs_embeds (line 188) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 192) | def test_model_get_set_embeddings(self): method test_model (line 195) | def test_model(self): method test_backbone (line 199) | def test_backbone(self): method test_initialization (line 203) | def test_initialization(self): method test_hidden_states_output (line 219) | def test_hidden_states_output(self): method test_feed_forward_chunking (line 254) | def test_feed_forward_chunking(self): method test_for_image_classification (line 257) | def test_for_image_classification(self): method test_model_from_pretrained (line 262) | def test_model_from_pretrained(self): function prepare_img (line 269) | def prepare_img(): class BitModelIntegrationTest (line 276) | class BitModelIntegrationTest(unittest.TestCase): method default_image_processor (line 278) | def default_image_processor(self): method test_inference_image_classification_head (line 282) | def test_inference_image_classification_head(self): class BitBackboneTest (line 303) | class BitBackboneTest(BackboneTesterMixin, unittest.TestCase): method setUp (line 309) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/blenderbot/test_modeling_blenderbot.py function prepare_blenderbot_inputs_dict (line 49) | def prepare_blenderbot_inputs_dict( class BlenderbotModelTester (line 80) | class BlenderbotModelTester: method __init__ (line 81) | def __init__( method prepare_config_and_inputs (line 125) | def prepare_config_and_inputs(self): method get_config (line 137) | def get_config(self): method get_pipeline_config (line 157) | def get_pipeline_config(self): method prepare_config_and_inputs_for_common (line 163) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 167) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 201) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class BlenderbotModelTest (line 235) | class BlenderbotModelTest(ModelTesterMixin, GenerationTesterMixin, Pipel... method setUp (line 254) | def setUp(self): method test_config (line 258) | def test_config(self): method test_save_load_strict (line 261) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 271) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 275) | def test_encoder_decoder_model_standalone(self): method test_generate_fp16 (line 280) | def test_generate_fp16(self): function assert_tensors_close (line 290) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): class Blenderbot3BIntegrationTests (line 313) | class Blenderbot3BIntegrationTests(unittest.TestCase): method tokenizer (line 317) | def tokenizer(self): method test_generation_from_short_input_same_as_parlai_3B (line 321) | def test_generation_from_short_input_same_as_parlai_3B(self): class BlenderbotStandaloneDecoderModelTester (line 351) | class BlenderbotStandaloneDecoderModelTester: method __init__ (line 352) | def __init__( method prepare_config_and_inputs (line 409) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 444) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 480) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 528) | def prepare_config_and_inputs_for_common(self): class BlenderbotStandaloneDecoderModelTest (line 545) | class BlenderbotStandaloneDecoderModelTest(ModelTesterMixin, GenerationT... method setUp (line 551) | def setUp( method test_config (line 557) | def test_config(self): method test_decoder_model_past (line 560) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 564) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 569) | def test_retain_grad_hidden_states_attentions(self): FILE: mplsandbox_for_rl/transformers/tests/models/blenderbot/test_modeling_flax_blenderbot.py function prepare_blenderbot_inputs_dict (line 46) | def prepare_blenderbot_inputs_dict( class FlaxBlenderbotModelTester (line 74) | class FlaxBlenderbotModelTester: method __init__ (line 75) | def __init__( method prepare_config_and_inputs (line 115) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 142) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 146) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 186) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class BlenderbotHeadTests (line 234) | class BlenderbotHeadTests(unittest.TestCase): method _get_config_and_data (line 237) | def _get_config_and_data(self): method test_lm_forward (line 275) | def test_lm_forward(self): method test_lm_uneven_forward (line 282) | def test_lm_uneven_forward(self): method test_shift_tokens_right (line 301) | def test_shift_tokens_right(self): class FlaxBlenderbotModelTest (line 312) | class FlaxBlenderbotModelTest(FlaxModelTesterMixin, unittest.TestCase, F... method setUp (line 324) | def setUp(self): method test_use_cache_forward (line 327) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 332) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 337) | def test_encode(self): method test_decode (line 360) | def test_decode(self): method test_model_from_pretrained (line 394) | def test_model_from_pretrained(self): method test_generation_from_short_input_same_as_parlai_3B (line 404) | def test_generation_from_short_input_same_as_parlai_3B(self): FILE: mplsandbox_for_rl/transformers/tests/models/blenderbot/test_modeling_tf_blenderbot.py class TFBlenderbotModelTester (line 37) | class TFBlenderbotModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs_for_common (line 79) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 107) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_blenderbot_inputs_dict (line 143) | def prepare_blenderbot_inputs_dict( class TFBlenderbotModelTest (line 181) | class TFBlenderbotModelTest(TFModelTesterMixin, PipelineTesterMixin, uni... method setUp (line 198) | def setUp(self): method test_config (line 202) | def test_config(self): method test_decoder_model_past_large_inputs (line 205) | def test_decoder_model_past_large_inputs(self): class TFBlenderbot400MIntegrationTests (line 212) | class TFBlenderbot400MIntegrationTests(unittest.TestCase): method tokenizer (line 217) | def tokenizer(self): method model (line 221) | def model(self): method test_generation_from_long_input (line 226) | def test_generation_from_long_input(self): FILE: mplsandbox_for_rl/transformers/tests/models/blenderbot/test_tokenization_blenderbot.py class Blenderbot3BTokenizerTests (line 25) | class Blenderbot3BTokenizerTests(unittest.TestCase): method tokenizer_3b (line 27) | def tokenizer_3b(self): method rust_tokenizer_3b (line 31) | def rust_tokenizer_3b(self): method test_encode_decode_cycle (line 34) | def test_encode_decode_cycle(self): method test_encode_decode_cycle_rust_tokenizer (line 41) | def test_encode_decode_cycle_rust_tokenizer(self): method test_3B_tokenization_same_as_parlai (line 48) | def test_3B_tokenization_same_as_parlai(self): method test_3B_tokenization_same_as_parlai_rust_tokenizer (line 52) | def test_3B_tokenization_same_as_parlai_rust_tokenizer(self): method test_tokenization_for_chat (line 57) | def test_tokenization_for_chat(self): FILE: mplsandbox_for_rl/transformers/tests/models/blenderbot_small/test_modeling_blenderbot_small.py function prepare_blenderbot_small_inputs_dict (line 46) | def prepare_blenderbot_small_inputs_dict( class BlenderbotSmallModelTester (line 77) | class BlenderbotSmallModelTester: method __init__ (line 78) | def __init__( method prepare_config_and_inputs (line 122) | def prepare_config_and_inputs(self): method get_config (line 134) | def get_config(self): method prepare_config_and_inputs_for_common (line 154) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 158) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 192) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class BlenderbotSmallModelTest (line 226) | class BlenderbotSmallModelTest(ModelTesterMixin, GenerationTesterMixin, ... method is_pipeline_test_to_skip (line 246) | def is_pipeline_test_to_skip( method setUp (line 251) | def setUp(self): method test_config (line 255) | def test_config(self): method test_save_load_strict (line 258) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 268) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 272) | def test_encoder_decoder_model_standalone(self): method test_generate_fp16 (line 277) | def test_generate_fp16(self): function assert_tensors_close (line 287) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): class Blenderbot90MIntegrationTests (line 307) | class Blenderbot90MIntegrationTests(unittest.TestCase): method model (line 311) | def model(self): method tokenizer (line 318) | def tokenizer(self): method test_90_generation_from_long_input (line 322) | def test_90_generation_from_long_input(self): method test_90_generation_from_short_input (line 340) | def test_90_generation_from_short_input(self): class BlenderbotSmallStandaloneDecoderModelTester (line 354) | class BlenderbotSmallStandaloneDecoderModelTester: method __init__ (line 355) | def __init__( method prepare_config_and_inputs (line 410) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 444) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 480) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 527) | def prepare_config_and_inputs_for_common(self): class BlenderbotSmallStandaloneDecoderModelTest (line 544) | class BlenderbotSmallStandaloneDecoderModelTest(ModelTesterMixin, Genera... method setUp (line 550) | def setUp( method test_config (line 556) | def test_config(self): method test_decoder_model_past (line 559) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 563) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 568) | def test_retain_grad_hidden_states_attentions(self): FILE: mplsandbox_for_rl/transformers/tests/models/blenderbot_small/test_modeling_flax_blenderbot_small.py function prepare_blenderbot_inputs_dict (line 45) | def prepare_blenderbot_inputs_dict( class FlaxBlenderbotSmallModelTester (line 73) | class FlaxBlenderbotSmallModelTester: method __init__ (line 74) | def __init__( method prepare_config_and_inputs (line 114) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 141) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 145) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 185) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class BlenderbotHeadTests (line 233) | class BlenderbotHeadTests(unittest.TestCase): method _get_config_and_data (line 236) | def _get_config_and_data(self): method test_lm_forward (line 274) | def test_lm_forward(self): method test_lm_uneven_forward (line 281) | def test_lm_uneven_forward(self): method test_shift_tokens_right (line 300) | def test_shift_tokens_right(self): class FlaxBlenderbotSmallModelTest (line 311) | class FlaxBlenderbotSmallModelTest(FlaxModelTesterMixin, unittest.TestCa... method is_pipeline_test_to_skip (line 323) | def is_pipeline_test_to_skip( method setUp (line 328) | def setUp(self): method test_use_cache_forward (line 331) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 336) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 341) | def test_encode(self): method test_decode (line 364) | def test_decode(self): method test_model_from_pretrained (line 398) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/blenderbot_small/test_modeling_tf_blenderbot_small.py class TFBlenderbotSmallModelTester (line 37) | class TFBlenderbotSmallModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs_for_common (line 79) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 107) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_blenderbot_small_inputs_dict (line 143) | def prepare_blenderbot_small_inputs_dict( class TFBlenderbotSmallModelTest (line 181) | class TFBlenderbotSmallModelTest(TFModelTesterMixin, PipelineTesterMixin... method is_pipeline_test_to_skip (line 200) | def is_pipeline_test_to_skip( method setUp (line 205) | def setUp(self): method test_config (line 209) | def test_config(self): method test_decoder_model_past_large_inputs (line 212) | def test_decoder_model_past_large_inputs(self): class TFBlenderbot90MIntegrationTests (line 219) | class TFBlenderbot90MIntegrationTests(unittest.TestCase): method tokenizer (line 227) | def tokenizer(self): method model (line 232) | def model(self): method test_90_generation_from_long_input (line 237) | def test_90_generation_from_long_input(self): FILE: mplsandbox_for_rl/transformers/tests/models/blenderbot_small/test_tokenization_blenderbot_small.py class BlenderbotSmallTokenizerTest (line 30) | class BlenderbotSmallTokenizerTest(TokenizerTesterMixin, unittest.TestCa... method setUp (line 35) | def setUp(self): method get_tokenizer (line 51) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 55) | def get_input_output_texts(self, tokenizer): method test_full_blenderbot_small_tokenizer (line 60) | def test_full_blenderbot_small_tokenizer(self): method test_special_tokens_small_tok (line 72) | def test_special_tokens_small_tok(self): method test_empty_word_small_tok (line 81) | def test_empty_word_small_tok(self): FILE: mplsandbox_for_rl/transformers/tests/models/blip/test_image_processing_blip.py class BlipImageProcessingTester (line 29) | class BlipImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 62) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 73) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 76) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class BlipImageProcessingTest (line 90) | class BlipImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 93) | def setUp(self): method image_processor_dict (line 98) | def image_processor_dict(self): method test_image_processor_properties (line 101) | def test_image_processor_properties(self): class BlipImageProcessingTestFourChannels (line 113) | class BlipImageProcessingTestFourChannels(ImageProcessingTestMixin, unit... method setUp (line 116) | def setUp(self): method image_processor_dict (line 122) | def image_processor_dict(self): method test_image_processor_properties (line 125) | def test_image_processor_properties(self): method test_call_numpy (line 135) | def test_call_numpy(self): method test_call_pytorch (line 139) | def test_call_pytorch(self): method test_call_pil (line 143) | def test_call_pil(self): method test_call_numpy_4_channels (line 147) | def test_call_numpy_4_channels(self): FILE: mplsandbox_for_rl/transformers/tests/models/blip/test_modeling_blip.py class BlipVisionModelTester (line 67) | class BlipVisionModelTester: method __init__ (line 68) | def __init__( method prepare_config_and_inputs (line 106) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method create_and_check_model (line 127) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 140) | def prepare_config_and_inputs_for_common(self): class BlipVisionModelTest (line 148) | class BlipVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 160) | def setUp(self): method test_config (line 164) | def test_config(self): method test_inputs_embeds (line 168) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 171) | def test_model_get_set_embeddings(self): method test_forward_signature (line 180) | def test_forward_signature(self): method test_model (line 192) | def test_model(self): method test_training (line 197) | def test_training(self): method test_training_gradient_checkpointing (line 201) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 207) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 213) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 217) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 221) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 225) | def test_model_from_pretrained(self): class BlipTextModelTester (line 231) | class BlipTextModelTester: method __init__ (line 232) | def __init__( method prepare_config_and_inputs (line 272) | def prepare_config_and_inputs(self): method get_config (line 290) | def get_config(self): method create_and_check_model (line 305) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 315) | def prepare_config_and_inputs_for_common(self): class BlipTextModelTest (line 323) | class BlipTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 329) | def setUp(self): method test_config (line 333) | def test_config(self): method test_model (line 336) | def test_model(self): method test_training (line 341) | def test_training(self): method test_training_gradient_checkpointing (line 345) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 351) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 357) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 361) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 365) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 369) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 373) | def test_model_from_pretrained(self): method test_pt_tf_model_equivalence (line 378) | def test_pt_tf_model_equivalence(self): class BlipModelTester (line 382) | class BlipModelTester: method __init__ (line 383) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 395) | def prepare_config_and_inputs(self): method get_config (line 403) | def get_config(self): method create_and_check_model (line 408) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 419) | def prepare_config_and_inputs_for_common(self): class BlipModelTest (line 432) | class BlipModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 449) | def setUp(self): method test_model (line 452) | def test_model(self): method test_hidden_states_output (line 457) | def test_hidden_states_output(self): method test_inputs_embeds (line 461) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 465) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 469) | def test_model_get_set_embeddings(self): method test_initialization (line 473) | def test_initialization(self): method _create_and_check_torchscript (line 496) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 567) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 583) | def test_model_from_pretrained(self): method test_get_image_features (line 588) | def test_get_image_features(self): method test_get_text_features (line 607) | def test_get_text_features(self): method test_get_multimodal_features (line 626) | def test_get_multimodal_features(self): method test_pt_tf_model_equivalence (line 645) | def test_pt_tf_model_equivalence(self): class BlipTextRetrievalModelTester (line 649) | class BlipTextRetrievalModelTester: method __init__ (line 650) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 662) | def prepare_config_and_inputs(self): method get_config (line 670) | def get_config(self): method create_and_check_model (line 675) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 686) | def prepare_config_and_inputs_for_common(self): class BlipTextImageModelsModelTester (line 697) | class BlipTextImageModelsModelTester: method __init__ (line 698) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 711) | def prepare_config_and_inputs(self): method get_config (line 719) | def get_config(self): method create_and_check_model (line 724) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 735) | def prepare_config_and_inputs_for_common(self): class BlipVQAModelTester (line 747) | class BlipVQAModelTester: method __init__ (line 748) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 760) | def prepare_config_and_inputs(self): method get_config (line 768) | def get_config(self): method create_and_check_model (line 773) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 784) | def prepare_config_and_inputs_for_common(self): class BlipVQAModelTest (line 799) | class BlipVQAModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 808) | def setUp(self): method _prepare_inputs_for_vqa (line 811) | def _prepare_inputs_for_vqa(self): method test_class_name_consistency (line 818) | def test_class_name_consistency(self): method test_training (line 829) | def test_training(self): method test_forward_signature (line 843) | def test_forward_signature(self): method test_hidden_states_output (line 866) | def test_hidden_states_output(self): method test_inputs_embeds (line 870) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 874) | def test_model_get_set_embeddings(self): class BlipTextRetrievalModelTest (line 879) | class BlipTextRetrievalModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 888) | def setUp(self): method test_model (line 891) | def test_model(self): method test_hidden_states_output (line 896) | def test_hidden_states_output(self): method test_inputs_embeds (line 900) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 904) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 908) | def test_model_get_set_embeddings(self): method test_forward_signature (line 911) | def test_forward_signature(self): method test_training (line 937) | def test_training(self): method test_training_gradient_checkpointing (line 956) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 980) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 986) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_initialization (line 990) | def test_initialization(self): method _create_and_check_torchscript (line 1013) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 1084) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 1100) | def test_model_from_pretrained(self): class BlipTextImageModelTest (line 1107) | class BlipTextImageModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 1116) | def setUp(self): method test_model (line 1119) | def test_model(self): method test_hidden_states_output (line 1124) | def test_hidden_states_output(self): method test_inputs_embeds (line 1128) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 1132) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 1136) | def test_model_get_set_embeddings(self): method test_forward_signature (line 1139) | def test_forward_signature(self): method test_training (line 1165) | def test_training(self): method test_training_gradient_checkpointing (line 1184) | def test_training_gradient_checkpointing(self): method test_initialization (line 1206) | def test_initialization(self): method _create_and_check_torchscript (line 1229) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 1300) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 1316) | def test_model_from_pretrained(self): function prepare_img (line 1323) | def prepare_img(): class BlipModelIntegrationTest (line 1332) | class BlipModelIntegrationTest(unittest.TestCase): method test_inference_image_captioning (line 1333) | def test_inference_image_captioning(self): method test_inference_image_captioning_fp16 (line 1360) | def test_inference_image_captioning_fp16(self): method test_inference_interpolate_pos_encoding (line 1387) | def test_inference_interpolate_pos_encoding(self): method test_inference_vqa (line 1401) | def test_inference_vqa(self): method test_inference_itm (line 1414) | def test_inference_itm(self): FILE: mplsandbox_for_rl/transformers/tests/models/blip/test_modeling_blip_text.py class BlipTextModelTester (line 35) | class BlipTextModelTester: method __init__ (line 36) | def __init__( method prepare_config_and_inputs (line 76) | def prepare_config_and_inputs(self): method get_config (line 94) | def get_config(self): method create_and_check_model (line 109) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 119) | def prepare_config_and_inputs_for_common(self): class BlipTextModelTest (line 127) | class BlipTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 133) | def setUp(self): method test_config (line 137) | def test_config(self): method test_model (line 140) | def test_model(self): method test_training (line 145) | def test_training(self): method test_training_gradient_checkpointing (line 149) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 155) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 161) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 165) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 169) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 173) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 177) | def test_model_from_pretrained(self): method test_pt_tf_model_equivalence (line 182) | def test_pt_tf_model_equivalence(self): FILE: mplsandbox_for_rl/transformers/tests/models/blip/test_modeling_tf_blip.py class TFBlipVisionModelTester (line 55) | class TFBlipVisionModelTester: method __init__ (line 56) | def __init__( method prepare_config_and_inputs (line 94) | def prepare_config_and_inputs(self): method get_config (line 100) | def get_config(self): method create_and_check_model (line 115) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 125) | def prepare_config_and_inputs_for_common(self): class TFBlipVisionModelTest (line 133) | class TFBlipVisionModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 146) | def setUp(self): method test_config (line 150) | def test_config(self): method test_inputs_embeds (line 154) | def test_inputs_embeds(self): method test_forward_signature (line 157) | def test_forward_signature(self): method test_model_common_attributes (line 169) | def test_model_common_attributes(self): method test_model (line 178) | def test_model(self): method test_save_load_fast_init_from_base (line 183) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 187) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 191) | def test_model_from_pretrained(self): class TFBlipTextModelTester (line 197) | class TFBlipTextModelTester: method __init__ (line 198) | def __init__( method prepare_config_and_inputs (line 238) | def prepare_config_and_inputs(self): method get_config (line 258) | def get_config(self): method create_and_check_model (line 273) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 280) | def prepare_config_and_inputs_for_common(self): class TFBlipTextModelTest (line 288) | class TFBlipTextModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 295) | def setUp(self): method test_config (line 299) | def test_config(self): method test_model (line 302) | def test_model(self): method test_inputs_embeds (line 307) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 311) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 315) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 319) | def test_model_from_pretrained(self): method test_pt_tf_model_equivalence (line 324) | def test_pt_tf_model_equivalence(self, allow_missing_keys=True): class TFBlipModelTester (line 328) | class TFBlipModelTester: method __init__ (line 329) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 340) | def prepare_config_and_inputs(self): method get_config (line 348) | def get_config(self): method create_and_check_model (line 353) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 363) | def prepare_config_and_inputs_for_common(self): class TFBlipModelTest (line 376) | class TFBlipModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 389) | def setUp(self): method test_model (line 392) | def test_model(self): method test_hidden_states_output (line 397) | def test_hidden_states_output(self): method test_inputs_embeds (line 401) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 405) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 409) | def test_model_common_attributes(self): method test_load_vision_text_config (line 412) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 428) | def test_model_from_pretrained(self): method test_pt_tf_model_equivalence (line 433) | def test_pt_tf_model_equivalence(self, allow_missing_keys=True): method test_saved_model_creation (line 437) | def test_saved_model_creation(self): class BlipTextRetrievalModelTester (line 444) | class BlipTextRetrievalModelTester: method __init__ (line 445) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 456) | def prepare_config_and_inputs(self): method get_config (line 464) | def get_config(self): method create_and_check_model (line 469) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 479) | def prepare_config_and_inputs_for_common(self): class BlipTextImageModelsModelTester (line 490) | class BlipTextImageModelsModelTester: method __init__ (line 491) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 502) | def prepare_config_and_inputs(self): method get_config (line 510) | def get_config(self): method create_and_check_model (line 515) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 525) | def prepare_config_and_inputs_for_common(self): class BlipVQAModelsModelTester (line 537) | class BlipVQAModelsModelTester: method __init__ (line 538) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 549) | def prepare_config_and_inputs(self): method get_config (line 557) | def get_config(self): method create_and_check_model (line 562) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 572) | def prepare_config_and_inputs_for_common(self): class TFBlipVQAModelTest (line 587) | class TFBlipVQAModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 595) | def setUp(self): method _prepare_inputs_for_vqa (line 598) | def _prepare_inputs_for_vqa(self): method test_class_name_consistency (line 605) | def test_class_name_consistency(self): method test_training (line 616) | def test_training(self): method test_hidden_states_output (line 627) | def test_hidden_states_output(self): method test_inputs_embeds (line 631) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 635) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 639) | def test_model_common_attributes(self): method test_compile_tf_model (line 643) | def test_compile_tf_model(self): method test_keras_fit (line 647) | def test_keras_fit(self): class TFBlipTextRetrievalModelTest (line 652) | class TFBlipTextRetrievalModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 660) | def setUp(self): method test_model (line 663) | def test_model(self): method test_hidden_states_output (line 668) | def test_hidden_states_output(self): method test_inputs_embeds (line 672) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 676) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 680) | def test_model_common_attributes(self): method test_training (line 683) | def test_training(self): method test_load_vision_text_config (line 700) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 716) | def test_model_from_pretrained(self): method test_compile_tf_model (line 722) | def test_compile_tf_model(self): method test_keras_fit (line 726) | def test_keras_fit(self): class TFBlipTextImageModelTest (line 731) | class TFBlipTextImageModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 739) | def setUp(self): method test_model (line 742) | def test_model(self): method test_hidden_states_output (line 747) | def test_hidden_states_output(self): method test_inputs_embeds (line 751) | def test_inputs_embeds(self): method test_forward_signature (line 754) | def test_forward_signature(self): method test_compile_tf_model (line 783) | def test_compile_tf_model(self): method test_keras_fit (line 787) | def test_keras_fit(self): method test_retain_grad_hidden_states_attentions (line 791) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 795) | def test_model_common_attributes(self): method test_training (line 798) | def test_training(self): method test_load_vision_text_config (line 815) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 831) | def test_model_from_pretrained(self): function prepare_img (line 838) | def prepare_img(): class TFBlipModelIntegrationTest (line 847) | class TFBlipModelIntegrationTest(unittest.TestCase): method test_inference_image_captioning (line 848) | def test_inference_image_captioning(self): method test_inference_vqa (line 875) | def test_inference_vqa(self): method test_inference_itm (line 887) | def test_inference_itm(self): FILE: mplsandbox_for_rl/transformers/tests/models/blip/test_modeling_tf_blip_text.py class BlipTextModelTester (line 37) | class BlipTextModelTester: method __init__ (line 38) | def __init__( method prepare_config_and_inputs (line 78) | def prepare_config_and_inputs(self): method get_config (line 97) | def get_config(self): method create_and_check_model (line 112) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 119) | def prepare_config_and_inputs_for_common(self): class BlipTextModelTest (line 127) | class BlipTextModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 133) | def setUp(self): method test_config (line 137) | def test_config(self): method test_model (line 140) | def test_model(self): method test_training (line 144) | def test_training(self): method test_training_gradient_checkpointing (line 147) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 153) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 159) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 163) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 167) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 171) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 175) | def test_model_from_pretrained(self): method test_pt_tf_model_equivalence (line 180) | def test_pt_tf_model_equivalence(self, allow_missing_keys=True): FILE: mplsandbox_for_rl/transformers/tests/models/blip/test_processor_blip.py class BlipProcessorTest (line 32) | class BlipProcessorTest(unittest.TestCase): method setUp (line 33) | def setUp(self): method get_tokenizer (line 43) | def get_tokenizer(self, **kwargs): method get_image_processor (line 46) | def get_image_processor(self, **kwargs): method tearDown (line 49) | def tearDown(self): method prepare_image_inputs (line 52) | def prepare_image_inputs(self): method test_save_load_pretrained_additional_features (line 63) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 80) | def test_image_processor(self): method test_tokenizer (line 94) | def test_tokenizer(self): method test_processor (line 109) | def test_processor(self): method test_tokenizer_decode (line 126) | def test_tokenizer_decode(self): method test_model_input_names (line 139) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/blip_2/test_modeling_blip_2.py class Blip2VisionModelTester (line 59) | class Blip2VisionModelTester: method __init__ (line 60) | def __init__( method prepare_config_and_inputs (line 98) | def prepare_config_and_inputs(self): method get_config (line 104) | def get_config(self): method create_and_check_model (line 119) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 132) | def prepare_config_and_inputs_for_common(self): class Blip2VisionModelTest (line 140) | class Blip2VisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 152) | def setUp(self): method test_config (line 158) | def test_config(self): method test_inputs_embeds (line 162) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 165) | def test_model_get_set_embeddings(self): method test_forward_signature (line 174) | def test_forward_signature(self): method test_model (line 186) | def test_model(self): method test_training (line 191) | def test_training(self): method test_training_gradient_checkpointing (line 195) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 201) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 207) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 211) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 215) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 219) | def test_model_from_pretrained(self): class Blip2QFormerModelTester (line 225) | class Blip2QFormerModelTester: method __init__ (line 226) | def __init__( method prepare_config_and_inputs (line 266) | def prepare_config_and_inputs(self): method get_config (line 284) | def get_config(self): class Blip2TextModelDecoderOnlyTester (line 301) | class Blip2TextModelDecoderOnlyTester: method __init__ (line 302) | def __init__( method prepare_config_and_inputs (line 349) | def prepare_config_and_inputs(self): method get_config (line 359) | def get_config(self): class Blip2ForConditionalGenerationDecoderOnlyModelTester (line 379) | class Blip2ForConditionalGenerationDecoderOnlyModelTester: method __init__ (line 380) | def __init__( method prepare_config_and_inputs (line 399) | def prepare_config_and_inputs(self): method get_config (line 407) | def get_config(self): method create_and_check_for_conditional_generation (line 415) | def create_and_check_for_conditional_generation(self, config, input_id... method prepare_config_and_inputs_for_common (line 426) | def prepare_config_and_inputs_for_common(self): class Blip2ForConditionalGenerationDecoderOnlyTest (line 439) | class Blip2ForConditionalGenerationDecoderOnlyTest(ModelTesterMixin, Gen... method setUp (line 448) | def setUp(self): method test_for_conditional_generation (line 451) | def test_for_conditional_generation(self): method test_hidden_states_output (line 456) | def test_hidden_states_output(self): method test_inputs_embeds (line 460) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 464) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 468) | def test_model_get_set_embeddings(self): method test_save_load_fast_init_from_base (line 472) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 476) | def test_save_load_fast_init_to_base(self): method test_forward_signature (line 479) | def test_forward_signature(self): method test_load_vision_qformer_text_config (line 491) | def test_load_vision_qformer_text_config(self): method test_model_from_pretrained (line 507) | def test_model_from_pretrained(self): class Blip2TextModelTester (line 514) | class Blip2TextModelTester: method __init__ (line 515) | def __init__( method prepare_config_and_inputs (line 562) | def prepare_config_and_inputs(self): method get_config (line 587) | def get_config(self): class Blip2ModelTester (line 607) | class Blip2ModelTester: method __init__ (line 608) | def __init__( method prepare_config_and_inputs (line 627) | def prepare_config_and_inputs(self): method get_config (line 642) | def get_config(self): method create_and_check_for_conditional_generation (line 650) | def create_and_check_for_conditional_generation( method prepare_config_and_inputs_for_common (line 666) | def prepare_config_and_inputs_for_common(self): class Blip2ModelTest (line 689) | class Blip2ModelTest(ModelTesterMixin, PipelineTesterMixin, GenerationTe... method setUp (line 707) | def setUp(self): method test_for_conditional_generation (line 710) | def test_for_conditional_generation(self): method test_hidden_states_output (line 715) | def test_hidden_states_output(self): method test_inputs_embeds (line 719) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 723) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 727) | def test_model_get_set_embeddings(self): method test_save_load_fast_init_from_base (line 731) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 735) | def test_save_load_fast_init_to_base(self): method test_cpu_offload (line 739) | def test_cpu_offload(self): method test_forward_signature (line 742) | def test_forward_signature(self): method test_load_vision_qformer_text_config (line 754) | def test_load_vision_qformer_text_config(self): method test_model_from_pretrained (line 770) | def test_model_from_pretrained(self): method test_get_text_features (line 775) | def test_get_text_features(self): method test_get_image_features (line 789) | def test_get_image_features(self): method test_get_qformer_features (line 809) | def test_get_qformer_features(self): method test_initialization (line 826) | def test_initialization(self): function prepare_img (line 844) | def prepare_img(): class Blip2ModelIntegrationTest (line 853) | class Blip2ModelIntegrationTest(unittest.TestCase): method test_inference_opt (line 854) | def test_inference_opt(self): method test_inference_interpolate_pos_encoding (line 886) | def test_inference_interpolate_pos_encoding(self): method test_inference_opt_batched_beam_search (line 902) | def test_inference_opt_batched_beam_search(self): method test_inference_t5 (line 918) | def test_inference_t5(self): method test_inference_t5_batched_beam_search (line 949) | def test_inference_t5_batched_beam_search(self): method test_inference_opt_multi_accelerator (line 966) | def test_inference_opt_multi_accelerator(self): method test_inference_t5_multi_accelerator (line 998) | def test_inference_t5_multi_accelerator(self): method test_expansion_in_processing (line 1037) | def test_expansion_in_processing(self): FILE: mplsandbox_for_rl/transformers/tests/models/blip_2/test_processor_blip_2.py class Blip2ProcessorTest (line 32) | class Blip2ProcessorTest(unittest.TestCase): method setUp (line 33) | def setUp(self): method get_tokenizer (line 43) | def get_tokenizer(self, **kwargs): method get_image_processor (line 46) | def get_image_processor(self, **kwargs): method tearDown (line 49) | def tearDown(self): method prepare_image_inputs (line 52) | def prepare_image_inputs(self): method test_save_load_pretrained_additional_features (line 63) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 80) | def test_image_processor(self): method test_tokenizer (line 94) | def test_tokenizer(self): method test_processor (line 109) | def test_processor(self): method test_tokenizer_decode (line 126) | def test_tokenizer_decode(self): method test_model_input_names (line 139) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/bloom/test_modeling_bloom.py class BloomModelTester (line 43) | class BloomModelTester: method __init__ (line 44) | def __init__( method get_large_model_config (line 97) | def get_large_model_config(self): method prepare_config_and_inputs (line 100) | def prepare_config_and_inputs(self, gradient_checkpointing=False): method get_config (line 115) | def get_config(self, gradient_checkpointing=False, slow_but_exact=True): method create_and_check_bloom_model (line 137) | def create_and_check_bloom_model(self, config, input_ids, input_mask, ... method create_and_check_bloom_model_past (line 147) | def create_and_check_bloom_model_past(self, config, input_ids, input_m... method create_and_check_bloom_model_attention_mask_past (line 180) | def create_and_check_bloom_model_attention_mask_past(self, config, inp... method create_and_check_bloom_model_past_large_inputs (line 220) | def create_and_check_bloom_model_past_large_inputs(self, config, input... method create_and_check_lm_head_model (line 252) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_sequence_classification_model (line 261) | def create_and_check_sequence_classification_model(self, config, input... method create_and_check_token_classification_model (line 270) | def create_and_check_token_classification_model(self, config, input_id... method create_and_check_question_answering_model (line 278) | def create_and_check_question_answering_model(self, config, input_ids,... method create_and_check_forward_and_backwards (line 286) | def create_and_check_forward_and_backwards( method create_and_check_bloom_weight_initialization (line 299) | def create_and_check_bloom_weight_initialization(self, config, *args): method prepare_config_and_inputs_for_common (line 307) | def prepare_config_and_inputs_for_common(self): class BloomModelTest (line 318) | class BloomModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe... method setUp (line 349) | def setUp(self): method test_config (line 353) | def test_config(self): method test_bloom_model (line 356) | def test_bloom_model(self): method test_bloom_model_past (line 360) | def test_bloom_model_past(self): method test_bloom_model_att_mask_past (line 364) | def test_bloom_model_att_mask_past(self): method test_bloom_model_past_large_inputs (line 368) | def test_bloom_model_past_large_inputs(self): method test_bloom_lm_head_model (line 372) | def test_bloom_lm_head_model(self): method test_bloom_sequence_classification_model (line 376) | def test_bloom_sequence_classification_model(self): method test_bloom_token_classification_model (line 380) | def test_bloom_token_classification_model(self): method test_bloom_gradient_checkpointing (line 384) | def test_bloom_gradient_checkpointing(self): method test_bloom_weight_initialization (line 388) | def test_bloom_weight_initialization(self): method test_past_key_values_format (line 393) | def test_past_key_values_format(self): method test_model_from_pretrained (line 397) | def test_model_from_pretrained(self): method test_simple_generation (line 404) | def test_simple_generation(self): method test_batch_generation (line 443) | def test_batch_generation(self): method test_batch_generation_padd (line 463) | def test_batch_generation_padd(self): method test_batch_generated_text (line 492) | def test_batch_generated_text(self): class BloomEmbeddingTest (line 519) | class BloomEmbeddingTest(unittest.TestCase): method setUp (line 541) | def setUp(self): method test_embeddings (line 546) | def test_embeddings(self): method test_hidden_states_transformers (line 775) | def test_hidden_states_transformers(self): method test_logits (line 803) | def test_logits(self): FILE: mplsandbox_for_rl/transformers/tests/models/bloom/test_modeling_flax_bloom.py function prepare_bloom_inputs_dict (line 38) | def prepare_bloom_inputs_dict(config, input_ids, attention_mask=None): class FlaxBloomModelTester (line 45) | class FlaxBloomModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 85) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 105) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 109) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 135) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxBloomModelTest (line 172) | class FlaxBloomModelTest(FlaxModelTesterMixin, unittest.TestCase, FlaxGe... method setUp (line 176) | def setUp(self): method test_use_cache_forward (line 179) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 184) | def test_use_cache_forward_with_attn_mask(self): method test_model_from_pretrained (line 190) | def test_model_from_pretrained(self): class FlaxBloomGenerationTest (line 200) | class FlaxBloomGenerationTest(unittest.TestCase): method setUp (line 204) | def setUp(self): method test_model_batched_gen (line 210) | def test_model_batched_gen(self): method test_model_batched_padding_left (line 220) | def test_model_batched_padding_left(self): method test_batch_generated_text (line 236) | def test_batch_generated_text(self): FILE: mplsandbox_for_rl/transformers/tests/models/bloom/test_tokenization_bloom.py class BloomTokenizationTest (line 27) | class BloomTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 37) | def setUp(self): method get_rust_tokenizer (line 42) | def get_rust_tokenizer(self, **kwargs): method test_encode_decode_with_spaces (line 47) | def test_encode_decode_with_spaces(self): method test_encodings_from_sample_data (line 50) | def test_encodings_from_sample_data(self): method test_padding (line 65) | def test_padding(self, max_length=6): method test_encodings_from_xnli_dataset (line 120) | def test_encodings_from_xnli_dataset(self): method test_tokenization_for_chat (line 136) | def test_tokenization_for_chat(self): method test_add_prefix_space_fast (line 157) | def test_add_prefix_space_fast(self): FILE: mplsandbox_for_rl/transformers/tests/models/bridgetower/test_image_processing_bridgetower.py class BridgeTowerImageProcessingTester (line 34) | class BridgeTowerImageProcessingTester(unittest.TestCase): method __init__ (line 35) | def __init__( method prepare_image_processor_dict (line 70) | def prepare_image_processor_dict(self): method get_expected_values (line 80) | def get_expected_values(self, image_inputs, batched=False): method expected_output_image_shape (line 122) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 126) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class BridgeTowerImageProcessingTest (line 140) | class BridgeTowerImageProcessingTest(ImageProcessingTestMixin, unittest.... method setUp (line 143) | def setUp(self): method image_processor_dict (line 148) | def image_processor_dict(self): method test_image_processor_properties (line 151) | def test_image_processor_properties(self): FILE: mplsandbox_for_rl/transformers/tests/models/bridgetower/test_modeling_bridgetower.py class BridgeTowerTextModelTester (line 59) | class BridgeTowerTextModelTester: method __init__ (line 60) | def __init__( method prepare_config_and_inputs (line 88) | def prepare_config_and_inputs(self): method get_config (line 96) | def get_config(self): class BridgeTowerImageModelTester (line 111) | class BridgeTowerImageModelTester: method __init__ (line 112) | def __init__( method prepare_config_and_inputs (line 136) | def prepare_config_and_inputs(self): method get_config (line 143) | def get_config(self): class BridgeTowerModelTester (line 159) | class BridgeTowerModelTester: method __init__ (line 160) | def __init__( method prepare_config_and_inputs (line 201) | def prepare_config_and_inputs(self): method get_config (line 209) | def get_config(self): method create_and_check_model (line 225) | def create_and_check_model( method create_and_check_for_image_and_text_retrieval (line 251) | def create_and_check_for_image_and_text_retrieval( method create_and_check_for_masked_language_modeling (line 269) | def create_and_check_for_masked_language_modeling( method prepare_config_and_inputs_for_common (line 288) | def prepare_config_and_inputs_for_common(self): class BridgeTowerModelTest (line 301) | class BridgeTowerModelTest(ModelTesterMixin, PipelineTesterMixin, unitte... method test_cpu_offload (line 322) | def test_cpu_offload(self): method test_disk_offload (line 326) | def test_disk_offload(self): method test_model_parallelism (line 330) | def test_model_parallelism(self): method extract_output (line 334) | def extract_output(self, outputs, model_class): method setUp (line 337) | def setUp(self): method test_config (line 341) | def test_config(self): method test_model (line 344) | def test_model(self): method test_for_image_and_text_retrieval (line 348) | def test_for_image_and_text_retrieval(self): method test_for_masked_language_modeling (line 352) | def test_for_masked_language_modeling(self): method test_model_from_pretrained (line 357) | def test_model_from_pretrained(self): method test_save_load_fast_init_from_base (line 363) | def test_save_load_fast_init_from_base(self): method test_save_load (line 368) | def test_save_load(self): method test_hidden_states_output (line 396) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 447) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 479) | def test_initialization(self): method test_model_get_set_embeddings (line 502) | def test_model_get_set_embeddings(self): method test_inputs_embeds (line 506) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 510) | def test_inputs_embeds_matches_input_ids(self): function prepare_img (line 515) | def prepare_img(): class BridgeTowerModelIntegrationTest (line 522) | class BridgeTowerModelIntegrationTest(unittest.TestCase): method default_processor (line 524) | def default_processor(self): method test_image_and_text_retrieval (line 532) | def test_image_and_text_retrieval(self): method test_masked_language_modeling (line 559) | def test_masked_language_modeling(self): method test_constrastive_learning (line 587) | def test_constrastive_learning(self): class BridgeTowerModelTrainingTest (line 606) | class BridgeTowerModelTrainingTest(unittest.TestCase): method setUp (line 613) | def setUp(self): method _prepare_inputs_for_training (line 617) | def _prepare_inputs_for_training(self, model_class): method _get_non_used_layer_names (line 627) | def _get_non_used_layer_names(self, model_class): method _is_layer_used (line 638) | def _is_layer_used(self, model_class, layer_name): method test_training (line 645) | def test_training(self): FILE: mplsandbox_for_rl/transformers/tests/models/bros/test_modeling_bros.py class BrosModelTester (line 40) | class BrosModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 137) | def get_config(self): method create_and_check_model (line 153) | def create_and_check_model( method create_and_check_for_token_classification (line 173) | def create_and_check_for_token_classification( method create_and_check_for_spade_ee_token_classification (line 194) | def create_and_check_for_spade_ee_token_classification( method create_and_check_for_spade_el_token_classification (line 224) | def create_and_check_for_spade_el_token_classification( method prepare_config_and_inputs_for_common (line 250) | def prepare_config_and_inputs_for_common(self): class BrosModelTest (line 273) | class BrosModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method is_pipeline_test_to_skip (line 297) | def is_pipeline_test_to_skip( method setUp (line 302) | def setUp(self): method _prepare_for_class (line 306) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 340) | def test_config(self): method test_model (line 343) | def test_model(self): method test_multi_gpu_data_parallel_forward (line 348) | def test_multi_gpu_data_parallel_forward(self): method test_model_various_embeddings (line 351) | def test_model_various_embeddings(self): method test_for_token_classification (line 357) | def test_for_token_classification(self): method test_for_spade_ee_token_classification (line 361) | def test_for_spade_ee_token_classification(self): method test_for_spade_el_token_classification (line 365) | def test_for_spade_el_token_classification(self): method test_model_from_pretrained (line 370) | def test_model_from_pretrained(self): function prepare_bros_batch_inputs (line 376) | def prepare_bros_batch_inputs(): class BrosModelIntegrationTest (line 424) | class BrosModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 426) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/byt5/test_tokenization_byt5.py class ByT5TokenizationTest (line 38) | class ByT5TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 42) | def setUp(self): method t5_base_tokenizer (line 48) | def t5_base_tokenizer(self): method get_tokenizer (line 51) | def get_tokenizer(self, **kwargs) -> ByT5Tokenizer: method get_clean_sequence (line 54) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_eos_treatment (line 92) | def test_eos_treatment(self): method test_multibytes_char (line 98) | def test_multibytes_char(self): method test_prepare_batch_integration (line 119) | def test_prepare_batch_integration(self): method test_empty_target_text (line 136) | def test_empty_target_text(self): method test_max_length_integration (line 146) | def test_max_length_integration(self): method test_eos_in_input (line 157) | def test_eos_in_input(self): method test_save_and_load_tokenizer (line 170) | def test_save_and_load_tokenizer(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 223) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_decode_single_bytes (line 287) | def test_decode_single_bytes(self): method test_get_vocab (line 304) | def test_get_vocab(self): method test_pretokenized_inputs (line 308) | def test_pretokenized_inputs(self): method test_conversion_reversible (line 312) | def test_conversion_reversible(self): method test_convert_tokens_to_string_format (line 315) | def test_convert_tokens_to_string_format(self): method test_tokenizers_common_ids_setters (line 328) | def test_tokenizers_common_ids_setters(self): FILE: mplsandbox_for_rl/transformers/tests/models/camembert/test_modeling_camembert.py class CamembertModelIntegrationTest (line 31) | class CamembertModelIntegrationTest(unittest.TestCase): method test_output_embeds_base_model (line 33) | def test_output_embeds_base_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/camembert/test_modeling_tf_camembert.py class TFCamembertModelIntegrationTest (line 34) | class TFCamembertModelIntegrationTest(unittest.TestCase): method test_output_embeds_base_model (line 36) | def test_output_embeds_base_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/camembert/test_tokenization_camembert.py class CamembertTokenizationTest (line 34) | class CamembertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 41) | def setUp(self): method test_special_tokens_map_equal (line 51) | def test_special_tokens_map_equal(self): method test_convert_token_and_id (line 54) | def test_convert_token_and_id(self): method test_get_vocab (line 62) | def test_get_vocab(self): method test_vocab_size (line 70) | def test_vocab_size(self): method test_rust_and_python_bpe_tokenizers (line 73) | def test_rust_and_python_bpe_tokenizers(self): method test_rust_and_python_full_tokenizers (line 95) | def test_rust_and_python_full_tokenizers(self): method test_tokenizer_integration (line 118) | def test_tokenizer_integration(self): method test_added_tokens_serialization (line 138) | def test_added_tokens_serialization(self): FILE: mplsandbox_for_rl/transformers/tests/models/canine/test_modeling_canine.py class CanineModelTester (line 40) | class CanineModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 116) | def get_config(self): method create_and_check_model (line 132) | def create_and_check_model( method create_and_check_for_question_answering (line 143) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 159) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 169) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 179) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 197) | def prepare_config_and_inputs_for_common(self): class CanineModelTest (line 213) | class CanineModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 241) | def setUp(self): method test_config (line 246) | def test_config(self): method test_model (line 249) | def test_model(self): method test_for_multiple_choice (line 253) | def test_for_multiple_choice(self): method test_for_question_answering (line 257) | def test_for_question_answering(self): method test_for_sequence_classification (line 261) | def test_for_sequence_classification(self): method test_for_token_classification (line 265) | def test_for_token_classification(self): method test_hidden_states_output (line 269) | def test_hidden_states_output(self): method test_attention_outputs (line 313) | def test_attention_outputs(self): method test_model_outputs_equivalence (line 373) | def test_model_outputs_equivalence(self): method test_headmasking (line 442) | def test_headmasking(self): method test_inputs_embeds (line 500) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 505) | def test_inputs_embeds_matches_input_ids(self): method test_model_get_set_embeddings (line 509) | def test_model_get_set_embeddings(self): method test_training_gradient_checkpointing (line 515) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 521) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 527) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_from_pretrained (line 531) | def test_model_from_pretrained(self): class CanineModelIntegrationTest (line 538) | class CanineModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 540) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/canine/test_tokenization_canine.py class CanineTokenizationTest (line 30) | class CanineTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method canine_tokenizer (line 41) | def canine_tokenizer(self): method get_tokenizer (line 44) | def get_tokenizer(self, **kwargs) -> CanineTokenizer: method test_prepare_batch_integration (line 50) | def test_prepare_batch_integration(self): method test_encoding_keys (line 65) | def test_encoding_keys(self): method test_max_length_integration (line 75) | def test_max_length_integration(self): method test_save_and_load_tokenizer (line 87) | def test_save_and_load_tokenizer(self): method test_add_special_tokens (line 141) | def test_add_special_tokens(self): method test_tokenize_special_tokens (line 165) | def test_tokenize_special_tokens(self): method test_added_token_serializable (line 183) | def test_added_token_serializable(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 198) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_encode_decode_with_spaces (line 256) | def test_encode_decode_with_spaces(self): method test_tokenizers_common_ids_setters (line 270) | def test_tokenizers_common_ids_setters(self): method test_add_tokens_tokenizer (line 307) | def test_add_tokens_tokenizer(self): method test_added_tokens_do_lower_case (line 313) | def test_added_tokens_do_lower_case(self): method test_np_encode_plus_sent_to_model (line 317) | def test_np_encode_plus_sent_to_model(self): method test_torch_encode_plus_sent_to_model (line 321) | def test_torch_encode_plus_sent_to_model(self): method test_get_vocab (line 325) | def test_get_vocab(self): method test_pretokenized_inputs (line 329) | def test_pretokenized_inputs(self): method test_conversion_reversible (line 333) | def test_conversion_reversible(self): FILE: mplsandbox_for_rl/transformers/tests/models/chameleon/test_image_processing_chameleon.py class ChameleonImageProcessingTester (line 35) | class ChameleonImageProcessingTester(unittest.TestCase): method __init__ (line 36) | def __init__( method prepare_image_processor_dict (line 71) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 84) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 88) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class ChameleonImageProcessingTest (line 102) | class ChameleonImageProcessingTest(ImageProcessingTestMixin, unittest.Te... method setUp (line 106) | def setUp(self): method image_processor_dict (line 112) | def image_processor_dict(self): method test_image_processor_properties (line 115) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 126) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pil (line 135) | def test_call_pil(self): method test_call_numpy (line 153) | def test_call_numpy(self): method test_call_pytorch (line 171) | def test_call_pytorch(self): method test_nested_input (line 190) | def test_nested_input(self): FILE: mplsandbox_for_rl/transformers/tests/models/chameleon/test_modeling_chameleon.py class ChameleonModelTester (line 53) | class ChameleonModelTester: method __init__ (line 54) | def __init__( method prepare_config_and_inputs (line 114) | def prepare_config_and_inputs(self): method get_config (line 133) | def get_config(self): method get_vq_config (line 165) | def get_vq_config(self): method create_and_check_model (line 175) | def create_and_check_model(self, config, input_ids, input_mask, sequen... method create_and_check_for_causal_lm (line 183) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 200) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 260) | def prepare_config_and_inputs_for_common(self): class ChameleonModelTest (line 275) | class ChameleonModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeli... method setUp (line 290) | def setUp(self): method test_config (line 294) | def test_config(self): method test_model (line 297) | def test_model(self): method test_model_rope_scaling (line 302) | def test_model_rope_scaling(self, scaling_type): method test_flash_attn_2_generate_padding_right (line 338) | def test_flash_attn_2_generate_padding_right(self): method test_batching_equivalence (line 370) | def test_batching_equivalence(self): method test_generate_compile_fullgraph (line 375) | def test_generate_compile_fullgraph(self): class ChameleonIntegrationTest (line 380) | class ChameleonIntegrationTest(unittest.TestCase): method test_model_7b (line 384) | def test_model_7b(self): method test_model_7b_batched (line 406) | def test_model_7b_batched(self): method test_model_7b_multi_image (line 439) | def test_model_7b_multi_image(self): FILE: mplsandbox_for_rl/transformers/tests/models/chinese_clip/test_image_processing_chinese_clip.py class ChineseCLIPImageProcessingTester (line 29) | class ChineseCLIPImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 65) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 77) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 80) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class ChineseCLIPImageProcessingTest (line 94) | class ChineseCLIPImageProcessingTest(ImageProcessingTestMixin, unittest.... method setUp (line 97) | def setUp(self): method image_processor_dict (line 102) | def image_processor_dict(self): method test_image_processor_properties (line 105) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 116) | def test_image_processor_from_dict_with_kwargs(self): method test_call_numpy_4_channels (line 128) | def test_call_numpy_4_channels(self): class ChineseCLIPImageProcessingTestFourChannels (line 134) | class ChineseCLIPImageProcessingTestFourChannels(ImageProcessingTestMixi... method setUp (line 137) | def setUp(self): method image_processor_dict (line 143) | def image_processor_dict(self): method test_image_processor_properties (line 146) | def test_image_processor_properties(self): method test_call_numpy (line 158) | def test_call_numpy(self): method test_call_pytorch (line 162) | def test_call_pytorch(self): method test_call_numpy_4_channels (line 168) | def test_call_numpy_4_channels(self): FILE: mplsandbox_for_rl/transformers/tests/models/chinese_clip/test_modeling_chinese_clip.py class ChineseCLIPTextModelTester (line 59) | class ChineseCLIPTextModelTester: method __init__ (line 60) | def __init__( method prepare_config_and_inputs (line 108) | def prepare_config_and_inputs(self): method get_config (line 131) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 150) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 177) | def create_and_check_model( method create_and_check_model_as_decoder (line 189) | def create_and_check_model_as_decoder( method prepare_config_and_inputs_for_common (line 222) | def prepare_config_and_inputs_for_common(self): class ChineseCLIPVisionModelTester (line 237) | class ChineseCLIPVisionModelTester: method __init__ (line 238) | def __init__( method prepare_config_and_inputs (line 276) | def prepare_config_and_inputs(self): method get_config (line 282) | def get_config(self): method create_and_check_model (line 297) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 310) | def prepare_config_and_inputs_for_common(self): class ChineseCLIPTextModelTest (line 318) | class ChineseCLIPTextModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 323) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 336) | def setUp(self): method test_config (line 340) | def test_config(self): method test_model (line 343) | def test_model(self): method test_model_various_embeddings (line 347) | def test_model_various_embeddings(self): method test_model_as_decoder (line 353) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 357) | def test_model_as_decoder_with_default_input_mask(self): method test_model_from_pretrained (line 386) | def test_model_from_pretrained(self): method test_training (line 392) | def test_training(self): method test_training_gradient_checkpointing (line 396) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 402) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 408) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 412) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 416) | def test_save_load_fast_init_to_base(self): class ChineseCLIPVisionModelTest (line 421) | class ChineseCLIPVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 433) | def setUp(self): method test_config (line 439) | def test_config(self): method test_inputs_embeds (line 443) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 446) | def test_model_get_set_embeddings(self): method test_forward_signature (line 455) | def test_forward_signature(self): method test_model (line 467) | def test_model(self): method test_training (line 472) | def test_training(self): method test_training_gradient_checkpointing (line 476) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 482) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 488) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 492) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 496) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 500) | def test_model_from_pretrained(self): class ChineseCLIPModelTester (line 506) | class ChineseCLIPModelTester: method __init__ (line 507) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 519) | def prepare_config_and_inputs(self): method get_config (line 535) | def get_config(self): method create_and_check_model (line 540) | def create_and_check_model(self, config, input_ids, token_type_ids, at... method prepare_config_and_inputs_for_common (line 551) | def prepare_config_and_inputs_for_common(self): class ChineseCLIPModelTest (line 565) | class ChineseCLIPModelTest(ModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 574) | def setUp(self): method test_model (line 579) | def test_model(self): method test_hidden_states_output (line 584) | def test_hidden_states_output(self): method test_inputs_embeds (line 588) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 592) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 596) | def test_model_get_set_embeddings(self): method test_initialization (line 600) | def test_initialization(self): method _create_and_check_torchscript (line 626) | def _create_and_check_torchscript(self, config, inputs_dict): method test_model_from_pretrained (line 698) | def test_model_from_pretrained(self): function prepare_img (line 705) | def prepare_img(): class ChineseCLIPModelIntegrationTest (line 713) | class ChineseCLIPModelIntegrationTest(unittest.TestCase): method test_inference (line 715) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/chinese_clip/test_processor_chinese_clip.py class ChineseCLIPProcessorTest (line 37) | class ChineseCLIPProcessorTest(unittest.TestCase): method setUp (line 38) | def setUp(self): method get_tokenizer (line 79) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 82) | def get_rust_tokenizer(self, **kwargs): method get_image_processor (line 85) | def get_image_processor(self, **kwargs): method tearDown (line 88) | def tearDown(self): method prepare_image_inputs (line 91) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 102) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 126) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 143) | def test_image_processor(self): method test_tokenizer (line 157) | def test_tokenizer(self): method test_processor (line 172) | def test_processor(self): method test_tokenizer_decode (line 189) | def test_tokenizer_decode(self): method test_model_input_names (line 202) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/clap/test_feature_extraction_clap.py function floats_list (line 39) | def floats_list(shape, scale=1.0, rng=None, name=None): class ClapFeatureExtractionTester (line 56) | class ClapFeatureExtractionTester(unittest.TestCase): method __init__ (line 57) | def __init__( method prepare_feat_extract_dict (line 84) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 95) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class ClapFeatureExtractionTest (line 114) | class ClapFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unit... method setUp (line 118) | def setUp(self): method test_call (line 121) | def test_call(self): method test_double_precision_pad (line 152) | def test_double_precision_pad(self): method _load_datasamples (line 166) | def _load_datasamples(self, num_samples): method test_integration_fusion_short_input (line 173) | def test_integration_fusion_short_input(self): method test_integration_rand_trunc_short_input (line 295) | def test_integration_rand_trunc_short_input(self): method test_integration_fusion_long_input (line 414) | def test_integration_fusion_long_input(self): method test_integration_rand_trunc_long_input (line 480) | def test_integration_rand_trunc_long_input(self): FILE: mplsandbox_for_rl/transformers/tests/models/clap/test_modeling_clap.py class ClapAudioModelTester (line 53) | class ClapAudioModelTester: method __init__ (line 54) | def __init__( method prepare_config_and_inputs (line 105) | def prepare_config_and_inputs(self): method get_config (line 111) | def get_config(self): method create_and_check_model (line 133) | def create_and_check_model(self, config, input_features): method create_and_check_model_with_projection (line 141) | def create_and_check_model_with_projection(self, config, input_features): method prepare_config_and_inputs_for_common (line 149) | def prepare_config_and_inputs_for_common(self): class ClapAudioModelTest (line 157) | class ClapAudioModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 169) | def setUp(self): method test_config (line 173) | def test_config(self): method test_inputs_embeds (line 177) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 180) | def test_model_get_set_embeddings(self): method test_hidden_states_output (line 189) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 223) | def test_retain_grad_hidden_states_attentions(self): method test_forward_signature (line 226) | def test_forward_signature(self): method test_model (line 238) | def test_model(self): method test_model_with_projection (line 242) | def test_model_with_projection(self): method test_training (line 247) | def test_training(self): method test_training_gradient_checkpointing (line 251) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 257) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 263) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 267) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 271) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 275) | def test_model_from_pretrained(self): method test_model_with_projection_from_pretrained (line 281) | def test_model_with_projection_from_pretrained(self): class ClapTextModelTester (line 288) | class ClapTextModelTester: method __init__ (line 289) | def __init__( method prepare_config_and_inputs (line 329) | def prepare_config_and_inputs(self): method get_config (line 347) | def get_config(self): method create_and_check_model (line 362) | def create_and_check_model(self, config, input_ids, input_mask): method create_and_check_model_with_projection (line 372) | def create_and_check_model_with_projection(self, config, input_ids, in... method prepare_config_and_inputs_for_common (line 382) | def prepare_config_and_inputs_for_common(self): class ClapTextModelTest (line 390) | class ClapTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 396) | def setUp(self): method test_config (line 400) | def test_config(self): method test_model (line 403) | def test_model(self): method test_model_with_projection (line 407) | def test_model_with_projection(self): method test_training (line 412) | def test_training(self): method test_training_gradient_checkpointing (line 416) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 422) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 428) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 432) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 436) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 440) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 444) | def test_model_from_pretrained(self): method test_model_with_projection_from_pretrained (line 450) | def test_model_with_projection_from_pretrained(self): class ClapModelTester (line 457) | class ClapModelTester: method __init__ (line 458) | def __init__(self, parent, text_kwargs=None, audio_kwargs=None, is_tra... method prepare_config_and_inputs (line 470) | def prepare_config_and_inputs(self): method get_config (line 478) | def get_config(self): method create_and_check_model (line 483) | def create_and_check_model(self, config, input_ids, attention_mask, in... method prepare_config_and_inputs_for_common (line 494) | def prepare_config_and_inputs_for_common(self): class ClapModelTest (line 507) | class ClapModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 516) | def setUp(self): method test_model (line 519) | def test_model(self): method test_hidden_states_output (line 524) | def test_hidden_states_output(self): method test_inputs_embeds (line 528) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 532) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 536) | def test_model_get_set_embeddings(self): method test_initialization (line 540) | def test_initialization(self): method _create_and_check_torchscript (line 563) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_audio_text_config (line 634) | def test_load_audio_text_config(self): method test_model_from_pretrained (line 650) | def test_model_from_pretrained(self): class ClapModelIntegrationTest (line 658) | class ClapModelIntegrationTest(unittest.TestCase): method test_integration_unfused (line 661) | def test_integration_unfused(self): method test_integration_fused (line 688) | def test_integration_fused(self): method test_batched_fused (line 715) | def test_batched_fused(self): method test_batched_unfused (line 742) | def test_batched_unfused(self): FILE: mplsandbox_for_rl/transformers/tests/models/clap/test_processor_clap.py class ClapProcessorTest (line 27) | class ClapProcessorTest(unittest.TestCase): method setUp (line 28) | def setUp(self): method get_tokenizer (line 32) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 35) | def get_feature_extractor(self, **kwargs): method tearDown (line 38) | def tearDown(self): method test_save_load_pretrained_default (line 41) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 56) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 73) | def test_feature_extractor(self): method test_tokenizer (line 87) | def test_tokenizer(self): method test_tokenizer_decode (line 102) | def test_tokenizer_decode(self): method test_model_input_names (line 115) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/clip/test_image_processing_clip.py class CLIPImageProcessingTester (line 29) | class CLIPImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 64) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 76) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 79) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class CLIPImageProcessingTest (line 93) | class CLIPImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 96) | def setUp(self): method image_processor_dict (line 101) | def image_processor_dict(self): method test_image_processor_properties (line 104) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 115) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/clip/test_modeling_clip.py class CLIPVisionModelTester (line 94) | class CLIPVisionModelTester: method __init__ (line 95) | def __init__( method prepare_config_and_inputs (line 133) | def prepare_config_and_inputs(self): method get_config (line 139) | def get_config(self): method create_and_check_model (line 154) | def create_and_check_model(self, config, pixel_values): method create_and_check_model_with_projection (line 167) | def create_and_check_model_with_projection(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 180) | def prepare_config_and_inputs_for_common(self): class CLIPModelTesterMixin (line 187) | class CLIPModelTesterMixin(ModelTesterMixin): method test_eager_matches_sdpa_inference (line 194) | def test_eager_matches_sdpa_inference( class CLIPVisionModelTest (line 360) | class CLIPVisionModelTest(CLIPModelTesterMixin, unittest.TestCase): method setUp (line 372) | def setUp(self): method test_config (line 376) | def test_config(self): method test_inputs_embeds (line 380) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 383) | def test_model_get_set_embeddings(self): method test_forward_signature (line 392) | def test_forward_signature(self): method test_model (line 404) | def test_model(self): method test_model_with_projection (line 408) | def test_model_with_projection(self): method test_training (line 413) | def test_training(self): method test_training_gradient_checkpointing (line 417) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 423) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 429) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 433) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 437) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 441) | def test_model_from_pretrained(self): method test_model_with_projection_from_pretrained (line 447) | def test_model_with_projection_from_pretrained(self): method test_eager_matches_sdpa_inference (line 457) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): class CLIPTextModelTester (line 465) | class CLIPTextModelTester: method __init__ (line 466) | def __init__( method prepare_config_and_inputs (line 504) | def prepare_config_and_inputs(self): method get_config (line 522) | def get_config(self): method create_and_check_model (line 536) | def create_and_check_model(self, config, input_ids, input_mask): method create_and_check_model_with_projection (line 546) | def create_and_check_model_with_projection(self, config, input_ids, in... method prepare_config_and_inputs_for_common (line 556) | def prepare_config_and_inputs_for_common(self): class CLIPTextModelTest (line 564) | class CLIPTextModelTest(CLIPModelTesterMixin, unittest.TestCase): method setUp (line 571) | def setUp(self): method test_config (line 575) | def test_config(self): method test_model (line 578) | def test_model(self): method test_model_with_projection (line 582) | def test_model_with_projection(self): method test_training (line 587) | def test_training(self): method test_training_gradient_checkpointing (line 591) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 597) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 603) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 607) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 611) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 615) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 619) | def test_model_from_pretrained(self): method test_model_with_projection_from_pretrained (line 625) | def test_model_with_projection_from_pretrained(self): method test_eager_matches_sdpa_inference (line 635) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): method test_sdpa_can_dispatch_on_flash (line 643) | def test_sdpa_can_dispatch_on_flash(self): class CLIPModelTester (line 647) | class CLIPModelTester: method __init__ (line 648) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 660) | def prepare_config_and_inputs(self): method get_config (line 668) | def get_config(self): method create_and_check_model (line 673) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 684) | def prepare_config_and_inputs_for_common(self): class CLIPModelTest (line 697) | class CLIPModelTest(CLIPModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 708) | def setUp(self): method test_model (line 711) | def test_model(self): method test_hidden_states_output (line 716) | def test_hidden_states_output(self): method test_inputs_embeds (line 720) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 724) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 728) | def test_model_get_set_embeddings(self): method test_initialization (line 732) | def test_initialization(self): method _create_and_check_torchscript (line 755) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 826) | def test_load_vision_text_config(self): method test_equivalence_pt_to_flax (line 844) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 900) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 959) | def test_model_from_pretrained(self): method test_eager_matches_sdpa_inference (line 968) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): method test_sdpa_can_dispatch_on_flash (line 976) | def test_sdpa_can_dispatch_on_flash(self): method test_sdpa_can_compile_dynamic (line 980) | def test_sdpa_can_compile_dynamic(self): method test_flash_attn_2_inference_equivalence (line 987) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 1025) | def test_flash_attn_2_inference_equivalence_right_padding(self): class CLIPForImageClassificationModelTester (line 1074) | class CLIPForImageClassificationModelTester(CLIPModelTester): method __init__ (line 1075) | def __init__(self, parent): method prepare_config_and_inputs (line 1082) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 1088) | def prepare_config_and_inputs_for_common(self): class CLIPForImageClassificationModelTest (line 1096) | class CLIPForImageClassificationModelTest(CLIPModelTesterMixin, Pipeline... method setUp (line 1105) | def setUp(self): method test_inputs_embeds (line 1109) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 1113) | def test_model_get_set_embeddings(self): method test_training_gradient_checkpointing (line 1117) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 1121) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 1125) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_initialization (line 1129) | def test_initialization(self): method test_eager_matches_sdpa_inference (line 1136) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): function prepare_img (line 1145) | def prepare_img(): class CLIPModelIntegrationTest (line 1153) | class CLIPModelIntegrationTest(unittest.TestCase): method test_inference (line 1155) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/clip/test_modeling_flax_clip.py class FlaxCLIPVisionModelTester (line 33) | class FlaxCLIPVisionModelTester: method __init__ (line 34) | def __init__( method prepare_config_and_inputs (line 66) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 83) | def prepare_config_and_inputs_for_common(self): class FlaxCLIPVisionModelTest (line 91) | class FlaxCLIPVisionModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 99) | def setUp(self): method test_forward_signature (line 102) | def test_forward_signature(self): method test_jit_compilation (line 114) | def test_jit_compilation(self): method test_hidden_states_output (line 137) | def test_hidden_states_output(self): method test_attention_outputs (line 169) | def test_attention_outputs(self): method test_save_load_from_base (line 219) | def test_save_load_from_base(self): method test_save_load_to_base (line 223) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 228) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 233) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 238) | def test_save_load_bf16_to_base_pt(self): method test_model_from_pretrained (line 242) | def test_model_from_pretrained(self): class FlaxCLIPTextModelTester (line 249) | class FlaxCLIPTextModelTester: method __init__ (line 250) | def __init__( method prepare_config_and_inputs (line 286) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 314) | def prepare_config_and_inputs_for_common(self): class FlaxCLIPTextModelTest (line 322) | class FlaxCLIPTextModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 325) | def setUp(self): method test_save_load_from_base (line 329) | def test_save_load_from_base(self): method test_save_load_to_base (line 333) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 338) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 343) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 348) | def test_save_load_bf16_to_base_pt(self): method test_model_from_pretrained (line 352) | def test_model_from_pretrained(self): class FlaxCLIPModelTester (line 359) | class FlaxCLIPModelTester: method __init__ (line 360) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 366) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 374) | def prepare_config_and_inputs_for_common(self): class FlaxCLIPModelTest (line 386) | class FlaxCLIPModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 390) | def setUp(self): method test_hidden_states_output (line 394) | def test_hidden_states_output(self): method test_jit_compilation (line 397) | def test_jit_compilation(self): method test_forward_signature (line 420) | def test_forward_signature(self): method test_get_image_features (line 432) | def test_get_image_features(self): method test_get_text_features (line 450) | def test_get_text_features(self): method test_model_from_pretrained (line 469) | def test_model_from_pretrained(self): method test_equivalence_pt_to_flax (line 478) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 519) | def test_equivalence_flax_to_pt(self): method test_from_pretrained_save_pretrained (line 563) | def test_from_pretrained_save_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/clip/test_modeling_tf_clip.py class TFCLIPVisionModelTester (line 49) | class TFCLIPVisionModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 82) | def prepare_config_and_inputs(self): method get_config (line 88) | def get_config(self): method create_and_check_model (line 102) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 112) | def prepare_config_and_inputs_for_common(self): class TFCLIPVisionModelTest (line 120) | class TFCLIPVisionModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 133) | def setUp(self): method test_config (line 137) | def test_config(self): method test_inputs_embeds (line 140) | def test_inputs_embeds(self): method test_graph_mode_with_inputs_embeds (line 144) | def test_graph_mode_with_inputs_embeds(self): method test_model_common_attributes (line 148) | def test_model_common_attributes(self): method test_forward_signature (line 157) | def test_forward_signature(self): method test_model (line 169) | def test_model(self): method test_attention_outputs (line 173) | def test_attention_outputs(self): method test_hidden_states_output (line 220) | def test_hidden_states_output(self): method test_model_from_pretrained (line 257) | def test_model_from_pretrained(self): method test_saved_model_creation_extended (line 263) | def test_saved_model_creation_extended(self): class TFCLIPTextModelTester (line 319) | class TFCLIPTextModelTester: method __init__ (line 320) | def __init__( method prepare_config_and_inputs (line 356) | def prepare_config_and_inputs(self): method get_config (line 373) | def get_config(self): method create_and_check_model (line 386) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 393) | def prepare_config_and_inputs_for_common(self): class TFCLIPTextModelTest (line 401) | class TFCLIPTextModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 407) | def setUp(self): method test_config (line 411) | def test_config(self): method test_model (line 414) | def test_model(self): method test_inputs_embeds (line 418) | def test_inputs_embeds(self): method test_model_from_pretrained (line 423) | def test_model_from_pretrained(self): method test_saved_model_creation_extended (line 429) | def test_saved_model_creation_extended(self): class TFCLIPModelTester (line 477) | class TFCLIPModelTester: method __init__ (line 478) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 484) | def prepare_config_and_inputs(self): method get_config (line 492) | def get_config(self): method create_and_check_model (line 497) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 507) | def prepare_config_and_inputs_for_common(self): class TFCLIPModelTest (line 520) | class TFCLIPModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 529) | def setUp(self): method test_model (line 532) | def test_model(self): method test_hidden_states_output (line 537) | def test_hidden_states_output(self): method test_inputs_embeds (line 541) | def test_inputs_embeds(self): method test_model_common_attributes (line 545) | def test_model_common_attributes(self): method test_keras_save_load (line 550) | def test_keras_save_load(self): method test_model_from_pretrained (line 607) | def test_model_from_pretrained(self): method test_saved_model_creation (line 614) | def test_saved_model_creation(self): method test_saved_model_creation_extended (line 619) | def test_saved_model_creation_extended(self): method test_prepare_serving_output (line 624) | def test_prepare_serving_output(self): function prepare_img (line 629) | def prepare_img(): class TFCLIPModelIntegrationTest (line 637) | class TFCLIPModelIntegrationTest(unittest.TestCase): method test_inference (line 639) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/clip/test_processor_clip.py class CLIPProcessorTest (line 39) | class CLIPProcessorTest(ProcessorTesterMixin, unittest.TestCase): method setUp (line 42) | def setUp(self): method get_tokenizer (line 70) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 73) | def get_rust_tokenizer(self, **kwargs): method get_image_processor (line 76) | def get_image_processor(self, **kwargs): method tearDown (line 79) | def tearDown(self): method prepare_image_inputs (line 82) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 93) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 117) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 134) | def test_image_processor(self): method test_tokenizer (line 148) | def test_tokenizer(self): method test_processor (line 163) | def test_processor(self): method test_tokenizer_decode (line 180) | def test_tokenizer_decode(self): method test_model_input_names (line 193) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/clip/test_tokenization_clip.py class CLIPTokenizationTest (line 29) | class CLIPTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 37) | def setUp(self): method get_tokenizer (line 52) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 56) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 60) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 65) | def test_full_tokenizer(self): method test_check_encoding_slow_fast (line 77) | def test_check_encoding_slow_fast(self): method test_offsets_mapping_with_different_add_prefix_space_argument (line 134) | def test_offsets_mapping_with_different_add_prefix_space_argument(self): method test_log_warning (line 165) | def test_log_warning(self): method test_tokenization_python_rust_equals (line 178) | def test_tokenization_python_rust_equals(self): method test_added_tokens_do_lower_case (line 182) | def test_added_tokens_do_lower_case(self): FILE: mplsandbox_for_rl/transformers/tests/models/clipseg/test_modeling_clipseg.py class CLIPSegVisionModelTester (line 69) | class CLIPSegVisionModelTester: method __init__ (line 70) | def __init__( method prepare_config_and_inputs (line 106) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method create_and_check_model (line 126) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 139) | def prepare_config_and_inputs_for_common(self): class CLIPSegVisionModelTest (line 147) | class CLIPSegVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 159) | def setUp(self): method test_config (line 165) | def test_config(self): method test_inputs_embeds (line 169) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 172) | def test_model_get_set_embeddings(self): method test_forward_signature (line 181) | def test_forward_signature(self): method test_model (line 193) | def test_model(self): method test_training (line 198) | def test_training(self): method test_training_gradient_checkpointing (line 202) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 208) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 214) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 218) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 222) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 226) | def test_model_from_pretrained(self): class CLIPSegTextModelTester (line 232) | class CLIPSegTextModelTester: method __init__ (line 233) | def __init__( method prepare_config_and_inputs (line 269) | def prepare_config_and_inputs(self): method get_config (line 287) | def get_config(self): method create_and_check_model (line 300) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 310) | def prepare_config_and_inputs_for_common(self): class CLIPSegTextModelTest (line 318) | class CLIPSegTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 325) | def setUp(self): method test_config (line 329) | def test_config(self): method test_model (line 332) | def test_model(self): method test_training (line 337) | def test_training(self): method test_training_gradient_checkpointing (line 341) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 347) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 353) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 357) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 361) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 365) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 369) | def test_model_from_pretrained(self): class CLIPSegModelTester (line 375) | class CLIPSegModelTester: method __init__ (line 376) | def __init__( method prepare_config_and_inputs (line 397) | def prepare_config_and_inputs(self): method get_config (line 405) | def get_config(self): method create_and_check_model (line 414) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method create_and_check_model_for_image_segmentation (line 425) | def create_and_check_model_for_image_segmentation(self, config, input_... method prepare_config_and_inputs_for_common (line 441) | def prepare_config_and_inputs_for_common(self): class CLIPSegModelTest (line 453) | class CLIPSegModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method _prepare_for_class (line 462) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 473) | def setUp(self): method test_model (line 476) | def test_model(self): method test_model_for_image_segmentation (line 480) | def test_model_for_image_segmentation(self): method test_hidden_states_output (line 485) | def test_hidden_states_output(self): method test_inputs_embeds (line 489) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 493) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 497) | def test_model_get_set_embeddings(self): method test_training_gradient_checkpointing (line 503) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 509) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 515) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_initialization (line 519) | def test_initialization(self): method _create_and_check_torchscript (line 545) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 616) | def test_load_vision_text_config(self): method test_equivalence_pt_to_flax (line 634) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 690) | def test_equivalence_flax_to_pt(self): method test_training (line 748) | def test_training(self): method test_model_from_pretrained (line 771) | def test_model_from_pretrained(self): function prepare_img (line 778) | def prepare_img(): class CLIPSegModelIntegrationTest (line 786) | class CLIPSegModelIntegrationTest(unittest.TestCase): method test_inference_image_segmentation (line 788) | def test_inference_image_segmentation(self): FILE: mplsandbox_for_rl/transformers/tests/models/clipseg/test_processor_clipseg.py class CLIPSegProcessorTest (line 37) | class CLIPSegProcessorTest(unittest.TestCase): method setUp (line 38) | def setUp(self): method get_tokenizer (line 66) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 69) | def get_rust_tokenizer(self, **kwargs): method get_image_processor (line 72) | def get_image_processor(self, **kwargs): method tearDown (line 75) | def tearDown(self): method prepare_image_inputs (line 78) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 88) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 112) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 129) | def test_image_processor(self): method test_tokenizer (line 143) | def test_tokenizer(self): method test_processor_text (line 158) | def test_processor_text(self): method test_processor_visual_prompt (line 175) | def test_processor_visual_prompt(self): method test_tokenizer_decode (line 192) | def test_tokenizer_decode(self): FILE: mplsandbox_for_rl/transformers/tests/models/clvp/test_feature_extraction_clvp.py function floats_list (line 40) | def floats_list(shape, scale=1.0, rng=None, name=None): class ClvpFeatureExtractionTester (line 55) | class ClvpFeatureExtractionTester(unittest.TestCase): method __init__ (line 56) | def __init__( method prepare_feat_extract_dict (line 81) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 92) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class ClvpFeatureExtractionTest (line 110) | class ClvpFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unit... method setUp (line 113) | def setUp(self): method tearDown (line 116) | def tearDown(self): method test_feat_extract_from_and_save_pretrained (line 123) | def test_feat_extract_from_and_save_pretrained(self): method test_feat_extract_to_json_file (line 139) | def test_feat_extract_to_json_file(self): method test_call (line 154) | def test_call(self): method test_double_precision_pad (line 198) | def test_double_precision_pad(self): method _load_datasamples (line 211) | def _load_datasamples(self, num_samples): method test_integration (line 220) | def test_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/clvp/test_modeling_clvp.py class ClvpEncoderTester (line 51) | class ClvpEncoderTester: method __init__ (line 52) | def __init__( method get_config (line 90) | def get_config(self): method prepare_config_and_inputs (line 107) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 125) | def prepare_config_and_inputs_for_common(self): method create_and_check_model (line 131) | def create_and_check_model(self, speech_config, input_ids, input_mask): class ClvpEncoderTest (line 164) | class ClvpEncoderTest(ModelTesterMixin, unittest.TestCase): method setUp (line 170) | def setUp(self): method tearDown (line 174) | def tearDown(self): method test_config (line 180) | def test_config(self): method test_model (line 183) | def test_model(self): method test_training (line 188) | def test_training(self): method test_training_gradient_checkpointing (line 192) | def test_training_gradient_checkpointing(self): class ClvpDecoderTester (line 196) | class ClvpDecoderTester: method __init__ (line 197) | def __init__( method get_config (line 231) | def get_config(self): method prepare_config_and_inputs (line 247) | def prepare_config_and_inputs(self): method create_and_check_model (line 265) | def create_and_check_model(self, config, input_ids, attention_mask): method prepare_config_and_inputs_for_common (line 272) | def prepare_config_and_inputs_for_common(self): class ClvpDecoderTest (line 283) | class ClvpDecoderTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method setUp (line 290) | def setUp(self): method tearDown (line 294) | def tearDown(self): method test_model (line 300) | def test_model(self): method _prepare_for_class (line 304) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_training (line 312) | def test_training(self): method test_training_gradient_checkpointing (line 324) | def test_training_gradient_checkpointing(self): class ClvpModelForConditionalGenerationTester (line 340) | class ClvpModelForConditionalGenerationTester: method __init__ (line 341) | def __init__(self, parent, is_training=False): method get_config (line 347) | def get_config(self): method prepare_config_and_inputs (line 371) | def prepare_config_and_inputs(self): method create_and_check_model (line 387) | def create_and_check_model(self, config, input_ids, attention_mask, in... method prepare_config_and_inputs_for_common (line 395) | def prepare_config_and_inputs_for_common(self): class ClvpModelForConditionalGenerationTest (line 408) | class ClvpModelForConditionalGenerationTest(ModelTesterMixin, unittest.T... method setUp (line 417) | def setUp(self): method tearDown (line 421) | def tearDown(self): method test_model (line 427) | def test_model(self): method test_hidden_states_output (line 431) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 484) | def test_retain_grad_hidden_states_attentions(self): method test_inputs_embeds (line 488) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 492) | def test_model_get_set_embeddings(self): method test_initialization (line 496) | def test_initialization(self): method test_load_speech_text_decoder_config (line 525) | def test_load_speech_text_decoder_config(self): method test_model_from_pretrained (line 541) | def test_model_from_pretrained(self): class ClvpIntegrationTest (line 553) | class ClvpIntegrationTest(unittest.TestCase): method setUp (line 554) | def setUp(self): method tearDown (line 571) | def tearDown(self): method test_conditional_encoder (line 577) | def test_conditional_encoder(self): method test_decoder_model_generate (line 594) | def test_decoder_model_generate(self): method test_text_and_speech_encoder_models (line 601) | def test_text_and_speech_encoder_models(self): method test_full_model_integration (line 620) | def test_full_model_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/clvp/test_processor_clvp.py class ClvpProcessorTest (line 28) | class ClvpProcessorTest(unittest.TestCase): method setUp (line 29) | def setUp(self): method tearDown (line 33) | def tearDown(self): method get_tokenizer (line 39) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 43) | def get_feature_extractor(self, **kwargs): method test_save_load_pretrained_default (line 47) | def test_save_load_pretrained_default(self): method test_feature_extractor (line 63) | def test_feature_extractor(self): method test_tokenizer (line 78) | def test_tokenizer(self): method test_tokenizer_decode (line 94) | def test_tokenizer_decode(self): method test_save_load_pretrained_additional_features (line 107) | def test_save_load_pretrained_additional_features(self): method test_model_input_names (line 126) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/clvp/test_tokenization_clvp.py class ClvpTokenizationTest (line 27) | class ClvpTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_tokenizer (line 75) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 80) | def get_input_output_texts(self, tokenizer): method test_add_special_tokens (line 86) | def test_add_special_tokens(self): method test_rust_and_python_full_tokenizers (line 103) | def test_rust_and_python_full_tokenizers(self): method test_padding (line 134) | def test_padding(self, max_length=15): method test_padding_if_pad_token_set_slow (line 179) | def test_padding_if_pad_token_set_slow(self): method test_special_tokens_mask_input_pairs_and_bos_token (line 231) | def test_special_tokens_mask_input_pairs_and_bos_token(self): method test_token_type_ids (line 256) | def test_token_type_ids(self): method test_full_tokenizer (line 267) | def test_full_tokenizer(self): method test_outputs_with_numbers (line 279) | def test_outputs_with_numbers(self): method test_tokenizer_integration (line 294) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/code_llama/test_tokenization_code_llama.py class CodeLlamaTokenizationTest (line 48) | class CodeLlamaTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 56) | def setUp(self): method get_tokenizers (line 64) | def get_tokenizers(self, **kwargs): method test_no_infilling_init (line 68) | def test_no_infilling_init(self): method test_full_tokenizer (line 73) | def test_full_tokenizer(self): method test_save_pretrained (line 145) | def test_save_pretrained(self): method test_batch_tokenization (line 216) | def test_batch_tokenization(self): method test_save_slow_from_fast_and_reload_fast (line 250) | def test_save_slow_from_fast_and_reload_fast(self): method test_special_tokens_initialization (line 253) | def test_special_tokens_initialization(self): method test_tokenizer_integration (line 287) | def test_tokenizer_integration(self): method test_picklable (line 297) | def test_picklable(self): method test_pickle_subword_regularization_tokenizer (line 305) | def test_pickle_subword_regularization_tokenizer(self): method test_subword_regularization_tokenizer (line 309) | def test_subword_regularization_tokenizer(self): class LlamaIntegrationTest (line 316) | class LlamaIntegrationTest(unittest.TestCase): method setUpClass (line 318) | def setUpClass(cls): method integration_tests (line 325) | def integration_tests(self): method test_fast_special_tokens (line 342) | def test_fast_special_tokens(self): method test_conversion (line 376) | def test_conversion(self): method test_simple_encode_decode (line 396) | def test_simple_encode_decode(self): method test_no_differences_showcase (line 444) | def test_no_differences_showcase(self): method test_no_differences_decode (line 462) | def test_no_differences_decode(self): method test_no_differences_special_tokens (line 472) | def test_no_differences_special_tokens(self): method test_integration_test_xnli (line 485) | def test_integration_test_xnli(self): method test_special_token_special_word (line 518) | def test_special_token_special_word(self): method test_fill_token (line 558) | def test_fill_token(self): method test_spm_edge_cases (line 576) | def test_spm_edge_cases(self): method test_infilling_tokenization (line 588) | def test_infilling_tokenization(self): FILE: mplsandbox_for_rl/transformers/tests/models/codegen/test_modeling_codegen.py class CodeGenModelTester (line 36) | class CodeGenModelTester: method __init__ (line 37) | def __init__( method get_large_model_config (line 91) | def get_large_model_config(self): method prepare_config_and_inputs (line 94) | def prepare_config_and_inputs(self): method get_config (line 133) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 153) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_codegen_model (line 182) | def create_and_check_codegen_model(self, config, input_ids, input_mask... method create_and_check_codegen_model_past (line 194) | def create_and_check_codegen_model_past(self, config, input_ids, input... method create_and_check_codegen_model_attention_mask_past (line 230) | def create_and_check_codegen_model_attention_mask_past( method create_and_check_codegen_model_past_large_inputs (line 272) | def create_and_check_codegen_model_past_large_inputs( method create_and_check_lm_head_model (line 310) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_forward_and_backwards (line 319) | def create_and_check_forward_and_backwards( method prepare_config_and_inputs_for_common (line 332) | def prepare_config_and_inputs_for_common(self): class CodeGenModelTest (line 353) | class CodeGenModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline... method _prepare_for_class (line 366) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 370) | def setUp(self): method test_config (line 374) | def test_config(self): method test_codegen_model (line 377) | def test_codegen_model(self): method test_codegen_model_past (line 381) | def test_codegen_model_past(self): method test_codegen_model_att_mask_past (line 385) | def test_codegen_model_att_mask_past(self): method test_codegen_model_past_large_inputs (line 389) | def test_codegen_model_past_large_inputs(self): method test_codegen_lm_head_model (line 393) | def test_codegen_lm_head_model(self): method test_codegen_gradient_checkpointing (line 397) | def test_codegen_gradient_checkpointing(self): method test_batch_generation (line 402) | def test_batch_generation(self): method test_model_from_pretrained (line 458) | def test_model_from_pretrained(self): class CodeGenModelLanguageGenerationTest (line 465) | class CodeGenModelLanguageGenerationTest(unittest.TestCase): method cached_tokenizer (line 467) | def cached_tokenizer(self): method cached_model (line 471) | def cached_model(self): method test_lm_generate_codegen (line 475) | def test_lm_generate_codegen(self): method test_codegen_sample (line 495) | def test_codegen_sample(self): method test_codegen_sample_max_time (line 528) | def test_codegen_sample_max_time(self): FILE: mplsandbox_for_rl/transformers/tests/models/codegen/test_tokenization_codegen.py class CodeGenTokenizationTest (line 30) | class CodeGenTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 38) | def setUp(self): method get_tokenizer (line 76) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 80) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 84) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 89) | def test_full_tokenizer(self): method test_rust_and_python_full_tokenizers (line 100) | def test_rust_and_python_full_tokenizers(self): method test_pretokenized_inputs (line 131) | def test_pretokenized_inputs(self, *args, **kwargs): method test_padding (line 136) | def test_padding(self, max_length=15): method test_padding_if_pad_token_set_slow (line 180) | def test_padding_if_pad_token_set_slow(self): method test_add_bos_token_slow (line 231) | def test_add_bos_token_slow(self): method test_truncation (line 253) | def test_truncation(self): method test_padding_different_model_input_name (line 267) | def test_padding_different_model_input_name(self): method test_tokenizer_integration (line 271) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/cohere/test_modeling_cohere.py class CohereModelTester (line 42) | class CohereModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 117) | def get_config(self): method create_and_check_model (line 135) | def create_and_check_model( method create_and_check_model_as_decoder (line 145) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 175) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 193) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 255) | def prepare_config_and_inputs_for_common(self): class CohereModelTest (line 271) | class CohereModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method setUp (line 290) | def setUp(self): method test_config (line 294) | def test_config(self): method test_model (line 297) | def test_model(self): method test_model_various_embeddings (line 301) | def test_model_various_embeddings(self): method test_eager_matches_sdpa_generate (line 311) | def test_eager_matches_sdpa_generate(self): class CohereIntegrationTest (line 368) | class CohereIntegrationTest(unittest.TestCase): method test_batched_4bit (line 371) | def test_batched_4bit(self): method test_batched_small_model_logits (line 391) | def test_batched_small_model_logits(self): FILE: mplsandbox_for_rl/transformers/tests/models/cohere/test_tokenization_cohere.py class CohereTokenizationTest (line 25) | class CohereTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 40) | def setUp(self): method get_rust_tokenizer (line 45) | def get_rust_tokenizer(self, **kwargs): method test_torch_encode_plus_sent_to_model (line 51) | def test_torch_encode_plus_sent_to_model(self): method test_encode_decode_with_spaces (line 55) | def test_encode_decode_with_spaces(self): method test_encodings_from_sample_data (line 58) | def test_encodings_from_sample_data(self): method test_padding (line 80) | def test_padding(self, max_length=10): method test_pretrained_model_lists (line 135) | def test_pretrained_model_lists(self): method test_tokenization_for_chat (line 141) | def test_tokenization_for_chat(self): method test_tokenization_for_tool_use (line 167) | def test_tokenization_for_tool_use(self): method test_tokenization_for_grounded_generation (line 238) | def test_tokenization_for_grounded_generation(self): method test_add_prefix_space_fast (line 283) | def test_add_prefix_space_fast(self): FILE: mplsandbox_for_rl/transformers/tests/models/conditional_detr/test_image_processing_conditional_detr.py class ConditionalDetrImageProcessingTester (line 38) | class ConditionalDetrImageProcessingTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_image_processor_dict (line 71) | def prepare_image_processor_dict(self): method get_expected_values (line 83) | def get_expected_values(self, image_inputs, batched=False): method expected_output_image_shape (line 116) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 120) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class ConditionalDetrImageProcessingTest (line 134) | class ConditionalDetrImageProcessingTest(AnnotationFormatTestMixin, Imag... method setUp (line 137) | def setUp(self): method image_processor_dict (line 142) | def image_processor_dict(self): method test_image_processor_properties (line 145) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 153) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pytorch_with_coco_detection_annotations (line 165) | def test_call_pytorch_with_coco_detection_annotations(self): method test_call_pytorch_with_coco_panoptic_annotations (line 209) | def test_call_pytorch_with_coco_panoptic_annotations(self): method test_batched_coco_detection_annotations (line 259) | def test_batched_coco_detection_annotations(self): method test_batched_coco_panoptic_annotations (line 377) | def test_batched_coco_panoptic_annotations(self): method test_max_width_max_height_resizing_and_pad_strategy (line 500) | def test_max_width_max_height_resizing_and_pad_strategy(self): method test_longest_edge_shortest_edge_resizing_strategy (line 546) | def test_longest_edge_shortest_edge_resizing_strategy(self): FILE: mplsandbox_for_rl/transformers/tests/models/conditional_detr/test_modeling_conditional_detr.py class ConditionalDetrModelTester (line 47) | class ConditionalDetrModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 90) | def prepare_config_and_inputs(self): method get_config (line 111) | def get_config(self): method prepare_config_and_inputs_for_common (line 140) | def prepare_config_and_inputs_for_common(self): method create_and_check_conditional_detr_model (line 145) | def create_and_check_conditional_detr_model(self, config, pixel_values... method create_and_check_conditional_detr_object_detection_head_model (line 157) | def create_and_check_conditional_detr_object_detection_head_model(self... class ConditionalDetrModelTest (line 176) | class ConditionalDetrModelTest(ModelTesterMixin, GenerationTesterMixin, ... method _prepare_for_class (line 199) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 225) | def setUp(self): method test_config (line 229) | def test_config(self): method test_conditional_detr_model (line 232) | def test_conditional_detr_model(self): method test_conditional_detr_object_detection_head_model (line 236) | def test_conditional_detr_object_detection_head_model(self): method test_multi_gpu_data_parallel_forward (line 242) | def test_multi_gpu_data_parallel_forward(self): method test_inputs_embeds (line 246) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 250) | def test_inputs_embeds_matches_input_ids(self): method test_model_get_set_embeddings (line 254) | def test_model_get_set_embeddings(self): method test_generate_without_input_ids (line 258) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 262) | def test_resize_tokens_embeddings(self): method test_model_outputs_equivalence (line 267) | def test_model_outputs_equivalence(self): method test_attention_outputs (line 270) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 372) | def test_retain_grad_hidden_states_attentions(self): method test_forward_auxiliary_loss (line 408) | def test_forward_auxiliary_loss(self): method test_forward_signature (line 424) | def test_forward_signature(self): method test_different_timm_backbone (line 445) | def test_different_timm_backbone(self): method test_hf_backbone (line 480) | def test_hf_backbone(self): method test_initialization (line 515) | def test_initialization(self): function prepare_img (line 543) | def prepare_img(): class ConditionalDetrModelIntegrationTests (line 551) | class ConditionalDetrModelIntegrationTests(unittest.TestCase): method default_image_processor (line 553) | def default_image_processor(self): method test_inference_no_head (line 560) | def test_inference_no_head(self): method test_inference_object_detection_head (line 577) | def test_inference_object_detection_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/convbert/test_modeling_convbert.py class ConvBertModelTester (line 44) | class ConvBertModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 116) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 132) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 159) | def create_and_check_model( method create_and_check_for_masked_lm (line 170) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 179) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 195) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 205) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 215) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 233) | def prepare_config_and_inputs_for_common(self): class ConvBertModelTest (line 249) | class ConvBertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 277) | def setUp(self): method test_config (line 281) | def test_config(self): method test_model (line 284) | def test_model(self): method test_for_masked_lm (line 288) | def test_for_masked_lm(self): method test_for_multiple_choice (line 292) | def test_for_multiple_choice(self): method test_for_question_answering (line 296) | def test_for_question_answering(self): method test_for_sequence_classification (line 300) | def test_for_sequence_classification(self): method test_for_token_classification (line 304) | def test_for_token_classification(self): method test_model_from_pretrained (line 309) | def test_model_from_pretrained(self): method test_attention_outputs (line 314) | def test_attention_outputs(self): method test_torchscript_device_change (line 431) | def test_torchscript_device_change(self): method test_model_for_input_embeds (line 451) | def test_model_for_input_embeds(self): method test_reducing_attention_heads (line 462) | def test_reducing_attention_heads(self): class ConvBertModelIntegrationTest (line 469) | class ConvBertModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 471) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/convbert/test_modeling_tf_convbert.py class TFConvBertModelTester (line 43) | class TFConvBertModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method create_and_check_model (line 132) | def create_and_check_model( method create_and_check_for_masked_lm (line 145) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 157) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 171) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 187) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 200) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 214) | def prepare_config_and_inputs_for_common(self): class TFConvBertModelTest (line 230) | class TFConvBertModelTest(TFModelTesterMixin, PipelineTesterMixin, unitt... method setUp (line 259) | def setUp(self): method test_config (line 263) | def test_config(self): method test_model (line 266) | def test_model(self): method test_for_masked_lm (line 270) | def test_for_masked_lm(self): method test_for_multiple_choice (line 274) | def test_for_multiple_choice(self): method test_for_question_answering (line 278) | def test_for_question_answering(self): method test_for_sequence_classification (line 282) | def test_for_sequence_classification(self): method test_for_token_classification (line 286) | def test_for_token_classification(self): method test_saved_model_creation_extended (line 291) | def test_saved_model_creation_extended(self): method test_model_from_pretrained (line 339) | def test_model_from_pretrained(self): method test_attention_outputs (line 343) | def test_attention_outputs(self): class TFConvBertModelIntegrationTest (line 406) | class TFConvBertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 408) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/convnext/test_image_processing_convnext.py class ConvNextImageProcessingTester (line 29) | class ConvNextImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 60) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 70) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 73) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class ConvNextImageProcessingTest (line 87) | class ConvNextImageProcessingTest(ImageProcessingTestMixin, unittest.Tes... method setUp (line 90) | def setUp(self): method image_processor_dict (line 95) | def image_processor_dict(self): method test_image_processor_properties (line 98) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 107) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/convnext/test_modeling_convnext.py class ConvNextModelTester (line 41) | class ConvNextModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 78) | def prepare_config_and_inputs(self): method get_config (line 88) | def get_config(self): method create_and_check_model (line 102) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 113) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_backbone (line 120) | def create_and_check_backbone(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 149) | def prepare_config_and_inputs_for_common(self): class ConvNextModelTest (line 157) | class ConvNextModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 184) | def setUp(self): method test_config (line 194) | def test_config(self): method test_inputs_embeds (line 198) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 202) | def test_model_get_set_embeddings(self): method test_feed_forward_chunking (line 206) | def test_feed_forward_chunking(self): method test_model (line 209) | def test_model(self): method test_backbone (line 213) | def test_backbone(self): method test_hidden_states_output (line 217) | def test_hidden_states_output(self): method test_for_image_classification (line 249) | def test_for_image_classification(self): method test_model_from_pretrained (line 254) | def test_model_from_pretrained(self): function prepare_img (line 261) | def prepare_img(): class ConvNextModelIntegrationTest (line 268) | class ConvNextModelIntegrationTest(unittest.TestCase): method default_image_processor (line 270) | def default_image_processor(self): method test_inference_image_classification_head (line 274) | def test_inference_image_classification_head(self): class ConvNextBackboneTest (line 295) | class ConvNextBackboneTest(unittest.TestCase, BackboneTesterMixin): method setUp (line 301) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/convnext/test_modeling_tf_convnext.py class TFConvNextModelTester (line 44) | class TFConvNextModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 78) | def prepare_config_and_inputs(self): method get_config (line 89) | def get_config(self): method create_and_check_model (line 100) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 109) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 115) | def prepare_config_and_inputs_for_common(self): class TFConvNextModelTest (line 123) | class TFConvNextModelTest(TFModelTesterMixin, PipelineTesterMixin, unitt... method setUp (line 142) | def setUp(self): method test_inputs_embeds (line 152) | def test_inputs_embeds(self): method test_keras_fit (line 160) | def test_keras_fit(self): method test_model_common_attributes (line 164) | def test_model_common_attributes(self): method test_forward_signature (line 167) | def test_forward_signature(self): method test_model (line 179) | def test_model(self): method test_dataset_conversion (line 187) | def test_dataset_conversion(self): method test_hidden_states_output (line 190) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 219) | def test_model_outputs_equivalence(self): method test_for_image_classification (line 262) | def test_for_image_classification(self): method test_model_from_pretrained (line 267) | def test_model_from_pretrained(self): function prepare_img (line 273) | def prepare_img(): class TFConvNextModelIntegrationTest (line 280) | class TFConvNextModelIntegrationTest(unittest.TestCase): method default_image_processor (line 282) | def default_image_processor(self): method test_inference_image_classification_head (line 286) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/convnextv2/test_modeling_convnextv2.py class ConvNextV2ModelTester (line 42) | class ConvNextV2ModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 79) | def prepare_config_and_inputs(self): method get_config (line 90) | def get_config(self): method create_and_check_model (line 104) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 115) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_backbone (line 122) | def create_and_check_backbone(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 151) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_with_labels (line 157) | def prepare_config_and_inputs_with_labels(self): class ConvNextV2ModelTest (line 165) | class ConvNextV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 192) | def setUp(self): method test_config (line 202) | def test_config(self): method test_inputs_embeds (line 206) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 210) | def test_model_get_set_embeddings(self): method test_feed_forward_chunking (line 214) | def test_feed_forward_chunking(self): method test_training (line 217) | def test_training(self): method test_training_gradient_checkpointing (line 238) | def test_training_gradient_checkpointing(self): method test_model (line 262) | def test_model(self): method test_hidden_states_output (line 266) | def test_hidden_states_output(self): method test_for_image_classification (line 298) | def test_for_image_classification(self): method test_model_from_pretrained (line 303) | def test_model_from_pretrained(self): function prepare_img (line 310) | def prepare_img(): class ConvNextV2ModelIntegrationTest (line 317) | class ConvNextV2ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 319) | def default_image_processor(self): method test_inference_image_classification_head (line 323) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/convnextv2/test_modeling_tf_convnextv2.py class TFConvNextV2ModelTester (line 46) | class TFConvNextV2ModelTester: method __init__ (line 47) | def __init__( method prepare_config_and_inputs (line 80) | def prepare_config_and_inputs(self): method get_config (line 91) | def get_config(self): method create_and_check_model (line 102) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 111) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 117) | def prepare_config_and_inputs_for_common(self): class TFConvNextV2ModelTest (line 125) | class TFConvNextV2ModelTest(TFModelTesterMixin, PipelineTesterMixin, uni... method setUp (line 144) | def setUp(self): method test_inputs_embeds (line 154) | def test_inputs_embeds(self): method test_keras_fit (line 162) | def test_keras_fit(self): method test_model_common_attributes (line 166) | def test_model_common_attributes(self): method test_forward_signature (line 169) | def test_forward_signature(self): method test_model (line 181) | def test_model(self): method test_dataset_conversion (line 189) | def test_dataset_conversion(self): method test_hidden_states_output (line 192) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 221) | def test_model_outputs_equivalence(self): method test_for_image_classification (line 264) | def test_for_image_classification(self): method test_model_from_pretrained (line 269) | def test_model_from_pretrained(self): function prepare_img (line 275) | def prepare_img(): class TFConvNextV2ModelIntegrationTest (line 282) | class TFConvNextV2ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 284) | def default_image_processor(self): method test_inference_image_classification_head (line 292) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/cpm/test_tokenization_cpm.py class CpmTokenizationTest (line 23) | class CpmTokenizationTest(XLNetModelTest): method is_pipeline_test_to_skip (line 25) | def is_pipeline_test_to_skip( method test_pre_tokenization (line 30) | def test_pre_tokenization(self): FILE: mplsandbox_for_rl/transformers/tests/models/cpmant/test_modeling_cpmant.py class CpmAntModelTester (line 39) | class CpmAntModelTester: method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 84) | def prepare_config_and_inputs(self): method get_config (line 93) | def get_config(self): method create_and_check_cpmant_model (line 110) | def create_and_check_cpmant_model(self, config, input_ids, *args): method create_and_check_lm_head_model (line 119) | def create_and_check_lm_head_model(self, config, input_ids, *args): method prepare_config_and_inputs_for_common (line 131) | def prepare_config_and_inputs_for_common(self): class CpmAntModelTest (line 137) | class CpmAntModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 149) | def setUp(self): method test_config (line 153) | def test_config(self): method test_inputs_embeds (line 156) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 159) | def test_retain_grad_hidden_states_attentions(self): method test_cpmant_model (line 165) | def test_cpmant_model(self): method test_cpmant_lm_head_model (line 169) | def test_cpmant_lm_head_model(self): class CpmAntModelIntegrationTest (line 175) | class CpmAntModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 177) | def test_inference_masked_lm(self): class CpmAntForCausalLMlIntegrationTest (line 192) | class CpmAntForCausalLMlIntegrationTest(unittest.TestCase): method test_inference_casual (line 194) | def test_inference_casual(self): method test_simple_generation (line 208) | def test_simple_generation(self): method test_batch_generation (line 220) | def test_batch_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/cpmant/test_tokenization_cpmant.py class CPMAntTokenizationTest (line 26) | class CPMAntTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 31) | def setUp(self): method test_pre_tokenization (line 57) | def test_pre_tokenization(self): FILE: mplsandbox_for_rl/transformers/tests/models/ctrl/test_modeling_ctrl.py class CTRLModelTester (line 38) | class CTRLModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 90) | def prepare_config_and_inputs(self): method get_config (line 129) | def get_config(self): method create_and_check_ctrl_model (line 145) | def create_and_check_ctrl_model(self, config, input_ids, input_mask, h... method create_and_check_lm_head_model (line 156) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method prepare_config_and_inputs_for_common (line 165) | def prepare_config_and_inputs_for_common(self): method create_and_check_ctrl_for_sequence_classification (line 184) | def create_and_check_ctrl_for_sequence_classification(self, config, in... class CTRLModelTest (line 195) | class CTRLModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method is_pipeline_test_to_skip (line 213) | def is_pipeline_test_to_skip( method setUp (line 224) | def setUp(self): method tearDown (line 228) | def tearDown(self): method test_config (line 234) | def test_config(self): method test_ctrl_model (line 237) | def test_ctrl_model(self): method test_ctrl_lm_head_model (line 241) | def test_ctrl_lm_head_model(self): method test_model_from_pretrained (line 246) | def test_model_from_pretrained(self): class CTRLModelLanguageGenerationTest (line 253) | class CTRLModelLanguageGenerationTest(unittest.TestCase): method tearDown (line 254) | def tearDown(self): method test_lm_generate_ctrl (line 261) | def test_lm_generate_ctrl(self): FILE: mplsandbox_for_rl/transformers/tests/models/ctrl/test_modeling_tf_ctrl.py class TFCTRLModelTester (line 40) | class TFCTRLModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 70) | def prepare_config_and_inputs(self): method create_and_check_ctrl_model (line 122) | def create_and_check_ctrl_model(self, config, input_ids, input_mask, h... method create_and_check_ctrl_lm_head (line 134) | def create_and_check_ctrl_lm_head(self, config, input_ids, input_mask,... method create_and_check_ctrl_for_sequence_classification (line 140) | def create_and_check_ctrl_for_sequence_classification( method prepare_config_and_inputs_for_common (line 154) | def prepare_config_and_inputs_for_common(self): class TFCTRLModelTest (line 174) | class TFCTRLModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.... method is_pipeline_test_to_skip (line 191) | def is_pipeline_test_to_skip( method setUp (line 202) | def setUp(self): method test_config (line 206) | def test_config(self): method test_ctrl_model (line 209) | def test_ctrl_model(self): method test_ctrl_lm_head (line 213) | def test_ctrl_lm_head(self): method test_ctrl_sequence_classification_model (line 217) | def test_ctrl_sequence_classification_model(self): method test_model_common_attributes (line 221) | def test_model_common_attributes(self): method test_model_from_pretrained (line 250) | def test_model_from_pretrained(self): class TFCTRLModelLanguageGenerationTest (line 257) | class TFCTRLModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_ctrl (line 259) | def test_lm_generate_ctrl(self): FILE: mplsandbox_for_rl/transformers/tests/models/ctrl/test_tokenization_ctrl.py class CTRLTokenizationTest (line 25) | class CTRLTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 31) | def setUp(self): method get_tokenizer (line 47) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 51) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 56) | def test_full_tokenizer(self): FILE: mplsandbox_for_rl/transformers/tests/models/cvt/test_modeling_cvt.py class CvtConfigTester (line 41) | class CvtConfigTester(ConfigTester): method create_and_test_config_common_properties (line 42) | def create_and_test_config_common_properties(self): class CvtModelTester (line 48) | class CvtModelTester: method __init__ (line 49) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 99) | def get_config(self): method create_and_check_model (line 116) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 128) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 136) | def prepare_config_and_inputs_for_common(self): class CvtModelTest (line 144) | class CvtModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 163) | def setUp(self): method test_config (line 173) | def test_config(self): method test_attention_outputs (line 177) | def test_attention_outputs(self): method test_inputs_embeds (line 181) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 185) | def test_model_get_set_embeddings(self): method test_model (line 188) | def test_model(self): method test_hidden_states_output (line 192) | def test_hidden_states_output(self): method test_for_image_classification (line 228) | def test_for_image_classification(self): method test_model_from_pretrained (line 233) | def test_model_from_pretrained(self): function prepare_img (line 240) | def prepare_img(): class CvtModelIntegrationTest (line 247) | class CvtModelIntegrationTest(unittest.TestCase): method default_image_processor (line 249) | def default_image_processor(self): method test_inference_image_classification_head (line 253) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/cvt/test_modeling_tf_cvt.py class TFCvtConfigTester (line 33) | class TFCvtConfigTester(ConfigTester): method create_and_test_config_common_properties (line 34) | def create_and_test_config_common_properties(self): class TFCvtModelTester (line 40) | class TFCvtModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 81) | def prepare_config_and_inputs(self): method get_config (line 92) | def get_config(self): method create_and_check_model (line 109) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 119) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 125) | def prepare_config_and_inputs_for_common(self): class TFCvtModelTest (line 133) | class TFCvtModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 151) | def setUp(self): method test_config (line 155) | def test_config(self): method test_attention_outputs (line 165) | def test_attention_outputs(self): method test_inputs_embeds (line 169) | def test_inputs_embeds(self): method test_model_common_attributes (line 173) | def test_model_common_attributes(self): method test_dataset_conversion (line 180) | def test_dataset_conversion(self): method test_keras_fit (line 188) | def test_keras_fit(self): method test_keras_fit_mixed_precision (line 192) | def test_keras_fit_mixed_precision(self): method test_forward_signature (line 198) | def test_forward_signature(self): method test_hidden_states_output (line 210) | def test_hidden_states_output(self): method test_model (line 242) | def test_model(self): method test_for_image_classification (line 246) | def test_for_image_classification(self): method test_model_from_pretrained (line 251) | def test_model_from_pretrained(self): function prepare_img (line 258) | def prepare_img(): class TFCvtModelIntegrationTest (line 265) | class TFCvtModelIntegrationTest(unittest.TestCase): method default_image_processor (line 267) | def default_image_processor(self): method test_inference_image_classification_head (line 271) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/dac/test_feature_extraction_dac.py function floats_list (line 38) | def floats_list(shape, scale=1.0, rng=None, name=None): class DacFeatureExtractionTester (line 54) | class DacFeatureExtractionTester(unittest.TestCase): method __init__ (line 56) | def __init__( method prepare_feat_extract_dict (line 78) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 86) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class DacFeatureExtractionTest (line 107) | class DacFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unitt... method setUp (line 110) | def setUp(self): method test_call (line 113) | def test_call(self): method test_double_precision_pad (line 131) | def test_double_precision_pad(self): method _load_datasamples (line 142) | def _load_datasamples(self, num_samples): method test_integration (line 151) | def test_integration(self): method test_integration_stereo (line 174) | def test_integration_stereo(self): method test_truncation_and_padding (line 178) | def test_truncation_and_padding(self): FILE: mplsandbox_for_rl/transformers/tests/models/dac/test_modeling_dac.py class DacModelTester (line 40) | class DacModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 77) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 83) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_model_class (line 87) | def prepare_config_and_inputs_for_model_class(self, model_class): method get_config (line 95) | def get_config(self): method create_and_check_model_forward (line 109) | def create_and_check_model_forward(self, config, inputs_dict): class DacModelTest (line 119) | class DacModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method _prepare_for_class (line 128) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 137) | def setUp(self): method test_config (line 143) | def test_config(self): method test_model_forward (line 146) | def test_model_forward(self): method test_forward_signature (line 150) | def test_forward_signature(self): method test_inputs_embeds (line 164) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 168) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 172) | def test_retain_grad_hidden_states_attentions(self): method test_torchscript_output_attentions (line 176) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 180) | def test_torchscript_output_hidden_state(self): method _create_and_check_torchscript (line 183) | def _create_and_check_torchscript(self, config, inputs_dict): method test_attention_outputs (line 274) | def test_attention_outputs(self): method test_hidden_states_output (line 278) | def test_hidden_states_output(self): method test_save_load_low_cpu_mem_usage (line 282) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 286) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 290) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method test_determinism (line 293) | def test_determinism(self): method test_model_outputs_equivalence (line 319) | def test_model_outputs_equivalence(self): method test_initialization (line 367) | def test_initialization(self): method test_identity_shortcut (line 382) | def test_identity_shortcut(self): function normalize (line 388) | def normalize(arr): function compute_rmse (line 394) | def compute_rmse(arr1, arr2): class DacIntegrationTest (line 402) | class DacIntegrationTest(unittest.TestCase): method test_integration_16khz (line 403) | def test_integration_16khz(self): method test_integration_24khz (line 458) | def test_integration_24khz(self): method test_integration_44khz (line 526) | def test_integration_44khz(self): method test_integration_batch_16khz (line 580) | def test_integration_batch_16khz(self): method test_integration_batch_24khz (line 637) | def test_integration_batch_24khz(self): method test_integration_batch_44khz (line 694) | def test_integration_batch_44khz(self): FILE: mplsandbox_for_rl/transformers/tests/models/data2vec/test_modeling_data2vec_audio.py class Data2VecAudioModelTester (line 46) | class Data2VecAudioModelTester: method __init__ (line 47) | def __init__( method prepare_config_and_inputs (line 119) | def prepare_config_and_inputs(self): method get_config (line 127) | def get_config(self): method create_and_check_model (line 156) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_model_with_adapter (line 165) | def create_and_check_model_with_adapter(self, config, input_values, at... method create_and_check_model_with_adapter_proj_dim (line 175) | def create_and_check_model_with_adapter_proj_dim(self, config, input_v... method create_and_check_batch_inference (line 187) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 213) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 241) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 266) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 295) | def check_seq_classifier_training(self, config, input_values, *args): method check_xvector_training (line 318) | def check_xvector_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 341) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 355) | def prepare_config_and_inputs_for_common(self): class Data2VecAudioModelTest (line 362) | class Data2VecAudioModelTest(ModelTesterMixin, PipelineTesterMixin, unit... method setUp (line 386) | def setUp(self): method test_config (line 390) | def test_config(self): method test_model (line 393) | def test_model(self): method test_model_with_adapter (line 397) | def test_model_with_adapter(self): method test_model_with_adapter_proj_dim (line 401) | def test_model_with_adapter_proj_dim(self): method test_ctc_loss_inference (line 405) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 409) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 413) | def test_ctc_train(self): method test_seq_classifier_train (line 417) | def test_seq_classifier_train(self): method test_xvector_train (line 421) | def test_xvector_train(self): method test_labels_out_of_vocab (line 425) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 430) | def test_inputs_embeds(self): method test_forward_signature (line 434) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 438) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 442) | def test_model_get_set_embeddings(self): method test_equivalence_flax_to_pt (line 447) | def test_equivalence_flax_to_pt(self): method test_equivalence_pt_to_flax (line 452) | def test_equivalence_pt_to_flax(self): method test_retain_grad_hidden_states_attentions (line 455) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 495) | def test_initialization(self): method _mock_init_weights (line 529) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 543) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 566) | def test_mask_time_prob_ctc(self): method test_feed_forward_chunking (line 590) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 594) | def test_model_from_pretrained(self): class Data2VecAudioUtilsTest (line 600) | class Data2VecAudioUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 601) | def test_compute_mask_indices(self): method test_compute_mask_indices_low_prob (line 612) | def test_compute_mask_indices_low_prob(self): method test_compute_mask_indices_overlap (line 642) | def test_compute_mask_indices_overlap(self): method test_compute_mask_indices_attn_mask_overlap (line 655) | def test_compute_mask_indices_attn_mask_overlap(self): method test_compute_mask_indices_short_audio (line 674) | def test_compute_mask_indices_short_audio(self): class Data2VecAudioModelIntegrationTest (line 695) | class Data2VecAudioModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 696) | def _load_datasamples(self, num_samples): method _load_superb (line 705) | def _load_superb(self, task, num_samples): method test_inference_ctc_normal (line 710) | def test_inference_ctc_normal(self): method test_inference_ctc_batched (line 727) | def test_inference_ctc_batched(self): FILE: mplsandbox_for_rl/transformers/tests/models/data2vec/test_modeling_data2vec_text.py class Data2VecTextModelTester (line 47) | class Data2VecTextModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method get_config (line 119) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 134) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 161) | def create_and_check_model( method create_and_check_model_as_decoder (line 174) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 207) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 225) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 293) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 302) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 312) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 330) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 346) | def prepare_config_and_inputs_for_common(self): class Data2VecTextModelTest (line 362) | class Data2VecTextModelTest(ModelTesterMixin, GenerationTesterMixin, Pip... method setUp (line 392) | def setUp(self): method test_config (line 396) | def test_config(self): method test_model (line 399) | def test_model(self): method test_model_various_embeddings (line 403) | def test_model_various_embeddings(self): method test_model_as_decoder (line 409) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 413) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 441) | def test_for_causal_lm(self): method test_decoder_model_past_with_large_inputs (line 445) | def test_decoder_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs_relative_pos_emb (line 449) | def test_decoder_model_past_with_large_inputs_relative_pos_emb(self): method test_for_masked_lm (line 454) | def test_for_masked_lm(self): method test_for_token_classification (line 458) | def test_for_token_classification(self): method test_for_multiple_choice (line 462) | def test_for_multiple_choice(self): method test_for_question_answering (line 466) | def test_for_question_answering(self): method test_model_from_pretrained (line 471) | def test_model_from_pretrained(self): method test_create_position_ids_respects_padding_index (line 476) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 494) | def test_create_position_ids_from_inputs_embeds(self): class Data2VecTextModelIntegrationTest (line 517) | class Data2VecTextModelIntegrationTest(TestCasePlus): method test_inference_masked_lm (line 519) | def test_inference_masked_lm(self): method test_inference_no_head (line 533) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/data2vec/test_modeling_data2vec_vision.py class Data2VecVisionModelTester (line 46) | class Data2VecVisionModelTester: method __init__ (line 47) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method get_config (line 108) | def get_config(self): method create_and_check_model (line 126) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_image_classification (line 135) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_image_segmentation (line 143) | def create_and_check_for_image_segmentation(self, config, pixel_values... method prepare_config_and_inputs_for_common (line 157) | def prepare_config_and_inputs_for_common(self): class Data2VecVisionModelTest (line 165) | class Data2VecVisionModelTest(ModelTesterMixin, PipelineTesterMixin, uni... method setUp (line 190) | def setUp(self): method test_config (line 196) | def test_config(self): method test_inputs_embeds (line 200) | def test_inputs_embeds(self): method test_multi_gpu_data_parallel_forward (line 207) | def test_multi_gpu_data_parallel_forward(self): method test_model_get_set_embeddings (line 210) | def test_model_get_set_embeddings(self): method test_model (line 219) | def test_model(self): method test_for_image_segmentation (line 223) | def test_for_image_segmentation(self): method test_training (line 227) | def test_training(self): method test_training_gradient_checkpointing (line 245) | def test_training_gradient_checkpointing(self): method test_initialization (line 271) | def test_initialization(self): method check_pt_tf_outputs (line 289) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method test_for_image_classification (line 293) | def test_for_image_classification(self): method test_model_from_pretrained (line 298) | def test_model_from_pretrained(self): function prepare_img (line 305) | def prepare_img(): class Data2VecVisionModelIntegrationTest (line 312) | class Data2VecVisionModelIntegrationTest(unittest.TestCase): method default_image_processor (line 314) | def default_image_processor(self): method test_inference_image_classification_head_imagenet_1k (line 320) | def test_inference_image_classification_head_imagenet_1k(self): method test_inference_interpolate_pos_encoding (line 346) | def test_inference_interpolate_pos_encoding(self): FILE: mplsandbox_for_rl/transformers/tests/models/data2vec/test_modeling_tf_data2vec_vision.py class TFData2VecVisionModelTester (line 50) | class TFData2VecVisionModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method get_config (line 108) | def get_config(self): method create_and_check_model (line 126) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_image_classification (line 143) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_image_segmentation (line 150) | def create_and_check_for_image_segmentation(self, config, pixel_values... method prepare_config_and_inputs_for_common (line 162) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_keras_fit (line 168) | def prepare_config_and_inputs_for_keras_fit(self): class TFData2VecVisionModelTest (line 176) | class TFData2VecVisionModelTest(TFModelTesterMixin, PipelineTesterMixin,... method setUp (line 198) | def setUp(self): method test_config (line 204) | def test_config(self): method test_inputs_embeds (line 208) | def test_inputs_embeds(self): method test_model_common_attributes (line 212) | def test_model_common_attributes(self): method test_forward_signature (line 221) | def test_forward_signature(self): method test_model (line 233) | def test_model(self): method test_for_image_segmentation (line 237) | def test_for_image_segmentation(self): method test_attention_outputs (line 241) | def test_attention_outputs(self): method test_hidden_states_output (line 303) | def test_hidden_states_output(self): method test_keras_fit (line 349) | def test_keras_fit(self): method check_pt_tf_outputs (line 388) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method test_loss_computation (line 393) | def test_loss_computation(self): method test_for_image_classification (line 449) | def test_for_image_classification(self): method test_model_from_pretrained (line 454) | def test_model_from_pretrained(self): function prepare_img (line 461) | def prepare_img(): class TFData2VecVisionModelIntegrationTest (line 468) | class TFData2VecVisionModelIntegrationTest(unittest.TestCase): method default_image_processor (line 470) | def default_image_processor(self): method test_inference_image_classification_head_imagenet_1k (line 476) | def test_inference_image_classification_head_imagenet_1k(self): FILE: mplsandbox_for_rl/transformers/tests/models/dbrx/test_modeling_dbrx.py class DbrxModelTester (line 34) | class DbrxModelTester: method __init__ (line 35) | def __init__( method prepare_config_and_inputs (line 137) | def prepare_config_and_inputs(self): method get_config (line 160) | def get_config(self): method create_and_check_model (line 184) | def create_and_check_model( method create_and_check_model_as_decoder (line 195) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 226) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 244) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 307) | def prepare_config_and_inputs_for_common(self): class DbrxModelTest (line 323) | class DbrxModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method setUp (line 330) | def setUp(self): method test_config (line 334) | def test_config(self): method test_model (line 337) | def test_model(self): method test_model_various_embeddings (line 341) | def test_model_various_embeddings(self): method test_model_from_pretrained (line 348) | def test_model_from_pretrained(self): method test_tied_weights_keys (line 354) | def test_tied_weights_keys(self): method test_cpu_offload (line 360) | def test_cpu_offload(self): method test_disk_offload_safetensors (line 364) | def test_disk_offload_safetensors(self): method test_disk_offload_bin (line 368) | def test_disk_offload_bin(self): method test_generate_compile_fullgraph (line 372) | def test_generate_compile_fullgraph(self): class DbrxModelIntegrationTest (line 377) | class DbrxModelIntegrationTest(unittest.TestCase): method test_tiny_model_logits (line 379) | def test_tiny_model_logits(self): FILE: mplsandbox_for_rl/transformers/tests/models/deberta/test_modeling_deberta.py class DebertaModelTester (line 37) | class DebertaModelTester: method __init__ (line 38) | def __init__( method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method get_config (line 115) | def get_config(self): method get_pipeline_config (line 133) | def get_pipeline_config(self): method check_loss_output (line 138) | def check_loss_output(self, result): method create_and_check_deberta_model (line 141) | def create_and_check_deberta_model( method create_and_check_deberta_for_masked_lm (line 153) | def create_and_check_deberta_for_masked_lm( method create_and_check_deberta_for_sequence_classification (line 163) | def create_and_check_deberta_for_sequence_classification( method create_and_check_deberta_for_token_classification (line 174) | def create_and_check_deberta_for_token_classification( method create_and_check_deberta_for_question_answering (line 184) | def create_and_check_deberta_for_question_answering( method prepare_config_and_inputs_for_common (line 200) | def prepare_config_and_inputs_for_common(self): class DebertaModelTest (line 216) | class DebertaModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 247) | def setUp(self): method test_config (line 251) | def test_config(self): method test_deberta_model (line 254) | def test_deberta_model(self): method test_for_sequence_classification (line 258) | def test_for_sequence_classification(self): method test_for_masked_lm (line 262) | def test_for_masked_lm(self): method test_for_question_answering (line 266) | def test_for_question_answering(self): method test_for_token_classification (line 270) | def test_for_token_classification(self): method test_model_from_pretrained (line 275) | def test_model_from_pretrained(self): class DebertaModelIntegrationTest (line 284) | class DebertaModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 286) | def test_inference_masked_lm(self): method test_inference_no_head (line 290) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/deberta/test_modeling_tf_deberta.py class TFDebertaModelTester (line 41) | class TFDebertaModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method create_and_check_model (line 131) | def create_and_check_model( method create_and_check_for_masked_lm (line 144) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 156) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 170) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 183) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 197) | def prepare_config_and_inputs_for_common(self): class TFDebertaModelTest (line 213) | class TFDebertaModelTest(TFModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 241) | def setUp(self): method test_config (line 245) | def test_config(self): method test_model (line 248) | def test_model(self): method test_for_masked_lm (line 252) | def test_for_masked_lm(self): method test_for_question_answering (line 256) | def test_for_question_answering(self): method test_for_sequence_classification (line 260) | def test_for_sequence_classification(self): method test_for_token_classification (line 264) | def test_for_token_classification(self): method test_model_from_pretrained (line 269) | def test_model_from_pretrained(self): class TFDeBERTaModelIntegrationTest (line 275) | class TFDeBERTaModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 277) | def test_inference_masked_lm(self): method test_inference_no_head (line 281) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/deberta/test_tokenization_deberta.py class DebertaTokenizationTest (line 28) | class DebertaTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 34) | def setUp(self): method get_tokenizer (line 71) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 75) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 80) | def test_full_tokenizer(self): method test_token_type_ids (line 91) | def test_token_type_ids(self): method test_sequence_builders (line 98) | def test_sequence_builders(self): method test_tokenizer_integration (line 118) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/deberta_v2/test_modeling_deberta_v2.py class DebertaV2ModelTester (line 38) | class DebertaV2ModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 116) | def get_config(self): method check_loss_output (line 134) | def check_loss_output(self, result): method create_and_check_deberta_model (line 137) | def create_and_check_deberta_model( method create_and_check_deberta_for_masked_lm (line 149) | def create_and_check_deberta_for_masked_lm( method create_and_check_deberta_for_sequence_classification (line 159) | def create_and_check_deberta_for_sequence_classification( method create_and_check_deberta_for_token_classification (line 170) | def create_and_check_deberta_for_token_classification( method create_and_check_deberta_for_question_answering (line 180) | def create_and_check_deberta_for_question_answering( method create_and_check_deberta_for_multiple_choice (line 196) | def create_and_check_deberta_for_multiple_choice( method prepare_config_and_inputs_for_common (line 213) | def prepare_config_and_inputs_for_common(self): class DebertaV2ModelTest (line 229) | class DebertaV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest... method setUp (line 261) | def setUp(self): method test_config (line 265) | def test_config(self): method test_deberta_model (line 268) | def test_deberta_model(self): method test_for_sequence_classification (line 272) | def test_for_sequence_classification(self): method test_for_masked_lm (line 276) | def test_for_masked_lm(self): method test_for_question_answering (line 280) | def test_for_question_answering(self): method test_for_token_classification (line 284) | def test_for_token_classification(self): method test_for_multiple_choice (line 288) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 293) | def test_model_from_pretrained(self): class DebertaV2ModelIntegrationTest (line 302) | class DebertaV2ModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 304) | def test_inference_masked_lm(self): method test_inference_no_head (line 308) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/deberta_v2/test_modeling_tf_deberta_v2.py class TFDebertaV2ModelTester (line 42) | class TFDebertaV2ModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 97) | def prepare_config_and_inputs(self): method create_and_check_model (line 134) | def create_and_check_model( method create_and_check_for_masked_lm (line 147) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 159) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 173) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 186) | def create_and_check_for_question_answering( method create_and_check_for_multiple_choice (line 200) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 216) | def prepare_config_and_inputs_for_common(self): class TFDebertaModelTest (line 232) | class TFDebertaModelTest(TFModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 261) | def setUp(self): method test_config (line 265) | def test_config(self): method test_model (line 268) | def test_model(self): method test_for_masked_lm (line 272) | def test_for_masked_lm(self): method test_for_question_answering (line 276) | def test_for_question_answering(self): method test_for_sequence_classification (line 280) | def test_for_sequence_classification(self): method test_for_token_classification (line 284) | def test_for_token_classification(self): method test_model_from_pretrained (line 289) | def test_model_from_pretrained(self): class TFDeBERTaV2ModelIntegrationTest (line 295) | class TFDeBERTaV2ModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 297) | def test_inference_masked_lm(self): method test_inference_no_head (line 301) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/deberta_v2/test_tokenization_deberta_v2.py class DebertaV2TokenizationTest (line 29) | class DebertaV2TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method get_input_output_texts (line 43) | def get_input_output_texts(self, tokenizer): method test_convert_token_and_id (line 48) | def test_convert_token_and_id(self): method test_get_vocab (line 56) | def test_get_vocab(self): method test_vocab_size (line 63) | def test_vocab_size(self): method test_do_lower_case (line 66) | def test_do_lower_case(self): method test_sentencepiece_tokenize_and_convert_tokens_to_string (line 83) | def test_sentencepiece_tokenize_and_convert_tokens_to_string(self): method test_sentencepiece_tokenize_and_decode (line 87) | def test_sentencepiece_tokenize_and_decode(self): method test_split_by_punct (line 90) | def test_split_by_punct(self): method test_do_lower_case_split_by_punct (line 106) | def test_do_lower_case_split_by_punct(self): method test_do_lower_case_split_by_punct_false (line 122) | def test_do_lower_case_split_by_punct_false(self): method test_do_lower_case_false_split_by_punct (line 140) | def test_do_lower_case_false_split_by_punct(self): method test_do_lower_case_false_split_by_punct_false (line 158) | def test_do_lower_case_false_split_by_punct_false(self): method test_rust_and_python_full_tokenizers (line 176) | def test_rust_and_python_full_tokenizers(self): method test_full_tokenizer (line 195) | def test_full_tokenizer(self): method test_sequence_builders (line 239) | def test_sequence_builders(self): method test_tokenizer_integration (line 255) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/decision_transformer/test_modeling_decision_transformer.py class DecisionTransformerModelTester (line 35) | class DecisionTransformerModelTester: method __init__ (line 36) | def __init__( method prepare_config_and_inputs (line 56) | def prepare_config_and_inputs(self): method get_config (line 76) | def get_config(self): method create_and_check_model (line 86) | def create_and_check_model( method prepare_config_and_inputs_for_common (line 108) | def prepare_config_and_inputs_for_common(self): class DecisionTransformerModelTest (line 131) | class DecisionTransformerModelTest(ModelTesterMixin, GenerationTesterMix... method setUp (line 149) | def setUp(self): method test_config (line 153) | def test_config(self): method test_model (line 156) | def test_model(self): method test_model_from_pretrained (line 161) | def test_model_from_pretrained(self): method test_forward_signature (line 166) | def test_forward_signature(self): method test_model_get_set_embeddings (line 187) | def test_model_get_set_embeddings(self): class DecisionTransformerModelIntegrationTest (line 192) | class DecisionTransformerModelIntegrationTest(unittest.TestCase): method test_autoregressive_prediction (line 194) | def test_autoregressive_prediction(self): FILE: mplsandbox_for_rl/transformers/tests/models/deformable_detr/test_image_processing_deformable_detr.py class DeformableDetrImageProcessingTester (line 38) | class DeformableDetrImageProcessingTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_image_processor_dict (line 71) | def prepare_image_processor_dict(self): method get_expected_values (line 83) | def get_expected_values(self, image_inputs, batched=False): method expected_output_image_shape (line 116) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 120) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class DeformableDetrImageProcessingTest (line 134) | class DeformableDetrImageProcessingTest(AnnotationFormatTestMixin, Image... method setUp (line 137) | def setUp(self): method image_processor_dict (line 142) | def image_processor_dict(self): method test_image_processor_properties (line 145) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 155) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pytorch_with_coco_detection_annotations (line 167) | def test_call_pytorch_with_coco_detection_annotations(self): method test_call_pytorch_with_coco_panoptic_annotations (line 211) | def test_call_pytorch_with_coco_panoptic_annotations(self): method test_batched_coco_detection_annotations (line 261) | def test_batched_coco_detection_annotations(self): method test_batched_coco_panoptic_annotations (line 379) | def test_batched_coco_panoptic_annotations(self): method test_max_width_max_height_resizing_and_pad_strategy (line 502) | def test_max_width_max_height_resizing_and_pad_strategy(self): method test_longest_edge_shortest_edge_resizing_strategy (line 548) | def test_longest_edge_shortest_edge_resizing_strategy(self): FILE: mplsandbox_for_rl/transformers/tests/models/deformable_detr/test_modeling_deformable_detr.py class DeformableDetrModelTester (line 52) | class DeformableDetrModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 104) | def prepare_config_and_inputs(self): method get_config (line 125) | def get_config(self): method prepare_config_and_inputs_for_common (line 157) | def prepare_config_and_inputs_for_common(self): method create_and_check_deformable_detr_model (line 162) | def create_and_check_deformable_detr_model(self, config, pixel_values,... method create_and_check_deformable_detr_object_detection_head_model (line 172) | def create_and_check_deformable_detr_object_detection_head_model(self,... class DeformableDetrModelTest (line 191) | class DeformableDetrModelTest(ModelTesterMixin, GenerationTesterMixin, P... method _prepare_for_class (line 205) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 231) | def setUp(self): method test_config (line 240) | def test_config(self): method test_deformable_detr_model (line 243) | def test_deformable_detr_model(self): method test_deformable_detr_object_detection_head_model (line 247) | def test_deformable_detr_object_detection_head_model(self): method test_inputs_embeds (line 252) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 256) | def test_inputs_embeds_matches_input_ids(self): method test_model_get_set_embeddings (line 260) | def test_model_get_set_embeddings(self): method test_generate_without_input_ids (line 264) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 268) | def test_resize_tokens_embeddings(self): method test_feed_forward_chunking (line 272) | def test_feed_forward_chunking(self): method test_attention_outputs (line 275) | def test_attention_outputs(self): method test_model_outputs_equivalence (line 374) | def test_model_outputs_equivalence(self): method test_retain_grad_hidden_states_attentions (line 448) | def test_retain_grad_hidden_states_attentions(self): method test_forward_auxiliary_loss (line 485) | def test_forward_auxiliary_loss(self): method test_forward_signature (line 501) | def test_forward_signature(self): method test_different_timm_backbone (line 522) | def test_different_timm_backbone(self): method test_hf_backbone (line 553) | def test_hf_backbone(self): method test_initialization (line 585) | def test_initialization(self): method test_save_load_low_cpu_mem_usage (line 610) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 614) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 618) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method test_two_stage_training (line 621) | def test_two_stage_training(self): method create_and_check_model_fp16_forward (line 636) | def create_and_check_model_fp16_forward(self): method create_and_check_model_bf16_forward (line 649) | def create_and_check_model_bf16_forward(self): function prepare_img (line 665) | def prepare_img(): class DeformableDetrModelIntegrationTests (line 673) | class DeformableDetrModelIntegrationTests(unittest.TestCase): method default_image_processor (line 675) | def default_image_processor(self): method test_inference_object_detection_head (line 678) | def test_inference_object_detection_head(self): method test_inference_object_detection_head_with_box_refine_two_stage (line 719) | def test_inference_object_detection_head_with_box_refine_two_stage(self): method test_inference_object_detection_head_equivalence_cpu_gpu (line 750) | def test_inference_object_detection_head_equivalence_cpu_gpu(self): FILE: mplsandbox_for_rl/transformers/tests/models/deit/test_image_processing_deit.py class DeiTImageProcessingTester (line 29) | class DeiTImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 64) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 75) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 78) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class DeiTImageProcessingTest (line 92) | class DeiTImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 96) | def setUp(self): method image_processor_dict (line 101) | def image_processor_dict(self): method test_image_processor_properties (line 104) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 114) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/deit/test_modeling_deit.py class DeiTModelTester (line 60) | class DeiTModelTester: method __init__ (line 61) | def __init__( method prepare_config_and_inputs (line 112) | def prepare_config_and_inputs(self): method get_config (line 123) | def get_config(self): method create_and_check_model (line 141) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 148) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 167) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 185) | def prepare_config_and_inputs_for_common(self): class DeiTModelTest (line 197) | class DeiTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 226) | def setUp(self): method test_multi_gpu_data_parallel_forward (line 234) | def test_multi_gpu_data_parallel_forward(self): method test_config (line 237) | def test_config(self): method test_inputs_embeds (line 241) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 244) | def test_model_get_set_embeddings(self): method test_model (line 253) | def test_model(self): method test_for_masked_image_modeling (line 257) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 261) | def test_for_image_classification(self): method _prepare_for_class (line 266) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_training (line 275) | def test_training(self): method test_training_gradient_checkpointing (line 296) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 321) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 327) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_problem_types (line 330) | def test_problem_types(self): method test_model_from_pretrained (line 381) | def test_model_from_pretrained(self): function prepare_img (line 388) | def prepare_img(): class DeiTModelIntegrationTest (line 395) | class DeiTModelIntegrationTest(unittest.TestCase): method default_image_processor (line 397) | def default_image_processor(self): method test_inference_image_classification_head (line 405) | def test_inference_image_classification_head(self): method test_inference_interpolate_pos_encoding (line 427) | def test_inference_interpolate_pos_encoding(self): method test_inference_fp16 (line 452) | def test_inference_fp16(self): FILE: mplsandbox_for_rl/transformers/tests/models/deit/test_modeling_tf_deit.py class TFDeiTModelTester (line 51) | class TFDeiTModelTester: method __init__ (line 52) | def __init__( method prepare_config_and_inputs (line 99) | def prepare_config_and_inputs(self): method get_config (line 110) | def get_config(self): method create_and_check_model (line 128) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 133) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 148) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 162) | def prepare_config_and_inputs_for_common(self): class TFDeiTModelTest (line 170) | class TFDeiTModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 200) | def setUp(self): method test_config (line 204) | def test_config(self): method test_inputs_embeds (line 208) | def test_inputs_embeds(self): method test_model_common_attributes (line 211) | def test_model_common_attributes(self): method test_forward_signature (line 220) | def test_forward_signature(self): method test_model (line 232) | def test_model(self): method test_for_masked_image_modeling (line 236) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 240) | def test_for_image_classification(self): method _prepare_for_class (line 245) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_model_from_pretrained (line 255) | def test_model_from_pretrained(self): function prepare_img (line 262) | def prepare_img(): class DeiTModelIntegrationTest (line 269) | class DeiTModelIntegrationTest(unittest.TestCase): method default_image_processor (line 271) | def default_image_processor(self): method test_inference_image_classification_head (line 279) | def test_inference_image_classification_head(self): method test_inference_interpolate_pos_encoding (line 298) | def test_inference_interpolate_pos_encoding(self): FILE: mplsandbox_for_rl/transformers/tests/models/depth_anything/test_modeling_depth_anything.py class DepthAnythingModelTester (line 40) | class DepthAnythingModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 83) | def prepare_config_and_inputs(self): method get_config (line 94) | def get_config(self): method get_backbone_config (line 104) | def get_backbone_config(self): method create_and_check_for_depth_estimation (line 119) | def create_and_check_for_depth_estimation(self, config, pixel_values, ... method prepare_config_and_inputs_for_common (line 128) | def prepare_config_and_inputs_for_common(self): class DepthAnythingModelTest (line 136) | class DepthAnythingModelTest(ModelTesterMixin, PipelineTesterMixin, unit... method setUp (line 149) | def setUp(self): method test_config (line 159) | def test_config(self): method test_inputs_embeds (line 163) | def test_inputs_embeds(self): method test_for_depth_estimation (line 166) | def test_for_depth_estimation(self): method test_training (line 171) | def test_training(self): method test_training_gradient_checkpointing (line 175) | def test_training_gradient_checkpointing(self): method test_model_get_set_embeddings (line 179) | def test_model_get_set_embeddings(self): method test_save_load_fast_init_from_base (line 183) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 187) | def test_save_load_fast_init_to_base(self): method test_training_gradient_checkpointing_use_reentrant (line 193) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 199) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_from_pretrained (line 203) | def test_model_from_pretrained(self): method test_backbone_selection (line 208) | def test_backbone_selection(self): function prepare_img (line 239) | def prepare_img(): class DepthAnythingModelIntegrationTest (line 247) | class DepthAnythingModelIntegrationTest(unittest.TestCase): method test_inference (line 248) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/detr/test_image_processing_detr.py class DetrImageProcessingTester (line 37) | class DetrImageProcessingTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_image_processor_dict (line 70) | def prepare_image_processor_dict(self): method get_expected_values (line 82) | def get_expected_values(self, image_inputs, batched=False): method expected_output_image_shape (line 115) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 119) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class DetrImageProcessingTest (line 133) | class DetrImageProcessingTest(AnnotationFormatTestMixin, ImageProcessing... method setUp (line 136) | def setUp(self): method image_processor_dict (line 141) | def image_processor_dict(self): method test_image_processor_properties (line 144) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 155) | def test_image_processor_from_dict_with_kwargs(self): method test_should_raise_if_annotation_format_invalid (line 166) | def test_should_raise_if_annotation_format_invalid(self): method test_valid_coco_detection_annotations (line 188) | def test_valid_coco_detection_annotations(self): method test_call_pytorch_with_coco_detection_annotations (line 224) | def test_call_pytorch_with_coco_detection_annotations(self): method test_call_pytorch_with_coco_panoptic_annotations (line 268) | def test_call_pytorch_with_coco_panoptic_annotations(self): method test_batched_coco_detection_annotations (line 317) | def test_batched_coco_detection_annotations(self): method test_batched_coco_panoptic_annotations (line 434) | def test_batched_coco_panoptic_annotations(self): method test_max_width_max_height_resizing_and_pad_strategy (line 556) | def test_max_width_max_height_resizing_and_pad_strategy(self): method test_longest_edge_shortest_edge_resizing_strategy (line 602) | def test_longest_edge_shortest_edge_resizing_strategy(self): FILE: mplsandbox_for_rl/transformers/tests/models/detr/test_modeling_detr.py class DetrModelTester (line 43) | class DetrModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 86) | def prepare_config_and_inputs(self): method get_config (line 107) | def get_config(self): method prepare_config_and_inputs_for_common (line 136) | def prepare_config_and_inputs_for_common(self): method create_and_check_detr_model (line 141) | def create_and_check_detr_model(self, config, pixel_values, pixel_mask... method create_and_check_detr_object_detection_head_model (line 153) | def create_and_check_detr_object_detection_head_model(self, config, pi... class DetrModelTest (line 172) | class DetrModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method _prepare_for_class (line 199) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 225) | def setUp(self): method test_config (line 229) | def test_config(self): method test_detr_model (line 232) | def test_detr_model(self): method test_detr_object_detection_head_model (line 236) | def test_detr_object_detection_head_model(self): method test_multi_gpu_data_parallel_forward (line 242) | def test_multi_gpu_data_parallel_forward(self): method test_inputs_embeds (line 246) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 250) | def test_inputs_embeds_matches_input_ids(self): method test_model_get_set_embeddings (line 254) | def test_model_get_set_embeddings(self): method test_generate_without_input_ids (line 258) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 262) | def test_resize_tokens_embeddings(self): method test_model_outputs_equivalence (line 267) | def test_model_outputs_equivalence(self): method test_attention_outputs (line 270) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 372) | def test_retain_grad_hidden_states_attentions(self): method test_forward_auxiliary_loss (line 408) | def test_forward_auxiliary_loss(self): method test_forward_signature (line 424) | def test_forward_signature(self): method test_different_timm_backbone (line 445) | def test_different_timm_backbone(self): method test_hf_backbone (line 479) | def test_hf_backbone(self): method test_greyscale_images (line 514) | def test_greyscale_images(self): method test_initialization (line 535) | def test_initialization(self): function prepare_img (line 563) | def prepare_img(): class DetrModelIntegrationTestsTimmBackbone (line 571) | class DetrModelIntegrationTestsTimmBackbone(unittest.TestCase): method default_image_processor (line 573) | def default_image_processor(self): method test_inference_no_head (line 576) | def test_inference_no_head(self): method test_inference_object_detection_head (line 593) | def test_inference_object_detection_head(self): method test_inference_panoptic_segmentation_head (line 633) | def test_inference_panoptic_segmentation_head(self): class DetrModelIntegrationTests (line 692) | class DetrModelIntegrationTests(unittest.TestCase): method default_image_processor (line 694) | def default_image_processor(self): method test_inference_no_head (line 701) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/dinat/test_modeling_dinat.py class DinatModelTester (line 42) | class DinatModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 97) | def prepare_config_and_inputs(self): method get_config (line 108) | def get_config(self): method create_and_check_model (line 132) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 145) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_backbone (line 162) | def create_and_check_backbone(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 189) | def prepare_config_and_inputs_for_common(self): class DinatModelTest (line 198) | class DinatModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 220) | def setUp(self): method test_config (line 226) | def test_config(self): method test_model (line 229) | def test_model(self): method test_for_image_classification (line 233) | def test_for_image_classification(self): method test_backbone (line 237) | def test_backbone(self): method test_inputs_embeds (line 242) | def test_inputs_embeds(self): method test_feed_forward_chunking (line 246) | def test_feed_forward_chunking(self): method test_model_get_set_embeddings (line 249) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 258) | def test_attention_outputs(self): method check_hidden_states_output (line 261) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 304) | def test_hidden_states_output(self): method test_model_from_pretrained (line 324) | def test_model_from_pretrained(self): method test_initialization (line 329) | def test_initialization(self): class DinatModelIntegrationTest (line 347) | class DinatModelIntegrationTest(unittest.TestCase): method default_image_processor (line 349) | def default_image_processor(self): method test_inference_image_classification_head (line 353) | def test_inference_image_classification_head(self): class DinatBackboneTest (line 373) | class DinatBackboneTest(unittest.TestCase, BackboneTesterMixin): method setUp (line 377) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/dinov2/test_modeling_dinov2.py class Dinov2ModelTester (line 48) | class Dinov2ModelTester: method __init__ (line 49) | def __init__( method prepare_config_and_inputs (line 91) | def prepare_config_and_inputs(self): method get_config (line 102) | def get_config(self): method create_and_check_model (line 118) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_backbone (line 125) | def create_and_check_backbone(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 172) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 190) | def prepare_config_and_inputs_for_common(self): class Dinov2ModelTest (line 202) | class Dinov2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 228) | def setUp(self): method test_initialization (line 233) | def test_initialization(self): method test_config (line 236) | def test_config(self): method test_inputs_embeds (line 240) | def test_inputs_embeds(self): method test_training_gradient_checkpointing (line 246) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 252) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 258) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_get_set_embeddings (line 261) | def test_model_get_set_embeddings(self): method test_model (line 270) | def test_model(self): method test_backbone (line 274) | def test_backbone(self): method test_for_image_classification (line 278) | def test_for_image_classification(self): method test_feed_forward_chunking (line 283) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 287) | def test_model_from_pretrained(self): function prepare_img (line 294) | def prepare_img(): class Dinov2ModelIntegrationTest (line 301) | class Dinov2ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 303) | def default_image_processor(self): method test_inference_no_head (line 307) | def test_inference_no_head(self): class Dinov2BackboneTest (line 330) | class Dinov2BackboneTest(unittest.TestCase, BackboneTesterMixin): method setUp (line 336) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/dinov2/test_modeling_flax_dinov2.py class FlaxDinov2ModelTester (line 41) | class FlaxDinov2ModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 82) | def prepare_config_and_inputs(self): method create_and_check_model (line 103) | def create_and_check_model(self, config, pixel_values): method create_and_check_for_image_classification (line 113) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 127) | def prepare_config_and_inputs_for_common(self): class FlaxDionv2ModelTest (line 139) | class FlaxDionv2ModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 142) | def setUp(self) -> None: method test_config (line 146) | def test_config(self): method test_model (line 149) | def test_model(self): method test_for_image_classification (line 153) | def test_for_image_classification(self): method test_forward_signature (line 158) | def test_forward_signature(self): method test_jit_compilation (line 171) | def test_jit_compilation(self): method test_model_from_pretrained (line 195) | def test_model_from_pretrained(self): function prepare_img (line 203) | def prepare_img(): class FlaxDinov2ModelIntegrationTest (line 210) | class FlaxDinov2ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 212) | def default_image_processor(self): method test_inference_no_head (line 216) | def test_inference_no_head(self): method test_inference_image_classification_head_imagenet_1k (line 241) | def test_inference_image_classification_head_imagenet_1k(self): FILE: mplsandbox_for_rl/transformers/tests/models/distilbert/test_modeling_distilbert.py class DistilBertModelTester (line 43) | class DistilBertModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method get_config (line 111) | def get_config(self): method create_and_check_distilbert_model (line 125) | def create_and_check_distilbert_model( method create_and_check_distilbert_for_masked_lm (line 135) | def create_and_check_distilbert_for_masked_lm( method create_and_check_distilbert_for_question_answering (line 144) | def create_and_check_distilbert_for_question_answering( method create_and_check_distilbert_for_sequence_classification (line 156) | def create_and_check_distilbert_for_sequence_classification( method create_and_check_distilbert_for_token_classification (line 166) | def create_and_check_distilbert_for_token_classification( method create_and_check_distilbert_for_multiple_choice (line 177) | def create_and_check_distilbert_for_multiple_choice( method prepare_config_and_inputs_for_common (line 193) | def prepare_config_and_inputs_for_common(self): class DistilBertModelTest (line 201) | class DistilBertModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 231) | def setUp(self): method test_config (line 235) | def test_config(self): method test_distilbert_model (line 238) | def test_distilbert_model(self): method test_distilbert_model_with_sinusoidal_encodings (line 242) | def test_distilbert_model_with_sinusoidal_encodings(self): method test_for_masked_lm (line 251) | def test_for_masked_lm(self): method test_for_question_answering (line 255) | def test_for_question_answering(self): method test_for_sequence_classification (line 259) | def test_for_sequence_classification(self): method test_for_token_classification (line 263) | def test_for_token_classification(self): method test_for_multiple_choice (line 267) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 272) | def test_model_from_pretrained(self): method test_torchscript_device_change (line 279) | def test_torchscript_device_change(self): method test_flash_attn_2_inference_equivalence (line 304) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 356) | def test_flash_attn_2_inference_equivalence_right_padding(self): class DistilBertModelIntergrationTest (line 408) | class DistilBertModelIntergrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 410) | def test_inference_no_head_absolute_embedding(self): FILE: mplsandbox_for_rl/transformers/tests/models/distilbert/test_modeling_flax_distilbert.py class FlaxDistilBertModelTester (line 38) | class FlaxDistilBertModelTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 83) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 106) | def prepare_config_and_inputs_for_common(self): class FlaxDistilBertModelTest (line 114) | class FlaxDistilBertModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 129) | def setUp(self): method test_model_from_pretrained (line 133) | def test_model_from_pretrained(self): class FlaxDistilBertModelIntegrationTest (line 141) | class FlaxDistilBertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 143) | def test_inference_no_head_absolute_embedding(self): FILE: mplsandbox_for_rl/transformers/tests/models/distilbert/test_modeling_tf_distilbert.py class TFDistilBertModelTester (line 42) | class TFDistilBertModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 70) | def prepare_config_and_inputs(self): method create_and_check_distilbert_model (line 100) | def create_and_check_distilbert_model( method create_and_check_distilbert_for_masked_lm (line 114) | def create_and_check_distilbert_for_masked_lm( method create_and_check_distilbert_for_question_answering (line 122) | def create_and_check_distilbert_for_question_answering( method create_and_check_distilbert_for_sequence_classification (line 134) | def create_and_check_distilbert_for_sequence_classification( method create_and_check_distilbert_for_multiple_choice (line 143) | def create_and_check_distilbert_for_multiple_choice( method create_and_check_distilbert_for_token_classification (line 157) | def create_and_check_distilbert_for_token_classification( method prepare_config_and_inputs_for_common (line 166) | def prepare_config_and_inputs_for_common(self): class TFDistilBertModelTest (line 174) | class TFDistilBertModelTest(TFModelTesterMixin, PipelineTesterMixin, uni... method setUp (line 202) | def setUp(self): method test_config (line 206) | def test_config(self): method test_distilbert_model (line 209) | def test_distilbert_model(self): method test_for_masked_lm (line 213) | def test_for_masked_lm(self): method test_for_question_answering (line 217) | def test_for_question_answering(self): method test_for_sequence_classification (line 221) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 225) | def test_for_multiple_choice(self): method test_for_token_classification (line 229) | def test_for_token_classification(self): method test_model_from_pretrained (line 234) | def test_model_from_pretrained(self): class TFDistilBertModelIntegrationTest (line 241) | class TFDistilBertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 243) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/distilbert/test_tokenization_distilbert.py class DistilBertTokenizationTest (line 24) | class DistilBertTokenizationTest(BertTokenizationTest): method test_sequence_builders (line 31) | def test_sequence_builders(self): FILE: mplsandbox_for_rl/transformers/tests/models/dit/test_modeling_dit.py class DiTIntegrationTest (line 33) | class DiTIntegrationTest(unittest.TestCase): method test_for_image_classification (line 35) | def test_for_image_classification(self): FILE: mplsandbox_for_rl/transformers/tests/models/donut/test_image_processing_donut.py class DonutImageProcessingTester (line 36) | class DonutImageProcessingTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_image_processor_dict (line 70) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 82) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 85) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class DonutImageProcessingTest (line 99) | class DonutImageProcessingTest(ImageProcessingTestMixin, unittest.TestCa... method setUp (line 102) | def setUp(self): method image_processor_dict (line 107) | def image_processor_dict(self): method test_image_processor_properties (line 110) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 121) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pil (line 133) | def test_call_pil(self): method test_call_numpy (line 166) | def test_call_numpy(self): method test_call_pytorch (line 199) | def test_call_pytorch(self): FILE: mplsandbox_for_rl/transformers/tests/models/donut/test_modeling_donut_swin.py class DonutSwinModelTester (line 36) | class DonutSwinModelTester: method __init__ (line 37) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 100) | def get_config(self): method create_and_check_model (line 122) | def create_and_check_model(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 133) | def prepare_config_and_inputs_for_common(self): class DonutSwinModelTest (line 145) | class DonutSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest... method setUp (line 154) | def setUp(self): method test_config (line 164) | def test_config(self): method test_model (line 167) | def test_model(self): method test_inputs_embeds (line 172) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 175) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 184) | def test_attention_outputs(self): method check_hidden_states_output (line 244) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 285) | def test_hidden_states_output(self): method test_hidden_states_output_with_padding (line 304) | def test_hidden_states_output_with_padding(self): method test_model_from_pretrained (line 332) | def test_model_from_pretrained(self): method test_initialization (line 337) | def test_initialization(self): FILE: mplsandbox_for_rl/transformers/tests/models/donut/test_processing_donut.py class DonutProcessorTest (line 22) | class DonutProcessorTest(unittest.TestCase): method setUp (line 25) | def setUp(self): method test_token2json (line 28) | def test_token2json(self): FILE: mplsandbox_for_rl/transformers/tests/models/dpr/test_modeling_dpr.py class DPRModelTester (line 34) | class DPRModelTester: method __init__ (line 35) | def __init__( method prepare_config_and_inputs (line 85) | def prepare_config_and_inputs(self): method get_config (line 108) | def get_config(self): method create_and_check_context_encoder (line 124) | def create_and_check_context_encoder( method create_and_check_question_encoder (line 135) | def create_and_check_question_encoder( method create_and_check_reader (line 146) | def create_and_check_reader( method prepare_config_and_inputs_for_common (line 161) | def prepare_config_and_inputs_for_common(self): class DPRModelTest (line 177) | class DPRModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 194) | def setUp(self): method test_config (line 198) | def test_config(self): method test_context_encoder_model (line 201) | def test_context_encoder_model(self): method test_question_encoder_model (line 205) | def test_question_encoder_model(self): method test_reader_model (line 209) | def test_reader_model(self): method test_init_changed_config (line 213) | def test_init_changed_config(self): method test_model_from_pretrained (line 227) | def test_model_from_pretrained(self): class DPRModelIntegrationTest (line 246) | class DPRModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 248) | def test_inference_no_head(self): method test_reader_inference (line 278) | def test_reader_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/dpr/test_modeling_tf_dpr.py class TFDPRModelTester (line 41) | class TFDPRModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method create_and_check_dpr_context_encoder (line 130) | def create_and_check_dpr_context_encoder( method create_and_check_dpr_question_encoder (line 139) | def create_and_check_dpr_question_encoder( method create_and_check_dpr_reader (line 148) | def create_and_check_dpr_reader( method prepare_config_and_inputs_for_common (line 158) | def prepare_config_and_inputs_for_common(self): class TFDPRModelTest (line 174) | class TFDPRModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 192) | def setUp(self): method test_config (line 196) | def test_config(self): method test_dpr_context_encoder_model (line 199) | def test_dpr_context_encoder_model(self): method test_dpr_question_encoder_model (line 203) | def test_dpr_question_encoder_model(self): method test_dpr_reader_model (line 207) | def test_dpr_reader_model(self): method test_model_from_pretrained (line 212) | def test_model_from_pretrained(self): class TFDPRModelIntegrationTest (line 231) | class TFDPRModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 233) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/dpr/test_tokenization_dpr.py class DPRContextEncoderTokenizationTest (line 32) | class DPRContextEncoderTokenizationTest(BertTokenizationTest): class DPRQuestionEncoderTokenizationTest (line 40) | class DPRQuestionEncoderTokenizationTest(BertTokenizationTest): class DPRReaderTokenizationTest (line 48) | class DPRReaderTokenizationTest(BertTokenizationTest): method test_decode_best_spans (line 55) | def test_decode_best_spans(self): method test_call (line 78) | def test_call(self): FILE: mplsandbox_for_rl/transformers/tests/models/dpt/test_image_processing_dpt.py class DPTImageProcessingTester (line 31) | class DPTImageProcessingTester(unittest.TestCase): method __init__ (line 32) | def __init__( method prepare_image_processor_dict (line 60) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 69) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 72) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class DPTImageProcessingTest (line 86) | class DPTImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 89) | def setUp(self): method image_processor_dict (line 94) | def image_processor_dict(self): method test_image_processor_properties (line 97) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 109) | def test_image_processor_from_dict_with_kwargs(self): method test_padding (line 116) | def test_padding(self): method test_keep_aspect_ratio (line 132) | def test_keep_aspect_ratio(self): FILE: mplsandbox_for_rl/transformers/tests/models/dpt/test_modeling_dpt.py class DPTModelTester (line 42) | class DPTModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 90) | def prepare_config_and_inputs(self): method get_config (line 101) | def get_config(self): method create_and_check_model (line 121) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_depth_estimation (line 128) | def create_and_check_for_depth_estimation(self, config, pixel_values, ... method create_and_check_for_semantic_segmentation (line 136) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 146) | def prepare_config_and_inputs_for_common(self): class DPTModelTest (line 154) | class DPTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 175) | def setUp(self): method test_config (line 179) | def test_config(self): method test_inputs_embeds (line 183) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 186) | def test_model_get_set_embeddings(self): method test_model (line 195) | def test_model(self): method test_for_depth_estimation (line 199) | def test_for_depth_estimation(self): method test_for_semantic_segmentation (line 203) | def test_for_semantic_segmentation(self): method test_training (line 207) | def test_training(self): method test_training_gradient_checkpointing (line 225) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 247) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 253) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_initialization (line 256) | def test_initialization(self): method test_backbone_selection (line 279) | def test_backbone_selection(self): method test_model_from_pretrained (line 308) | def test_model_from_pretrained(self): function prepare_img (line 315) | def prepare_img(): class DPTModelIntegrationTest (line 323) | class DPTModelIntegrationTest(unittest.TestCase): method test_inference_depth_estimation (line 324) | def test_inference_depth_estimation(self): method test_inference_semantic_segmentation (line 346) | def test_inference_semantic_segmentation(self): method test_post_processing_semantic_segmentation (line 367) | def test_post_processing_semantic_segmentation(self): FILE: mplsandbox_for_rl/transformers/tests/models/dpt/test_modeling_dpt_auto_backbone.py class DPTModelTester (line 41) | class DPTModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 82) | def prepare_config_and_inputs(self): method get_config (line 93) | def get_config(self): method get_backbone_config (line 101) | def get_backbone_config(self): method create_and_check_for_depth_estimation (line 115) | def create_and_check_for_depth_estimation(self, config, pixel_values, ... method prepare_config_and_inputs_for_common (line 123) | def prepare_config_and_inputs_for_common(self): class DPTModelTest (line 131) | class DPTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 144) | def setUp(self): method test_config (line 148) | def test_config(self): method test_inputs_embeds (line 152) | def test_inputs_embeds(self): method test_for_depth_estimation (line 155) | def test_for_depth_estimation(self): method test_training (line 159) | def test_training(self): method test_training_gradient_checkpointing (line 177) | def test_training_gradient_checkpointing(self): method test_initialization (line 196) | def test_initialization(self): method test_model_get_set_embeddings (line 220) | def test_model_get_set_embeddings(self): method test_save_load_fast_init_from_base (line 224) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 228) | def test_save_load_fast_init_to_base(self): method test_training_gradient_checkpointing_use_reentrant (line 234) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 240) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_from_pretrained (line 244) | def test_model_from_pretrained(self): function prepare_img (line 251) | def prepare_img(): class DPTModelIntegrationTest (line 259) | class DPTModelIntegrationTest(unittest.TestCase): method test_inference_depth_estimation_dinov2 (line 260) | def test_inference_depth_estimation_dinov2(self): method test_inference_depth_estimation_beit (line 282) | def test_inference_depth_estimation_beit(self): method test_inference_depth_estimation_swinv2 (line 304) | def test_inference_depth_estimation_swinv2(self): FILE: mplsandbox_for_rl/transformers/tests/models/dpt/test_modeling_dpt_hybrid.py class DPTModelTester (line 42) | class DPTModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method get_config (line 103) | def get_config(self): method create_and_check_model (line 136) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_depth_estimation (line 143) | def create_and_check_for_depth_estimation(self, config, pixel_values, ... method create_and_check_for_semantic_segmentation (line 151) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 161) | def prepare_config_and_inputs_for_common(self): class DPTModelTest (line 169) | class DPTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 190) | def setUp(self): method test_config (line 194) | def test_config(self): method test_inputs_embeds (line 198) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 201) | def test_model_get_set_embeddings(self): method test_model (line 210) | def test_model(self): method test_for_depth_estimation (line 214) | def test_for_depth_estimation(self): method test_for_semantic_segmentation (line 218) | def test_for_semantic_segmentation(self): method test_training (line 222) | def test_training(self): method test_training_gradient_checkpointing (line 240) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 262) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 268) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_initialization (line 271) | def test_initialization(self): method test_model_from_pretrained (line 295) | def test_model_from_pretrained(self): method test_raise_readout_type (line 300) | def test_raise_readout_type(self): method test_batching_equivalence (line 308) | def test_batching_equivalence(self): function prepare_img (line 313) | def prepare_img(): class DPTModelIntegrationTest (line 321) | class DPTModelIntegrationTest(unittest.TestCase): method test_inference_depth_estimation (line 322) | def test_inference_depth_estimation(self): FILE: mplsandbox_for_rl/transformers/tests/models/efficientnet/test_image_processing_efficientnet.py class EfficientNetImageProcessorTester (line 31) | class EfficientNetImageProcessorTester(unittest.TestCase): method __init__ (line 32) | def __init__( method prepare_image_processor_dict (line 60) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 69) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 72) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class EfficientNetImageProcessorTest (line 86) | class EfficientNetImageProcessorTest(ImageProcessingTestMixin, unittest.... method setUp (line 89) | def setUp(self): method image_processor_dict (line 94) | def image_processor_dict(self): method test_image_processor_properties (line 97) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 105) | def test_image_processor_from_dict_with_kwargs(self): method test_rescale (line 112) | def test_rescale(self): FILE: mplsandbox_for_rl/transformers/tests/models/efficientnet/test_modeling_efficientnet.py class EfficientNetModelTester (line 40) | class EfficientNetModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 74) | def prepare_config_and_inputs(self): method get_config (line 84) | def get_config(self): method create_and_check_model (line 97) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 108) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 115) | def prepare_config_and_inputs_for_common(self): class EfficientNetModelTest (line 123) | class EfficientNetModelTest(ModelTesterMixin, PipelineTesterMixin, unitt... method setUp (line 142) | def setUp(self): method test_config (line 152) | def test_config(self): method test_inputs_embeds (line 156) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 160) | def test_model_get_set_embeddings(self): method test_feed_forward_chunking (line 164) | def test_feed_forward_chunking(self): method test_model (line 167) | def test_model(self): method test_hidden_states_output (line 171) | def test_hidden_states_output(self): method test_for_image_classification (line 202) | def test_for_image_classification(self): method test_model_from_pretrained (line 207) | def test_model_from_pretrained(self): method test_pipeline_image_feature_extraction (line 215) | def test_pipeline_image_feature_extraction(self): method test_pipeline_image_feature_extraction_fp16 (line 221) | def test_pipeline_image_feature_extraction_fp16(self): method test_pipeline_image_classification (line 227) | def test_pipeline_image_classification(self): function prepare_img (line 232) | def prepare_img(): class EfficientNetModelIntegrationTest (line 239) | class EfficientNetModelIntegrationTest(unittest.TestCase): method default_image_processor (line 241) | def default_image_processor(self): method test_inference_image_classification_head (line 245) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/electra/test_modeling_electra.py class ElectraModelTester (line 44) | class ElectraModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 126) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 142) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_electra_model (line 170) | def create_and_check_electra_model( method create_and_check_electra_model_as_decoder (line 189) | def create_and_check_electra_model_as_decoder( method create_and_check_electra_for_masked_lm (line 221) | def create_and_check_electra_for_masked_lm( method create_and_check_electra_for_causal_lm (line 238) | def create_and_check_electra_for_causal_lm( method create_and_check_electra_for_token_classification (line 256) | def create_and_check_electra_for_token_classification( method create_and_check_electra_for_pretraining (line 274) | def create_and_check_electra_for_pretraining( method create_and_check_electra_for_sequence_classification (line 292) | def create_and_check_electra_for_sequence_classification( method create_and_check_electra_for_question_answering (line 310) | def create_and_check_electra_for_question_answering( method create_and_check_electra_for_multiple_choice (line 334) | def create_and_check_electra_for_multiple_choice( method prepare_config_and_inputs_for_common (line 360) | def prepare_config_and_inputs_for_common(self): class ElectraModelTest (line 377) | class ElectraModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method _prepare_for_class (line 408) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 418) | def setUp(self): method test_config (line 422) | def test_config(self): method test_electra_model (line 425) | def test_electra_model(self): method test_electra_model_as_decoder (line 429) | def test_electra_model_as_decoder(self): method test_electra_model_various_embeddings (line 433) | def test_electra_model_various_embeddings(self): method test_for_masked_lm (line 439) | def test_for_masked_lm(self): method test_for_token_classification (line 443) | def test_for_token_classification(self): method test_for_pre_training (line 447) | def test_for_pre_training(self): method test_for_sequence_classification (line 451) | def test_for_sequence_classification(self): method test_for_question_answering (line 455) | def test_for_question_answering(self): method test_for_multiple_choice (line 459) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 464) | def test_model_from_pretrained(self): method test_for_causal_lm (line 469) | def test_for_causal_lm(self): class ElectraModelIntegrationTest (line 475) | class ElectraModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 477) | def test_inference_no_head_absolute_embedding(self): FILE: mplsandbox_for_rl/transformers/tests/models/electra/test_modeling_flax_electra.py class FlaxElectraModelTester (line 24) | class FlaxElectraModelTester(unittest.TestCase): method __init__ (line 25) | def __init__( method prepare_config_and_inputs (line 71) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 99) | def prepare_config_and_inputs_for_common(self): class FlaxElectraModelTest (line 107) | class FlaxElectraModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 125) | def setUp(self): method test_model_from_pretrained (line 129) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/electra/test_modeling_tf_electra.py class TFElectraModelTester (line 43) | class TFElectraModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 72) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 107) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 134) | def create_and_check_model( method create_and_check_causal_lm_base_model (line 148) | def create_and_check_causal_lm_base_model( method create_and_check_model_as_decoder (line 164) | def create_and_check_model_as_decoder( method create_and_check_causal_lm_base_model_past (line 196) | def create_and_check_causal_lm_base_model_past( method create_and_check_causal_lm_base_model_past_with_attn_mask (line 239) | def create_and_check_causal_lm_base_model_past_with_attn_mask( method create_and_check_causal_lm_base_model_past_large_inputs (line 300) | def create_and_check_causal_lm_base_model_past_large_inputs( method create_and_check_decoder_model_past_large_inputs (line 352) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 418) | def create_and_check_for_masked_lm( method create_and_check_for_pretraining (line 426) | def create_and_check_for_pretraining( method create_and_check_for_sequence_classification (line 434) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 443) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 459) | def create_and_check_for_question_answering( method create_and_check_for_token_classification (line 468) | def create_and_check_for_token_classification( method prepare_config_and_inputs_for_common (line 477) | def prepare_config_and_inputs_for_common(self): class TFElectraModelTest (line 493) | class TFElectraModelTest(TFModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 522) | def setUp(self): method test_config (line 526) | def test_config(self): method test_model (line 529) | def test_model(self): method test_causal_lm_base_model (line 534) | def test_causal_lm_base_model(self): method test_model_as_decoder (line 542) | def test_model_as_decoder(self): method test_causal_lm_base_model_past (line 550) | def test_causal_lm_base_model_past(self): method test_causal_lm_base_model_past_with_attn_mask (line 555) | def test_causal_lm_base_model_past_with_attn_mask(self): method test_causal_lm_base_model_past_with_large_inputs (line 560) | def test_causal_lm_base_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs (line 565) | def test_decoder_model_past_with_large_inputs(self): method test_for_masked_lm (line 570) | def test_for_masked_lm(self): method test_for_pretraining (line 574) | def test_for_pretraining(self): method test_for_question_answering (line 578) | def test_for_question_answering(self): method test_for_sequence_classification (line 582) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 586) | def test_for_multiple_choice(self): method test_for_token_classification (line 590) | def test_for_token_classification(self): method test_model_from_pretrained (line 595) | def test_model_from_pretrained(self): class TFElectraModelIntegrationTest (line 603) | class TFElectraModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 605) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/electra/test_tokenization_electra.py class ElectraTokenizationTest (line 35) | class ElectraTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 43) | def setUp(self): method get_input_output_texts (line 67) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 72) | def test_full_tokenizer(self): method test_rust_and_python_full_tokenizers (line 79) | def test_rust_and_python_full_tokenizers(self): method test_chinese (line 120) | def test_chinese(self): method test_basic_tokenizer_lower (line 125) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 133) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 141) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 149) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 157) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 164) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 171) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 178) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_wordpiece_tokenizer (line 185) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 199) | def test_is_whitespace(self): method test_is_control (line 209) | def test_is_control(self): method test_is_punctuation (line 217) | def test_is_punctuation(self): method test_clean_text (line 226) | def test_clean_text(self): method test_sequence_builders (line 238) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 250) | def test_offsets_with_special_characters(self): method test_change_tokenize_chinese_chars (line 302) | def test_change_tokenize_chinese_chars(self): FILE: mplsandbox_for_rl/transformers/tests/models/encodec/test_feature_extraction_encodec.py function floats_list (line 38) | def floats_list(shape, scale=1.0, rng=None, name=None): class EnCodecFeatureExtractionTester (line 53) | class EnCodecFeatureExtractionTester(unittest.TestCase): method __init__ (line 54) | def __init__( method prepare_feat_extract_dict (line 75) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 83) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class EnCodecFeatureExtractionTest (line 103) | class EnCodecFeatureExtractionTest(SequenceFeatureExtractionTestMixin, u... method setUp (line 106) | def setUp(self): method test_call (line 109) | def test_call(self): method test_double_precision_pad (line 127) | def test_double_precision_pad(self): method _load_datasamples (line 138) | def _load_datasamples(self, num_samples): method test_integration (line 147) | def test_integration(self): method test_integration_stereo (line 164) | def test_integration_stereo(self): method test_truncation_and_padding (line 184) | def test_truncation_and_padding(self): FILE: mplsandbox_for_rl/transformers/tests/models/encodec/test_modeling_encodec.py function prepare_inputs_dict (line 45) | def prepare_inputs_dict( class EncodecModelTester (line 67) | class EncodecModelTester: method __init__ (line 68) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 101) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_model_class (line 105) | def prepare_config_and_inputs_for_model_class(self, model_class): method get_config (line 114) | def get_config(self): method create_and_check_model_forward (line 126) | def create_and_check_model_forward(self, config, inputs_dict): class EncodecModelTest (line 137) | class EncodecModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method _prepare_for_class (line 146) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 155) | def setUp(self): method test_config (line 161) | def test_config(self): method test_model_forward (line 164) | def test_model_forward(self): method test_forward_signature (line 168) | def test_forward_signature(self): method test_inputs_embeds (line 181) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 185) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 191) | def test_retain_grad_hidden_states_attentions(self): method test_torchscript_output_attentions (line 197) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 203) | def test_torchscript_output_hidden_state(self): method _create_and_check_torchscript (line 206) | def _create_and_check_torchscript(self, config, inputs_dict): method test_attention_outputs (line 299) | def test_attention_outputs(self): method test_feed_forward_chunking (line 302) | def test_feed_forward_chunking(self): method test_hidden_states_output (line 334) | def test_hidden_states_output(self): method test_save_load_low_cpu_mem_usage (line 338) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 342) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 346) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method test_determinism (line 349) | def test_determinism(self): method test_model_outputs_equivalence (line 375) | def test_model_outputs_equivalence(self): method test_initialization (line 412) | def test_initialization(self): method test_identity_shortcut (line 434) | def test_identity_shortcut(self): function normalize (line 440) | def normalize(arr): function compute_rmse (line 446) | def compute_rmse(arr1, arr2): class EncodecIntegrationTest (line 454) | class EncodecIntegrationTest(unittest.TestCase): method test_integration_24kHz (line 455) | def test_integration_24kHz(self): method test_integration_48kHz (line 509) | def test_integration_48kHz(self): method test_batch_48kHz (line 565) | def test_batch_48kHz(self): FILE: mplsandbox_for_rl/transformers/tests/models/encoder_decoder/test_modeling_encoder_decoder.py class EncoderDecoderMixin (line 56) | class EncoderDecoderMixin: method get_encoder_decoder_model (line 57) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 60) | def prepare_config_and_inputs(self): method get_pretrained_model (line 63) | def get_pretrained_model(self): method check_encoder_decoder_model_from_pretrained_configs (line 66) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 100) | def check_encoder_decoder_model( method check_encoder_decoder_model_from_pretrained_using_model_paths (line 161) | def check_encoder_decoder_model_from_pretrained_using_model_paths( method check_encoder_decoder_model_from_pretrained (line 203) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 234) | def check_save_and_load( method check_save_and_load_encoder_decoder_model (line 275) | def check_save_and_load_encoder_decoder_model( method check_encoder_decoder_model_labels (line 320) | def check_encoder_decoder_model_labels( method _check_output_with_attentions (line 354) | def _check_output_with_attentions( method check_encoder_decoder_model_output_attentions (line 388) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_output_attentions_from_config (line 417) | def check_encoder_decoder_model_output_attentions_from_config( method check_encoder_decoder_model_generate (line 467) | def check_encoder_decoder_model_generate(self, input_ids, config, deco... method create_and_check_encoder_decoder_shared_weights (line 486) | def create_and_check_encoder_decoder_shared_weights( method test_encoder_decoder_model (line 568) | def test_encoder_decoder_model(self): method test_encoder_decoder_model_from_pretrained_configs (line 572) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 576) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 580) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_encoder_decoder_model_from_pretrained_using_model_paths (line 584) | def test_encoder_decoder_model_from_pretrained_using_model_paths(self): method test_save_and_load_from_pretrained (line 588) | def test_save_and_load_from_pretrained(self): method test_save_and_load_from_encoder_decoder_pretrained (line 592) | def test_save_and_load_from_encoder_decoder_pretrained(self): method test_encoder_decoder_model_labels (line 596) | def test_encoder_decoder_model_labels(self): method test_encoder_decoder_model_output_attentions (line 600) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_output_attentions_from_config (line 604) | def test_encoder_decoder_model_output_attentions_from_config(self): method test_encoder_decoder_model_generate (line 608) | def test_encoder_decoder_model_generate(self): method test_encoder_decoder_model_shared_weights (line 612) | def test_encoder_decoder_model_shared_weights(self): method test_training_gradient_checkpointing (line 616) | def test_training_gradient_checkpointing(self): method test_real_model_save_load_from_pretrained (line 643) | def test_real_model_save_load_from_pretrained(self): class BertEncoderDecoderModelTest (line 675) | class BertEncoderDecoderModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model (line 676) | def get_pretrained_model(self): method get_encoder_decoder_model (line 681) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 686) | def prepare_config_and_inputs(self): method test_relative_position_embeds (line 728) | def test_relative_position_embeds(self): method test_bert2bert_summarization (line 747) | def test_bert2bert_summarization(self): method test_bert2bert_default_decoder_attention_mask (line 774) | def test_bert2bert_default_decoder_attention_mask(self): class BertGenerationEncoderDecoderModelTest (line 826) | class BertGenerationEncoderDecoderModelTest(EncoderDecoderMixin, unittes... method get_pretrained_model (line 827) | def get_pretrained_model(self): method get_encoder_decoder_model (line 832) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 837) | def prepare_config_and_inputs(self): method test_roberta2roberta_summarization (line 871) | def test_roberta2roberta_summarization(self): class RoBertaEncoderDecoderModelTest (line 896) | class RoBertaEncoderDecoderModelTest(EncoderDecoderMixin, unittest.TestC... method get_encoder_decoder_model (line 897) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 902) | def prepare_config_and_inputs(self): method get_pretrained_model (line 944) | def get_pretrained_model(self): class GPT2EncoderDecoderModelTest (line 951) | class GPT2EncoderDecoderModelTest(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 952) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 957) | def prepare_config_and_inputs(self): method get_pretrained_model (line 1003) | def get_pretrained_model(self): method test_encoder_decoder_model_shared_weights (line 1009) | def test_encoder_decoder_model_shared_weights(self): method test_bert2gpt2_summarization (line 1013) | def test_bert2gpt2_summarization(self): class ProphetNetEncoderDecoderModelTest (line 1032) | class ProphetNetEncoderDecoderModelTest(EncoderDecoderMixin, unittest.Te... method get_encoder_decoder_model (line 1033) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 1038) | def prepare_config_and_inputs(self): method get_pretrained_model (line 1078) | def get_pretrained_model(self): method test_encoder_decoder_model_shared_weights (line 1084) | def test_encoder_decoder_model_shared_weights(self): class BartEncoderDecoderModelTest (line 1089) | class BartEncoderDecoderModelTest(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 1090) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 1095) | def prepare_config_and_inputs(self): method get_pretrained_model (line 1135) | def get_pretrained_model(self): method test_encoder_decoder_model_shared_weights (line 1141) | def test_encoder_decoder_model_shared_weights(self): class EncoderDecoderModelTest (line 1146) | class EncoderDecoderModelTest(unittest.TestCase): method get_from_encoderdecoder_pretrained_model (line 1147) | def get_from_encoderdecoder_pretrained_model(self): method get_decoder_config (line 1152) | def get_decoder_config(self): method get_encoderdecoder_model (line 1158) | def get_encoderdecoder_model(self): method get_encoder_decoder_models (line 1161) | def get_encoder_decoder_models(self): method _check_configuration_tie (line 1168) | def _check_configuration_tie(self, model): method test_configuration_tie (line 1173) | def test_configuration_tie(self): FILE: mplsandbox_for_rl/transformers/tests/models/encoder_decoder/test_modeling_flax_encoder_decoder.py class FlaxEncoderDecoderMixin (line 53) | class FlaxEncoderDecoderMixin: method get_encoder_decoder_model (line 54) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 57) | def prepare_config_and_inputs(self): method get_pretrained_model (line 60) | def get_pretrained_model(self): method check_encoder_decoder_model_from_pretrained_configs (line 63) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model_from_pretrained (line 95) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 125) | def check_save_and_load( method check_encoder_decoder_model_from_encoder_decoder_pretrained (line 164) | def check_encoder_decoder_model_from_encoder_decoder_pretrained( method check_encoder_decoder_model_output_attentions (line 209) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 265) | def check_encoder_decoder_model_generate(self, input_ids, config, deco... method check_pt_flax_equivalence (line 294) | def check_pt_flax_equivalence(self, pt_model, fx_model, inputs_dict): method check_equivalence_pt_to_flax (line 335) | def check_equivalence_pt_to_flax(self, config, decoder_config, inputs_... method check_equivalence_flax_to_pt (line 346) | def check_equivalence_flax_to_pt(self, config, decoder_config, inputs_... method test_encoder_decoder_model_from_pretrained_configs (line 356) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 360) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 364) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 368) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_from_encoder_decoder_pretrained (line 372) | def test_encoder_decoder_model_from_encoder_decoder_pretrained(self): method test_encoder_decoder_model_output_attentions (line 376) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_generate (line 380) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 384) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_flax_equivalence (line 389) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 423) | def test_real_model_save_load_from_pretrained(self): class FlaxGPT2EncoderDecoderModelTest (line 453) | class FlaxGPT2EncoderDecoderModelTest(FlaxEncoderDecoderMixin, unittest.... method get_encoder_decoder_model (line 454) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 459) | def prepare_config_and_inputs(self): method get_pretrained_model (line 485) | def get_pretrained_model(self): method test_bert2gpt2_summarization (line 491) | def test_bert2gpt2_summarization(self): class FlaxBartEncoderDecoderModelTest (line 511) | class FlaxBartEncoderDecoderModelTest(FlaxEncoderDecoderMixin, unittest.... method get_encoder_decoder_model (line 512) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 517) | def prepare_config_and_inputs(self): method get_pretrained_model (line 543) | def get_pretrained_model(self): class FlaxBertEncoderDecoderModelTest (line 550) | class FlaxBertEncoderDecoderModelTest(FlaxEncoderDecoderMixin, unittest.... method get_encoder_decoder_model (line 551) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 556) | def prepare_config_and_inputs(self): method get_pretrained_model (line 582) | def get_pretrained_model(self): class FlaxEncoderDecoderModelTest (line 589) | class FlaxEncoderDecoderModelTest(unittest.TestCase): method get_from_encoderdecoder_pretrained_model (line 590) | def get_from_encoderdecoder_pretrained_model(self): method _check_configuration_tie (line 595) | def _check_configuration_tie(self, model): method test_configuration_tie (line 602) | def test_configuration_tie(self): FILE: mplsandbox_for_rl/transformers/tests/models/encoder_decoder/test_modeling_tf_encoder_decoder.py class TFEncoderDecoderMixin (line 64) | class TFEncoderDecoderMixin: method get_encoder_decoder_model (line 65) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 68) | def prepare_config_and_inputs(self): method get_pretrained_model (line 71) | def get_pretrained_model(self): method check_encoder_decoder_model_from_pretrained_configs (line 74) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 107) | def check_encoder_decoder_model( method check_encoder_decoder_model_from_pretrained (line 155) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 186) | def check_save_and_load( method check_encoder_decoder_model_labels (line 226) | def check_encoder_decoder_model_labels( method _check_output_with_attentions (line 260) | def _check_output_with_attentions( method check_encoder_decoder_model_output_attentions (line 294) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_output_attentions_from_config (line 322) | def check_encoder_decoder_model_output_attentions_from_config( method check_encoder_decoder_model_generate (line 371) | def check_encoder_decoder_model_generate(self, input_ids, config, deco... method check_pt_tf_outputs (line 389) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method prepare_pt_inputs_from_tf_inputs (line 476) | def prepare_pt_inputs_from_tf_inputs(self, tf_inputs_dict): method check_pt_tf_models (line 495) | def check_pt_tf_models(self, tf_model, pt_model, tf_inputs_dict): method check_pt_tf_equivalence (line 522) | def check_pt_tf_equivalence(self, tf_model, pt_model, tf_inputs_dict): method check_pt_to_tf_equivalence (line 534) | def check_pt_to_tf_equivalence(self, config, decoder_config, tf_inputs... method check_tf_to_pt_equivalence (line 551) | def check_tf_to_pt_equivalence(self, config, decoder_config, tf_inputs... method test_encoder_decoder_model (line 571) | def test_encoder_decoder_model(self): method test_encoder_decoder_model_from_pretrained_configs (line 575) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 579) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 583) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 587) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_labels (line 591) | def test_encoder_decoder_model_labels(self): method test_encoder_decoder_model_output_attentions (line 595) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_output_attentions_from_config (line 599) | def test_encoder_decoder_model_output_attentions_from_config(self): method test_encoder_decoder_model_generate (line 603) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 607) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_tf_model_equivalence (line 612) | def test_pt_tf_model_equivalence(self): method test_model_save_load_from_pretrained (line 675) | def test_model_save_load_from_pretrained(self): class TFBertEncoderDecoderModelTest (line 705) | class TFBertEncoderDecoderModelTest(TFEncoderDecoderMixin, unittest.Test... method setUp (line 706) | def setUp(self): method get_pretrained_model (line 710) | def get_pretrained_model(self): method get_encoder_decoder_model (line 716) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 721) | def prepare_config_and_inputs(self): method test_bert2bert_summarization (line 766) | def test_bert2bert_summarization(self): class TFGPT2EncoderDecoderModelTest (line 804) | class TFGPT2EncoderDecoderModelTest(TFEncoderDecoderMixin, unittest.Test... method setUp (line 805) | def setUp(self): method get_pretrained_model (line 809) | def get_pretrained_model(self): method get_encoder_decoder_model (line 815) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 820) | def prepare_config_and_inputs(self): method test_bert2gpt2_summarization (line 866) | def test_bert2gpt2_summarization(self): class TFRoBertaEncoderDecoderModelTest (line 897) | class TFRoBertaEncoderDecoderModelTest(TFEncoderDecoderMixin, unittest.T... method setUp (line 898) | def setUp(self): method get_pretrained_model (line 902) | def get_pretrained_model(self): method get_encoder_decoder_model (line 908) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 913) | def prepare_config_and_inputs(self): class TFRembertEncoderDecoderModelTest (line 958) | class TFRembertEncoderDecoderModelTest(TFEncoderDecoderMixin, unittest.T... method setUp (line 959) | def setUp(self): method get_pretrained_model (line 963) | def get_pretrained_model(self): method get_encoder_decoder_model (line 969) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 974) | def prepare_config_and_inputs(self): class TFEncoderDecoderModelTest (line 1019) | class TFEncoderDecoderModelTest(unittest.TestCase): method get_from_encoderdecoder_pretrained_model (line 1020) | def get_from_encoderdecoder_pretrained_model(self): method get_decoder_config (line 1025) | def get_decoder_config(self): method get_encoderdecoder_model (line 1031) | def get_encoderdecoder_model(self): method get_encoder_decoder_models (line 1034) | def get_encoder_decoder_models(self): method _check_configuration_tie (line 1041) | def _check_configuration_tie(self, model): method test_configuration_tie (line 1046) | def test_configuration_tie(self): class TFEncoderDecoderModelSaveLoadTests (line 1060) | class TFEncoderDecoderModelSaveLoadTests(unittest.TestCase): method get_encoder_decoder_config (line 1061) | def get_encoder_decoder_config(self): method get_encoder_decoder_config_small (line 1068) | def get_encoder_decoder_config_small(self): method test_encoder_decoder_save_load_from_encoder_decoder (line 1075) | def test_encoder_decoder_save_load_from_encoder_decoder(self): method test_encoder_decoder_save_load_from_encoder_decoder_from_pt (line 1118) | def test_encoder_decoder_save_load_from_encoder_decoder_from_pt(self): method test_encoder_decoder_from_pretrained (line 1165) | def test_encoder_decoder_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/ernie/test_modeling_ernie.py class ErnieModelTester (line 46) | class ErnieModelTester: method __init__ (line 47) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method get_config (line 118) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 137) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 164) | def create_and_check_model( method create_and_check_model_as_decoder (line 176) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 209) | def create_and_check_for_causal_lm( method create_and_check_for_masked_lm (line 227) | def create_and_check_for_masked_lm( method create_and_check_model_for_causal_lm_as_decoder (line 236) | def create_and_check_model_for_causal_lm_as_decoder( method create_and_check_decoder_model_past_large_inputs (line 269) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_next_sequence_prediction (line 329) | def create_and_check_for_next_sequence_prediction( method create_and_check_for_pretraining (line 343) | def create_and_check_for_pretraining( method create_and_check_for_question_answering (line 359) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 375) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 385) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 395) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 413) | def prepare_config_and_inputs_for_common(self): class ErnieModelTest (line 429) | class ErnieModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe... method _prepare_for_class (line 462) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 475) | def setUp(self): method test_config (line 479) | def test_config(self): method test_model (line 482) | def test_model(self): method test_model_various_embeddings (line 486) | def test_model_various_embeddings(self): method test_model_as_decoder (line 492) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 496) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 524) | def test_for_causal_lm(self): method test_for_masked_lm (line 528) | def test_for_masked_lm(self): method test_for_causal_lm_decoder (line 532) | def test_for_causal_lm_decoder(self): method test_decoder_model_past_with_large_inputs (line 536) | def test_decoder_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs_relative_pos_emb (line 540) | def test_decoder_model_past_with_large_inputs_relative_pos_emb(self): method test_for_multiple_choice (line 545) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 549) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 553) | def test_for_pretraining(self): method test_for_question_answering (line 557) | def test_for_question_answering(self): method test_for_sequence_classification (line 561) | def test_for_sequence_classification(self): method test_for_token_classification (line 565) | def test_for_token_classification(self): method test_model_from_pretrained (line 570) | def test_model_from_pretrained(self): method test_torchscript_device_change (line 577) | def test_torchscript_device_change(self): FILE: mplsandbox_for_rl/transformers/tests/models/esm/test_modeling_esm.py class EsmModelTester (line 38) | class EsmModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 87) | def prepare_config_and_inputs(self): method get_config (line 106) | def get_config(self): method create_and_check_model (line 122) | def create_and_check_model(self, config, input_ids, input_mask, sequen... method create_and_check_for_masked_lm (line 133) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 142) | def create_and_check_for_token_classification( method create_and_check_forward_and_backwards (line 152) | def create_and_check_forward_and_backwards( method prepare_config_and_inputs_for_common (line 170) | def prepare_config_and_inputs_for_common(self): class EsmModelTest (line 185) | class EsmModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 213) | def setUp(self): method test_config (line 217) | def test_config(self): method test_model (line 220) | def test_model(self): method test_model_various_embeddings (line 224) | def test_model_various_embeddings(self): method test_for_masked_lm (line 230) | def test_for_masked_lm(self): method test_for_token_classification (line 234) | def test_for_token_classification(self): method test_esm_gradient_checkpointing (line 238) | def test_esm_gradient_checkpointing(self): method test_model_from_pretrained (line 243) | def test_model_from_pretrained(self): method test_create_position_ids_respects_padding_index (line 248) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 272) | def test_create_position_ids_from_inputs_embeds(self): method test_resize_embeddings_untied (line 294) | def test_resize_embeddings_untied(self): method test_resize_tokens_embeddings (line 298) | def test_resize_tokens_embeddings(self): class EsmModelIntegrationTest (line 304) | class EsmModelIntegrationTest(TestCasePlus): method test_inference_masked_lm (line 305) | def test_inference_masked_lm(self): method test_inference_no_head (line 322) | def test_inference_no_head(self): method test_inference_bitsandbytes (line 336) | def test_inference_bitsandbytes(self): FILE: mplsandbox_for_rl/transformers/tests/models/esm/test_modeling_esmfold.py class EsmFoldModelTester (line 33) | class EsmFoldModelTester: method __init__ (line 34) | def __init__( method prepare_config_and_inputs (line 82) | def prepare_config_and_inputs(self): method get_config (line 101) | def get_config(self): method create_and_check_model (line 142) | def create_and_check_model(self, config, input_ids, input_mask, sequen... method prepare_config_and_inputs_for_common (line 153) | def prepare_config_and_inputs_for_common(self): class EsmFoldModelTest (line 168) | class EsmFoldModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 176) | def setUp(self): method test_config (line 180) | def test_config(self): method test_model (line 183) | def test_model(self): method test_attention_outputs (line 188) | def test_attention_outputs(self): method test_correct_missing_keys (line 192) | def test_correct_missing_keys(self): method test_resize_embeddings_untied (line 196) | def test_resize_embeddings_untied(self): method test_resize_tokens_embeddings (line 200) | def test_resize_tokens_embeddings(self): method test_inputs_embeds (line 204) | def test_inputs_embeds(self): method test_head_pruning (line 208) | def test_head_pruning(self): method test_head_pruning_integration (line 212) | def test_head_pruning_integration(self): method test_head_pruning_save_load_from_config_init (line 216) | def test_head_pruning_save_load_from_config_init(self): method test_head_pruning_save_load_from_pretrained (line 220) | def test_head_pruning_save_load_from_pretrained(self): method test_headmasking (line 224) | def test_headmasking(self): method test_hidden_states_output (line 228) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 232) | def test_retain_grad_hidden_states_attentions(self): method test_model_outputs_equivalence (line 236) | def test_model_outputs_equivalence(self): method test_save_load_fast_init_from_base (line 240) | def test_save_load_fast_init_from_base(self): method test_feed_forward_chunking (line 244) | def test_feed_forward_chunking(self): method test_initialization (line 250) | def test_initialization(self): method test_torchscript_output_attentions (line 254) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 258) | def test_torchscript_output_hidden_state(self): method test_torchscript_simple (line 262) | def test_torchscript_simple(self): method test_multi_gpu_data_parallel_forward (line 266) | def test_multi_gpu_data_parallel_forward(self): class EsmModelIntegrationTest (line 271) | class EsmModelIntegrationTest(TestCasePlus): method test_inference_protein_folding (line 273) | def test_inference_protein_folding(self): FILE: mplsandbox_for_rl/transformers/tests/models/esm/test_modeling_tf_esm.py class TFEsmModelTester (line 43) | class TFEsmModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 70) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 102) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 127) | def create_and_check_model(self, config, input_ids, input_mask, sequen... method create_and_check_model_as_decoder (line 139) | def create_and_check_model_as_decoder( method create_and_check_for_masked_lm (line 169) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 176) | def create_and_check_for_token_classification( method prepare_config_and_inputs_for_common (line 185) | def prepare_config_and_inputs_for_common(self): class TFEsmModelTest (line 200) | class TFEsmModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 225) | def setUp(self): method test_config (line 229) | def test_config(self): method test_model (line 232) | def test_model(self): method test_model_as_decoder (line 237) | def test_model_as_decoder(self): method test_for_masked_lm (line 245) | def test_for_masked_lm(self): method test_for_token_classification (line 249) | def test_for_token_classification(self): method test_model_from_pretrained (line 254) | def test_model_from_pretrained(self): method test_resize_token_embeddings (line 260) | def test_resize_token_embeddings(self): method test_save_load_after_resize_token_embeddings (line 264) | def test_save_load_after_resize_token_embeddings(self): method test_model_common_attributes (line 267) | def test_model_common_attributes(self): class TFEsmModelIntegrationTest (line 287) | class TFEsmModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 289) | def test_inference_masked_lm(self): method test_inference_no_head (line 309) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/esm/test_tokenization_esm.py class ESMTokenizationTest (line 29) | class ESMTokenizationTest(unittest.TestCase): method setUp (line 32) | def setUp(self): method get_tokenizers (line 40) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_tokenizer (line 43) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method test_tokenizer_single_example (line 46) | def test_tokenizer_single_example(self): method test_tokenizer_encode_single (line 53) | def test_tokenizer_encode_single(self): method test_tokenizer_call_no_pad (line 59) | def test_tokenizer_call_no_pad(self): method test_tokenizer_call_pad (line 67) | def test_tokenizer_call_pad(self): method test_tokenize_special_tokens (line 75) | def test_tokenize_special_tokens(self): method test_add_tokens (line 91) | def test_add_tokens(self): FILE: mplsandbox_for_rl/transformers/tests/models/falcon/test_modeling_falcon.py class FalconModelTester (line 61) | class FalconModelTester: method __init__ (line 62) | def __init__( method prepare_config_and_inputs (line 110) | def prepare_config_and_inputs(self): method get_config (line 131) | def get_config(self): method create_and_check_model (line 149) | def create_and_check_model( method create_and_check_model_as_decoder (line 159) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 189) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 207) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 269) | def prepare_config_and_inputs_for_common(self): class FalconModelTest (line 285) | class FalconModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method is_pipeline_test_to_skip (line 314) | def is_pipeline_test_to_skip( method setUp (line 319) | def setUp(self): method test_config (line 323) | def test_config(self): method test_model (line 326) | def test_model(self): method test_position_embedding_types (line 330) | def test_position_embedding_types(self): method test_falcon_sequence_classification_model (line 336) | def test_falcon_sequence_classification_model(self): method test_falcon_sequence_classification_model_for_single_label (line 348) | def test_falcon_sequence_classification_model_for_single_label(self): method test_falcon_sequence_classification_model_for_multi_label (line 361) | def test_falcon_sequence_classification_model_for_multi_label(self): method test_past_key_values_format (line 376) | def test_past_key_values_format(self): method test_model_rope_scaling_from_config (line 423) | def test_model_rope_scaling_from_config(self, scaling_type): method test_model_rope_scaling (line 453) | def test_model_rope_scaling(self): method test_eager_matches_sdpa_generate (line 516) | def test_eager_matches_sdpa_generate(self): class FalconLanguageGenerationTest (line 586) | class FalconLanguageGenerationTest(unittest.TestCase): method test_lm_generate_falcon (line 588) | def test_lm_generate_falcon(self): method test_lm_generate_falcon_11b (line 606) | def test_lm_generate_falcon_11b(self): method test_lm_generation_big_models (line 624) | def test_lm_generation_big_models(self): method test_lm_generation_use_cache (line 641) | def test_lm_generation_use_cache(self): method test_batched_generation (line 663) | def test_batched_generation(self): method test_falcon_alibi_sdpa_matches_eager (line 690) | def test_falcon_alibi_sdpa_matches_eager(self): FILE: mplsandbox_for_rl/transformers/tests/models/falcon_mamba/test_modeling_falcon_mamba.py class FalconMambaModelTester (line 52) | class FalconMambaModelTester: method __init__ (line 53) | def __init__( method get_large_model_config (line 97) | def get_large_model_config(self): method prepare_config_and_inputs (line 100) | def prepare_config_and_inputs( method get_config (line 129) | def get_config( method get_pipeline_config (line 148) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 153) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_falcon_mamba_model (line 172) | def create_and_check_falcon_mamba_model(self, config, input_ids, *args): method create_and_check_causal_lm (line 183) | def create_and_check_causal_lm(self, config, input_ids, *args): method create_and_check_state_equivalency (line 192) | def create_and_check_state_equivalency(self, config, input_ids, *args): method create_and_check_falcon_mamba_cached_slow_forward_and_backwards (line 219) | def create_and_check_falcon_mamba_cached_slow_forward_and_backwards( method create_and_check_falcon_mamba_lm_head_forward_and_backwards (line 242) | def create_and_check_falcon_mamba_lm_head_forward_and_backwards( method prepare_config_and_inputs_for_common (line 255) | def prepare_config_and_inputs_for_common(self): class FalconMambaModelTest (line 273) | class FalconMambaModelTest(ModelTesterMixin, GenerationTesterMixin, Pipe... method setUp (line 289) | def setUp(self): method assertInterval (line 295) | def assertInterval(self, member, container, msg=None): method test_config (line 317) | def test_config(self): method test_multi_gpu_data_parallel_forward (line 321) | def test_multi_gpu_data_parallel_forward(self): method test_falcon_mamba_model (line 345) | def test_falcon_mamba_model(self): method test_falcon_mamba_lm_head_model (line 349) | def test_falcon_mamba_lm_head_model(self): method test_state_equivalency (line 353) | def test_state_equivalency(self): method test_falcon_mamba_cached_slow_forward_and_backwards (line 357) | def test_falcon_mamba_cached_slow_forward_and_backwards(self): method test_falcon_mamba_lm_head_forward_and_backwards (line 361) | def test_falcon_mamba_lm_head_forward_and_backwards(self): method test_initialization (line 365) | def test_initialization(self): method test_model_from_pretrained (line 390) | def test_model_from_pretrained(self): method test_model_outputs_equivalence (line 396) | def test_model_outputs_equivalence(self): class FalconMambaIntegrationTests (line 456) | class FalconMambaIntegrationTests(unittest.TestCase): method setUp (line 457) | def setUp(self): method test_generation_bf16 (line 462) | def test_generation_bf16(self): method test_generation_4bit (line 474) | def test_generation_4bit(self): method test_generation_torch_compile (line 486) | def test_generation_torch_compile(self): method test_batched_generation (line 498) | def test_batched_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/fastspeech2_conformer/test_modeling_fastspeech2_conformer.py class FastSpeech2ConformerModelTester (line 40) | class FastSpeech2ConformerModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 76) | def prepare_config_and_inputs(self): method get_config (line 81) | def get_config(self): method create_and_check_model (line 96) | def create_and_check_model(self, config, input_ids, *args): method prepare_config_and_inputs_for_common (line 114) | def prepare_config_and_inputs_for_common(self): class FastSpeech2ConformerModelTest (line 122) | class FastSpeech2ConformerModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 130) | def setUp(self): method test_config (line 134) | def test_config(self): method test_model (line 137) | def test_model(self): method test_initialization (line 141) | def test_initialization(self): method test_duration_energy_pitch_output (line 157) | def test_duration_energy_pitch_output(self): method test_hidden_states_output (line 176) | def test_hidden_states_output(self): method test_save_load_strict (line 210) | def test_save_load_strict(self): method test_forward_signature (line 219) | def test_forward_signature(self): method test_retain_grad_hidden_states_attentions (line 243) | def test_retain_grad_hidden_states_attentions(self): method test_attention_outputs (line 277) | def test_attention_outputs(self): method test_model_from_pretrained (line 338) | def test_model_from_pretrained(self): method test_inputs_embeds (line 343) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 347) | def test_model_get_set_embeddings(self): method test_batching_equivalence (line 354) | def test_batching_equivalence(self): class FastSpeech2ConformerModelIntegrationTest (line 361) | class FastSpeech2ConformerModelIntegrationTest(unittest.TestCase): method test_inference_integration (line 362) | def test_inference_integration(self): method test_training_integration (line 396) | def test_training_integration(self): class FastSpeech2ConformerWithHifiGanTester (line 455) | class FastSpeech2ConformerWithHifiGanTester: method __init__ (line 456) | def __init__( method prepare_config_and_inputs (line 493) | def prepare_config_and_inputs(self): method get_config (line 498) | def get_config(self): method create_and_check_model (line 519) | def create_and_check_model(self, config, input_ids, *args): method prepare_config_and_inputs_for_common (line 537) | def prepare_config_and_inputs_for_common(self): class FastSpeech2ConformerWithHifiGanTest (line 545) | class FastSpeech2ConformerWithHifiGanTest(ModelTesterMixin, unittest.Tes... method setUp (line 553) | def setUp(self): method test_model (line 556) | def test_model(self): method test_initialization (line 560) | def test_initialization(self): method _prepare_for_class (line 576) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_duration_energy_pitch_output (line 579) | def test_duration_energy_pitch_output(self): method test_hidden_states_output (line 598) | def test_hidden_states_output(self): method test_save_load_strict (line 632) | def test_save_load_strict(self): method test_forward_signature (line 641) | def test_forward_signature(self): method test_retain_grad_hidden_states_attentions (line 665) | def test_retain_grad_hidden_states_attentions(self): method test_attention_outputs (line 699) | def test_attention_outputs(self): method test_model_from_pretrained (line 760) | def test_model_from_pretrained(self): method test_inputs_embeds (line 765) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 769) | def test_model_get_set_embeddings(self): method test_batching_equivalence (line 776) | def test_batching_equivalence(self): class FastSpeech2ConformerWithHifiGanIntegrationTest (line 783) | class FastSpeech2ConformerWithHifiGanIntegrationTest(unittest.TestCase): method test_inference_integration (line 784) | def test_inference_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/fastspeech2_conformer/test_tokenization_fastspeech2_conformer.py class FastSpeech2ConformerTokenizerTest (line 26) | class FastSpeech2ConformerTokenizerTest(TokenizerTesterMixin, unittest.T... method setUp (line 31) | def setUp(self): method get_input_output_texts (line 36) | def get_input_output_texts(self, tokenizer): method get_clean_sequence (line 42) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, **kwa... method test_convert_token_and_id (line 47) | def test_convert_token_and_id(self): method test_get_vocab (line 55) | def test_get_vocab(self): method test_vocab_size (line 65) | def test_vocab_size(self): method test_added_token_are_matched_longest_first (line 71) | def test_added_token_are_matched_longest_first(self): method test_added_tokens_do_lower_case (line 77) | def test_added_tokens_do_lower_case(self): method test_tokenize_special_tokens (line 83) | def test_tokenize_special_tokens(self): method test_full_tokenizer (line 86) | def test_full_tokenizer(self): method test_tokenizer_integration (line 96) | def test_tokenizer_integration(self): method test_add_tokens_tokenizer (line 144) | def test_add_tokens_tokenizer(self): method test_add_special_tokens (line 150) | def test_add_special_tokens(self): method test_added_token_serializable (line 156) | def test_added_token_serializable(self): method test_save_and_load_tokenizer (line 162) | def test_save_and_load_tokenizer(self): method test_internal_consistency (line 166) | def test_internal_consistency(self): method test_encode_decode_with_spaces (line 170) | def test_encode_decode_with_spaces(self): method test_convert_tokens_to_string_format (line 174) | def test_convert_tokens_to_string_format(self): method test_maximum_encoding_length_pair_input (line 178) | def test_maximum_encoding_length_pair_input(self): method test_pretokenized_inputs (line 184) | def test_pretokenized_inputs(self): method test_maximum_encoding_length_single_input (line 190) | def test_maximum_encoding_length_single_input(self): FILE: mplsandbox_for_rl/transformers/tests/models/flaubert/test_modeling_flaubert.py class FlaubertModelTester (line 42) | class FlaubertModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 103) | def prepare_config_and_inputs(self): method get_config (line 140) | def get_config(self): method create_and_check_flaubert_model (line 160) | def create_and_check_flaubert_model( method create_and_check_flaubert_lm_head (line 180) | def create_and_check_flaubert_lm_head( method create_and_check_flaubert_simple_qa (line 200) | def create_and_check_flaubert_simple_qa( method create_and_check_flaubert_qa (line 222) | def create_and_check_flaubert_qa( method create_and_check_flaubert_sequence_classif (line 274) | def create_and_check_flaubert_sequence_classif( method create_and_check_flaubert_token_classif (line 296) | def create_and_check_flaubert_token_classif( method create_and_check_flaubert_multiple_choice (line 316) | def create_and_check_flaubert_multiple_choice( method prepare_config_and_inputs_for_common (line 343) | def prepare_config_and_inputs_for_common(self): class FlaubertModelTest (line 366) | class FlaubertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method is_pipeline_test_to_skip (line 394) | def is_pipeline_test_to_skip( method _prepare_for_class (line 410) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 424) | def setUp(self): method test_config (line 428) | def test_config(self): method test_flaubert_model (line 431) | def test_flaubert_model(self): method test_flaubert_model_with_sinusoidal_encodings (line 436) | def test_flaubert_model_with_sinusoidal_encodings(self): method test_flaubert_lm_head (line 443) | def test_flaubert_lm_head(self): method test_flaubert_simple_qa (line 447) | def test_flaubert_simple_qa(self): method test_flaubert_qa (line 451) | def test_flaubert_qa(self): method test_flaubert_sequence_classif (line 455) | def test_flaubert_sequence_classif(self): method test_flaubert_token_classif (line 459) | def test_flaubert_token_classif(self): method test_flaubert_multiple_choice (line 463) | def test_flaubert_multiple_choice(self): method test_model_from_pretrained (line 468) | def test_model_from_pretrained(self): method test_torchscript_device_change (line 475) | def test_torchscript_device_change(self): class FlaubertModelIntegrationTest (line 497) | class FlaubertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 499) | def test_inference_no_head_absolute_embedding(self): FILE: mplsandbox_for_rl/transformers/tests/models/flaubert/test_modeling_tf_flaubert.py class TFFlaubertModelTester (line 43) | class TFFlaubertModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 78) | def prepare_config_and_inputs(self): method create_and_check_flaubert_model (line 133) | def create_and_check_flaubert_model( method create_and_check_flaubert_lm_head (line 153) | def create_and_check_flaubert_lm_head( method create_and_check_flaubert_qa (line 172) | def create_and_check_flaubert_qa( method create_and_check_flaubert_sequence_classif (line 193) | def create_and_check_flaubert_sequence_classif( method create_and_check_flaubert_for_token_classification (line 213) | def create_and_check_flaubert_for_token_classification( method create_and_check_flaubert_for_multiple_choice (line 231) | def create_and_check_flaubert_for_multiple_choice( method prepare_config_and_inputs_for_common (line 256) | def prepare_config_and_inputs_for_common(self): class TFFlaubertModelTest (line 279) | class TFFlaubertModelTest(TFModelTesterMixin, PipelineTesterMixin, unitt... method is_pipeline_test_to_skip (line 311) | def is_pipeline_test_to_skip( method setUp (line 326) | def setUp(self): method test_config (line 330) | def test_config(self): method test_flaubert_model (line 333) | def test_flaubert_model(self): method test_flaubert_lm_head (line 337) | def test_flaubert_lm_head(self): method test_flaubert_qa (line 341) | def test_flaubert_qa(self): method test_flaubert_sequence_classif (line 345) | def test_flaubert_sequence_classif(self): method test_for_token_classification (line 349) | def test_for_token_classification(self): method test_for_multiple_choice (line 353) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 358) | def test_model_from_pretrained(self): class TFFlaubertModelIntegrationTest (line 367) | class TFFlaubertModelIntegrationTest(unittest.TestCase): method test_output_embeds_base_model (line 369) | def test_output_embeds_base_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/flaubert/test_tokenization_flaubert.py class FlaubertTokenizationTest (line 28) | class FlaubertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 33) | def setUp(self): method test_full_tokenizer (line 50) | def test_full_tokenizer(self): method test_sequence_builders (line 63) | def test_sequence_builders(self): FILE: mplsandbox_for_rl/transformers/tests/models/flava/test_image_processing_flava.py class FlavaImageProcessingTester (line 45) | class FlavaImageProcessingTester(unittest.TestCase): method __init__ (line 46) | def __init__( method prepare_image_processor_dict (line 118) | def prepare_image_processor_dict(self): method get_expected_image_size (line 147) | def get_expected_image_size(self): method get_expected_mask_size (line 150) | def get_expected_mask_size(self): method get_expected_codebook_image_size (line 157) | def get_expected_codebook_image_size(self): method prepare_image_inputs (line 160) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class FlavaImageProcessingTest (line 174) | class FlavaImageProcessingTest(ImageProcessingTestMixin, unittest.TestCa... method setUp (line 178) | def setUp(self): method image_processor_dict (line 183) | def image_processor_dict(self): method test_image_processor_properties (line 186) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 208) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pil (line 223) | def test_call_pil(self): method _test_call_framework (line 261) | def _test_call_framework(self, instance_class, prepare_kwargs): method test_call_numpy (line 339) | def test_call_numpy(self): method test_call_numpy_4_channels (line 342) | def test_call_numpy_4_channels(self): method test_call_pytorch (line 347) | def test_call_pytorch(self): method test_masking (line 350) | def test_masking(self): method test_codebook_pixels (line 360) | def test_codebook_pixels(self): FILE: mplsandbox_for_rl/transformers/tests/models/flava/test_modeling_flava.py class FlavaImageModelTester (line 71) | class FlavaImageModelTester: method __init__ (line 72) | def __init__( method prepare_config_and_inputs (line 110) | def prepare_config_and_inputs(self): method get_config (line 119) | def get_config(self): method create_and_check_model (line 138) | def create_and_check_model(self, config, pixel_values, bool_masked_pos): method prepare_config_and_inputs_for_common (line 151) | def prepare_config_and_inputs_for_common(self): class FlavaImageModelTest (line 159) | class FlavaImageModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 172) | def setUp(self): method test_config (line 176) | def test_config(self): method test_inputs_embeds (line 180) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 183) | def test_model_get_set_embeddings(self): method test_forward_signature (line 192) | def test_forward_signature(self): method test_model (line 204) | def test_model(self): method test_attention_outputs (line 208) | def test_attention_outputs(self): method test_hidden_states_output (line 264) | def test_hidden_states_output(self): method test_training (line 304) | def test_training(self): method test_training_gradient_checkpointing (line 308) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 314) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 320) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 324) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 330) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 334) | def test_model_from_pretrained(self): class FlavaTextModelTester (line 340) | class FlavaTextModelTester: method __init__ (line 341) | def __init__( method prepare_config_and_inputs (line 387) | def prepare_config_and_inputs(self): method get_config (line 410) | def get_config(self): method create_and_check_model (line 429) | def create_and_check_model(self, config, input_ids, token_type_ids, in... method prepare_config_and_inputs_for_common (line 439) | def prepare_config_and_inputs_for_common(self): class FlavaTextModelTest (line 447) | class FlavaTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 453) | def setUp(self): method test_config (line 457) | def test_config(self): method test_model (line 460) | def test_model(self): method test_training (line 465) | def test_training(self): method test_training_gradient_checkpointing (line 469) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 475) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 481) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 485) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 490) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 494) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 498) | def test_model_from_pretrained(self): class FlavaMultimodalModelTester (line 504) | class FlavaMultimodalModelTester: method __init__ (line 505) | def __init__( method prepare_config_and_inputs (line 541) | def prepare_config_and_inputs(self): method get_config (line 559) | def get_config(self): method create_and_check_model (line 575) | def create_and_check_model(self, config, hidden_states, input_mask): method prepare_config_and_inputs_for_common (line 585) | def prepare_config_and_inputs_for_common(self): class FlavaMultimodalModelTest (line 593) | class FlavaMultimodalModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 600) | def setUp(self): method test_config (line 606) | def test_config(self): method test_model (line 609) | def test_model(self): method test_forward_signature (line 613) | def test_forward_signature(self): method test_model_get_set_embeddings (line 626) | def test_model_get_set_embeddings(self): method test_training (line 630) | def test_training(self): method test_training_gradient_checkpointing (line 634) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 640) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 646) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 650) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 654) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 658) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 662) | def test_model_from_pretrained(self): class FlavaImageCodebookTester (line 668) | class FlavaImageCodebookTester: method __init__ (line 669) | def __init__( method prepare_config_and_inputs (line 687) | def prepare_config_and_inputs(self): method get_config (line 693) | def get_config(self): method create_and_check_model (line 698) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 708) | def prepare_config_and_inputs_for_common(self): class FlavaImageCodebookTest (line 716) | class FlavaImageCodebookTest(ModelTesterMixin, unittest.TestCase): method setUp (line 724) | def setUp(self): method test_model (line 728) | def test_model(self): method test_forward_signature (line 732) | def test_forward_signature(self): method test_attention_outputs (line 745) | def test_attention_outputs(self): method test_model_get_set_embeddings (line 749) | def test_model_get_set_embeddings(self): method test_training (line 753) | def test_training(self): method test_hidden_states_output (line 757) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 761) | def test_retain_grad_hidden_states_attentions(self): method test_training_gradient_checkpointing (line 765) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 771) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 777) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 781) | def test_inputs_embeds(self): method test_model_outputs_equivalence (line 785) | def test_model_outputs_equivalence(self): method test_save_load_fast_init_from_base (line 789) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 793) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 797) | def test_model_from_pretrained(self): class FlavaModelTester (line 803) | class FlavaModelTester: method __init__ (line 806) | def __init__( method test_config (line 841) | def test_config(self): method prepare_config_and_inputs_for_common (line 844) | def prepare_config_and_inputs_for_common(self): method get_config (line 858) | def get_config(self): method create_and_check_model (line 870) | def create_and_check_model(self, config, inputs): method _test_model (line 875) | def _test_model(self, config, inputs, test_image=False, test_text=False): class FlavaModelTest (line 923) | class FlavaModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 932) | def setUp(self): method test_model (line 935) | def test_model(self): method test_hidden_states_output (line 940) | def test_hidden_states_output(self): method test_inputs_embeds (line 944) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 948) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 952) | def test_model_get_set_embeddings(self): method test_initialization (line 956) | def test_initialization(self): method _create_and_check_torchscript (line 979) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_image_text_config (line 1060) | def test_load_image_text_config(self): method test_model_from_pretrained (line 1083) | def test_model_from_pretrained(self): class FlavaForPreTrainingTester (line 1089) | class FlavaForPreTrainingTester(FlavaModelTester): method prepare_config_and_inputs_for_common (line 1092) | def prepare_config_and_inputs_for_common(self): method _test_model (line 1121) | def _test_model(self, config, inputs, test_image=False, test_text=False): class FlavaForPreTrainingTest (line 1237) | class FlavaForPreTrainingTest(FlavaModelTest): method test_training_gradient_checkpointing (line 1245) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 1251) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 1257) | def test_training_gradient_checkpointing_use_reentrant_false(self): function prepare_img (line 1262) | def prepare_img(): class FlavaModelIntegrationTest (line 1270) | class FlavaModelIntegrationTest(unittest.TestCase): method test_inference (line 1272) | def test_inference(self): class FlavaForPreTrainingIntegrationTest (line 1298) | class FlavaForPreTrainingIntegrationTest(unittest.TestCase): method test_inference (line 1300) | def test_inference(self): method test_inference_with_itm_labels (line 1348) | def test_inference_with_itm_labels(self): FILE: mplsandbox_for_rl/transformers/tests/models/flava/test_processor_flava.py class FlavaProcessorTest (line 44) | class FlavaProcessorTest(unittest.TestCase): method setUp (line 45) | def setUp(self): method get_tokenizer (line 82) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 85) | def get_rust_tokenizer(self, **kwargs): method get_image_processor (line 88) | def get_image_processor(self, **kwargs): method tearDown (line 91) | def tearDown(self): method prepare_image_inputs (line 94) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 105) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 129) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 146) | def test_image_processor(self): method test_tokenizer (line 173) | def test_tokenizer(self): method test_processor (line 188) | def test_processor(self): method test_tokenizer_decode (line 220) | def test_tokenizer_decode(self): method test_model_input_names (line 233) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/fnet/test_modeling_fnet.py class FNetConfigTester (line 51) | class FNetConfigTester(ConfigTester): method create_and_test_config_common_properties (line 52) | def create_and_test_config_common_properties(self): class FNetModelTester (line 60) | class FNetModelTester: method __init__ (line 61) | def __init__( method prepare_config_and_inputs (line 103) | def prepare_config_and_inputs(self): method get_config (line 122) | def get_config(self): method create_and_check_fourier_transform (line 137) | def create_and_check_fourier_transform(self, config): method create_and_check_model (line 156) | def create_and_check_model(self, config, input_ids, token_type_ids, se... method create_and_check_for_pretraining (line 164) | def create_and_check_for_pretraining( method create_and_check_for_masked_lm (line 179) | def create_and_check_for_masked_lm( method create_and_check_for_next_sentence_prediction (line 188) | def create_and_check_for_next_sentence_prediction( method create_and_check_for_question_answering (line 201) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 216) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 226) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 236) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 252) | def prepare_config_and_inputs_for_common(self): class FNetModelTest (line 267) | class FNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method is_pipeline_test_to_skip (line 300) | def is_pipeline_test_to_skip( method _prepare_for_class (line 309) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_attention_outputs (line 324) | def test_attention_outputs(self): method test_training_gradient_checkpointing (line 330) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 336) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 342) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_outputs_equivalence (line 345) | def test_model_outputs_equivalence(self): method test_retain_grad_hidden_states_attentions (line 404) | def test_retain_grad_hidden_states_attentions(self): method setUp (line 428) | def setUp(self): method test_config (line 432) | def test_config(self): method test_model (line 435) | def test_model(self): method test_for_pretraining (line 439) | def test_for_pretraining(self): method test_for_masked_lm (line 443) | def test_for_masked_lm(self): method test_for_multiple_choice (line 447) | def test_for_multiple_choice(self): method test_for_question_answering (line 451) | def test_for_question_answering(self): method test_for_sequence_classification (line 455) | def test_for_sequence_classification(self): method test_for_token_classification (line 459) | def test_for_token_classification(self): method test_model_from_pretrained (line 464) | def test_model_from_pretrained(self): class FNetModelIntegrationTest (line 471) | class FNetModelIntegrationTest(unittest.TestCase): method test_inference_for_masked_lm (line 473) | def test_inference_for_masked_lm(self): method test_inference_long_sentence (line 550) | def test_inference_long_sentence(self): method test_inference_for_next_sentence_prediction (line 575) | def test_inference_for_next_sentence_prediction(self): method test_inference_model (line 591) | def test_inference_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/fnet/test_tokenization_fnet.py class FNetTokenizationTest (line 30) | class FNetTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 39) | def setUp(self): method get_input_output_texts (line 46) | def get_input_output_texts(self, tokenizer): method test_convert_token_and_id (line 51) | def test_convert_token_and_id(self): method test_get_vocab (line 59) | def test_get_vocab(self): method test_vocab_size (line 67) | def test_vocab_size(self): method test_rust_and_python_full_tokenizers (line 70) | def test_rust_and_python_full_tokenizers(self): method test_full_tokenizer (line 92) | def test_full_tokenizer(self): method test_sequence_builders (line 130) | def test_sequence_builders(self): method test_special_tokens_initialization (line 145) | def test_special_tokens_initialization(self): method test_special_tokens_initialization_from_slow (line 174) | def test_special_tokens_initialization_from_slow(self): method test_padding (line 194) | def test_padding(self, max_length=50): method test_save_pretrained (line 413) | def test_save_pretrained(self): method test_save_slow_from_fast_and_reload_fast (line 417) | def test_save_slow_from_fast_and_reload_fast(self): method assert_batch_padded_input_match (line 420) | def assert_batch_padded_input_match( method test_tokenizer_integration (line 444) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/focalnet/test_modeling_focalnet.py class FocalNetModelTester (line 47) | class FocalNetModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 106) | def prepare_config_and_inputs(self): method get_config (line 117) | def get_config(self): method create_and_check_model (line 142) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_backbone (line 153) | def create_and_check_backbone(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 182) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 201) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 219) | def prepare_config_and_inputs_for_common(self): class FocalNetModelTest (line 228) | class FocalNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 251) | def setUp(self): method test_config (line 261) | def test_config(self): method test_model (line 264) | def test_model(self): method test_backbone (line 268) | def test_backbone(self): method test_for_masked_image_modeling (line 272) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 276) | def test_for_image_classification(self): method test_inputs_embeds (line 281) | def test_inputs_embeds(self): method test_feed_forward_chunking (line 285) | def test_feed_forward_chunking(self): method test_model_get_set_embeddings (line 288) | def test_model_get_set_embeddings(self): method check_hidden_states_output (line 297) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 338) | def test_hidden_states_output(self): method test_hidden_states_output_with_padding (line 357) | def test_hidden_states_output_with_padding(self): method test_model_from_pretrained (line 385) | def test_model_from_pretrained(self): method test_initialization (line 390) | def test_initialization(self): class FocalNetModelIntegrationTest (line 407) | class FocalNetModelIntegrationTest(unittest.TestCase): method default_image_processor (line 409) | def default_image_processor(self): method test_inference_image_classification_head (line 414) | def test_inference_image_classification_head(self): class FocalNetBackboneTest (line 434) | class FocalNetBackboneTest(BackboneTesterMixin, unittest.TestCase): method setUp (line 440) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/fsmt/test_modeling_fsmt.py class FSMTModelTester (line 53) | class FSMTModelTester: method __init__ (line 54) | def __init__( method prepare_config_and_inputs (line 100) | def prepare_config_and_inputs(self): method get_config (line 110) | def get_config(self): method prepare_config_and_inputs_for_common (line 131) | def prepare_config_and_inputs_for_common(self): function prepare_fsmt_inputs_dict (line 139) | def prepare_fsmt_inputs_dict( class FSMTModelTest (line 164) | class FSMTModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method setUp (line 181) | def setUp(self): method test_config (line 193) | def test_config(self): method test_model_get_set_embeddings (line 197) | def test_model_get_set_embeddings(self): method test_initialization_more (line 207) | def test_initialization_more(self): method test_advanced_inputs (line 225) | def test_advanced_inputs(self): method test_save_load_missing_keys (line 255) | def test_save_load_missing_keys(self): method test_export_to_onnx (line 267) | def test_export_to_onnx(self): method test_ensure_weights_are_shared (line 280) | def test_ensure_weights_are_shared(self): method test_resize_tokens_embeddings (line 316) | def test_resize_tokens_embeddings(self): method test_inputs_embeds (line 320) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 324) | def test_inputs_embeds_matches_input_ids(self): method test_tie_model_weights (line 328) | def test_tie_model_weights(self): method test_resize_embeddings_untied (line 332) | def test_resize_embeddings_untied(self): class FSMTHeadTests (line 337) | class FSMTHeadTests(unittest.TestCase): method _get_config (line 342) | def _get_config(self): method _get_config_and_data (line 360) | def _get_config_and_data(self): method test_generate_beam_search (line 385) | def test_generate_beam_search(self): method test_shift_tokens_right (line 402) | def test_shift_tokens_right(self): method test_generate_fp16 (line 412) | def test_generate_fp16(self): method test_dummy_inputs (line 420) | def test_dummy_inputs(self): method test_prepare_fsmt_decoder_inputs (line 425) | def test_prepare_fsmt_decoder_inputs(self): function _assert_tensors_equal (line 441) | def _assert_tensors_equal(a, b, atol=1e-12, prefix=""): function _long_tensor (line 455) | def _long_tensor(tok_lst): class FSMTModelIntegrationTests (line 473) | class FSMTModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 479) | def default_tokenizer(self): method default_model (line 483) | def default_model(self): method get_tokenizer (line 486) | def get_tokenizer(self, mname): method get_model (line 491) | def get_model(self, mname): method test_inference_no_head (line 499) | def test_inference_no_head(self): method translation_setup (line 518) | def translation_setup(self, pair): method test_translation_direct (line 538) | def test_translation_direct(self, pair): method test_translation_pipeline (line 549) | def test_translation_pipeline(self, pair): class TestSinusoidalPositionalEmbeddings (line 557) | class TestSinusoidalPositionalEmbeddings(unittest.TestCase): method test_basic (line 561) | def test_basic(self): method test_odd_embed_dim (line 578) | def test_odd_embed_dim(self): method test_positional_emb_weights_against_marian (line 586) | def test_positional_emb_weights_against_marian(self): FILE: mplsandbox_for_rl/transformers/tests/models/fsmt/test_tokenization_fsmt.py class FSMTTokenizationTest (line 32) | class FSMTTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 37) | def setUp(self): method tokenizer_ru_en (line 88) | def tokenizer_ru_en(self): method tokenizer_en_ru (line 92) | def tokenizer_en_ru(self): method test_online_tokenizer_config (line 95) | def test_online_tokenizer_config(self): method test_full_tokenizer (line 104) | def test_full_tokenizer(self): method test_sequence_builders (line 118) | def test_sequence_builders(self): method test_match_encode_decode (line 131) | def test_match_encode_decode(self): method test_tokenizer_lower (line 157) | def test_tokenizer_lower(self): method test_torch_encode_plus_sent_to_model (line 164) | def test_torch_encode_plus_sent_to_model(self): method test_np_encode_plus_sent_to_model (line 168) | def test_np_encode_plus_sent_to_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/funnel/test_modeling_funnel.py class FunnelModelTester (line 44) | class FunnelModelTester: method __init__ (line 47) | def __init__( method prepare_config_and_inputs (line 112) | def prepare_config_and_inputs(self): method get_config (line 145) | def get_config(self): method create_and_check_model (line 163) | def create_and_check_model( method create_and_check_base_model (line 190) | def create_and_check_base_model( method create_and_check_for_pretraining (line 217) | def create_and_check_for_pretraining( method create_and_check_for_masked_lm (line 235) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 252) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 270) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 296) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 314) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 338) | def prepare_config_and_inputs_for_common(self): class FunnelModelTest (line 355) | class FunnelModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method _prepare_for_class (line 383) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 393) | def setUp(self): method test_config (line 397) | def test_config(self): method test_model (line 400) | def test_model(self): method test_for_pretraining (line 404) | def test_for_pretraining(self): method test_for_masked_lm (line 408) | def test_for_masked_lm(self): method test_for_token_classification (line 412) | def test_for_token_classification(self): method test_for_question_answering (line 416) | def test_for_question_answering(self): method _mock_init_weights (line 421) | def _mock_init_weights(self, module): class FunnelBaseModelTest (line 434) | class FunnelBaseModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 441) | def setUp(self): method test_config (line 445) | def test_config(self): method test_base_model (line 448) | def test_base_model(self): method test_for_sequence_classification (line 452) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 456) | def test_for_multiple_choice(self): method test_training (line 461) | def test_training(self): method _mock_init_weights (line 476) | def _mock_init_weights(self, module): class FunnelModelIntegrationTest (line 491) | class FunnelModelIntegrationTest(unittest.TestCase): method test_inference_tiny_model (line 492) | def test_inference_tiny_model(self): method test_inference_model (line 516) | def test_inference_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/funnel/test_modeling_tf_funnel.py class TFFunnelModelTester (line 44) | class TFFunnelModelTester: method __init__ (line 47) | def __init__( method prepare_config_and_inputs (line 112) | def prepare_config_and_inputs(self): method create_and_check_model (line 158) | def create_and_check_model( method create_and_check_base_model (line 188) | def create_and_check_base_model( method create_and_check_for_pretraining (line 218) | def create_and_check_for_pretraining( method create_and_check_for_masked_lm (line 233) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 248) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 264) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 287) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 303) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 319) | def prepare_config_and_inputs_for_common(self): class TFFunnelModelTest (line 335) | class TFFunnelModelTest(TFModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 362) | def setUp(self): method test_config (line 366) | def test_config(self): method test_model (line 369) | def test_model(self): method test_for_pretraining (line 373) | def test_for_pretraining(self): method test_for_masked_lm (line 377) | def test_for_masked_lm(self): method test_for_token_classification (line 381) | def test_for_token_classification(self): method test_for_question_answering (line 385) | def test_for_question_answering(self): class TFFunnelBaseModelTest (line 391) | class TFFunnelBaseModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 398) | def setUp(self): method test_config (line 402) | def test_config(self): method test_base_model (line 405) | def test_base_model(self): method test_for_sequence_classification (line 409) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 413) | def test_for_multiple_choice(self): FILE: mplsandbox_for_rl/transformers/tests/models/funnel/test_tokenization_funnel.py class FunnelTokenizationTest (line 28) | class FunnelTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_tokenizer (line 57) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 60) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 63) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 68) | def test_full_tokenizer(self): method test_token_type_ids (line 75) | def test_token_type_ids(self): FILE: mplsandbox_for_rl/transformers/tests/models/fuyu/test_image_processing_fuyu.py class TestFuyuImageProcessor (line 25) | class TestFuyuImageProcessor(unittest.TestCase): method setUp (line 26) | def setUp(self): method test_patches (line 41) | def test_patches(self): method test_scale_to_target_aspect_ratio (line 49) | def test_scale_to_target_aspect_ratio(self): method test_apply_transformation_numpy (line 55) | def test_apply_transformation_numpy(self): method test_apply_transformation_pil (line 60) | def test_apply_transformation_pil(self): FILE: mplsandbox_for_rl/transformers/tests/models/fuyu/test_modeling_fuyu.py class FuyuModelTester (line 44) | class FuyuModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 99) | def prepare_config_and_inputs(self): method get_config (line 116) | def get_config(self): method create_and_check_model (line 133) | def create_and_check_model( method create_and_check_model_as_decoder (line 148) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 176) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 192) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 252) | def prepare_config_and_inputs_for_common(self): class FuyuModelTest (line 266) | class FuyuModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 276) | def setUp(self): method test_training_gradient_checkpointing (line 282) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 288) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 294) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_disk_offload_bin (line 299) | def test_disk_offload_bin(self): method test_disk_offload_safetensors (line 304) | def test_disk_offload_safetensors(self): method test_model_parallelism (line 309) | def test_model_parallelism(self): class FuyuModelIntegrationTest (line 315) | class FuyuModelIntegrationTest(unittest.TestCase): method default_processor (line 317) | def default_processor(self): method default_model (line 321) | def default_model(self): method test_greedy_generation (line 324) | def test_greedy_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/fuyu/test_processing_fuyu.py class FuyuProcessingTest (line 25) | class FuyuProcessingTest(unittest.TestCase): # TODO Which mixins do we ... method setUp (line 28) | def setUp(self): method test_fuyu_processing (line 38) | def test_fuyu_processing(self): method test_fuyu_processing_no_image (line 52) | def test_fuyu_processing_no_image(self): method test_fuyu_processing_no_text (line 60) | def test_fuyu_processing_no_text(self): method test_fuyu_processing_multiple_image_sample (line 96) | def test_fuyu_processing_multiple_image_sample(self): class TestImageTextProcessingUtils (line 161) | class TestImageTextProcessingUtils(unittest.TestCase): method setUp (line 162) | def setUp(self): method test_full_unpacked_stream_to_tensor (line 179) | def test_full_unpacked_stream_to_tensor(self): method test_construct_full_unpacked_stream (line 191) | def test_construct_full_unpacked_stream(self): class TestProcessImagesForModelInput (line 201) | class TestProcessImagesForModelInput(unittest.TestCase): method setUp (line 202) | def setUp(self): method test_process_images_for_model_input_fixed_sized (line 220) | def test_process_images_for_model_input_fixed_sized(self): FILE: mplsandbox_for_rl/transformers/tests/models/gemma/test_modeling_flax_gemma.py class FlaxGemmaModelTester (line 35) | class FlaxGemmaModelTester: method __init__ (line 36) | def __init__( method prepare_config_and_inputs (line 80) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 106) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 112) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 142) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxGemmaModelTest (line 177) | class FlaxGemmaModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixin... method setUp (line 181) | def setUp(self): method test_use_cache_forward (line 184) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 189) | def test_use_cache_forward_with_attn_mask(self): method test_model_from_pretrained (line 197) | def test_model_from_pretrained(self): class FlaxGemmaIntegrationTest (line 207) | class FlaxGemmaIntegrationTest(unittest.TestCase): method setUp (line 212) | def setUp(self): method test_logits (line 219) | def test_logits(self): method test_generation (line 237) | def test_generation(self): method test_jit_generation (line 249) | def test_jit_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/gemma/test_modeling_gemma.py class GemmaModelTester (line 55) | class GemmaModelTester: method __init__ (line 63) | def __init__( method prepare_config_and_inputs (line 117) | def prepare_config_and_inputs(self): method get_config (line 140) | def get_config(self): method create_and_check_model (line 159) | def create_and_check_model( method create_and_check_model_as_decoder (line 169) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 199) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 217) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 280) | def prepare_config_and_inputs_for_common(self): class GemmaModelTest (line 296) | class GemmaModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe... method is_pipeline_test_to_skip (line 325) | def is_pipeline_test_to_skip( method setUp (line 330) | def setUp(self): method test_config (line 334) | def test_config(self): method test_model (line 337) | def test_model(self): method test_model_various_embeddings (line 341) | def test_model_various_embeddings(self): method test_Gemma_sequence_classification_model (line 347) | def test_Gemma_sequence_classification_model(self): method test_Gemma_sequence_classification_model_for_single_label (line 360) | def test_Gemma_sequence_classification_model_for_single_label(self): method test_Gemma_sequence_classification_model_for_multi_label (line 373) | def test_Gemma_sequence_classification_model_for_multi_label(self): method test_Gemma_token_classification_model (line 388) | def test_Gemma_token_classification_model(self): method test_save_load_fast_init_from_base (line 404) | def test_save_load_fast_init_from_base(self): method test_past_key_values_format (line 408) | def test_past_key_values_format(self): method test_flash_attn_2_generate_use_cache (line 415) | def test_flash_attn_2_generate_use_cache(self): method test_flash_attn_2_inference_equivalence_right_padding (line 460) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_sdpa_equivalence (line 466) | def test_sdpa_equivalence(self): method test_flash_attn_2_equivalence (line 500) | def test_flash_attn_2_equivalence(self): class GemmaIntegrationTest (line 532) | class GemmaIntegrationTest(unittest.TestCase): method setUpClass (line 539) | def setUpClass(cls): method test_model_2b_fp16 (line 545) | def test_model_2b_fp16(self): method test_model_2b_bf16 (line 567) | def test_model_2b_bf16(self): method test_model_2b_eager (line 588) | def test_model_2b_eager(self): method test_model_2b_sdpa (line 611) | def test_model_2b_sdpa(self): method test_model_2b_flash_attn (line 635) | def test_model_2b_flash_attn(self): method test_model_2b_4bit (line 657) | def test_model_2b_4bit(self): method test_model_7b_fp32 (line 676) | def test_model_7b_fp32(self): method test_model_7b_fp16 (line 694) | def test_model_7b_fp16(self): method test_model_7b_bf16 (line 717) | def test_model_7b_bf16(self): method test_model_7b_fp16_static_cache (line 755) | def test_model_7b_fp16_static_cache(self): method test_model_7b_4bit (line 781) | def test_model_7b_4bit(self): method test_compile_static_cache (line 800) | def test_compile_static_cache(self): method test_model_2b_bf16_dola (line 837) | def test_model_2b_bf16_dola(self): FILE: mplsandbox_for_rl/transformers/tests/models/gemma/test_tokenization_gemma.py class GemmaTokenizationTest (line 47) | class GemmaTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 56) | def setUp(self): method test_batch_tokenization (line 64) | def test_batch_tokenization(self): method test_save_slow_from_fast_and_reload_fast (line 98) | def test_save_slow_from_fast_and_reload_fast(self): method test_special_tokens_initialization (line 101) | def test_special_tokens_initialization(self): method test_tokenizer_integration (line 136) | def test_tokenizer_integration(self): method test_pickle_subword_regularization_tokenizer (line 145) | def test_pickle_subword_regularization_tokenizer(self): method test_subword_regularization_tokenizer (line 149) | def test_subword_regularization_tokenizer(self): method test_torch_encode_plus_sent_to_model (line 153) | def test_torch_encode_plus_sent_to_model(self): class GemmaIntegrationTest (line 160) | class GemmaIntegrationTest(unittest.TestCase): method setUpClass (line 162) | def setUpClass(cls): method integration_tests (line 173) | def integration_tests(self): method test_user_added_tokens (line 190) | def test_user_added_tokens(self): method test_fast_special_tokens (line 203) | def test_fast_special_tokens(self): method test_fast_merge_priority (line 224) | def test_fast_merge_priority(self): method test_conversion (line 237) | def test_conversion(self): method test_simple_encode_decode (line 257) | def test_simple_encode_decode(self): method test_no_differences_decode (line 304) | def test_no_differences_decode(self): method test_no_differences_special_tokens (line 316) | def test_no_differences_special_tokens(self): method test_integration_test_xnli (line 329) | def test_integration_test_xnli(self): method test_special_token_special_word (line 368) | def test_special_token_special_word(self): method test_some_edge_cases (line 408) | def test_some_edge_cases(self): method test_tokenization_for_chat (line 437) | def test_tokenization_for_chat(self): method test_save_fast_load_slow (line 455) | def test_save_fast_load_slow(self): class CommonSpmIntegrationTests (line 482) | class CommonSpmIntegrationTests(unittest.TestCase): method test_edge_case_tabulation (line 487) | def test_edge_case_tabulation(self): FILE: mplsandbox_for_rl/transformers/tests/models/gemma2/test_modeling_gemma2.py class Gemma2ModelTester (line 46) | class Gemma2ModelTester(GemmaModelTester): class Gemma2ModelTest (line 56) | class Gemma2ModelTest(GemmaModelTest, unittest.TestCase): method setUp (line 80) | def setUp(self): method test_model_outputs_equivalence (line 85) | def test_model_outputs_equivalence(self, **kwargs): method test_eager_matches_sdpa_inference (line 89) | def test_eager_matches_sdpa_inference(self): class Gemma2IntegrationTest (line 95) | class Gemma2IntegrationTest(unittest.TestCase): method setUpClass (line 102) | def setUpClass(cls): method test_model_9b_bf16 (line 108) | def test_model_9b_bf16(self): method test_model_9b_fp16 (line 128) | def test_model_9b_fp16(self): method test_model_9b_pipeline_bf16 (line 148) | def test_model_9b_pipeline_bf16(self): method test_model_9b_flash_attn (line 173) | def test_model_9b_flash_attn(self): FILE: mplsandbox_for_rl/transformers/tests/models/git/test_modeling_git.py class GitVisionModelTester (line 42) | class GitVisionModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 81) | def prepare_config_and_inputs(self): method get_config (line 87) | def get_config(self): method create_and_check_model (line 102) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 114) | def prepare_config_and_inputs_for_common(self): class GitVisionModelTest (line 122) | class GitVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 134) | def setUp(self): method test_config (line 138) | def test_config(self): method test_inputs_embeds (line 142) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 145) | def test_model_get_set_embeddings(self): method test_forward_signature (line 154) | def test_forward_signature(self): method test_model (line 166) | def test_model(self): method test_training (line 171) | def test_training(self): method test_training_gradient_checkpointing (line 175) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 181) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 187) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 191) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 195) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 199) | def test_model_from_pretrained(self): class GitModelTester (line 205) | class GitModelTester: method __init__ (line 206) | def __init__( method prepare_config_and_inputs (line 262) | def prepare_config_and_inputs(self): method get_config (line 275) | def get_config(self): method create_and_check_model (line 304) | def create_and_check_model(self, config, input_ids, input_mask, pixel_... method create_and_check_for_causal_lm (line 322) | def create_and_check_for_causal_lm(self, config, input_ids, input_mask... method _test_beam_search_generate (line 343) | def _test_beam_search_generate(self, config, input_ids, input_mask, pi... method _test_batched_generate_captioning (line 361) | def _test_batched_generate_captioning(self, config, input_ids, input_m... method prepare_config_and_inputs_for_common (line 379) | def prepare_config_and_inputs_for_common(self): class GitModelTest (line 399) | class GitModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTest... method _prepare_for_class (line 411) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 423) | def setUp(self): method test_config (line 427) | def test_config(self): method test_model (line 430) | def test_model(self): method test_for_causal_lm (line 434) | def test_for_causal_lm(self): method test_beam_search_generate (line 438) | def test_beam_search_generate(self): method test_batched_generate_captioning (line 442) | def test_batched_generate_captioning(self): method test_model_various_embeddings (line 446) | def test_model_various_embeddings(self): method test_model_from_pretrained (line 453) | def test_model_from_pretrained(self): method test_beam_search_generate_dict_outputs_use_cache (line 459) | def test_beam_search_generate_dict_outputs_use_cache(self): method test_contrastive_generate (line 463) | def test_contrastive_generate(self): method test_contrastive_generate_dict_outputs_use_cache (line 467) | def test_contrastive_generate_dict_outputs_use_cache(self): method test_greedy_generate_dict_outputs_use_cache (line 471) | def test_greedy_generate_dict_outputs_use_cache(self): class GitModelIntegrationTest (line 478) | class GitModelIntegrationTest(unittest.TestCase): method test_forward_pass (line 479) | def test_forward_pass(self): method test_inference_image_captioning (line 499) | def test_inference_image_captioning(self): method test_visual_question_answering (line 520) | def test_visual_question_answering(self): method test_batched_generation (line 544) | def test_batched_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/git/test_processor_git.py class GitProcessorTest (line 32) | class GitProcessorTest(unittest.TestCase): method setUp (line 33) | def setUp(self): method get_tokenizer (line 45) | def get_tokenizer(self, **kwargs): method get_image_processor (line 48) | def get_image_processor(self, **kwargs): method tearDown (line 51) | def tearDown(self): method prepare_image_inputs (line 54) | def prepare_image_inputs(self): method test_save_load_pretrained_additional_features (line 65) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 82) | def test_image_processor(self): method test_tokenizer (line 96) | def test_tokenizer(self): method test_processor (line 111) | def test_processor(self): method test_tokenizer_decode (line 128) | def test_tokenizer_decode(self): method test_model_input_names (line 141) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/glpn/test_image_processing_glpn.py class GLPNImageProcessingTester (line 36) | class GLPNImageProcessingTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_image_processor_dict (line 60) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 67) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 80) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class GLPNImageProcessingTest (line 95) | class GLPNImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 98) | def setUp(self): method image_processor_dict (line 103) | def image_processor_dict(self): method test_image_processor_properties (line 106) | def test_image_processor_properties(self): method test_call_pil (line 113) | def test_call_pil(self): method test_call_numpy (line 126) | def test_call_numpy(self): method test_call_pytorch (line 139) | def test_call_pytorch(self): method test_call_numpy_4_channels (line 152) | def test_call_numpy_4_channels(self): FILE: mplsandbox_for_rl/transformers/tests/models/glpn/test_modeling_glpn.py class GLPNConfigTester (line 40) | class GLPNConfigTester(ConfigTester): method create_and_test_config_common_properties (line 41) | def create_and_test_config_common_properties(self): class GLPNModelTester (line 48) | class GLPNModelTester: method __init__ (line 49) | def __init__( method prepare_config_and_inputs (line 91) | def prepare_config_and_inputs(self): method get_config (line 101) | def get_config(self): method create_and_check_model (line 116) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_depth_estimation (line 126) | def create_and_check_for_depth_estimation(self, config, pixel_values, ... method prepare_config_and_inputs_for_common (line 136) | def prepare_config_and_inputs_for_common(self): class GLPNModelTest (line 144) | class GLPNModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 156) | def setUp(self): method test_config (line 160) | def test_config(self): method test_model (line 163) | def test_model(self): method test_for_depth_estimation (line 167) | def test_for_depth_estimation(self): method test_inputs_embeds (line 172) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 176) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 179) | def test_attention_outputs(self): method test_hidden_states_output (line 248) | def test_hidden_states_output(self): method test_training (line 284) | def test_training(self): method test_model_from_pretrained (line 309) | def test_model_from_pretrained(self): function prepare_img (line 316) | def prepare_img(): class GLPNModelIntegrationTest (line 324) | class GLPNModelIntegrationTest(unittest.TestCase): method test_inference_depth_estimation (line 326) | def test_inference_depth_estimation(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt2/test_modeling_flax_gpt2.py class FlaxGPT2ModelTester (line 43) | class FlaxGPT2ModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 86) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 107) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_decoder (line 113) | def prepare_config_and_inputs_for_decoder(self): method check_use_cache_forward (line 127) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 157) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... method check_bool_attention_mask_in_generation (line 190) | def check_bool_attention_mask_in_generation(self, model_class_name, co... class FlaxGPT2ModelTest (line 212) | class FlaxGPT2ModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixin,... method setUp (line 216) | def setUp(self): method test_use_cache_forward (line 219) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 224) | def test_use_cache_forward_with_attn_mask(self): method test_bool_attention_mask_in_generation (line 231) | def test_bool_attention_mask_in_generation(self): method test_batch_generation (line 239) | def test_batch_generation(self): method test_equivalence_pt_to_flax (line 263) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 311) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 360) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt2/test_modeling_gpt2.py class GPT2ModelTester (line 54) | class GPT2ModelTester: method __init__ (line 55) | def __init__( method get_large_model_config (line 108) | def get_large_model_config(self): method prepare_config_and_inputs (line 111) | def prepare_config_and_inputs( method get_config (line 156) | def get_config( method get_pipeline_config (line 180) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 185) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_gpt2_model (line 214) | def create_and_check_gpt2_model(self, config, input_ids, input_mask, h... method create_and_check_gpt2_model_past (line 226) | def create_and_check_gpt2_model_past(self, config, input_ids, input_ma... method create_and_check_gpt2_model_attention_mask_past (line 262) | def create_and_check_gpt2_model_attention_mask_past( method create_and_check_gpt2_model_past_large_inputs (line 304) | def create_and_check_gpt2_model_past_large_inputs( method create_and_check_lm_head_model (line 342) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_forward_and_backwards (line 351) | def create_and_check_forward_and_backwards( method create_and_check_double_lm_head_model (line 364) | def create_and_check_double_lm_head_model( method create_and_check_gpt2_for_question_answering (line 390) | def create_and_check_gpt2_for_question_answering( method create_and_check_gpt2_for_sequence_classification (line 401) | def create_and_check_gpt2_for_sequence_classification( method create_and_check_gpt2_for_token_classification (line 411) | def create_and_check_gpt2_for_token_classification( method create_and_check_gpt2_weight_initialization (line 421) | def create_and_check_gpt2_weight_initialization(self, config, *args): method create_and_check_cached_forward_with_and_without_attention_mask (line 429) | def create_and_check_cached_forward_with_and_without_attention_mask(se... method prepare_config_and_inputs_for_common (line 459) | def prepare_config_and_inputs_for_common(self): class GPT2ModelTest (line 484) | class GPT2ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method _prepare_for_class (line 516) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 538) | def setUp(self): method tearDown (line 542) | def tearDown(self): method test_config (line 548) | def test_config(self): method test_gpt2_model (line 551) | def test_gpt2_model(self): method test_gpt2_model_past (line 555) | def test_gpt2_model_past(self): method test_gpt2_model_att_mask_past (line 559) | def test_gpt2_model_att_mask_past(self): method test_gpt2_model_past_large_inputs (line 563) | def test_gpt2_model_past_large_inputs(self): method test_gpt2_lm_head_model (line 567) | def test_gpt2_lm_head_model(self): method test_gpt2_double_lm_head_model (line 571) | def test_gpt2_double_lm_head_model(self): method test_gpt2_question_answering_model (line 575) | def test_gpt2_question_answering_model(self): method test_gpt2_sequence_classification_model (line 579) | def test_gpt2_sequence_classification_model(self): method test_gpt2_token_classification_model (line 583) | def test_gpt2_token_classification_model(self): method test_gpt2_gradient_checkpointing (line 587) | def test_gpt2_gradient_checkpointing(self): method test_gpt2_scale_attn_by_inverse_layer_idx (line 591) | def test_gpt2_scale_attn_by_inverse_layer_idx(self): method test_gpt2_reorder_and_upcast_attn (line 595) | def test_gpt2_reorder_and_upcast_attn(self): method test_gpt2_weight_initialization (line 599) | def test_gpt2_weight_initialization(self): method test_cached_forward_with_and_without_attention_mask (line 603) | def test_cached_forward_with_and_without_attention_mask(self): method test_training_gradient_checkpointing (line 610) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 616) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 622) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_batch_generation (line 626) | def test_batch_generation(self): method test_batch_generation_2heads (line 685) | def test_batch_generation_2heads(self): method test_model_from_pretrained (line 745) | def test_model_from_pretrained(self): class GPT2ModelLanguageGenerationTest (line 752) | class GPT2ModelLanguageGenerationTest(unittest.TestCase): method tearDown (line 753) | def tearDown(self): method _test_lm_generate_gpt2_helper (line 759) | def _test_lm_generate_gpt2_helper( method test_lm_generate_gpt2 (line 787) | def test_lm_generate_gpt2(self): method test_lm_generate_gpt2_with_gradient_checkpointing (line 791) | def test_lm_generate_gpt2_with_gradient_checkpointing(self): method test_lm_generate_gpt2_with_reorder_and_upcast_attn (line 795) | def test_lm_generate_gpt2_with_reorder_and_upcast_attn(self): method test_lm_generate_gpt2_with_scale_attn_by_inverse_layer_idx (line 799) | def test_lm_generate_gpt2_with_scale_attn_by_inverse_layer_idx(self): method test_gpt2_sample (line 803) | def test_gpt2_sample(self): method test_gpt2_sample_max_time (line 831) | def test_gpt2_sample_max_time(self): method test_contrastive_search_gpt2 (line 873) | def test_contrastive_search_gpt2(self): method test_flash_attn_2_generate_padding_left (line 910) | def test_flash_attn_2_generate_padding_left(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt2/test_modeling_tf_gpt2.py class TFGPT2ModelTester (line 42) | class TFGPT2ModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 74) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 129) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_gpt2_model (line 158) | def create_and_check_gpt2_model(self, config, input_ids, input_mask, h... method create_and_check_gpt2_model_past (line 174) | def create_and_check_gpt2_model_past(self, config, input_ids, input_ma... method create_and_check_gpt2_model_attention_mask_past (line 208) | def create_and_check_gpt2_model_attention_mask_past( method create_and_check_gpt2_model_past_large_inputs (line 252) | def create_and_check_gpt2_model_past_large_inputs( method create_and_check_gpt2_lm_head (line 296) | def create_and_check_gpt2_lm_head(self, config, input_ids, input_mask,... method create_and_check_gpt2_double_head (line 306) | def create_and_check_gpt2_double_head( method create_and_check_gpt2_for_sequence_classification (line 327) | def create_and_check_gpt2_for_sequence_classification( method prepare_config_and_inputs_for_common (line 342) | def prepare_config_and_inputs_for_common(self): class TFGPT2ModelTest (line 366) | class TFGPT2ModelTest(TFModelTesterMixin, TFCoreModelTesterMixin, Pipeli... method setUp (line 387) | def setUp(self): method test_config (line 391) | def test_config(self): method test_gpt2_model (line 394) | def test_gpt2_model(self): method test_gpt2_model_past (line 398) | def test_gpt2_model_past(self): method test_gpt2_model_att_mask_past (line 402) | def test_gpt2_model_att_mask_past(self): method test_gpt2_model_past_large_inputs (line 406) | def test_gpt2_model_past_large_inputs(self): method test_gpt2_lm_head (line 410) | def test_gpt2_lm_head(self): method test_gpt2_double_head (line 414) | def test_gpt2_double_head(self): method test_gpt2_sequence_classification_model (line 418) | def test_gpt2_sequence_classification_model(self): method test_model_from_pretrained (line 423) | def test_model_from_pretrained(self): method test_onnx_runtime_optimize (line 432) | def test_onnx_runtime_optimize(self): method test_onnx_compliancy (line 455) | def test_onnx_compliancy(self): class TFGPT2ModelLanguageGenerationTest (line 460) | class TFGPT2ModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_greedy_distilgpt2_batch_special (line 462) | def test_lm_generate_greedy_distilgpt2_batch_special(self): method test_lm_generate_sample_distilgpt2_batch_special (line 489) | def test_lm_generate_sample_distilgpt2_batch_special(self): method test_lm_generate_greedy_distilgpt2_beam_search_special (line 523) | def test_lm_generate_greedy_distilgpt2_beam_search_special(self): method test_lm_generate_distilgpt2_left_padding (line 550) | def test_lm_generate_distilgpt2_left_padding(self): method test_lm_generate_gpt2_greedy_xla (line 583) | def test_lm_generate_gpt2_greedy_xla(self): method test_lm_generate_gpt2_sample_xla (line 607) | def test_lm_generate_gpt2_sample_xla(self): method test_lm_generate_gpt2_beam_search_xla (line 643) | def test_lm_generate_gpt2_beam_search_xla(self): method test_contrastive_search_gpt2 (line 667) | def test_contrastive_search_gpt2(self): method test_contrastive_search_gpt2_xla (line 701) | def test_contrastive_search_gpt2_xla(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt2/test_tokenization_gpt2.py class GPT2TokenizationTest (line 29) | class GPT2TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 37) | def setUp(self): method get_tokenizer (line 75) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 79) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 83) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 88) | def test_full_tokenizer(self): method test_rust_and_python_full_tokenizers (line 99) | def test_rust_and_python_full_tokenizers(self): method test_pretokenized_inputs (line 130) | def test_pretokenized_inputs(self, *args, **kwargs): method test_padding (line 135) | def test_padding(self, max_length=15): method test_padding_if_pad_token_set_slow (line 179) | def test_padding_if_pad_token_set_slow(self): method test_add_bos_token_slow (line 230) | def test_add_bos_token_slow(self): method test_padding_different_model_input_name (line 252) | def test_padding_different_model_input_name(self): method test_special_tokens_mask_input_pairs_and_bos_token (line 255) | def test_special_tokens_mask_input_pairs_and_bos_token(self): method test_tokenization_for_chat (line 281) | def test_tokenization_for_chat(self): class OPTTokenizationTest (line 304) | class OPTTokenizationTest(unittest.TestCase): method test_serialize_deserialize_fast_opt (line 305) | def test_serialize_deserialize_fast_opt(self): method test_fast_slow_equivalence (line 326) | def test_fast_slow_equivalence(self): method test_users_can_modify_bos (line 337) | def test_users_can_modify_bos(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt2/test_tokenization_gpt2_tf.py class ModelToSave (line 23) | class ModelToSave(tf.Module): method __init__ (line 24) | def __init__(self, tokenizer): method serving (line 31) | def serving(self, text): class GPTTokenizationTest (line 45) | class GPTTokenizationTest(unittest.TestCase): method setUp (line 49) | def setUp(self): method test_output_equivalence (line 66) | def test_output_equivalence(self): method test_graph_mode (line 81) | def test_graph_mode(self): method test_saved_model (line 93) | def test_saved_model(self): method test_from_config (line 107) | def test_from_config(self): method test_padding (line 120) | def test_padding(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt_bigcode/test_modeling_gpt_bigcode.py class GPTBigCodeModelTester (line 45) | class GPTBigCodeModelTester: method __init__ (line 46) | def __init__( method get_large_model_config (line 101) | def get_large_model_config(self): method prepare_config_and_inputs (line 104) | def prepare_config_and_inputs( method get_config (line 149) | def get_config( method get_pipeline_config (line 176) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 181) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_gpt_bigcode_model (line 210) | def create_and_check_gpt_bigcode_model(self, config, input_ids, input_... method create_and_check_gpt_bigcode_model_past (line 222) | def create_and_check_gpt_bigcode_model_past(self, config, input_ids, i... method create_and_check_gpt_bigcode_model_attention_mask_past (line 258) | def create_and_check_gpt_bigcode_model_attention_mask_past( method create_and_check_gpt_bigcode_model_past_large_inputs (line 300) | def create_and_check_gpt_bigcode_model_past_large_inputs( method create_and_check_lm_head_model (line 338) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_forward_and_backwards (line 347) | def create_and_check_forward_and_backwards( method create_and_check_gpt_bigcode_for_sequence_classification (line 360) | def create_and_check_gpt_bigcode_for_sequence_classification( method create_and_check_gpt_bigcode_for_token_classification (line 370) | def create_and_check_gpt_bigcode_for_token_classification( method create_and_check_gpt_bigcode_weight_initialization (line 380) | def create_and_check_gpt_bigcode_weight_initialization(self, config, *... method prepare_config_and_inputs_for_common (line 388) | def prepare_config_and_inputs_for_common(self): class GPTBigCodeModelTest (line 413) | class GPTBigCodeModelTest(ModelTesterMixin, GenerationTesterMixin, Pipel... method _prepare_for_class (line 444) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 449) | def setUp(self): method tearDown (line 453) | def tearDown(self): method test_config (line 458) | def test_config(self): method test_retain_grad_hidden_states_attentions (line 462) | def test_retain_grad_hidden_states_attentions(self): method test_contrastive_generate (line 466) | def test_contrastive_generate(self): method test_contrastive_generate_dict_outputs_use_cache (line 470) | def test_contrastive_generate_dict_outputs_use_cache(self): method test_cpu_offload (line 474) | def test_cpu_offload(self): method test_disk_offload (line 478) | def test_disk_offload(self): method test_past_key_values_format (line 482) | def test_past_key_values_format(self): method test_gpt_bigcode_model (line 485) | def test_gpt_bigcode_model(self): method test_gpt_bigcode_model_past (line 489) | def test_gpt_bigcode_model_past(self): method test_gpt_bigcode_model_att_mask_past (line 493) | def test_gpt_bigcode_model_att_mask_past(self): method test_gpt_bigcode_model_past_large_inputs (line 497) | def test_gpt_bigcode_model_past_large_inputs(self): method test_gpt_bigcode_lm_head_model (line 501) | def test_gpt_bigcode_lm_head_model(self): method test_gpt_bigcode_sequence_classification_model (line 505) | def test_gpt_bigcode_sequence_classification_model(self): method test_gpt_bigcode_token_classification_model (line 509) | def test_gpt_bigcode_token_classification_model(self): method test_gpt_bigcode_gradient_checkpointing (line 513) | def test_gpt_bigcode_gradient_checkpointing(self): method test_gpt_bigcode_scale_attn_by_inverse_layer_idx (line 517) | def test_gpt_bigcode_scale_attn_by_inverse_layer_idx(self): method test_gpt_bigcode_reorder_and_upcast_attn (line 521) | def test_gpt_bigcode_reorder_and_upcast_attn(self): method test_gpt_bigcode_weight_initialization (line 525) | def test_gpt_bigcode_weight_initialization(self): class GPTBigCodeMHAModelTest (line 531) | class GPTBigCodeMHAModelTest(GPTBigCodeModelTest): class GPTBigCodeModelLanguageGenerationTest (line 542) | class GPTBigCodeModelLanguageGenerationTest(unittest.TestCase): method test_generate_simple (line 543) | def test_generate_simple(self): method test_generate_batched (line 555) | def test_generate_batched(self): class GPTBigCodeMQATest (line 576) | class GPTBigCodeMQATest(unittest.TestCase): method get_attention (line 577) | def get_attention(self, multi_query): method test_mqa_reduces_to_mha (line 587) | def test_mqa_reduces_to_mha(self, seed, is_train_mode=True): FILE: mplsandbox_for_rl/transformers/tests/models/gpt_neo/test_modeling_flax_gpt_neo.py class FlaxGPTNeoModelTester (line 43) | class FlaxGPTNeoModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 90) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 113) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 119) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 149) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxGPTNeoModelTest (line 184) | class FlaxGPTNeoModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixi... method setUp (line 188) | def setUp(self): method test_use_cache_forward (line 191) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 196) | def test_use_cache_forward_with_attn_mask(self): method test_batch_generation (line 204) | def test_batch_generation(self): method test_equivalence_pt_to_flax (line 232) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 280) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 329) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt_neo/test_modeling_gpt_neo.py class GPTNeoModelTester (line 42) | class GPTNeoModelTester: method __init__ (line 43) | def __init__( method get_large_model_config (line 98) | def get_large_model_config(self): method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs(self): method get_config (line 140) | def get_config(self): method get_pipeline_config (line 155) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 160) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_gpt_neo_model (line 189) | def create_and_check_gpt_neo_model(self, config, input_ids, input_mask... method create_and_check_gpt_neo_model_past (line 202) | def create_and_check_gpt_neo_model_past(self, config, input_ids, input... method create_and_check_gpt_neo_model_attention_mask_past (line 238) | def create_and_check_gpt_neo_model_attention_mask_past( method create_and_check_gpt_neo_model_past_large_inputs (line 280) | def create_and_check_gpt_neo_model_past_large_inputs( method create_and_check_lm_head_model (line 318) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_gpt_neo_for_question_answering (line 327) | def create_and_check_gpt_neo_for_question_answering( method create_and_check_gpt_neo_for_sequence_classification (line 338) | def create_and_check_gpt_neo_for_sequence_classification( method create_and_check_gpt_neo_for_token_classification (line 348) | def create_and_check_gpt_neo_for_token_classification( method create_and_check_forward_and_backwards (line 358) | def create_and_check_forward_and_backwards( method prepare_config_and_inputs_for_common (line 371) | def prepare_config_and_inputs_for_common(self): class GPTNeoModelTest (line 396) | class GPTNeoModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method _prepare_for_class (line 427) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 431) | def setUp(self): method test_config (line 435) | def test_config(self): method test_gpt_neo_model (line 438) | def test_gpt_neo_model(self): method test_gpt_neo_model_past (line 442) | def test_gpt_neo_model_past(self): method test_gpt_neo_model_att_mask_past (line 446) | def test_gpt_neo_model_att_mask_past(self): method test_gpt_neo_model_past_large_inputs (line 450) | def test_gpt_neo_model_past_large_inputs(self): method test_gpt_neo_lm_head_model (line 454) | def test_gpt_neo_lm_head_model(self): method test_gpt_neo_question_answering_model (line 458) | def test_gpt_neo_question_answering_model(self): method test_gpt_neo_sequence_classification_model (line 462) | def test_gpt_neo_sequence_classification_model(self): method test_gpt_neo_token_classification_model (line 466) | def test_gpt_neo_token_classification_model(self): method test_gpt_neo_gradient_checkpointing (line 470) | def test_gpt_neo_gradient_checkpointing(self): method _get_hidden_states (line 474) | def _get_hidden_states(self): method test_local_attn_probs (line 492) | def test_local_attn_probs(self): class GPTNeoModelLanguageGenerationTest (line 520) | class GPTNeoModelLanguageGenerationTest(unittest.TestCase): method model (line 522) | def model(self): method tokenizer (line 526) | def tokenizer(self): method test_lm_generate_gpt_neo (line 530) | def test_lm_generate_gpt_neo(self): method test_gpt_neo_sample (line 544) | def test_gpt_neo_sample(self): method test_batch_generation (line 558) | def test_batch_generation(self): method test_model_from_pretrained (line 601) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt_neox/test_modeling_gpt_neox.py class GPTNeoXModelTester (line 47) | class GPTNeoXModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 97) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 129) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 136) | def create_and_check_model(self, config, input_ids, input_mask): method create_and_check_model_as_decoder (line 144) | def create_and_check_model_as_decoder(self, config, input_ids, input_m... method create_and_check_for_causal_lm (line 152) | def create_and_check_for_causal_lm(self, config, input_ids, input_mask... method create_and_check_for_question_answering (line 159) | def create_and_check_for_question_answering(self, config, input_ids, i... method create_and_check_for_sequence_classification (line 168) | def create_and_check_for_sequence_classification(self, config, input_i... method create_and_check_for_token_classification (line 177) | def create_and_check_for_token_classification(self, config, input_ids,... method create_and_check_decoder_model_past_large_inputs (line 185) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method create_and_check_cached_forward_with_and_without_attention_mask (line 222) | def create_and_check_cached_forward_with_and_without_attention_mask(se... method prepare_config_and_inputs_for_common (line 252) | def prepare_config_and_inputs_for_common(self): class GPTNeoXModelTest (line 260) | class GPTNeoXModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline... method setUp (line 290) | def setUp(self): method test_config (line 294) | def test_config(self): method test_model (line 297) | def test_model(self): method test_model_as_decoder (line 301) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 305) | def test_model_as_decoder_with_default_input_mask(self): method test_decoder_model_past_large_inputs (line 313) | def test_decoder_model_past_large_inputs(self): method test_model_for_causal_lm (line 317) | def test_model_for_causal_lm(self): method test_model_for_question_answering (line 321) | def test_model_for_question_answering(self): method test_model_for_sequence_classification (line 325) | def test_model_for_sequence_classification(self): method test_model_for_token_classification (line 329) | def test_model_for_token_classification(self): method test_cached_forward_with_and_without_attention_mask (line 333) | def test_cached_forward_with_and_without_attention_mask(self): method test_feed_forward_chunking (line 338) | def test_feed_forward_chunking(self): method test_model_rope_scaling_from_config (line 343) | def test_model_rope_scaling_from_config(self, scaling_type): method test_model_rope_scaling (line 374) | def test_model_rope_scaling(self): method test_eager_matches_sdpa_generate (line 435) | def test_eager_matches_sdpa_generate(self): class GPTNeoXLanguageGenerationTest (line 497) | class GPTNeoXLanguageGenerationTest(unittest.TestCase): method test_lm_generate_gptneox (line 499) | def test_lm_generate_gptneox(self): method pythia_integration_test (line 520) | def pythia_integration_test(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt_neox_japanese/test_modeling_gpt_neox_japanese.py class GPTNeoXJapaneseModelTester (line 34) | class GPTNeoXJapaneseModelTester: method __init__ (line 35) | def __init__( method prepare_config_and_inputs (line 85) | def prepare_config_and_inputs(self): method get_config (line 100) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 117) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 124) | def create_and_check_model(self, config, input_ids, input_mask): method create_and_check_model_as_decoder (line 132) | def create_and_check_model_as_decoder(self, config, input_ids, input_m... method create_and_check_for_causal_lm (line 140) | def create_and_check_for_causal_lm(self, config, input_ids, input_mask... method create_and_check_decoder_model_past_large_inputs (line 147) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method prepare_config_and_inputs_for_common (line 184) | def prepare_config_and_inputs_for_common(self): class GPTNeoXModelJapaneseTest (line 192) | class GPTNeoXModelJapaneseTest(ModelTesterMixin, PipelineTesterMixin, un... method setUp (line 205) | def setUp(self): method test_config (line 209) | def test_config(self): method test_model (line 212) | def test_model(self): method test_model_as_decoder (line 216) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 220) | def test_model_as_decoder_with_default_input_mask(self): method test_decoder_model_past_large_inputs (line 228) | def test_decoder_model_past_large_inputs(self): method test_model_for_causal_lm (line 232) | def test_model_for_causal_lm(self): method test_generation (line 237) | def test_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt_neox_japanese/test_tokenization_gpt_neox_japanese.py class GPTNeoXJapaneseTokenizationTest (line 31) | class GPTNeoXJapaneseTokenizationTest(TokenizerTesterMixin, unittest.Tes... method setUp (line 37) | def setUp(self): method get_tokenizer (line 74) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 78) | def get_input_output_texts(self, tokenizer): method get_clean_sequence (line 83) | def get_clean_sequence(self, tokenizer): method test_pretokenized_inputs (line 89) | def test_pretokenized_inputs(self): method test_maximum_encoding_length_pair_input (line 92) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 95) | def test_maximum_encoding_length_single_input(self): method test_full_tokenizer (line 98) | def test_full_tokenizer(self): method test_sequence_builders (line 119) | def test_sequence_builders(self): method test_conversion_reversible (line 132) | def test_conversion_reversible(self): method test_padding_different_model_input_name (line 137) | def test_padding_different_model_input_name(self): FILE: mplsandbox_for_rl/transformers/tests/models/gpt_sw3/test_tokenization_gpt_sw3.py class GPTSw3TokenizationTest (line 29) | class GPTSw3TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method get_input_output_texts (line 44) | def get_input_output_texts(self, tokenizer): method test_convert_token_and_id (line 49) | def test_convert_token_and_id(self): method test_get_vocab (line 57) | def test_get_vocab(self): method test_vocab_size (line 65) | def test_vocab_size(self): method test_full_tokenizer (line 68) | def test_full_tokenizer(self): method test_fast_encode_decode (line 98) | def test_fast_encode_decode(self): method test_tokenizer_integration (line 115) | def test_tokenizer_integration(self): method test_tokenization_for_chat (line 132) | def test_tokenization_for_chat(self): FILE: mplsandbox_for_rl/transformers/tests/models/gptj/test_modeling_flax_gptj.py class FlaxGPTJModelTester (line 43) | class FlaxGPTJModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 88) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 110) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 116) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 146) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxGPTJModelTest (line 181) | class FlaxGPTJModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixin,... method setUp (line 185) | def setUp(self): method test_use_cache_forward (line 188) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 193) | def test_use_cache_forward_with_attn_mask(self): method test_batch_generation (line 201) | def test_batch_generation(self): method test_equivalence_pt_to_flax (line 229) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 277) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 326) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/gptj/test_modeling_gptj.py class GPTJModelTester (line 54) | class GPTJModelTester: method __init__ (line 55) | def __init__( method get_large_model_config (line 109) | def get_large_model_config(self): method prepare_config_and_inputs (line 112) | def prepare_config_and_inputs(self): method get_config (line 151) | def get_config(self): method get_pipeline_config (line 171) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 176) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_gptj_model (line 205) | def create_and_check_gptj_model(self, config, input_ids, input_mask, h... method create_and_check_gptj_model_past (line 217) | def create_and_check_gptj_model_past(self, config, input_ids, input_ma... method create_and_check_gptj_model_attention_mask_past (line 253) | def create_and_check_gptj_model_attention_mask_past( method create_and_check_gptj_model_past_large_inputs (line 295) | def create_and_check_gptj_model_past_large_inputs( method create_and_check_lm_head_model (line 333) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_forward_and_backwards (line 342) | def create_and_check_forward_and_backwards( method prepare_config_and_inputs_for_common (line 355) | def prepare_config_and_inputs_for_common(self): class GPTJModelTest (line 376) | class GPTJModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method test_torch_fx (line 403) | def test_torch_fx(self): method test_torch_fx_output_loss (line 409) | def test_torch_fx_output_loss(self): method is_pipeline_test_to_skip (line 413) | def is_pipeline_test_to_skip( method _prepare_for_class (line 429) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 433) | def setUp(self): method test_config (line 437) | def test_config(self): method test_gptj_model (line 440) | def test_gptj_model(self): method test_gptj_model_past (line 444) | def test_gptj_model_past(self): method test_gptj_model_att_mask_past (line 448) | def test_gptj_model_att_mask_past(self): method test_gptj_model_past_large_inputs (line 452) | def test_gptj_model_past_large_inputs(self): method test_gptj_lm_head_model (line 456) | def test_gptj_lm_head_model(self): method test_gptj_gradient_checkpointing (line 460) | def test_gptj_gradient_checkpointing(self): method test_batch_generation (line 465) | def test_batch_generation(self): method test_model_from_pretrained (line 525) | def test_model_from_pretrained(self): method test_flash_attn_2_generate_padding_right (line 535) | def test_flash_attn_2_generate_padding_right(self): class GPTJModelLanguageGenerationTest (line 570) | class GPTJModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_gptj (line 572) | def test_lm_generate_gptj(self): method test_gptj_sample (line 590) | def test_gptj_sample(self): method test_gptj_sample_max_time (line 624) | def test_gptj_sample_max_time(self): method test_contrastive_search_gptj (line 665) | def test_contrastive_search_gptj(self): FILE: mplsandbox_for_rl/transformers/tests/models/gptj/test_modeling_tf_gptj.py class TFGPTJModelTester (line 41) | class TFGPTJModelTester: method __init__ (line 42) | def __init__(self, parent): method prepare_config_and_inputs (line 71) | def prepare_config_and_inputs(self): method create_and_check_gptj_model (line 127) | def create_and_check_gptj_model(self, config, input_ids, input_mask, h... method create_and_check_gptj_model_past (line 143) | def create_and_check_gptj_model_past(self, config, input_ids, input_ma... method create_and_check_gptj_model_attention_mask_past (line 177) | def create_and_check_gptj_model_attention_mask_past( method create_and_check_gptj_model_past_large_inputs (line 221) | def create_and_check_gptj_model_past_large_inputs( method create_and_check_gptj_lm_head_model (line 265) | def create_and_check_gptj_lm_head_model(self, config, input_ids, input... method prepare_config_and_inputs_for_common (line 275) | def prepare_config_and_inputs_for_common(self): class TFGPTJModelTest (line 299) | class TFGPTJModelTest(TFModelTesterMixin, TFCoreModelTesterMixin, Pipeli... method is_pipeline_test_to_skip (line 324) | def is_pipeline_test_to_skip( method setUp (line 339) | def setUp(self): method test_config (line 343) | def test_config(self): method test_gptj_model (line 346) | def test_gptj_model(self): method test_gptj_model_past (line 350) | def test_gptj_model_past(self): method test_gptj_model_att_mask_past (line 354) | def test_gptj_model_att_mask_past(self): method test_gptj_model_past_large_inputs (line 358) | def test_gptj_model_past_large_inputs(self): method test_gptj_lm_head_model (line 362) | def test_gptj_lm_head_model(self): method test_model_from_pretrained (line 371) | def test_model_from_pretrained(self): method test_resize_token_embeddings (line 376) | def test_resize_token_embeddings(self): class TFGPTJModelLanguageGenerationTest (line 383) | class TFGPTJModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_gptj (line 384) | def test_lm_generate_gptj(self): method test_gptj_sample (line 392) | def test_gptj_sample(self): method _get_beam_search_test_objects (line 405) | def _get_beam_search_test_objects(self): method test_batch_beam_search (line 426) | def test_batch_beam_search(self): method test_batch_left_padding (line 435) | def test_batch_left_padding(self): method test_xla_beam_search (line 454) | def test_xla_beam_search(self): FILE: mplsandbox_for_rl/transformers/tests/models/grounding_dino/test_image_processing_grounding_dino.py class GroundingDinoImageProcessingTester (line 40) | class GroundingDinoImageProcessingTester(unittest.TestCase): method __init__ (line 41) | def __init__( method prepare_image_processor_dict (line 76) | def prepare_image_processor_dict(self): method get_expected_values (line 89) | def get_expected_values(self, image_inputs, batched=False): method expected_output_image_shape (line 123) | def expected_output_image_shape(self, images): method get_fake_grounding_dino_output (line 127) | def get_fake_grounding_dino_output(self): method prepare_image_inputs (line 135) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class GroundingDinoImageProcessingTest (line 149) | class GroundingDinoImageProcessingTest(AnnotationFormatTestMixin, ImageP... method setUp (line 152) | def setUp(self): method image_processor_dict (line 157) | def image_processor_dict(self): method test_image_processor_properties (line 161) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 172) | def test_image_processor_from_dict_with_kwargs(self): method test_post_process_object_detection (line 183) | def test_post_process_object_detection(self): method test_call_pytorch_with_coco_detection_annotations (line 201) | def test_call_pytorch_with_coco_detection_annotations(self): method test_batched_coco_detection_annotations (line 246) | def test_batched_coco_detection_annotations(self): method test_call_pytorch_with_coco_panoptic_annotations (line 365) | def test_call_pytorch_with_coco_panoptic_annotations(self): method test_batched_coco_panoptic_annotations (line 415) | def test_batched_coco_panoptic_annotations(self): method test_max_width_max_height_resizing_and_pad_strategy (line 538) | def test_max_width_max_height_resizing_and_pad_strategy(self): method test_longest_edge_shortest_edge_resizing_strategy (line 584) | def test_longest_edge_shortest_edge_resizing_strategy(self): FILE: mplsandbox_for_rl/transformers/tests/models/grounding_dino/test_modeling_grounding_dino.py class GroundingDinoModelTester (line 57) | class GroundingDinoModelTester: method __init__ (line 58) | def __init__( method prepare_config_and_inputs (line 114) | def prepare_config_and_inputs(self): method get_config (line 136) | def get_config(self): method prepare_config_and_inputs_for_common (line 175) | def prepare_config_and_inputs_for_common(self): method create_and_check_model (line 180) | def create_and_check_model(self, config, pixel_values, pixel_mask, inp... method create_and_check_object_detection_head_model (line 189) | def create_and_check_object_detection_head_model(self, config, pixel_v... class GroundingDinoModelTest (line 207) | class GroundingDinoModelTest(ModelTesterMixin, PipelineTesterMixin, unit... method _prepare_for_class (line 221) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 247) | def setUp(self): method test_config (line 256) | def test_config(self): method test_model (line 259) | def test_model(self): method test_object_detection_head_model (line 263) | def test_object_detection_head_model(self): method test_inputs_embeds (line 268) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 272) | def test_model_get_set_embeddings(self): method test_resize_tokens_embeddings (line 276) | def test_resize_tokens_embeddings(self): method test_feed_forward_chunking (line 280) | def test_feed_forward_chunking(self): method test_attention_outputs (line 283) | def test_attention_outputs(self): method test_hidden_states_output (line 377) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 436) | def test_retain_grad_hidden_states_attentions(self): method test_forward_signature (line 466) | def test_forward_signature(self): method test_different_timm_backbone (line 478) | def test_different_timm_backbone(self): method test_hf_backbone (line 505) | def test_hf_backbone(self): method test_initialization (line 532) | def test_initialization(self): method test_two_stage_training (line 557) | def test_two_stage_training(self): method test_tied_weights_keys (line 572) | def test_tied_weights_keys(self): function prepare_img (line 609) | def prepare_img(): function prepare_text (line 614) | def prepare_text(): class GroundingDinoModelIntegrationTests (line 622) | class GroundingDinoModelIntegrationTests(unittest.TestCase): method default_processor (line 624) | def default_processor(self): method test_inference_object_detection_head (line 627) | def test_inference_object_detection_head(self): method test_inference_object_detection_head_equivalence_cpu_gpu (line 680) | def test_inference_object_detection_head_equivalence_cpu_gpu(self): method test_cross_attention_mask (line 719) | def test_cross_attention_mask(self): FILE: mplsandbox_for_rl/transformers/tests/models/grounding_dino/test_processor_grounding_dino.py class GroundingDinoProcessorTest (line 45) | class GroundingDinoProcessorTest(ProcessorTesterMixin, unittest.TestCase): method setUp (line 49) | def setUp(self): method get_tokenizer (line 84) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 88) | def get_rust_tokenizer(self, **kwargs): method get_image_processor (line 92) | def get_image_processor(self, **kwargs): method tearDown (line 96) | def tearDown(self): method prepare_image_inputs (line 100) | def prepare_image_inputs(self): method get_fake_grounding_dino_output (line 111) | def get_fake_grounding_dino_output(self): method get_fake_grounding_dino_input_ids (line 118) | def get_fake_grounding_dino_input_ids(self): method test_post_process_grounded_object_detection (line 122) | def test_post_process_grounded_object_detection(self): method test_save_load_pretrained_default (line 147) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 172) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 190) | def test_image_processor(self): method test_tokenizer (line 205) | def test_tokenizer(self): method test_processor (line 220) | def test_processor(self): method test_tokenizer_decode (line 240) | def test_tokenizer_decode(self): method test_model_input_names (line 254) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/groupvit/test_modeling_groupvit.py class GroupViTVisionModelTester (line 54) | class GroupViTVisionModelTester: method __init__ (line 55) | def __init__( method prepare_config_and_inputs (line 97) | def prepare_config_and_inputs(self): method get_config (line 104) | def get_config(self): method create_and_check_model (line 120) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 131) | def prepare_config_and_inputs_for_common(self): class GroupViTVisionModelTest (line 139) | class GroupViTVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 152) | def setUp(self): method test_config (line 158) | def test_config(self): method test_inputs_embeds (line 162) | def test_inputs_embeds(self): method test_pt_tf_model_equivalence (line 166) | def test_pt_tf_model_equivalence(self): method test_model_get_set_embeddings (line 177) | def test_model_get_set_embeddings(self): method test_forward_signature (line 186) | def test_forward_signature(self): method test_model (line 198) | def test_model(self): method test_attention_outputs (line 202) | def test_attention_outputs(self): method test_training (line 266) | def test_training(self): method test_training_gradient_checkpointing (line 270) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 276) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 282) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 286) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 290) | def test_save_load_fast_init_to_base(self): method test_retain_grad_hidden_states_attentions (line 294) | def test_retain_grad_hidden_states_attentions(self): method test_model_from_pretrained (line 354) | def test_model_from_pretrained(self): class GroupViTTextModelTester (line 360) | class GroupViTTextModelTester: method __init__ (line 361) | def __init__( method prepare_config_and_inputs (line 397) | def prepare_config_and_inputs(self): method get_config (line 416) | def get_config(self): method create_and_check_model (line 429) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 439) | def prepare_config_and_inputs_for_common(self): class GroupViTTextModelTest (line 447) | class GroupViTTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 452) | def setUp(self): method test_config (line 456) | def test_config(self): method test_model (line 459) | def test_model(self): method test_training (line 464) | def test_training(self): method test_training_gradient_checkpointing (line 468) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 474) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 480) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 484) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 488) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 492) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 496) | def test_model_from_pretrained(self): class GroupViTModelTester (line 502) | class GroupViTModelTester: method __init__ (line 503) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 515) | def prepare_config_and_inputs(self): method get_config (line 523) | def get_config(self): method create_and_check_model (line 528) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 539) | def prepare_config_and_inputs_for_common(self): class GroupViTModelTest (line 552) | class GroupViTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 560) | def setUp(self): method test_model (line 563) | def test_model(self): method test_hidden_states_output (line 568) | def test_hidden_states_output(self): method test_inputs_embeds (line 572) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 576) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 580) | def test_model_get_set_embeddings(self): method check_pt_tf_outputs (line 584) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method test_pt_tf_model_equivalence (line 588) | def test_pt_tf_model_equivalence(self): method test_initialization (line 600) | def test_initialization(self): method _create_and_check_torchscript (line 623) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 694) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 710) | def test_model_from_pretrained(self): function prepare_img (line 717) | def prepare_img(): class GroupViTModelIntegrationTest (line 725) | class GroupViTModelIntegrationTest(unittest.TestCase): method test_inference (line 727) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/groupvit/test_modeling_tf_groupvit.py class TFGroupViTVisionModelTester (line 57) | class TFGroupViTVisionModelTester: method __init__ (line 58) | def __init__( method prepare_config_and_inputs (line 100) | def prepare_config_and_inputs(self): method get_config (line 107) | def get_config(self): method create_and_check_model (line 123) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 131) | def prepare_config_and_inputs_for_common(self): class TFGroupViTVisionModelTest (line 139) | class TFGroupViTVisionModelTest(TFModelTesterMixin, unittest.TestCase): method check_pt_tf_outputs (line 152) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method setUp (line 156) | def setUp(self): method test_config (line 162) | def test_config(self): method test_inputs_embeds (line 166) | def test_inputs_embeds(self): method test_saved_model_creation (line 176) | def test_saved_model_creation(self): method test_graph_mode_with_inputs_embeds (line 180) | def test_graph_mode_with_inputs_embeds(self): method test_model_common_attributes (line 183) | def test_model_common_attributes(self): method test_forward_signature (line 192) | def test_forward_signature(self): method test_model (line 204) | def test_model(self): method test_attention_outputs (line 208) | def test_attention_outputs(self): method test_hidden_states_output (line 262) | def test_hidden_states_output(self): method test_pt_tf_model_equivalence (line 295) | def test_pt_tf_model_equivalence(self): method test_model_from_pretrained (line 314) | def test_model_from_pretrained(self): method test_saved_model_creation_extended (line 324) | def test_saved_model_creation_extended(self): class TFGroupViTTextModelTester (line 376) | class TFGroupViTTextModelTester: method __init__ (line 377) | def __init__( method prepare_config_and_inputs (line 413) | def prepare_config_and_inputs(self): method get_config (line 431) | def get_config(self): method create_and_check_model (line 444) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 451) | def prepare_config_and_inputs_for_common(self): class TFGroupViTTextModelTest (line 459) | class TFGroupViTTextModelTest(TFModelTesterMixin, unittest.TestCase): method check_pt_tf_outputs (line 465) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method setUp (line 469) | def setUp(self): method test_config (line 473) | def test_config(self): method test_model (line 476) | def test_model(self): method test_inputs_embeds (line 481) | def test_inputs_embeds(self): method test_model_from_pretrained (line 485) | def test_model_from_pretrained(self): method test_saved_model_creation_extended (line 491) | def test_saved_model_creation_extended(self): class TFGroupViTModelTester (line 539) | class TFGroupViTModelTester: method __init__ (line 540) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 546) | def prepare_config_and_inputs(self): method get_config (line 554) | def get_config(self): method create_and_check_model (line 559) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 569) | def prepare_config_and_inputs_for_common(self): class TFGroupViTModelTest (line 582) | class TFGroupViTModelTest(TFModelTesterMixin, PipelineTesterMixin, unitt... method check_pt_tf_outputs (line 591) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method setUp (line 595) | def setUp(self): method test_model (line 598) | def test_model(self): method test_hidden_states_output (line 603) | def test_hidden_states_output(self): method test_inputs_embeds (line 607) | def test_inputs_embeds(self): method test_model_common_attributes (line 611) | def test_model_common_attributes(self): method test_keras_fit (line 616) | def test_keras_fit(self): method test_pt_tf_model_equivalence (line 620) | def test_pt_tf_model_equivalence(self): method test_keras_save_load (line 640) | def test_keras_save_load(self): method test_model_from_pretrained (line 697) | def test_model_from_pretrained(self): method test_saved_model_creation (line 704) | def test_saved_model_creation(self): method test_prepare_serving_output (line 709) | def test_prepare_serving_output(self): function prepare_img (line 714) | def prepare_img(): class TFGroupViTModelIntegrationTest (line 722) | class TFGroupViTModelIntegrationTest(unittest.TestCase): method test_inference (line 724) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/herbert/test_tokenization_herbert.py class HerbertTokenizationTest (line 30) | class HerbertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method get_input_output_texts (line 79) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 84) | def test_full_tokenizer(self): method test_rust_and_python_full_tokenizers (line 96) | def test_rust_and_python_full_tokenizers(self): method test_sequence_builders (line 119) | def test_sequence_builders(self): method test_training_new_tokenizer_with_special_tokens_change (line 134) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_training_new_tokenizer (line 140) | def test_training_new_tokenizer(self): FILE: mplsandbox_for_rl/transformers/tests/models/hiera/test_modeling_hiera.py class HieraModelTester (line 52) | class HieraModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method create_and_check_model (line 132) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_backbone (line 144) | def create_and_check_backbone(self, config, pixel_values, labels): method create_and_check_for_pretraining (line 176) | def create_and_check_for_pretraining(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 197) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 215) | def prepare_config_and_inputs_for_common(self): class HieraModelTest (line 227) | class HieraModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 254) | def setUp(self): method test_config (line 258) | def test_config(self): method test_model_get_set_embeddings (line 267) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 277) | def test_attention_outputs(self): method test_hidden_states_output (line 340) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 399) | def test_model_outputs_equivalence(self): method test_feed_forward_chunking (line 480) | def test_feed_forward_chunking(self): method test_inputs_embeds (line 484) | def test_inputs_embeds(self): method test_model_common_attributes (line 487) | def test_model_common_attributes(self): method test_model (line 496) | def test_model(self): method test_backbone (line 500) | def test_backbone(self): method test_for_pretraining (line 504) | def test_for_pretraining(self): method test_for_image_classification (line 508) | def test_for_image_classification(self): method test_model_from_pretrained (line 513) | def test_model_from_pretrained(self): function prepare_img (line 520) | def prepare_img(): class HieraModelIntegrationTest (line 527) | class HieraModelIntegrationTest(unittest.TestCase): method default_image_processor (line 529) | def default_image_processor(self): method test_inference_image_classification_head (line 533) | def test_inference_image_classification_head(self): method test_inference_interpolate_pos_encoding (line 562) | def test_inference_interpolate_pos_encoding(self): method test_inference_for_pretraining (line 587) | def test_inference_for_pretraining(self): class HieraBackboneTest (line 626) | class HieraBackboneTest(unittest.TestCase, BackboneTesterMixin): method setUp (line 630) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/hubert/test_modeling_hubert.py class HubertModelTester (line 56) | class HubertModelTester: method __init__ (line 57) | def __init__( method prepare_config_and_inputs (line 115) | def prepare_config_and_inputs(self): method get_config (line 123) | def get_config(self): method create_and_check_model (line 146) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 155) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 181) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 209) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 234) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 263) | def check_seq_classifier_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 286) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 300) | def prepare_config_and_inputs_for_common(self): class HubertModelTest (line 307) | class HubertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 322) | def setUp(self): method test_config (line 326) | def test_config(self): method test_model (line 329) | def test_model(self): method test_ctc_loss_inference (line 333) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 337) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 341) | def test_ctc_train(self): method test_seq_classifier_train (line 345) | def test_seq_classifier_train(self): method test_labels_out_of_vocab (line 349) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 354) | def test_inputs_embeds(self): method test_forward_signature (line 358) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 364) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 368) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 371) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 411) | def test_initialization(self): method _create_and_check_torch_fx_tracing (line 438) | def _create_and_check_torch_fx_tracing(self, config, inputs_dict, outp... method _mock_init_weights (line 552) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 565) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 569) | def test_model_from_pretrained(self): class HubertRobustModelTest (line 575) | class HubertRobustModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 580) | def setUp(self): method test_config (line 586) | def test_config(self): method test_model (line 589) | def test_model(self): method test_batched_inference (line 593) | def test_batched_inference(self): method test_ctc_loss_inference (line 597) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 601) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 605) | def test_ctc_train(self): method test_seq_classifier_train (line 609) | def test_seq_classifier_train(self): method test_labels_out_of_vocab (line 613) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 618) | def test_inputs_embeds(self): method test_forward_signature (line 622) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 626) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 630) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 633) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 673) | def test_initialization(self): method _mock_init_weights (line 700) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 713) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 717) | def test_model_from_pretrained(self): class HubertUtilsTest (line 723) | class HubertUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 724) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 735) | def test_compute_mask_indices_overlap(self): class HubertModelIntegrationTest (line 752) | class HubertModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 753) | def _load_datasamples(self, num_samples): method _load_superb (line 764) | def _load_superb(self, task, num_samples): method test_inference_ctc_batched (line 771) | def test_inference_ctc_batched(self): method test_inference_keyword_spotting (line 796) | def test_inference_keyword_spotting(self): method test_inference_intent_classification (line 817) | def test_inference_intent_classification(self): method test_inference_speaker_identification (line 856) | def test_inference_speaker_identification(self): method test_inference_emotion_recognition (line 882) | def test_inference_emotion_recognition(self): method test_inference_distilhubert (line 904) | def test_inference_distilhubert(self): FILE: mplsandbox_for_rl/transformers/tests/models/hubert/test_modeling_tf_hubert.py class TFHubertModelTester (line 45) | class TFHubertModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 104) | def prepare_config_and_inputs(self): method create_and_check_model (line 132) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 139) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 164) | def check_ctc_loss(self, config, input_values, *args): method check_training (line 188) | def check_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 211) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 219) | def prepare_config_and_inputs_for_common(self): class TFHubertModelTest (line 226) | class TFHubertModelTest(TFModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 233) | def setUp(self): method test_config (line 237) | def test_config(self): method test_forward_signature (line 241) | def test_forward_signature(self): method test_keyword_and_dict_args (line 254) | def test_keyword_and_dict_args(self): method test_model (line 271) | def test_model(self): method test_hidden_states_output (line 275) | def test_hidden_states_output(self): method test_ctc_loss_inference (line 301) | def test_ctc_loss_inference(self): method test_train (line 305) | def test_train(self): method test_labels_out_of_vocab (line 309) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 314) | def test_inputs_embeds(self): method test_resize_tokens_embeddings (line 318) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 322) | def test_model_common_attributes(self): method test_model_from_pretrained (line 326) | def test_model_from_pretrained(self): method test_dataset_conversion (line 331) | def test_dataset_conversion(self): method test_keras_fit (line 336) | def test_keras_fit(self): method test_pt_tf_model_equivalence (line 341) | def test_pt_tf_model_equivalence(self, allow_missing_keys=False): class TFHubertRobustModelTest (line 398) | class TFHubertRobustModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 404) | def setUp(self): method test_forward_signature (line 415) | def test_forward_signature(self): method test_keyword_and_dict_args (line 428) | def test_keyword_and_dict_args(self): method test_config (line 445) | def test_config(self): method test_model (line 448) | def test_model(self): method test_hidden_states_output (line 452) | def test_hidden_states_output(self): method test_batched_inference (line 478) | def test_batched_inference(self): method test_ctc_loss_inference (line 482) | def test_ctc_loss_inference(self): method test_train (line 486) | def test_train(self): method test_labels_out_of_vocab (line 490) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 495) | def test_inputs_embeds(self): method test_resize_tokens_embeddings (line 499) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 503) | def test_model_common_attributes(self): method test_model_from_pretrained (line 507) | def test_model_from_pretrained(self): method test_dataset_conversion (line 512) | def test_dataset_conversion(self): method test_keras_fit (line 517) | def test_keras_fit(self): method test_pt_tf_model_equivalence (line 522) | def test_pt_tf_model_equivalence(self, allow_missing_keys=False): class TFHubertUtilsTest (line 579) | class TFHubertUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 580) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 592) | def test_compute_mask_indices_overlap(self): class TFHubertModelIntegrationTest (line 608) | class TFHubertModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 609) | def _load_datasamples(self, num_samples): method test_inference_ctc_normal (line 620) | def test_inference_ctc_normal(self): method test_inference_ctc_normal_batched (line 635) | def test_inference_ctc_normal_batched(self): method test_inference_ctc_robust_batched (line 654) | def test_inference_ctc_robust_batched(self): FILE: mplsandbox_for_rl/transformers/tests/models/ibert/test_modeling_ibert.py class IBertModelTester (line 52) | class IBertModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs(self): method get_config (line 124) | def get_config(self): method get_pipeline_config (line 140) | def get_pipeline_config(self): method create_and_check_model (line 145) | def create_and_check_model( method create_and_check_for_masked_lm (line 158) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 167) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 177) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 195) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 211) | def prepare_config_and_inputs_for_common(self): class IBertModelTest (line 227) | class IBertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 258) | def setUp(self): method test_config (line 262) | def test_config(self): method test_model (line 265) | def test_model(self): method test_model_various_embeddings (line 269) | def test_model_various_embeddings(self): method test_for_masked_lm (line 276) | def test_for_masked_lm(self): method test_for_token_classification (line 280) | def test_for_token_classification(self): method test_for_multiple_choice (line 284) | def test_for_multiple_choice(self): method test_for_question_answering (line 288) | def test_for_question_answering(self): method test_model_from_pretrained (line 293) | def test_model_from_pretrained(self): method test_create_position_ids_respects_padding_index (line 298) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 316) | def test_create_position_ids_from_inputs_embeds(self): method test_model_get_set_embeddings (line 337) | def test_model_get_set_embeddings(self): method test_feed_forward_chunking (line 348) | def test_feed_forward_chunking(self): method test_inputs_embeds (line 352) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 383) | def test_inputs_embeds_matches_input_ids(self): class IBertModelIntegrationTest (line 388) | class IBertModelIntegrationTest(unittest.TestCase): method test_quant_embedding (line 389) | def test_quant_embedding(self): method test_quant_act (line 408) | def test_quant_act(self): method test_quant_linear (line 485) | def test_quant_linear(self): method test_int_gelu (line 518) | def test_int_gelu(self): method test_force_dequant_gelu (line 536) | def test_force_dequant_gelu(self): method test_int_softmax (line 563) | def test_int_softmax(self): method test_force_dequant_softmax (line 593) | def test_force_dequant_softmax(self): method test_int_layernorm (line 622) | def test_int_layernorm(self): method test_force_dequant_layernorm (line 649) | def test_force_dequant_layernorm(self): method quantize (line 682) | def quantize(self, model): method test_inference_masked_lm (line 700) | def test_inference_masked_lm(self): method test_inference_classification_head (line 720) | def test_inference_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/idefics/test_image_processing_idefics.py class IdeficsImageProcessingTester (line 39) | class IdeficsImageProcessingTester(unittest.TestCase): method __init__ (line 40) | def __init__( method prepare_image_processor_dict (line 63) | def prepare_image_processor_dict(self): method get_expected_values (line 70) | def get_expected_values(self, image_inputs, batched=False): method expected_output_image_shape (line 112) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 116) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class IdeficsImageProcessingTest (line 130) | class IdeficsImageProcessingTest(ImageProcessingTestMixin, unittest.Test... method setUp (line 133) | def setUp(self): method image_processor_dict (line 138) | def image_processor_dict(self): method test_image_processor_properties (line 141) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 147) | def test_image_processor_from_dict_with_kwargs(self): method test_torchvision_numpy_transforms_equivalency (line 155) | def test_torchvision_numpy_transforms_equivalency(self): method test_call_numpy (line 195) | def test_call_numpy(self): method test_call_numpy_4_channels (line 199) | def test_call_numpy_4_channels(self): method test_call_pil (line 203) | def test_call_pil(self): method test_call_pytorch (line 207) | def test_call_pytorch(self): FILE: mplsandbox_for_rl/transformers/tests/models/idefics/test_modeling_idefics.py class IdeficsModelTester (line 52) | class IdeficsModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 154) | def prepare_config_and_inputs(self, num_images=1, interpolate_pos_enco... method prepare_config_and_inputs_gate_tests (line 175) | def prepare_config_and_inputs_gate_tests(self): method get_config (line 226) | def get_config(self): method create_and_check_model (line 249) | def create_and_check_model( method create_and_check_model_gen (line 272) | def create_and_check_model_gen( method prepare_config_and_inputs_for_common (line 293) | def prepare_config_and_inputs_for_common(self): method prepare_pixel_values (line 312) | def prepare_pixel_values(self): method test_eager_matches_sdpa_inference (line 318) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): class IdeficsModelTest (line 324) | class IdeficsModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method _prepare_for_class (line 331) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_model_outputs_equivalence (line 343) | def test_model_outputs_equivalence(self): method setUp (line 352) | def setUp(self): method test_config (line 356) | def test_config(self): method test_model_single_image (line 359) | def test_model_single_image(self): method test_model_multiple_images (line 365) | def test_model_multiple_images(self): method test_model_with_image_pos_embeddings_interpolation_single_image (line 371) | def test_model_with_image_pos_embeddings_interpolation_single_image(se... method test_model_with_image_pos_embeddings_interpolation_multiple_images (line 381) | def test_model_with_image_pos_embeddings_interpolation_multiple_images... method test_generate_with_image_pos_embeddings_interpolation_single_image (line 391) | def test_generate_with_image_pos_embeddings_interpolation_single_image... method test_generate_with_image_pos_embeddings_interpolation_multiple_images (line 397) | def test_generate_with_image_pos_embeddings_interpolation_multiple_ima... method test_cross_attention_gates (line 403) | def test_cross_attention_gates(self): method test_training (line 423) | def test_training(self): method test_training_gradient_checkpointing (line 443) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 468) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 474) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_retain_grad_hidden_states_attentions (line 478) | def test_retain_grad_hidden_states_attentions(self): method test_attention_outputs (line 481) | def test_attention_outputs(self): method test_hidden_states_output (line 528) | def test_hidden_states_output(self): method test_pt_tf_model_equivalence (line 564) | def test_pt_tf_model_equivalence(self, allow_missing_keys=False): method test_model_from_pretrained (line 569) | def test_model_from_pretrained(self): method test_eager_matches_sdpa_inference (line 577) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): class IdeficsForVisionText2TextTest (line 583) | class IdeficsForVisionText2TextTest(IdeficsModelTest, unittest.TestCase): method setUp (line 586) | def setUp(self): method test_model (line 594) | def test_model(self): method test_for_token_classification (line 598) | def test_for_token_classification(self): method test_retain_grad_hidden_states_attentions (line 602) | def test_retain_grad_hidden_states_attentions(self): method test_training_gradient_checkpointing_use_reentrant (line 608) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 614) | def test_training_gradient_checkpointing_use_reentrant_false(self): class IdeficsModelIntegrationTest (line 621) | class IdeficsModelIntegrationTest(TestCasePlus): method default_processor (line 623) | def default_processor(self): method test_inference_natural_language_visual_reasoning (line 632) | def test_inference_natural_language_visual_reasoning(self): FILE: mplsandbox_for_rl/transformers/tests/models/idefics/test_modeling_tf_idefics.py class IdeficsModelTester (line 45) | class IdeficsModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 145) | def prepare_config_and_inputs(self, num_images=1, interpolate_pos_enco... method get_config (line 166) | def get_config(self): method create_and_check_model (line 188) | def create_and_check_model( method create_and_check_model_gen (line 209) | def create_and_check_model_gen( method prepare_config_and_inputs_for_common (line 228) | def prepare_config_and_inputs_for_common(self): method prepare_pixel_values (line 247) | def prepare_pixel_values(self): class TFIdeficsModelTest (line 252) | class TFIdeficsModelTest(TFModelTesterMixin, PipelineTesterMixin, unitte... method _prepare_for_class (line 260) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_model_outputs_equivalence (line 271) | def test_model_outputs_equivalence(self): method setUp (line 280) | def setUp(self): method test_config (line 284) | def test_config(self): method test_model_single_image (line 287) | def test_model_single_image(self): method test_model_multiple_images (line 293) | def test_model_multiple_images(self): method test_model_with_image_pos_embeddings_interpolation_single_image (line 299) | def test_model_with_image_pos_embeddings_interpolation_single_image(se... method test_model_with_image_pos_embeddings_interpolation_multiple_images (line 309) | def test_model_with_image_pos_embeddings_interpolation_multiple_images... method test_generate_with_image_pos_embeddings_interpolation_single_image (line 319) | def test_generate_with_image_pos_embeddings_interpolation_single_image... method test_generate_with_image_pos_embeddings_interpolation_multiple_images (line 325) | def test_generate_with_image_pos_embeddings_interpolation_multiple_ima... method test_training_gradient_checkpointing (line 331) | def test_training_gradient_checkpointing(self): method test_retain_grad_hidden_states_attentions (line 335) | def test_retain_grad_hidden_states_attentions(self): method test_embeddings_out_of_bounds_raise_exception (line 339) | def test_embeddings_out_of_bounds_raise_exception(self): method test_prepare_serving_output (line 343) | def test_prepare_serving_output(self): method test_model_common_attributes (line 346) | def test_model_common_attributes(self): method test_attention_outputs (line 355) | def test_attention_outputs(self): method test_hidden_states_output (line 392) | def test_hidden_states_output(self): method test_pt_tf_model_equivalence (line 424) | def test_pt_tf_model_equivalence(self, allow_missing_keys=False): method test_keras_save_load (line 428) | def test_keras_save_load(self): method test_keras_fit (line 463) | def test_keras_fit(self): method test_model_from_pretrained (line 467) | def test_model_from_pretrained(self): method test_saved_model_creation (line 472) | def test_saved_model_creation(self): method test_loss_computation (line 476) | def test_loss_computation(self): class TFIdeficsForVisionText2TextTest (line 481) | class TFIdeficsForVisionText2TextTest(TFIdeficsModelTest, unittest.TestC... method setUp (line 485) | def setUp(self): method test_model (line 493) | def test_model(self): method test_for_token_classification (line 497) | def test_for_token_classification(self): method test_retain_grad_hidden_states_attentions (line 501) | def test_retain_grad_hidden_states_attentions(self): method test_loss_computation (line 505) | def test_loss_computation(self): method test_keras_fit (line 509) | def test_keras_fit(self): class TFIdeficsModelIntegrationTest (line 523) | class TFIdeficsModelIntegrationTest(TestCasePlus): method default_processor (line 525) | def default_processor(self): method test_inference_natural_language_visual_reasoning (line 529) | def test_inference_natural_language_visual_reasoning(self): FILE: mplsandbox_for_rl/transformers/tests/models/idefics/test_processor_idefics.py class IdeficsProcessorTest (line 38) | class IdeficsProcessorTest(TestCasePlus): method setUp (line 39) | def setUp(self): method get_tokenizer (line 53) | def get_tokenizer(self, **kwargs): method get_image_processor (line 56) | def get_image_processor(self, **kwargs): method prepare_prompts (line 59) | def prepare_prompts(self): method test_save_load_pretrained_additional_features (line 101) | def test_save_load_pretrained_additional_features(self): method test_processor (line 118) | def test_processor(self): method test_tokenizer_decode (line 131) | def test_tokenizer_decode(self): method test_tokenizer_padding (line 144) | def test_tokenizer_padding(self): method test_tokenizer_left_padding (line 172) | def test_tokenizer_left_padding(self): method test_model_input_names (line 200) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/idefics2/test_image_processing_idefics2.py class Idefics2ImageProcessingTester (line 37) | class Idefics2ImageProcessingTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_image_processor_dict (line 77) | def prepare_image_processor_dict(self): method get_expected_values (line 91) | def get_expected_values(self, image_inputs, batched=False): method expected_output_image_shape (line 129) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 134) | def prepare_image_inputs( class Idefics2ImageProcessingTest (line 190) | class Idefics2ImageProcessingTest(ImageProcessingTestMixin, unittest.Tes... method setUp (line 193) | def setUp(self): method image_processor_dict (line 198) | def image_processor_dict(self): method test_image_processor_properties (line 201) | def test_image_processor_properties(self): method test_call_numpy (line 214) | def test_call_numpy(self): method test_call_numpy_4_channels (line 236) | def test_call_numpy_4_channels(self): method test_call_pil (line 267) | def test_call_pil(self): method test_call_pytorch (line 289) | def test_call_pytorch(self): FILE: mplsandbox_for_rl/transformers/tests/models/idefics2/test_modeling_idefics2.py class Idefics2VisionText2TextModelTester (line 55) | class Idefics2VisionText2TextModelTester: method __init__ (line 56) | def __init__( method get_config (line 127) | def get_config(self): method prepare_config_and_inputs (line 138) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 152) | def prepare_config_and_inputs_for_common(self): class Idefics2ModelTest (line 170) | class Idefics2ModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 182) | def setUp(self): method test_inputs_embeds (line 187) | def test_inputs_embeds(): method test_inputs_embeds_matches_input_ids (line 191) | def test_inputs_embeds_matches_input_ids(self): method test_flash_attn_2_generate_padding_right (line 195) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_inference_padding_right (line 199) | def test_flash_attn_2_inference_padding_right(self): method test_resize_tokens_embeddings (line 203) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 283) | def test_resize_embeddings_untied(self): class Idefics2ForConditionalGenerationModelTest (line 330) | class Idefics2ForConditionalGenerationModelTest(GenerationTesterMixin, M... method setUp (line 342) | def setUp(self): method test_inputs_embeds (line 347) | def test_inputs_embeds(): method test_flash_attn_2_generate_padding_right (line 351) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_inference_padding_right (line 355) | def test_flash_attn_2_inference_padding_right(self): method test_resize_tokens_embeddings (line 359) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 432) | def test_resize_embeddings_untied(self): class Idefics2ForConditionalGenerationIntegrationTest (line 475) | class Idefics2ForConditionalGenerationIntegrationTest(unittest.TestCase): method setUp (line 476) | def setUp(self): method tearDown (line 496) | def tearDown(self): method test_integration_test (line 502) | def test_integration_test(self): method test_integration_test_4bit (line 524) | def test_integration_test_4bit(self): method test_flash_attn_2_eager_equivalence (line 545) | def test_flash_attn_2_eager_equivalence(self): FILE: mplsandbox_for_rl/transformers/tests/models/idefics2/test_processing_idefics2.py class Idefics2ProcessorTest (line 32) | class Idefics2ProcessorTest(unittest.TestCase): method setUp (line 33) | def setUp(self): method test_process_interleaved_images_prompts_no_image_splitting (line 61) | def test_process_interleaved_images_prompts_no_image_splitting(self): method test_process_interleaved_images_prompts_image_splitting (line 122) | def test_process_interleaved_images_prompts_image_splitting(self): method test_add_special_tokens_processor (line 183) | def test_add_special_tokens_processor(self): method test_apply_chat_template (line 201) | def test_apply_chat_template(self): FILE: mplsandbox_for_rl/transformers/tests/models/imagegpt/test_image_processing_imagegpt.py class ImageGPTImageProcessingTester (line 41) | class ImageGPTImageProcessingTester(unittest.TestCase): method __init__ (line 42) | def __init__( method prepare_image_processor_dict (line 66) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 80) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 83) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class ImageGPTImageProcessingTest (line 97) | class ImageGPTImageProcessingTest(ImageProcessingTestMixin, unittest.Tes... method setUp (line 100) | def setUp(self): method image_processor_dict (line 105) | def image_processor_dict(self): method test_image_processor_properties (line 108) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 115) | def test_image_processor_from_dict_with_kwargs(self): method test_image_processor_to_json_string (line 122) | def test_image_processor_to_json_string(self): method test_image_processor_to_json_file (line 131) | def test_image_processor_to_json_file(self): method test_image_processor_from_and_save_pretrained (line 146) | def test_image_processor_from_and_save_pretrained(self): method test_image_processor_save_load_with_autoimageprocessor (line 161) | def test_image_processor_save_load_with_autoimageprocessor(self): method test_init_without_params (line 181) | def test_init_without_params(self): method test_call_pil (line 185) | def test_call_pil(self): method test_call_numpy (line 205) | def test_call_numpy(self): method test_call_numpy_4_channels (line 225) | def test_call_numpy_4_channels(self): method test_call_pytorch (line 229) | def test_call_pytorch(self): function prepare_images (line 251) | def prepare_images(): class ImageGPTImageProcessorIntegrationTest (line 266) | class ImageGPTImageProcessorIntegrationTest(unittest.TestCase): method test_image (line 268) | def test_image(self): FILE: mplsandbox_for_rl/transformers/tests/models/imagegpt/test_modeling_imagegpt.py class ImageGPTModelTester (line 54) | class ImageGPTModelTester: method __init__ (line 55) | def __init__( method get_large_model_config (line 105) | def get_large_model_config(self): method prepare_config_and_inputs (line 108) | def prepare_config_and_inputs( method get_config (line 153) | def get_config( method get_pipeline_config (line 174) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 180) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_imagegpt_model (line 209) | def create_and_check_imagegpt_model(self, config, pixel_values, input_... method create_and_check_lm_head_model (line 221) | def create_and_check_lm_head_model(self, config, pixel_values, input_m... method create_and_check_imagegpt_for_image_classification (line 232) | def create_and_check_imagegpt_for_image_classification( method prepare_config_and_inputs_for_common (line 242) | def prepare_config_and_inputs_for_common(self): class ImageGPTModelTest (line 267) | class ImageGPTModelTest(ModelTesterMixin, GenerationTesterMixin, Pipelin... method _prepare_for_class (line 281) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method _check_scores (line 293) | def _check_scores(self, batch_size, scores, length, config): method setUp (line 299) | def setUp(self): method test_config (line 303) | def test_config(self): method test_imagegpt_model (line 306) | def test_imagegpt_model(self): method test_imagegpt_causal_lm (line 310) | def test_imagegpt_causal_lm(self): method test_imagegpt_image_classification (line 314) | def test_imagegpt_image_classification(self): method test_training_gradient_checkpointing (line 321) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 327) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 333) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_from_pretrained (line 337) | def test_model_from_pretrained(self): method test_forward_signature (line 342) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 354) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 401) | def test_resize_embeddings_untied(self): method test_inputs_embeds (line 450) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 471) | def test_inputs_embeds_matches_input_ids(self): method _create_and_check_torchscript (line 494) | def _create_and_check_torchscript(self, config, inputs_dict): method test_left_padding_compatibility (line 577) | def test_left_padding_compatibility(self): function prepare_img (line 582) | def prepare_img(): class ImageGPTModelIntegrationTest (line 589) | class ImageGPTModelIntegrationTest(unittest.TestCase): method default_image_processor (line 591) | def default_image_processor(self): method test_inference_causal_lm_head (line 595) | def test_inference_causal_lm_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/informer/test_modeling_informer.py class InformerModelTester (line 46) | class InformerModelTester: method __init__ (line 47) | def __init__( method get_config (line 94) | def get_config(self): method prepare_informer_inputs_dict (line 117) | def prepare_informer_inputs_dict(self, config): method prepare_config_and_inputs (line 142) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 147) | def prepare_config_and_inputs_for_common(self): method check_encoder_decoder_model_standalone (line 151) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class InformerModelTest (line 191) | class InformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 202) | def setUp(self): method test_config (line 211) | def test_config(self): method test_save_load_strict (line 214) | def test_save_load_strict(self): method test_encoder_decoder_model_standalone (line 224) | def test_encoder_decoder_model_standalone(self): method test_hidden_states_output (line 228) | def test_hidden_states_output(self): method test_resize_tokens_embeddings (line 282) | def test_resize_tokens_embeddings(self): method test_model_outputs_equivalence (line 286) | def test_model_outputs_equivalence(self): method test_determinism (line 290) | def test_determinism(self): method test_batching_equivalence (line 294) | def test_batching_equivalence(self): method test_training_gradient_checkpointing (line 300) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 306) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 312) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_main_input_name (line 316) | def test_model_main_input_name(self): method test_forward_signature (line 322) | def test_forward_signature(self): method test_attention_outputs (line 372) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 469) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 473) | def test_model_get_set_embeddings(self): function prepare_batch (line 477) | def prepare_batch(filename="train-batch.pt"): class InformerModelIntegrationTests (line 485) | class InformerModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 486) | def test_inference_no_head(self): method test_inference_head (line 509) | def test_inference_head(self): method test_seq_to_seq_generation (line 532) | def test_seq_to_seq_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/instructblip/test_modeling_instructblip.py class InstructBlipVisionModelTester (line 62) | class InstructBlipVisionModelTester: method __init__ (line 63) | def __init__( method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs(self): method get_config (line 107) | def get_config(self): method create_and_check_model (line 122) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 135) | def prepare_config_and_inputs_for_common(self): class InstructBlipVisionModelTest (line 143) | class InstructBlipVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 155) | def setUp(self): method test_config (line 161) | def test_config(self): method test_inputs_embeds (line 165) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 168) | def test_model_get_set_embeddings(self): method test_forward_signature (line 177) | def test_forward_signature(self): method test_model (line 189) | def test_model(self): method test_training (line 194) | def test_training(self): method test_training_gradient_checkpointing (line 198) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 204) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 210) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 214) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 218) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 222) | def test_model_from_pretrained(self): class InstructBlipQFormerModelTester (line 228) | class InstructBlipQFormerModelTester: method __init__ (line 229) | def __init__( method prepare_config_and_inputs (line 269) | def prepare_config_and_inputs(self): method get_config (line 289) | def get_config(self): class InstructBlipTextModelDecoderOnlyTester (line 306) | class InstructBlipTextModelDecoderOnlyTester: method __init__ (line 307) | def __init__( method prepare_config_and_inputs (line 354) | def prepare_config_and_inputs(self): method get_config (line 364) | def get_config(self): class InstructBlipForConditionalGenerationDecoderOnlyModelTester (line 384) | class InstructBlipForConditionalGenerationDecoderOnlyModelTester: method __init__ (line 385) | def __init__( method prepare_config_and_inputs (line 404) | def prepare_config_and_inputs(self): method get_config (line 413) | def get_config(self): method create_and_check_for_conditional_generation (line 421) | def create_and_check_for_conditional_generation( method prepare_config_and_inputs_for_common (line 440) | def prepare_config_and_inputs_for_common(self): class InstructBlipForConditionalGenerationDecoderOnlyTest (line 455) | class InstructBlipForConditionalGenerationDecoderOnlyTest(ModelTesterMix... method setUp (line 464) | def setUp(self): method test_for_conditional_generation (line 467) | def test_for_conditional_generation(self): method test_hidden_states_output (line 472) | def test_hidden_states_output(self): method test_inputs_embeds (line 476) | def test_inputs_embeds(self): method test_tied_weights_keys (line 480) | def test_tied_weights_keys(self): method test_retain_grad_hidden_states_attentions (line 484) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 488) | def test_model_get_set_embeddings(self): method test_save_load_fast_init_from_base (line 492) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 496) | def test_save_load_fast_init_to_base(self): method test_forward_signature (line 499) | def test_forward_signature(self): method test_load_vision_qformer_text_config (line 511) | def test_load_vision_qformer_text_config(self): method test_model_from_pretrained (line 527) | def test_model_from_pretrained(self): function prepare_img (line 534) | def prepare_img(): class InstructBlipModelIntegrationTest (line 543) | class InstructBlipModelIntegrationTest(unittest.TestCase): method test_inference_vicuna_7b (line 546) | def test_inference_vicuna_7b(self): method test_inference_flant5_xl (line 580) | def test_inference_flant5_xl(self): method test_inference_interpolate_pos_encoding (line 620) | def test_inference_interpolate_pos_encoding(self): method test_expansion_in_processing (line 641) | def test_expansion_in_processing(self): FILE: mplsandbox_for_rl/transformers/tests/models/instructblip/test_processor_instructblip.py class InstructBlipProcessorTest (line 39) | class InstructBlipProcessorTest(unittest.TestCase): method setUp (line 40) | def setUp(self): method get_tokenizer (line 51) | def get_tokenizer(self, **kwargs): method get_image_processor (line 54) | def get_image_processor(self, **kwargs): method get_qformer_tokenizer (line 57) | def get_qformer_tokenizer(self, **kwargs): method tearDown (line 60) | def tearDown(self): method prepare_image_inputs (line 63) | def prepare_image_inputs(self): method test_save_load_pretrained_additional_features (line 74) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 96) | def test_image_processor(self): method test_tokenizer (line 113) | def test_tokenizer(self): method test_processor (line 135) | def test_processor(self): method test_tokenizer_decode (line 158) | def test_tokenizer_decode(self): method test_model_input_names (line 174) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/instructblipvideo/test_image_processing_instrictblipvideo.py class InstructBlipVideoProcessingTester (line 36) | class InstructBlipVideoProcessingTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_image_processor_dict (line 69) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 79) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 82) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class InstructBlipVideoProcessingTest (line 112) | class InstructBlipVideoProcessingTest(ImageProcessingTestMixin, unittest... method setUp (line 115) | def setUp(self): method image_processor_dict (line 121) | def image_processor_dict(self): method test_image_processor_properties (line 124) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 133) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pil (line 140) | def test_call_pil(self): method test_call_numpy (line 158) | def test_call_numpy(self): method test_call_pytorch (line 176) | def test_call_pytorch(self): FILE: mplsandbox_for_rl/transformers/tests/models/instructblipvideo/test_modeling_instructblipvideo.py class InstructBlipVideoVisionModelTester (line 62) | class InstructBlipVideoVisionModelTester: method __init__ (line 63) | def __init__( method prepare_config_and_inputs (line 103) | def prepare_config_and_inputs(self): method get_config (line 111) | def get_config(self): method create_and_check_model (line 126) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 141) | def prepare_config_and_inputs_for_common(self): class InstructBlipVideoVisionModelTest (line 149) | class InstructBlipVideoVisionModelTest(ModelTesterMixin, unittest.TestCa... method setUp (line 161) | def setUp(self): method test_config (line 167) | def test_config(self): method test_inputs_embeds (line 171) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 175) | def test_model_get_set_embeddings(self): method test_model_common_attributes (line 178) | def test_model_common_attributes(self): method test_forward_signature (line 187) | def test_forward_signature(self): method test_model (line 199) | def test_model(self): method test_training (line 206) | def test_training(self): method test_training_gradient_checkpointing (line 212) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 218) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 224) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 228) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 232) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 236) | def test_model_from_pretrained(self): class InstructBlipVideoQFormerModelTester (line 242) | class InstructBlipVideoQFormerModelTester: method __init__ (line 243) | def __init__( method prepare_config_and_inputs (line 283) | def prepare_config_and_inputs(self): method get_config (line 303) | def get_config(self): class InstructBlipVideoTextModelDecoderOnlyTester (line 320) | class InstructBlipVideoTextModelDecoderOnlyTester: method __init__ (line 321) | def __init__( method prepare_config_and_inputs (line 368) | def prepare_config_and_inputs(self): method get_config (line 378) | def get_config(self): class InstructBlipVideoForConditionalGenerationDecoderOnlyModelTester (line 398) | class InstructBlipVideoForConditionalGenerationDecoderOnlyModelTester: method __init__ (line 399) | def __init__( method prepare_config_and_inputs (line 418) | def prepare_config_and_inputs(self): method get_config (line 430) | def get_config(self): method create_and_check_for_conditional_generation (line 438) | def create_and_check_for_conditional_generation( method prepare_config_and_inputs_for_common (line 459) | def prepare_config_and_inputs_for_common(self): class InstructBlipVideoForConditionalGenerationDecoderOnlyTest (line 474) | class InstructBlipVideoForConditionalGenerationDecoderOnlyTest( method setUp (line 485) | def setUp(self): method test_for_conditional_generation (line 488) | def test_for_conditional_generation(self): method test_hidden_states_output (line 493) | def test_hidden_states_output(self): method test_inputs_embeds (line 497) | def test_inputs_embeds(self): method test_tied_weights_keys (line 501) | def test_tied_weights_keys(self): method test_retain_grad_hidden_states_attentions (line 505) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 509) | def test_model_common_attributes(self): method test_save_load_fast_init_from_base (line 513) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 517) | def test_save_load_fast_init_to_base(self): method test_forward_signature (line 520) | def test_forward_signature(self): method test_load_vision_qformer_text_config (line 532) | def test_load_vision_qformer_text_config(self): method test_model_from_pretrained (line 548) | def test_model_from_pretrained(self): function prepare_video (line 555) | def prepare_video(): class InstructBlipVideoModelIntegrationTest (line 568) | class InstructBlipVideoModelIntegrationTest(unittest.TestCase): method test_inference_vicuna_7b (line 569) | def test_inference_vicuna_7b(self): method test_expansion_in_processing (line 587) | def test_expansion_in_processing(self): FILE: mplsandbox_for_rl/transformers/tests/models/jamba/test_modeling_jamba.py class JambaModelTester (line 53) | class JambaModelTester: method __init__ (line 54) | def __init__( method prepare_config_and_inputs (line 106) | def prepare_config_and_inputs(self): method get_config (line 125) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 146) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 167) | def create_and_check_model(self, config, input_ids, input_mask, sequen... method create_and_check_for_causal_lm (line 175) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 193) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_sequence_classification (line 254) | def create_and_check_for_sequence_classification( method prepare_config_and_inputs_for_common (line 264) | def prepare_config_and_inputs_for_common(self): class JambaModelTest (line 279) | class JambaModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe... method setUp (line 303) | def setUp(self): method test_config (line 307) | def test_config(self): method test_model (line 310) | def test_model(self): method test_for_casual_lm (line 314) | def test_for_casual_lm(self): method test_for_sequence_classification (line 318) | def test_for_sequence_classification(self): method test_decoder_model_past_with_large_inputs (line 322) | def test_decoder_model_past_with_large_inputs(self): method test_load_balancing_loss (line 326) | def test_load_balancing_loss(self): method test_initialization (line 364) | def test_initialization(self): method test_mismatched_shapes_have_properly_initialized_weights (line 388) | def test_mismatched_shapes_have_properly_initialized_weights(self): method test_attention_outputs (line 395) | def test_attention_outputs(self): method test_left_padding_compatibility (line 461) | def test_left_padding_compatibility(self): method test_flash_attn_2_fp32_ln (line 511) | def test_flash_attn_2_fp32_ln(self): method test_flash_attn_2_generate_padding_right (line 549) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 587) | def test_flash_attn_2_generate_use_cache(self): method test_flash_attn_2_inference_equivalence_right_padding (line 636) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_new_cache_format (line 645) | def test_new_cache_format(self, num_beams, do_sample): class JambaModelIntegrationTest (line 650) | class JambaModelIntegrationTest(unittest.TestCase): method setUpClass (line 655) | def setUpClass(cls): method test_simple_generate (line 661) | def test_simple_generate(self): method test_simple_batched_generate_with_padding (line 690) | def test_simple_batched_generate_with_padding(self): FILE: mplsandbox_for_rl/transformers/tests/models/jetmoe/test_modeling_jetmoe.py class JetMoeModelTester (line 52) | class JetMoeModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 106) | def prepare_config_and_inputs(self): method get_config (line 129) | def get_config(self): method create_and_check_model (line 147) | def create_and_check_model( method create_and_check_model_as_decoder (line 157) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 187) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 205) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 267) | def prepare_config_and_inputs_for_common(self): class JetMoeModelTest (line 283) | class JetMoeModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method test_eager_matches_sdpa_generate (line 309) | def test_eager_matches_sdpa_generate(self): method test_new_cache_format (line 313) | def test_new_cache_format(self, num_beams, do_sample): method setUp (line 316) | def setUp(self): method test_config (line 323) | def test_config(self): method test_model (line 327) | def test_model(self): method test_model_various_embeddings (line 332) | def test_model_various_embeddings(self): method test_jetmoe_sequence_classification_model (line 339) | def test_jetmoe_sequence_classification_model(self): method test_jetmoe_sequence_classification_model_for_single_label (line 352) | def test_jetmoe_sequence_classification_model_for_single_label(self): method test_jetmoe_sequence_classification_model_for_multi_label (line 366) | def test_jetmoe_sequence_classification_model_for_multi_label(self): method test_save_load_fast_init_from_base (line 382) | def test_save_load_fast_init_from_base(self): method test_past_key_values_format (line 386) | def test_past_key_values_format(self): method test_flash_attn_2_generate_padding_right (line 393) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 427) | def test_flash_attn_2_generate_use_cache(self): method test_flash_attn_2_inference_equivalence_right_padding (line 472) | def test_flash_attn_2_inference_equivalence_right_padding(self): class JetMoeIntegrationTest (line 477) | class JetMoeIntegrationTest(unittest.TestCase): method test_model_8b_logits (line 479) | def test_model_8b_logits(self): method test_model_8b_generation (line 497) | def test_model_8b_generation(self): method test_model_8b_batched_generation (line 514) | def test_model_8b_batched_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/kosmos2/test_modeling_kosmos2.py class Kosmos2VisionModelTester (line 52) | class Kosmos2VisionModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 95) | def get_config(self): method prepare_config_and_inputs_for_common (line 109) | def prepare_config_and_inputs_for_common(self): class Kosmos2TextModelTester (line 116) | class Kosmos2TextModelTester: method __init__ (line 117) | def __init__( method prepare_config_and_inputs (line 151) | def prepare_config_and_inputs(self): method get_config (line 169) | def get_config(self): method prepare_config_and_inputs_for_common (line 181) | def prepare_config_and_inputs_for_common(self): class Kosmos2ModelTester (line 188) | class Kosmos2ModelTester: method __init__ (line 189) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, laten... method prepare_config_and_inputs (line 202) | def prepare_config_and_inputs(self): method get_config (line 214) | def get_config(self): method create_and_check_model (line 221) | def create_and_check_model(self, config, input_ids, attention_mask, im... method prepare_config_and_inputs_for_common (line 234) | def prepare_config_and_inputs_for_common(self): class Kosmos2ModelTest (line 247) | class Kosmos2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method is_pipeline_test_to_skip (line 262) | def is_pipeline_test_to_skip( method _prepare_for_class (line 267) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 280) | def setUp(self): method test_initialization (line 285) | def test_initialization(self): method test_model (line 302) | def test_model(self): method test_forward_signature (line 306) | def test_forward_signature(self): method test_load_save_without_tied_weights (line 318) | def test_load_save_without_tied_weights(self): method test_hidden_states_output (line 338) | def test_hidden_states_output(self): method test_tie_model_weights (line 376) | def test_tie_model_weights(self): method test_model_from_pretrained (line 425) | def test_model_from_pretrained(self): method _create_and_check_torchscript (line 430) | def _create_and_check_torchscript(self, config, inputs_dict): function prepare_img (line 512) | def prepare_img(): class Kosmos2ModelIntegrationTest (line 521) | class Kosmos2ModelIntegrationTest(unittest.TestCase): method run_example (line 522) | def run_example(self, prompt, image, model, processor): method test_snowman_image_captioning (line 547) | def test_snowman_image_captioning(self): method test_snowman_image_captioning_batch (line 693) | def test_snowman_image_captioning_batch(self): FILE: mplsandbox_for_rl/transformers/tests/models/kosmos2/test_processor_kosmos2.py class Kosmos2ProcessorTest (line 55) | class Kosmos2ProcessorTest(unittest.TestCase): method setUp (line 56) | def setUp(self): method get_tokenizer (line 68) | def get_tokenizer(self, **kwargs): method get_image_processor (line 71) | def get_image_processor(self, **kwargs): method tearDown (line 74) | def tearDown(self): method prepare_image_inputs (line 77) | def prepare_image_inputs(self): method test_image_procesor_load_save_reload (line 88) | def test_image_procesor_load_save_reload(self): method test_save_load_pretrained_additional_features (line 97) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 114) | def test_image_processor(self): method test_tokenizer (line 128) | def test_tokenizer(self): method test_processor (line 143) | def test_processor(self): method test_tokenizer_decode (line 162) | def test_tokenizer_decode(self): method test_model_input_names (line 175) | def test_model_input_names(self): method test_full_processor (line 199) | def test_full_processor(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlm/test_modeling_layoutlm.py class LayoutLMModelTester (line 37) | class LayoutLMModelTester: method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 90) | def prepare_config_and_inputs(self): method get_config (line 126) | def get_config(self): method create_and_check_model (line 141) | def create_and_check_model( method create_and_check_for_masked_lm (line 153) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 162) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 174) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 184) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 201) | def prepare_config_and_inputs_for_common(self): class LayoutLMModelTest (line 223) | class LayoutLMModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 249) | def setUp(self): method test_config (line 253) | def test_config(self): method test_model (line 256) | def test_model(self): method test_model_various_embeddings (line 260) | def test_model_various_embeddings(self): method test_for_masked_lm (line 266) | def test_for_masked_lm(self): method test_for_sequence_classification (line 270) | def test_for_sequence_classification(self): method test_for_token_classification (line 274) | def test_for_token_classification(self): method test_for_question_answering (line 278) | def test_for_question_answering(self): method test_training_gradient_checkpointing (line 285) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 291) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 297) | def test_training_gradient_checkpointing_use_reentrant_false(self): function prepare_layoutlm_batch_inputs (line 301) | def prepare_layoutlm_batch_inputs(): class LayoutLMModelIntegrationTest (line 316) | class LayoutLMModelIntegrationTest(unittest.TestCase): method test_forward_pass_no_head (line 318) | def test_forward_pass_no_head(self): method test_forward_pass_sequence_classification (line 340) | def test_forward_pass_sequence_classification(self): method test_forward_pass_token_classification (line 368) | def test_forward_pass_token_classification(self): method test_forward_pass_question_answering (line 393) | def test_forward_pass_question_answering(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlm/test_modeling_tf_layoutlm.py class TFLayoutLMModelTester (line 42) | class TFLayoutLMModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method create_and_check_model (line 143) | def create_and_check_model( method create_and_check_for_masked_lm (line 154) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 162) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 171) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 180) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 189) | def prepare_config_and_inputs_for_common(self): class TFLayoutLMModelTest (line 211) | class TFLayoutLMModelTest(TFModelTesterMixin, PipelineTesterMixin, unitt... method setUp (line 238) | def setUp(self): method test_config (line 242) | def test_config(self): method test_model (line 245) | def test_model(self): method test_for_masked_lm (line 249) | def test_for_masked_lm(self): method test_for_sequence_classification (line 253) | def test_for_sequence_classification(self): method test_for_token_classification (line 257) | def test_for_token_classification(self): method test_for_question_answering (line 261) | def test_for_question_answering(self): method test_model_from_pretrained (line 266) | def test_model_from_pretrained(self): method test_onnx_compliancy (line 273) | def test_onnx_compliancy(self): function prepare_layoutlm_batch_inputs (line 277) | def prepare_layoutlm_batch_inputs(): class TFLayoutLMModelIntegrationTest (line 292) | class TFLayoutLMModelIntegrationTest(unittest.TestCase): method test_forward_pass_no_head (line 294) | def test_forward_pass_no_head(self): method test_forward_pass_sequence_classification (line 315) | def test_forward_pass_sequence_classification(self): method test_forward_pass_token_classification (line 341) | def test_forward_pass_token_classification(self): method test_forward_pass_question_answering (line 358) | def test_forward_pass_question_answering(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlm/test_tokenization_layoutlm.py class LayoutLMTokenizationTest (line 28) | class LayoutLMTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_tokenizer (line 57) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 60) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 65) | def test_full_tokenizer(self): method test_special_tokens_as_you_expect (line 73) | def test_special_tokens_as_you_expect(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlmv2/test_image_processing_layoutlmv2.py class LayoutLMv2ImageProcessingTester (line 31) | class LayoutLMv2ImageProcessingTester(unittest.TestCase): method __init__ (line 32) | def __init__( method prepare_image_processor_dict (line 56) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 59) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 62) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class LayoutLMv2ImageProcessingTest (line 76) | class LayoutLMv2ImageProcessingTest(ImageProcessingTestMixin, unittest.T... method setUp (line 79) | def setUp(self): method image_processor_dict (line 84) | def image_processor_dict(self): method test_image_processor_properties (line 87) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 93) | def test_image_processor_from_dict_with_kwargs(self): method test_layoutlmv2_integration_test (line 101) | def test_layoutlmv2_integration_test(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlmv2/test_modeling_layoutlmv2.py class LayoutLMv2ModelTester (line 43) | class LayoutLMv2ModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 104) | def prepare_config_and_inputs(self): method create_and_check_model (line 164) | def create_and_check_model( method create_and_check_for_sequence_classification (line 180) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 197) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 214) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 232) | def prepare_config_and_inputs_for_common(self): class LayoutLMv2ModelTest (line 256) | class LayoutLMv2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 277) | def setUp(self): method test_config (line 281) | def test_config(self): method test_model (line 284) | def test_model(self): method test_multi_gpu_data_parallel_forward (line 295) | def test_multi_gpu_data_parallel_forward(self): method test_model_various_embeddings (line 298) | def test_model_various_embeddings(self): method test_for_sequence_classification (line 304) | def test_for_sequence_classification(self): method test_for_token_classification (line 308) | def test_for_token_classification(self): method test_for_question_answering (line 312) | def test_for_question_answering(self): method test_attention_outputs (line 316) | def test_attention_outputs(self): method test_hidden_states_output (line 378) | def test_hidden_states_output(self): method test_model_is_small (line 418) | def test_model_is_small(self): method test_model_from_pretrained (line 422) | def test_model_from_pretrained(self): method test_initialization (line 427) | def test_initialization(self): method test_batching_equivalence (line 444) | def test_batching_equivalence(self): function prepare_layoutlmv2_batch_inputs (line 503) | def prepare_layoutlmv2_batch_inputs(): class LayoutLMv2ModelIntegrationTest (line 518) | class LayoutLMv2ModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 520) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlmv2/test_processor_layoutlmv2.py class LayoutLMv2ProcessorTest (line 39) | class LayoutLMv2ProcessorTest(unittest.TestCase): method setUp (line 43) | def setUp(self): method get_tokenizer (line 76) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 79) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method get_tokenizers (line 82) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_image_processor (line 85) | def get_image_processor(self, **kwargs): method tearDown (line 88) | def tearDown(self): method prepare_image_inputs (line 91) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 102) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 117) | def test_save_load_pretrained_additional_features(self): method test_model_input_names (line 149) | def test_model_input_names(self): method test_overflowing_tokens (line 164) | def test_overflowing_tokens(self): class LayoutLMv2ProcessorIntegrationTests (line 200) | class LayoutLMv2ProcessorIntegrationTests(unittest.TestCase): method get_images (line 202) | def get_images(self): method get_tokenizers (line 214) | def get_tokenizers(self): method test_processor_case_1 (line 220) | def test_processor_case_1(self): method test_processor_case_2 (line 267) | def test_processor_case_2(self): method test_processor_case_3 (line 321) | def test_processor_case_3(self): method test_processor_case_4 (line 386) | def test_processor_case_4(self): method test_processor_case_5 (line 433) | def test_processor_case_5(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlmv2/test_tokenization_layoutlmv2.py class LayoutLMv2TokenizationTest (line 63) | class LayoutLMv2TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method get_words_and_boxes (line 72) | def get_words_and_boxes(self): method get_words_and_boxes_batch (line 78) | def get_words_and_boxes_batch(self): method get_question_words_and_boxes (line 87) | def get_question_words_and_boxes(self): method get_question_words_and_boxes_batch (line 94) | def get_question_words_and_boxes_batch(self): method setUp (line 104) | def setUp(self): method get_input_output_texts (line 128) | def get_input_output_texts(self, tokenizer): method test_chinese (line 133) | def test_chinese(self): method test_basic_tokenizer_lower (line 138) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 146) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 154) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 162) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 170) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 177) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 184) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 191) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_chat_template_batched (line 199) | def test_chat_template_batched(self): method test_wordpiece_tokenizer (line 202) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 216) | def test_is_whitespace(self): method test_is_control (line 226) | def test_is_control(self): method test_is_punctuation (line 234) | def test_is_punctuation(self): method test_clean_text (line 243) | def test_clean_text(self): method test_sequence_builders (line 250) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 266) | def test_offsets_with_special_characters(self): method test_add_special_tokens (line 295) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 311) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 371) | def test_encode_decode_with_spaces(self): method test_right_and_left_truncation (line 389) | def test_right_and_left_truncation(self): method test_split_special_tokens (line 393) | def test_split_special_tokens(self): method test_encode_plus_with_padding (line 396) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 498) | def test_internal_consistency(self): method test_mask_output (line 519) | def test_mask_output(self): method test_number_of_added_tokens (line 533) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 561) | def test_padding_to_max_length(self): method test_padding (line 596) | def test_padding(self, max_length=50): method test_padding_warning_message_fast_tokenizer (line 815) | def test_padding_warning_message_fast_tokenizer(self): method test_call (line 858) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 881) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 946) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 949) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 1001) | def test_padding_to_multiple_of(self): method test_tokenizer_slow_store_full_signature (line 1038) | def test_tokenizer_slow_store_full_signature(self): method test_build_inputs_with_special_tokens (line 1046) | def test_build_inputs_with_special_tokens(self): method test_special_tokens_mask_input_pairs (line 1071) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 1094) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 1111) | def test_save_and_load_tokenizer(self): method test_right_and_left_padding (line 1138) | def test_right_and_left_padding(self): method test_token_type_ids (line 1201) | def test_token_type_ids(self): method test_offsets_mapping (line 1233) | def test_offsets_mapping(self): method test_torch_encode_plus_sent_to_model (line 1282) | def test_torch_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 1328) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_python_rust_equals (line 1349) | def test_tokenization_python_rust_equals(self): method test_embeded_special_tokens (line 1403) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 1434) | def test_compare_add_special_tokens(self): method test_layoutlmv2_truncation_integration_test (line 1471) | def test_layoutlmv2_truncation_integration_test(self): method test_batch_encode_plus_tensors (line 1491) | def test_batch_encode_plus_tensors(self): method test_sequence_ids (line 1532) | def test_sequence_ids(self): method test_special_tokens_initialization (line 1556) | def test_special_tokens_initialization(self): method test_training_new_tokenizer (line 1593) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 1630) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_prepare_for_model (line 1729) | def test_prepare_for_model(self): method test_padding_different_model_input_name (line 1743) | def test_padding_different_model_input_name(self): method test_batch_encode_dynamic_overflowing (line 1779) | def test_batch_encode_dynamic_overflowing(self): method test_alignement_methods (line 1841) | def test_alignement_methods(self): method get_clean_sequence (line 1844) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_maximum_encoding_length_pair_input (line 1879) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 2241) | def test_maximum_encoding_length_single_input(self): method test_pretokenized_inputs (line 2363) | def test_pretokenized_inputs(self): method test_compare_pretokenized_inputs (line 2367) | def test_compare_pretokenized_inputs(self): method test_compare_prepare_for_model (line 2371) | def test_compare_prepare_for_model(self): method test_only_label_first_subword (line 2375) | def test_only_label_first_subword(self): method test_layoutlmv2_integration_test (line 2403) | def test_layoutlmv2_integration_test(self): method test_np_encode_plus_sent_to_model (line 2480) | def test_np_encode_plus_sent_to_model(self): method test_chat_template (line 2484) | def test_chat_template(self): method test_chat_template_return_assistant_tokens_mask (line 2488) | def test_chat_template_return_assistant_tokens_mask(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlmv3/test_image_processing_layoutlmv3.py class LayoutLMv3ImageProcessingTester (line 31) | class LayoutLMv3ImageProcessingTester(unittest.TestCase): method __init__ (line 32) | def __init__( method prepare_image_processor_dict (line 56) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 59) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 62) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class LayoutLMv3ImageProcessingTest (line 76) | class LayoutLMv3ImageProcessingTest(ImageProcessingTestMixin, unittest.T... method setUp (line 79) | def setUp(self): method image_processor_dict (line 84) | def image_processor_dict(self): method test_image_processor_properties (line 87) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 93) | def test_image_processor_from_dict_with_kwargs(self): method test_LayoutLMv3_integration_test (line 100) | def test_LayoutLMv3_integration_test(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlmv3/test_modeling_layoutlmv3.py class LayoutLMv3ModelTester (line 50) | class LayoutLMv3ModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 116) | def prepare_config_and_inputs(self): method create_and_check_model (line 168) | def create_and_check_model( method create_and_check_for_sequence_classification (line 197) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 214) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 231) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 249) | def prepare_config_and_inputs_for_common(self): class LayoutLMv3ModelTest (line 272) | class LayoutLMv3ModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method is_pipeline_test_to_skip (line 294) | def is_pipeline_test_to_skip( method setUp (line 303) | def setUp(self): method _prepare_for_class (line 307) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 343) | def test_config(self): method test_model (line 346) | def test_model(self): method test_model_various_embeddings (line 350) | def test_model_various_embeddings(self): method test_for_sequence_classification (line 356) | def test_for_sequence_classification(self): method test_for_token_classification (line 360) | def test_for_token_classification(self): method test_for_question_answering (line 364) | def test_for_question_answering(self): method test_model_from_pretrained (line 369) | def test_model_from_pretrained(self): function prepare_img (line 376) | def prepare_img(): class LayoutLMv3ModelIntegrationTest (line 382) | class LayoutLMv3ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 384) | def default_image_processor(self): method test_inference_no_head (line 388) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlmv3/test_modeling_tf_layoutlmv3.py class TFLayoutLMv3ModelTester (line 56) | class TFLayoutLMv3ModelTester: method __init__ (line 57) | def __init__( method prepare_config_and_inputs (line 121) | def prepare_config_and_inputs(self): method create_and_check_model (line 175) | def create_and_check_model(self, config, input_ids, bbox, pixel_values... method create_and_check_for_sequence_classification (line 204) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 220) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 236) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 254) | def prepare_config_and_inputs_for_common(self): class TFLayoutLMv3ModelTest (line 268) | class TFLayoutLMv3ModelTest(TFModelTesterMixin, PipelineTesterMixin, uni... method is_pipeline_test_to_skip (line 290) | def is_pipeline_test_to_skip( method _prepare_for_class (line 295) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 321) | def setUp(self): method test_config (line 325) | def test_config(self): method test_loss_computation (line 328) | def test_loss_computation(self): method test_model (line 395) | def test_model(self): method test_model_various_embeddings (line 408) | def test_model_various_embeddings(self): method test_for_sequence_classification (line 423) | def test_for_sequence_classification(self): method test_for_token_classification (line 438) | def test_for_token_classification(self): method test_for_question_answering (line 453) | def test_for_question_answering(self): method test_model_from_pretrained (line 469) | def test_model_from_pretrained(self): function prepare_img (line 476) | def prepare_img(): class TFLayoutLMv3ModelIntegrationTest (line 482) | class TFLayoutLMv3ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 484) | def default_image_processor(self): method test_inference_no_head (line 488) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlmv3/test_processor_layoutlmv3.py class LayoutLMv3ProcessorTest (line 39) | class LayoutLMv3ProcessorTest(unittest.TestCase): method setUp (line 43) | def setUp(self): method get_tokenizer (line 89) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 92) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method get_tokenizers (line 95) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_image_processor (line 98) | def get_image_processor(self, **kwargs): method tearDown (line 101) | def tearDown(self): method prepare_image_inputs (line 104) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 115) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 130) | def test_save_load_pretrained_additional_features(self): method test_model_input_names (line 162) | def test_model_input_names(self): class LayoutLMv3ProcessorIntegrationTests (line 180) | class LayoutLMv3ProcessorIntegrationTests(unittest.TestCase): method get_images (line 182) | def get_images(self): method get_tokenizers (line 194) | def get_tokenizers(self): method test_processor_case_1 (line 200) | def test_processor_case_1(self): method test_processor_case_2 (line 251) | def test_processor_case_2(self): method test_processor_case_3 (line 305) | def test_processor_case_3(self): method test_processor_case_4 (line 370) | def test_processor_case_4(self): method test_processor_case_5 (line 417) | def test_processor_case_5(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutlmv3/test_tokenization_layoutlmv3.py class LayoutLMv3TokenizationTest (line 51) | class LayoutLMv3TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method get_words_and_boxes (line 61) | def get_words_and_boxes(self): method get_words_and_boxes_batch (line 67) | def get_words_and_boxes_batch(self): method get_question_words_and_boxes (line 76) | def get_question_words_and_boxes(self): method get_question_words_and_boxes_batch (line 83) | def get_question_words_and_boxes_batch(self): method setUp (line 93) | def setUp(self): method get_tokenizer (line 130) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 134) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 138) | def get_input_output_texts(self, tokenizer): method test_chat_template_batched (line 144) | def test_chat_template_batched(self): method test_full_tokenizer (line 147) | def test_full_tokenizer(self): method test_sequence_builders (line 159) | def test_sequence_builders(self): method test_add_special_tokens (line 175) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 191) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 251) | def test_encode_decode_with_spaces(self): method test_right_and_left_truncation (line 269) | def test_right_and_left_truncation(self): method test_split_special_tokens (line 273) | def test_split_special_tokens(self): method test_encode_plus_with_padding (line 276) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 378) | def test_internal_consistency(self): method test_mask_output (line 399) | def test_mask_output(self): method test_number_of_added_tokens (line 413) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 441) | def test_padding_to_max_length(self): method test_padding (line 476) | def test_padding(self, max_length=50): method test_padding_warning_message_fast_tokenizer (line 695) | def test_padding_warning_message_fast_tokenizer(self): method test_call (line 738) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 761) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 826) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 829) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 881) | def test_padding_to_multiple_of(self): method test_tokenizer_slow_store_full_signature (line 918) | def test_tokenizer_slow_store_full_signature(self): method test_build_inputs_with_special_tokens (line 926) | def test_build_inputs_with_special_tokens(self): method test_special_tokens_mask_input_pairs (line 951) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 974) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 991) | def test_save_and_load_tokenizer(self): method test_right_and_left_padding (line 1018) | def test_right_and_left_padding(self): method test_token_type_ids (line 1081) | def test_token_type_ids(self): method test_offsets_mapping (line 1112) | def test_offsets_mapping(self): method test_torch_encode_plus_sent_to_model (line 1160) | def test_torch_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 1206) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_python_rust_equals (line 1227) | def test_tokenization_python_rust_equals(self): method test_embeded_special_tokens (line 1281) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 1312) | def test_compare_add_special_tokens(self): method test_layoutlmv3_truncation_integration_test (line 1349) | def test_layoutlmv3_truncation_integration_test(self): method test_batch_encode_plus_tensors (line 1369) | def test_batch_encode_plus_tensors(self): method test_sequence_ids (line 1410) | def test_sequence_ids(self): method test_special_tokens_initialization (line 1434) | def test_special_tokens_initialization(self): method test_training_new_tokenizer (line 1471) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 1508) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_prepare_for_model (line 1607) | def test_prepare_for_model(self): method test_padding_different_model_input_name (line 1621) | def test_padding_different_model_input_name(self): method test_batch_encode_dynamic_overflowing (line 1657) | def test_batch_encode_dynamic_overflowing(self): method test_alignement_methods (line 1724) | def test_alignement_methods(self): method get_clean_sequence (line 1727) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_added_token_with_space_before (line 1761) | def test_added_token_with_space_before(self): method test_maximum_encoding_length_pair_input (line 1791) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 2153) | def test_maximum_encoding_length_single_input(self): method test_pretokenized_inputs (line 2276) | def test_pretokenized_inputs(self): method test_compare_pretokenized_inputs (line 2280) | def test_compare_pretokenized_inputs(self): method test_compare_prepare_for_model (line 2284) | def test_compare_prepare_for_model(self): method test_only_label_first_subword (line 2288) | def test_only_label_first_subword(self): method test_layoutlmv3_integration_test (line 2320) | def test_layoutlmv3_integration_test(self): method test_np_encode_plus_sent_to_model (line 2397) | def test_np_encode_plus_sent_to_model(self): method test_tf_encode_plus_sent_to_model (line 2402) | def test_tf_encode_plus_sent_to_model(self): method test_chat_template (line 2437) | def test_chat_template(self): method test_chat_template_return_assistant_tokens_mask (line 2441) | def test_chat_template_return_assistant_tokens_mask(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutxlm/test_processor_layoutxlm.py class LayoutXLMProcessorTest (line 45) | class LayoutXLMProcessorTest(unittest.TestCase): method setUp (line 49) | def setUp(self): method get_tokenizer (line 64) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 67) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method get_tokenizers (line 70) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_image_processor (line 73) | def get_image_processor(self, **kwargs): method tearDown (line 76) | def tearDown(self): method prepare_image_inputs (line 79) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 90) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 105) | def test_save_load_pretrained_additional_features(self): method test_model_input_names (line 142) | def test_model_input_names(self): method test_overflowing_tokens (line 157) | def test_overflowing_tokens(self): class LayoutXLMProcessorIntegrationTests (line 195) | class LayoutXLMProcessorIntegrationTests(unittest.TestCase): method get_images (line 197) | def get_images(self): method get_tokenizers (line 209) | def get_tokenizers(self): method test_processor_case_1 (line 215) | def test_processor_case_1(self): method test_processor_case_2 (line 266) | def test_processor_case_2(self): method test_processor_case_3 (line 320) | def test_processor_case_3(self): method test_processor_case_4 (line 385) | def test_processor_case_4(self): method test_processor_case_5 (line 432) | def test_processor_case_5(self): FILE: mplsandbox_for_rl/transformers/tests/models/layoutxlm/test_tokenization_layoutxlm.py class LayoutXLMTokenizationTest (line 56) | class LayoutXLMTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method get_words_and_boxes (line 66) | def get_words_and_boxes(self): method get_words_and_boxes_batch (line 72) | def get_words_and_boxes_batch(self): method get_question_words_and_boxes (line 81) | def get_question_words_and_boxes(self): method get_question_words_and_boxes_batch (line 88) | def get_question_words_and_boxes_batch(self): method setUp (line 98) | def setUp(self): method get_input_output_texts (line 105) | def get_input_output_texts(self, tokenizer): method test_chat_template_batched (line 111) | def test_chat_template_batched(self): method test_save_sentencepiece_tokenizer (line 116) | def test_save_sentencepiece_tokenizer(self) -> None: method test_split_special_tokens (line 152) | def test_split_special_tokens(self): method test_sequence_builders (line 189) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 205) | def test_offsets_with_special_characters(self): method test_add_special_tokens (line 234) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 250) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 310) | def test_encode_decode_with_spaces(self): method test_encode_plus_with_padding (line 327) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 429) | def test_internal_consistency(self): method test_mask_output (line 450) | def test_mask_output(self): method test_number_of_added_tokens (line 464) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 492) | def test_padding_to_max_length(self): method test_padding (line 527) | def test_padding(self, max_length=50): method test_padding_warning_message_fast_tokenizer (line 746) | def test_padding_warning_message_fast_tokenizer(self): method test_call (line 789) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 812) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 877) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 880) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 932) | def test_padding_to_multiple_of(self): method test_tokenizer_slow_store_full_signature (line 969) | def test_tokenizer_slow_store_full_signature(self): method test_build_inputs_with_special_tokens (line 977) | def test_build_inputs_with_special_tokens(self): method test_special_tokens_mask_input_pairs (line 1002) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 1025) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 1042) | def test_save_and_load_tokenizer(self): method test_right_and_left_truncation (line 1070) | def test_right_and_left_truncation(self): method test_right_and_left_padding (line 1073) | def test_right_and_left_padding(self): method test_token_type_ids (line 1136) | def test_token_type_ids(self): method test_offsets_mapping (line 1168) | def test_offsets_mapping(self): method test_torch_encode_plus_sent_to_model (line 1216) | def test_torch_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 1257) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_python_rust_equals (line 1278) | def test_tokenization_python_rust_equals(self): method test_embeded_special_tokens (line 1332) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 1363) | def test_compare_add_special_tokens(self): method test_layoutxlm_truncation_integration_test (line 1400) | def test_layoutxlm_truncation_integration_test(self): method test_batch_encode_plus_tensors (line 1420) | def test_batch_encode_plus_tensors(self): method test_sequence_ids (line 1461) | def test_sequence_ids(self): method test_special_tokens_initialization (line 1485) | def test_special_tokens_initialization(self): method test_training_new_tokenizer (line 1522) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 1559) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_prepare_for_model (line 1658) | def test_prepare_for_model(self): method test_padding_different_model_input_name (line 1672) | def test_padding_different_model_input_name(self): method test_batch_encode_dynamic_overflowing (line 1708) | def test_batch_encode_dynamic_overflowing(self): method test_save_pretrained (line 1770) | def test_save_pretrained(self): method test_alignement_methods (line 1842) | def test_alignement_methods(self): method test_maximum_encoding_length_pair_input (line 1846) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 1850) | def test_maximum_encoding_length_single_input(self): method test_pretokenized_inputs (line 1854) | def test_pretokenized_inputs(self): method test_compare_pretokenized_inputs (line 1858) | def test_compare_pretokenized_inputs(self): method test_compare_prepare_for_model (line 1862) | def test_compare_prepare_for_model(self): method test_only_label_first_subword (line 1866) | def test_only_label_first_subword(self): method test_layoutxlm_integration_test (line 1890) | def test_layoutxlm_integration_test(self): method test_np_encode_plus_sent_to_model (line 1966) | def test_np_encode_plus_sent_to_model(self): method test_sentencepiece_tokenize_and_convert_tokens_to_string (line 1970) | def test_sentencepiece_tokenize_and_convert_tokens_to_string(self): method test_sentencepiece_tokenize_and_decode (line 1974) | def test_sentencepiece_tokenize_and_decode(self): method test_chat_template (line 1978) | def test_chat_template(self): method test_chat_template_return_assistant_tokens_mask (line 1982) | def test_chat_template_return_assistant_tokens_mask(self): FILE: mplsandbox_for_rl/transformers/tests/models/led/test_modeling_led.py function prepare_led_inputs_dict (line 53) | def prepare_led_inputs_dict( class LEDModelTester (line 84) | class LEDModelTester: method __init__ (line 85) | def __init__( method prepare_config_and_inputs (line 138) | def prepare_config_and_inputs(self): method get_config (line 151) | def get_config(self): method get_pipeline_config (line 170) | def get_pipeline_config(self): method prepare_config_and_inputs_for_common (line 176) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 184) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 218) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): method check_global_attention (line 252) | def check_global_attention(self, config, inputs_dict): class LEDModelTest (line 278) | class LEDModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTest... method is_pipeline_test_to_skip (line 304) | def is_pipeline_test_to_skip( method setUp (line 312) | def setUp(self): method test_config (line 316) | def test_config(self): method test_save_load_strict (line 319) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 329) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 333) | def test_encoder_decoder_model_standalone(self): method test_global_attention (line 337) | def test_global_attention(self): method test_inputs_embeds (line 342) | def test_inputs_embeds(self): method test_generate_fp16 (line 372) | def test_generate_fp16(self): method test_retain_grad_hidden_states_attentions (line 382) | def test_retain_grad_hidden_states_attentions(self): method test_attention_outputs (line 385) | def test_attention_outputs(self): method _check_encoder_attention_for_generate (line 458) | def _check_encoder_attention_for_generate(self, attentions, batch_size... function assert_tensors_close (line 473) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 492) | def _long_tensor(tok_lst): class LEDModelIntegrationTests (line 503) | class LEDModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 512) | def default_tokenizer(self): method test_inference_no_head (line 515) | def test_inference_no_head(self): method test_inference_head (line 532) | def test_inference_head(self): method test_seq_to_seq_generation (line 549) | def test_seq_to_seq_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/led/test_modeling_tf_led.py class TFLEDModelTester (line 36) | class TFLEDModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs_for_common (line 92) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 126) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_led_inputs_dict (line 161) | def prepare_led_inputs_dict( class TFLEDModelTest (line 195) | class TFLEDModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 213) | def setUp(self): method test_config (line 217) | def test_config(self): method test_decoder_model_past_large_inputs (line 220) | def test_decoder_model_past_large_inputs(self): method test_attention_outputs (line 224) | def test_attention_outputs(self): method test_saved_model_creation (line 295) | def test_saved_model_creation(self): method test_generate_with_headmasking (line 298) | def test_generate_with_headmasking(self): function _long_tensor (line 303) | def _long_tensor(tok_lst): class TFLEDModelIntegrationTest (line 312) | class TFLEDModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 313) | def test_inference_no_head(self): method test_inference_with_head (line 329) | def test_inference_with_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/led/test_tokenization_led.py class TestTokenizationLED (line 27) | class TestTokenizationLED(TokenizerTesterMixin, unittest.TestCase): method setUp (line 33) | def setUp(self): method get_tokenizer (line 68) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 72) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 76) | def get_input_output_texts(self, tokenizer): method default_tokenizer (line 80) | def default_tokenizer(self): method default_tokenizer_fast (line 84) | def default_tokenizer_fast(self): method test_prepare_batch (line 88) | def test_prepare_batch(self): method test_prepare_batch_empty_target_text (line 102) | def test_prepare_batch_empty_target_text(self): method test_tokenizer_as_target_length (line 112) | def test_tokenizer_as_target_length(self): method test_prepare_batch_not_longer_than_maxlen (line 122) | def test_prepare_batch_not_longer_than_maxlen(self): method test_special_tokens (line 131) | def test_special_tokens(self): method test_global_attention_mask (line 147) | def test_global_attention_mask(self): method test_pretokenized_inputs (line 158) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 161) | def test_embeded_special_tokens(self): FILE: mplsandbox_for_rl/transformers/tests/models/levit/test_image_processing_levit.py class LevitImageProcessingTester (line 29) | class LevitImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 63) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 74) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 77) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class LevitImageProcessingTest (line 91) | class LevitImageProcessingTest(ImageProcessingTestMixin, unittest.TestCa... method setUp (line 94) | def setUp(self): method image_processor_dict (line 99) | def image_processor_dict(self): method test_image_processor_properties (line 102) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 111) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/levit/test_modeling_levit.py class LevitConfigTester (line 50) | class LevitConfigTester(ConfigTester): method create_and_test_config_common_properties (line 51) | def create_and_test_config_common_properties(self): class LevitModelTester (line 57) | class LevitModelTester: method __init__ (line 58) | def __init__( method prepare_config_and_inputs (line 105) | def prepare_config_and_inputs(self): method get_config (line 115) | def get_config(self): method create_and_check_model (line 134) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 149) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 157) | def prepare_config_and_inputs_for_common(self): class LevitModelTest (line 165) | class LevitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 191) | def setUp(self): method test_config (line 197) | def test_config(self): method test_inputs_embeds (line 201) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 205) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 209) | def test_attention_outputs(self): method test_hidden_states_output (line 212) | def test_hidden_states_output(self): method _prepare_for_class (line 264) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_model (line 273) | def test_model(self): method test_for_image_classification (line 277) | def test_for_image_classification(self): method test_training (line 282) | def test_training(self): method test_training_gradient_checkpointing (line 303) | def test_training_gradient_checkpointing(self): method test_problem_types (line 325) | def test_problem_types(self): method test_model_from_pretrained (line 375) | def test_model_from_pretrained(self): function prepare_img (line 382) | def prepare_img(): class LevitModelIntegrationTest (line 389) | class LevitModelIntegrationTest(unittest.TestCase): method default_image_processor (line 391) | def default_image_processor(self): method test_inference_image_classification_head (line 395) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/lilt/test_modeling_lilt.py class LiltModelTester (line 39) | class LiltModelTester: method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 88) | def prepare_config_and_inputs(self): method get_config (line 122) | def get_config(self): method create_and_check_model (line 137) | def create_and_check_model( method create_and_check_for_token_classification (line 157) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 176) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 200) | def prepare_config_and_inputs_for_common(self): class LiltModelTest (line 221) | class LiltModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method is_pipeline_test_to_skip (line 247) | def is_pipeline_test_to_skip( method setUp (line 252) | def setUp(self): method test_config (line 256) | def test_config(self): method test_model (line 259) | def test_model(self): method test_model_various_embeddings (line 263) | def test_model_various_embeddings(self): method test_for_token_classification (line 269) | def test_for_token_classification(self): method test_for_question_answering (line 273) | def test_for_question_answering(self): method test_training_gradient_checkpointing (line 280) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 286) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 292) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_from_pretrained (line 296) | def test_model_from_pretrained(self): class LiltModelIntegrationTest (line 304) | class LiltModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 305) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/llama/test_modeling_flax_llama.py class FlaxLlamaModelTester (line 37) | class FlaxLlamaModelTester: method __init__ (line 38) | def __init__( method prepare_config_and_inputs (line 82) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 106) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 112) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 142) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxLlamaModelTest (line 177) | class FlaxLlamaModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixin... method setUp (line 181) | def setUp(self): method test_use_cache_forward (line 184) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 189) | def test_use_cache_forward_with_attn_mask(self): method test_model_from_pretrained (line 197) | def test_model_from_pretrained(self): class FlaxLlamaIntegrationTest (line 206) | class FlaxLlamaIntegrationTest(unittest.TestCase): method setUp (line 207) | def setUp(self): method test_model_logits (line 212) | def test_model_logits(self): method test_model_hidden_states (line 227) | def test_model_hidden_states(self): method test_generated_text (line 243) | def test_generated_text(self): FILE: mplsandbox_for_rl/transformers/tests/models/llama/test_modeling_llama.py class LlamaModelTester (line 57) | class LlamaModelTester: method __init__ (line 58) | def __init__( method prepare_config_and_inputs (line 108) | def prepare_config_and_inputs(self): method get_config (line 131) | def get_config(self): method create_and_check_model (line 148) | def create_and_check_model( method create_and_check_model_as_decoder (line 158) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 188) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 206) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 268) | def prepare_config_and_inputs_for_common(self): class LlamaModelTest (line 284) | class LlamaModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe... method setUp (line 320) | def setUp(self): method test_config (line 324) | def test_config(self): method test_model (line 327) | def test_model(self): method test_model_various_embeddings (line 331) | def test_model_various_embeddings(self): method test_llama_sequence_classification_model (line 337) | def test_llama_sequence_classification_model(self): method test_llama_sequence_classification_model_for_single_label (line 349) | def test_llama_sequence_classification_model_for_single_label(self): method test_llama_sequence_classification_model_for_multi_label (line 362) | def test_llama_sequence_classification_model_for_multi_label(self): method test_llama_token_classification_model (line 377) | def test_llama_token_classification_model(self): method test_save_load_fast_init_from_base (line 393) | def test_save_load_fast_init_from_base(self): method test_model_rope_scaling_from_config (line 397) | def test_model_rope_scaling_from_config(self, scaling_type): method test_model_rope_scaling (line 427) | def test_model_rope_scaling(self): method test_rope_class_retrocompatibility (line 492) | def test_rope_class_retrocompatibility(self): method test_model_loading_old_rope_configs (line 529) | def test_model_loading_old_rope_configs(self): method test_flash_attn_2_generate_padding_right (line 589) | def test_flash_attn_2_generate_padding_right(self): method test_use_flash_attention_2_true (line 624) | def test_use_flash_attention_2_true(self): method test_eager_matches_sdpa_generate (line 650) | def test_eager_matches_sdpa_generate(self): class LlamaIntegrationTest (line 711) | class LlamaIntegrationTest(unittest.TestCase): method setUpClass (line 717) | def setUpClass(cls): method test_llama_3_1_hard (line 724) | def test_llama_3_1_hard(self): method test_model_7b_logits_bf16 (line 752) | def test_model_7b_logits_bf16(self): method test_model_7b_logits (line 789) | def test_model_7b_logits(self): method test_model_7b_dola_generation (line 825) | def test_model_7b_dola_generation(self): method test_compile_static_cache (line 850) | def test_compile_static_cache(self): class Mask4DTestHard (line 900) | class Mask4DTestHard(unittest.TestCase): method tearDown (line 901) | def tearDown(self): method setUp (line 905) | def setUp(self): method get_test_data (line 911) | def get_test_data(self): method test_stacked_causal_mask (line 955) | def test_stacked_causal_mask(self): method test_partial_stacked_causal_mask (line 980) | def test_partial_stacked_causal_mask(self): method test_stacked_causal_mask_static_cache (line 1024) | def test_stacked_causal_mask_static_cache(self): method test_partial_stacked_causal_mask_static_cache (line 1071) | def test_partial_stacked_causal_mask_static_cache(self): FILE: mplsandbox_for_rl/transformers/tests/models/llama/test_tokenization_llama.py class LlamaTokenizationTest (line 49) | class LlamaTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 58) | def setUp(self): method get_tokenizers (line 66) | def get_tokenizers(self, **kwargs): method test_full_tokenizer (line 70) | def test_full_tokenizer(self): method test_save_pretrained (line 143) | def test_save_pretrained(self): method test_batch_tokenization (line 209) | def test_batch_tokenization(self): method test_save_slow_from_fast_and_reload_fast (line 243) | def test_save_slow_from_fast_and_reload_fast(self): method test_special_tokens_initialization (line 246) | def test_special_tokens_initialization(self): method test_tokenizer_integration (line 280) | def test_tokenizer_integration(self): method test_picklable (line 290) | def test_picklable(self): method test_pickle_subword_regularization_tokenizer (line 298) | def test_pickle_subword_regularization_tokenizer(self): method test_subword_regularization_tokenizer (line 302) | def test_subword_regularization_tokenizer(self): method test_add_prefix_space (line 305) | def test_add_prefix_space(self): class LlamaIntegrationTest (line 337) | class LlamaIntegrationTest(unittest.TestCase): method setUpClass (line 339) | def setUpClass(cls): method integration_tests (line 346) | def integration_tests(self): method test_fast_special_tokens (line 363) | def test_fast_special_tokens(self): method test_conversion (line 397) | def test_conversion(self): method test_simple_encode_decode (line 417) | def test_simple_encode_decode(self): method test_no_differences_showcase (line 465) | def test_no_differences_showcase(self): method test_no_differences_decode (line 483) | def test_no_differences_decode(self): method test_no_differences_special_tokens (line 493) | def test_no_differences_special_tokens(self): method test_integration_test_xnli (line 506) | def test_integration_test_xnli(self): method test_special_token_special_word (line 539) | def test_special_token_special_word(self): method test_no_prefix_space (line 599) | def test_no_prefix_space(self): method test_some_edge_cases (line 660) | def test_some_edge_cases(self): method test_fast_post_processor (line 688) | def test_fast_post_processor(self): method test_tokenization_for_chat (line 702) | def test_tokenization_for_chat(self): class CommonSpmIntegrationTests (line 730) | class CommonSpmIntegrationTests(unittest.TestCase): method setUpClass (line 736) | def setUpClass(cls): method test_add_dummy_prefix (line 742) | def test_add_dummy_prefix(self): method test_remove_extra_whitespaces (line 764) | def test_remove_extra_whitespaces(self): method test_character_after_special_token (line 798) | def test_character_after_special_token(self): method test_special_tokens_strip (line 814) | def test_special_tokens_strip(self): FILE: mplsandbox_for_rl/transformers/tests/models/llava/test_modeling_llava.py class LlavaVisionText2TextModelTester (line 52) | class LlavaVisionText2TextModelTester: method __init__ (line 53) | def __init__( method get_config (line 122) | def get_config(self): method prepare_config_and_inputs (line 133) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 146) | def prepare_config_and_inputs_for_common(self): method create_and_check_llava_model_fp16_forward (line 160) | def create_and_check_llava_model_fp16_forward(self, config, input_ids,... class LlavaForConditionalGenerationModelTest (line 175) | class LlavaForConditionalGenerationModelTest(ModelTesterMixin, unittest.... method setUp (line 185) | def setUp(self): method test_inputs_embeds (line 190) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 212) | def test_inputs_embeds_matches_input_ids(self): method test_training_gradient_checkpointing (line 235) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 241) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 247) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_sdpa_can_compile_dynamic (line 251) | def test_sdpa_can_compile_dynamic(self): method test_sdpa_can_dispatch_on_flash (line 255) | def test_sdpa_can_dispatch_on_flash(self): class LlavaForConditionalGenerationIntegrationTest (line 260) | class LlavaForConditionalGenerationIntegrationTest(unittest.TestCase): method setUp (line 261) | def setUp(self): method tearDown (line 264) | def tearDown(self): method test_small_model_integration_test (line 270) | def test_small_model_integration_test(self): method test_small_model_integration_test_llama_single (line 292) | def test_small_model_integration_test_llama_single(self): method test_small_model_integration_test_llama_batched (line 314) | def test_small_model_integration_test_llama_batched(self): method test_small_model_integration_test_batch (line 341) | def test_small_model_integration_test_batch(self): method test_small_model_integration_test_llama_batched_regression (line 364) | def test_small_model_integration_test_llama_batched_regression(self): method test_batched_generation (line 395) | def test_batched_generation(self): method test_llava_index_error_bug (line 429) | def test_llava_index_error_bug(self): method test_llava_merge_inputs_error_bug (line 451) | def test_llava_merge_inputs_error_bug(self): method test_tokenizer_integration (line 487) | def test_tokenizer_integration(self): method test_generation_no_images (line 507) | def test_generation_no_images(self): method test_expansion_in_processing (line 520) | def test_expansion_in_processing(self): FILE: mplsandbox_for_rl/transformers/tests/models/llava/test_processor_llava.py class LlavaProcessorTest (line 25) | class LlavaProcessorTest(unittest.TestCase): method test_can_load_various_tokenizers (line 26) | def test_can_load_various_tokenizers(self): method test_chat_template (line 32) | def test_chat_template(self): FILE: mplsandbox_for_rl/transformers/tests/models/llava_next/test_image_processing_llava_next.py class LlavaNextImageProcessingTester (line 37) | class LlavaNextImageProcessingTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_image_processor_dict (line 72) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 85) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 89) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class LlavaNextImageProcessingTest (line 103) | class LlavaNextImageProcessingTest(ImageProcessingTestMixin, unittest.Te... method setUp (line 107) | def setUp(self): method image_processor_dict (line 113) | def image_processor_dict(self): method test_image_processor_properties (line 116) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 129) | def test_image_processor_from_dict_with_kwargs(self): method test_select_best_resolution (line 138) | def test_select_best_resolution(self): method test_call_pil (line 145) | def test_call_pil(self): method test_call_numpy (line 163) | def test_call_numpy(self): method test_call_pytorch (line 181) | def test_call_pytorch(self): method test_call_numpy_4_channels (line 203) | def test_call_numpy_4_channels(self): method test_nested_input (line 206) | def test_nested_input(self): FILE: mplsandbox_for_rl/transformers/tests/models/llava_next/test_modeling_llava_next.py class LlavaNextVisionText2TextModelTester (line 58) | class LlavaNextVisionText2TextModelTester: method __init__ (line 59) | def __init__( method get_config (line 129) | def get_config(self): method prepare_config_and_inputs (line 141) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 155) | def prepare_config_and_inputs_for_common(self): method create_and_check_llava_next_model_fp16_forward (line 176) | def create_and_check_llava_next_model_fp16_forward( method create_and_check_llava_next_model_fp16_autocast_forward (line 192) | def create_and_check_llava_next_model_fp16_autocast_forward( class LlavaNextForConditionalGenerationModelTest (line 211) | class LlavaNextForConditionalGenerationModelTest(ModelTesterMixin, Gener... method setUp (line 220) | def setUp(self): method test_initialization (line 224) | def test_initialization(self): method test_inputs_embeds (line 241) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 263) | def test_inputs_embeds_matches_input_ids(self): method test_training_gradient_checkpointing (line 286) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 292) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 298) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_feed_forward_chunking (line 302) | def test_feed_forward_chunking(self): method test_cpu_offload (line 306) | def test_cpu_offload(self): method test_sdpa_can_compile_dynamic (line 310) | def test_sdpa_can_compile_dynamic(self): method test_sdpa_can_dispatch_on_flash (line 314) | def test_sdpa_can_dispatch_on_flash(self): class LlavaNextForConditionalGenerationIntegrationTest (line 319) | class LlavaNextForConditionalGenerationIntegrationTest(unittest.TestCase): method setUp (line 320) | def setUp(self): method tearDown (line 327) | def tearDown(self): method test_small_model_integration_test (line 333) | def test_small_model_integration_test(self): method test_small_model_integration_test_batch (line 387) | def test_small_model_integration_test_batch(self): method test_small_model_integration_test_unk_token (line 412) | def test_small_model_integration_test_unk_token(self): method test_small_model_integration_test_batch_different_resolutions (line 438) | def test_small_model_integration_test_batch_different_resolutions(self): method test_small_model_integration_test_batch_matches_single (line 491) | def test_small_model_integration_test_batch_matches_single(self): method test_padding_side_when_merging_inputs (line 520) | def test_padding_side_when_merging_inputs(self): method test_expansion_in_processing (line 572) | def test_expansion_in_processing(self): FILE: mplsandbox_for_rl/transformers/tests/models/llava_next/test_processor_llava_next.py class LlavaProcessorTest (line 25) | class LlavaProcessorTest(unittest.TestCase): method test_chat_template (line 26) | def test_chat_template(self): FILE: mplsandbox_for_rl/transformers/tests/models/llava_next_video/test_image_processing_llava_next_video.py class LlavaNextVideoProcessingTester (line 36) | class LlavaNextVideoProcessingTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_image_processor_dict (line 71) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 84) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 88) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... method prepare_video_inputs (line 99) | def prepare_video_inputs(self, equal_resolution=False, numpify=False, ... class LlavaNextVideoProcessingTest (line 129) | class LlavaNextVideoProcessingTest(ImageProcessingTestMixin, unittest.Te... method setUp (line 132) | def setUp(self): method image_processor_dict (line 138) | def image_processor_dict(self): method test_image_processor_properties (line 141) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 153) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pil (line 162) | def test_call_pil(self): method test_call_numpy (line 180) | def test_call_numpy(self): method test_call_pytorch (line 198) | def test_call_pytorch(self): method test_call_numpy_4_channels (line 217) | def test_call_numpy_4_channels(self): FILE: mplsandbox_for_rl/transformers/tests/models/llava_next_video/test_modeling_llava_next_video.py class LlavaNextVideoVisionText2TextModelTester (line 57) | class LlavaNextVideoVisionText2TextModelTester: method __init__ (line 58) | def __init__( method get_config (line 130) | def get_config(self): method prepare_config_and_inputs (line 143) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 166) | def prepare_config_and_inputs_for_common(self): method create_and_check_llava_next_video_model_fp16_forward (line 189) | def create_and_check_llava_next_video_model_fp16_forward( method create_and_check_llava_next_video_model_fp16_autocast_forward (line 206) | def create_and_check_llava_next_video_model_fp16_autocast_forward( class LlavaNextVideoForConditionalGenerationModelTest (line 226) | class LlavaNextVideoForConditionalGenerationModelTest(ModelTesterMixin, ... method setUp (line 235) | def setUp(self): method test_initialization (line 239) | def test_initialization(self): method test_inputs_embeds (line 256) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 279) | def test_inputs_embeds_matches_input_ids(self): method test_training_gradient_checkpointing (line 303) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 309) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 315) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_feed_forward_chunking (line 319) | def test_feed_forward_chunking(self): method test_cpu_offload (line 323) | def test_cpu_offload(self): method test_sdpa_can_compile_dynamic (line 329) | def test_sdpa_can_compile_dynamic(self): method test_sdpa_can_dispatch_on_flash (line 335) | def test_sdpa_can_dispatch_on_flash(self): class LlavaNextVideoForConditionalGenerationIntegrationTest (line 340) | class LlavaNextVideoForConditionalGenerationIntegrationTest(unittest.Tes... method setUp (line 341) | def setUp(self): method tearDown (line 354) | def tearDown(self): method test_small_model_integration_test (line 360) | def test_small_model_integration_test(self): method test_small_model_integration_test_batch (line 405) | def test_small_model_integration_test_batch(self): method test_small_model_integration_test_batch_different_vision_types (line 427) | def test_small_model_integration_test_batch_different_vision_types(self): method test_small_model_integration_test_batch_matches_single (line 455) | def test_small_model_integration_test_batch_matches_single(self): method test_padding_side_when_merging_inputs (line 480) | def test_padding_side_when_merging_inputs(self): method test_expansion_in_processing (line 534) | def test_expansion_in_processing(self): FILE: mplsandbox_for_rl/transformers/tests/models/longformer/test_modeling_longformer.py class LongformerModelTester (line 41) | class LongformerModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 100) | def prepare_config_and_inputs(self): method get_config (line 123) | def get_config(self): method get_pipeline_config (line 139) | def get_pipeline_config(self): method create_and_check_attention_mask_determinism (line 144) | def create_and_check_attention_mask_determinism( method create_and_check_model (line 156) | def create_and_check_model( method create_and_check_model_with_global_attention_mask (line 168) | def create_and_check_model_with_global_attention_mask( method create_and_check_for_masked_lm (line 190) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 199) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 216) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 226) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 236) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 256) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_question_answering (line 278) | def prepare_config_and_inputs_for_question_answering(self): class LongformerModelTest (line 300) | class LongformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method is_pipeline_test_to_skip (line 333) | def is_pipeline_test_to_skip( method setUp (line 348) | def setUp(self): method test_config (line 352) | def test_config(self): method test_model (line 355) | def test_model(self): method test_model_attention_mask_determinism (line 359) | def test_model_attention_mask_determinism(self): method test_model_global_attention_mask (line 363) | def test_model_global_attention_mask(self): method test_for_masked_lm (line 367) | def test_for_masked_lm(self): method test_for_question_answering (line 371) | def test_for_question_answering(self): method test_for_sequence_classification (line 375) | def test_for_sequence_classification(self): method test_for_token_classification (line 379) | def test_for_token_classification(self): method test_for_multiple_choice (line 383) | def test_for_multiple_choice(self): method test_retain_grad_hidden_states_attentions (line 388) | def test_retain_grad_hidden_states_attentions(self): method test_batching_equivalence (line 392) | def test_batching_equivalence(self): class LongformerModelIntegrationTest (line 399) | class LongformerModelIntegrationTest(unittest.TestCase): method _get_hidden_states (line 400) | def _get_hidden_states(self): method test_diagonalize (line 450) | def test_diagonalize(self): method test_pad_and_transpose_last_two_dims (line 480) | def test_pad_and_transpose_last_two_dims(self): method test_chunk (line 492) | def test_chunk(self): method test_mask_invalid_locations (line 513) | def test_mask_invalid_locations(self): method test_layer_local_attn (line 538) | def test_layer_local_attn(self): method test_layer_global_attn (line 572) | def test_layer_global_attn(self): method test_layer_attn_probs (line 623) | def test_layer_attn_probs(self): method test_inference_no_head (line 712) | def test_inference_no_head(self): method test_inference_no_head_long (line 728) | def test_inference_no_head_long(self): method test_inference_masked_lm_long (line 749) | def test_inference_masked_lm_long(self): FILE: mplsandbox_for_rl/transformers/tests/models/longformer/test_modeling_tf_longformer.py class TFLongformerModelTester (line 45) | class TFLongformerModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 80) | def prepare_config_and_inputs(self): method create_and_check_attention_mask_determinism (line 116) | def create_and_check_attention_mask_determinism( method create_and_check_model (line 126) | def create_and_check_model( method create_and_check_model_with_global_attention_mask (line 140) | def create_and_check_model_with_global_attention_mask( method create_and_check_for_masked_lm (line 168) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 176) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 192) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 202) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 210) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 227) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_question_answering (line 254) | def prepare_config_and_inputs_for_question_answering(self): class TFLongformerModelTest (line 276) | class TFLongformerModelTest(TFModelTesterMixin, PipelineTesterMixin, uni... method is_pipeline_test_to_skip (line 305) | def is_pipeline_test_to_skip( method setUp (line 320) | def setUp(self): method test_config (line 324) | def test_config(self): method test_model_attention_mask_determinism (line 327) | def test_model_attention_mask_determinism(self): method test_model (line 331) | def test_model(self): method test_model_global_attention_mask (line 335) | def test_model_global_attention_mask(self): method test_for_masked_lm (line 339) | def test_for_masked_lm(self): method test_for_question_answering (line 343) | def test_for_question_answering(self): method test_for_sequence_classification (line 347) | def test_for_sequence_classification(self): method test_for_token_classification (line 351) | def test_for_token_classification(self): method test_for_multiple_choice (line 355) | def test_for_multiple_choice(self): method test_saved_model_creation (line 360) | def test_saved_model_creation(self): method test_compile_tf_model (line 364) | def test_compile_tf_model(self): class TFLongformerModelIntegrationTest (line 371) | class TFLongformerModelIntegrationTest(unittest.TestCase): method _get_hidden_states (line 372) | def _get_hidden_states(self): method test_diagonalize (line 421) | def test_diagonalize(self): method test_pad_and_transpose_last_two_dims (line 442) | def test_pad_and_transpose_last_two_dims(self): method test_mask_invalid_locations (line 459) | def test_mask_invalid_locations(self): method test_chunk (line 477) | def test_chunk(self): method test_layer_local_attn (line 496) | def test_layer_local_attn(self): method test_layer_global_attn (line 522) | def test_layer_global_attn(self): method test_layer_attn_probs (line 568) | def test_layer_attn_probs(self): method test_inference_no_head (line 646) | def test_inference_no_head(self): method test_inference_no_head_long (line 662) | def test_inference_no_head_long(self): method test_inference_masked_lm_long (line 687) | def test_inference_masked_lm_long(self): method test_inference_masked_lm (line 711) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/longformer/test_tokenization_longformer.py class LongformerTokenizationTest (line 31) | class LongformerTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 39) | def setUp(self): method get_tokenizer (line 76) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 80) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 84) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 89) | def test_full_tokenizer(self): method longformer_dict_integration_testing (line 100) | def longformer_dict_integration_testing(self): method test_sequence_builders (line 110) | def test_sequence_builders(self): method test_space_encoding (line 129) | def test_space_encoding(self): method test_pretokenized_inputs (line 170) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 173) | def test_embeded_special_tokens(self): method test_change_add_prefix_space_and_trim_offsets_args (line 205) | def test_change_add_prefix_space_and_trim_offsets_args(self): method test_offsets_mapping_with_different_add_prefix_space_and_trim_space_arguments (line 219) | def test_offsets_mapping_with_different_add_prefix_space_and_trim_spac... FILE: mplsandbox_for_rl/transformers/tests/models/longt5/test_modeling_flax_longt5.py class FlaxLongT5ModelTester (line 58) | class FlaxLongT5ModelTester: method __init__ (line 59) | def __init__( method prepare_config_and_inputs (line 113) | def prepare_config_and_inputs(self): method create_and_check_model (line 151) | def create_and_check_model( method check_use_cache_forward_with_attn_mask (line 173) | def check_use_cache_forward_with_attn_mask( method prepare_config_and_inputs_for_common (line 218) | def prepare_config_and_inputs_for_common(self): class FlaxLongT5ModelTest (line 238) | class FlaxLongT5ModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixi... method setUp (line 243) | def setUp(self): method test_config (line 247) | def test_config(self): method test_model (line 250) | def test_model(self): method test_model_v1_1 (line 254) | def test_model_v1_1(self): method test_use_cache_forward_with_attn_mask (line 262) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 267) | def test_encode(self): method test_decode (line 290) | def test_decode(self): method test_shift_right (line 323) | def test_shift_right(self): method test_save_load_from_base (line 341) | def test_save_load_from_base(self): method test_save_load_to_base (line 364) | def test_save_load_to_base(self): method test_attention_outputs (line 386) | def test_attention_outputs(self): method test_save_load_from_base_pt (line 474) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 504) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 533) | def test_save_load_bf16_to_base_pt(self): class FlaxLongT5TGlobalModelTest (line 562) | class FlaxLongT5TGlobalModelTest(FlaxLongT5ModelTest): method setUp (line 563) | def setUp(self): method test_attention_outputs (line 567) | def test_attention_outputs(self): class FlaxLongT5ModelIntegrationTests (line 659) | class FlaxLongT5ModelIntegrationTests(unittest.TestCase): method expected_summary (line 662) | def expected_summary(self): method test_summarization (line 674) | def test_summarization(self): FILE: mplsandbox_for_rl/transformers/tests/models/longt5/test_modeling_longt5.py class LongT5ModelTester (line 44) | class LongT5ModelTester: method __init__ (line 45) | def __init__( method get_large_model_config (line 101) | def get_large_model_config(self): method prepare_config_and_inputs (line 104) | def prepare_config_and_inputs(self): method get_pipeline_config (line 129) | def get_pipeline_config(self): method get_config (line 150) | def get_config(self): method check_prepare_lm_labels_via_shift_left (line 171) | def check_prepare_lm_labels_via_shift_left( method create_and_check_model (line 210) | def create_and_check_model( method create_and_check_with_lm_head (line 240) | def create_and_check_with_lm_head( method create_and_check_decoder_model_past (line 260) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 297) | def create_and_check_decoder_model_attention_mask_past( method create_and_check_decoder_model_past_large_inputs (line 348) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_generate_with_past_key_values (line 386) | def create_and_check_generate_with_past_key_values( method create_and_check_encoder_decoder_shared_weights (line 404) | def create_and_check_encoder_decoder_shared_weights( method prepare_config_and_inputs_for_common (line 480) | def prepare_config_and_inputs_for_common(self): class LongT5ModelTest (line 502) | class LongT5ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method setUp (line 522) | def setUp(self): method test_config (line 526) | def test_config(self): method test_shift_right (line 529) | def test_shift_right(self): method test_model (line 533) | def test_model(self): method test_with_lm_head (line 537) | def test_with_lm_head(self): method test_decoder_model_past (line 541) | def test_decoder_model_past(self): method test_decoder_model_past_with_attn_mask (line 545) | def test_decoder_model_past_with_attn_mask(self): method test_decoder_model_past_with_3d_attn_mask (line 549) | def test_decoder_model_past_with_3d_attn_mask(self): method test_decoder_model_past_with_large_inputs (line 577) | def test_decoder_model_past_with_large_inputs(self): method test_generate_with_past_key_values (line 581) | def test_generate_with_past_key_values(self): method test_encoder_decoder_shared_weights (line 585) | def test_encoder_decoder_shared_weights(self): method test_model_from_pretrained (line 590) | def test_model_from_pretrained(self): method test_export_to_onnx (line 596) | def test_export_to_onnx(self): method test_generate_with_head_masking (line 609) | def test_generate_with_head_masking(self): method test_attention_outputs (line 643) | def test_attention_outputs(self): method _check_encoder_attention_for_generate (line 752) | def _check_encoder_attention_for_generate(self, attentions, batch_size... method test_load_save_without_tied_weights (line 764) | def test_load_save_without_tied_weights(self): class LongT5TGlobalModelTest (line 769) | class LongT5TGlobalModelTest(LongT5ModelTest): method setUp (line 770) | def setUp(self): method test_attention_outputs (line 776) | def test_attention_outputs(self): method _check_encoder_attention_for_generate (line 887) | def _check_encoder_attention_for_generate(self, attentions, batch_size... class LongT5EncoderOnlyModelTester (line 905) | class LongT5EncoderOnlyModelTester: method __init__ (line 906) | def __init__( method get_large_model_config (line 956) | def get_large_model_config(self): method prepare_config_and_inputs (line 959) | def prepare_config_and_inputs(self): method create_and_check_model (line 991) | def create_and_check_model( method prepare_config_and_inputs_for_common (line 1009) | def prepare_config_and_inputs_for_common(self): class LongT5EncoderOnlyModelTest (line 1024) | class LongT5EncoderOnlyModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 1031) | def setUp(self): method test_config (line 1035) | def test_config(self): method test_model (line 1038) | def test_model(self): method test_attention_outputs (line 1042) | def test_attention_outputs(self): method test_load_save_without_tied_weights (line 1109) | def test_load_save_without_tied_weights(self): class LongT5EncoderOnlyTGlobalModelTest (line 1113) | class LongT5EncoderOnlyTGlobalModelTest(LongT5EncoderOnlyModelTest): method setUp (line 1114) | def setUp(self): method test_attention_outputs (line 1120) | def test_attention_outputs(self): function use_task_specific_params (line 1188) | def use_task_specific_params(model, task): class LongT5ModelIntegrationTests (line 1195) | class LongT5ModelIntegrationTests(unittest.TestCase): method model (line 1197) | def model(self): method tokenizer (line 1203) | def tokenizer(self): method expected_summary (line 1206) | def expected_summary(self): method test_summarization (line 1218) | def test_summarization(self): method test_inference_hidden_states (line 1304) | def test_inference_hidden_states(self): FILE: mplsandbox_for_rl/transformers/tests/models/luke/test_modeling_luke.py class LukeModelTester (line 44) | class LukeModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 121) | def prepare_config_and_inputs(self): method get_config (line 193) | def get_config(self): method create_and_check_model (line 212) | def create_and_check_model( method create_and_check_for_masked_lm (line 253) | def create_and_check_for_masked_lm( method create_and_check_for_entity_classification (line 295) | def create_and_check_for_entity_classification( method create_and_check_for_entity_pair_classification (line 330) | def create_and_check_for_entity_pair_classification( method create_and_check_for_entity_span_classification (line 365) | def create_and_check_for_entity_span_classification( method create_and_check_for_question_answering (line 407) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 442) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 476) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 510) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 557) | def prepare_config_and_inputs_for_common(self): class LukeModelTest (line 589) | class LukeModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method is_pipeline_test_to_skip (line 623) | def is_pipeline_test_to_skip( method _prepare_for_class (line 631) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 689) | def setUp(self): method test_config (line 693) | def test_config(self): method test_model (line 696) | def test_model(self): method test_model_from_pretrained (line 701) | def test_model_from_pretrained(self): method test_for_masked_lm (line 706) | def test_for_masked_lm(self): method test_for_masked_lm_with_word_only (line 710) | def test_for_masked_lm_with_word_only(self): method test_for_question_answering (line 715) | def test_for_question_answering(self): method test_for_sequence_classification (line 719) | def test_for_sequence_classification(self): method test_for_token_classification (line 723) | def test_for_token_classification(self): method test_for_multiple_choice (line 727) | def test_for_multiple_choice(self): method test_for_entity_classification (line 731) | def test_for_entity_classification(self): method test_for_entity_pair_classification (line 735) | def test_for_entity_pair_classification(self): method test_for_entity_span_classification (line 739) | def test_for_entity_span_classification(self): method test_attention_outputs (line 743) | def test_attention_outputs(self): method test_entity_hidden_states_output (line 800) | def test_entity_hidden_states_output(self): method test_retain_grad_entity_hidden_states (line 835) | def test_retain_grad_entity_hidden_states(self): method test_training_gradient_checkpointing (line 861) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 867) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 873) | def test_training_gradient_checkpointing_use_reentrant_false(self): class LukeModelIntegrationTests (line 878) | class LukeModelIntegrationTests(unittest.TestCase): method test_inference_base_model (line 880) | def test_inference_base_model(self): method test_inference_large_model (line 915) | def test_inference_large_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/luke/test_tokenization_luke.py class LukeTokenizerTest (line 30) | class LukeTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method get_tokenizer (line 41) | def get_tokenizer(self, task=None, **kwargs): method get_input_output_texts (line 52) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 57) | def test_full_tokenizer(self): method test_sequence_builders (line 69) | def test_sequence_builders(self): method get_clean_sequence (line 88) | def get_clean_sequence(self, tokenizer, max_length=20) -> Tuple[str, l... method test_space_encoding (line 93) | def test_space_encoding(self): method test_pretokenized_inputs (line 134) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 137) | def test_embeded_special_tokens(self): method test_padding_entity_inputs (line 164) | def test_padding_entity_inputs(self): method test_if_tokenize_single_text_raise_error_with_invalid_inputs (line 179) | def test_if_tokenize_single_text_raise_error_with_invalid_inputs(self): method test_if_tokenize_entity_classification_raise_error_with_invalid_inputs (line 201) | def test_if_tokenize_entity_classification_raise_error_with_invalid_in... method test_if_tokenize_entity_pair_classification_raise_error_with_invalid_inputs (line 216) | def test_if_tokenize_entity_pair_classification_raise_error_with_inval... method test_if_tokenize_entity_span_classification_raise_error_with_invalid_inputs (line 228) | def test_if_tokenize_entity_span_classification_raise_error_with_inval... class LukeTokenizerIntegrationTests (line 242) | class LukeTokenizerIntegrationTests(unittest.TestCase): method setUp (line 246) | def setUp(self): method test_single_text_no_padding_or_truncation (line 249) | def test_single_text_no_padding_or_truncation(self): method test_single_text_only_entity_spans_no_padding_or_truncation (line 290) | def test_single_text_only_entity_spans_no_padding_or_truncation(self): method test_single_text_padding_pytorch_tensors (line 324) | def test_single_text_padding_pytorch_tensors(self): method test_text_pair_no_padding_or_truncation (line 352) | def test_text_pair_no_padding_or_truncation(self): method test_text_pair_only_entity_spans_no_padding_or_truncation (line 404) | def test_text_pair_only_entity_spans_no_padding_or_truncation(self): method test_text_pair_padding_pytorch_tensors (line 446) | def test_text_pair_padding_pytorch_tensors(self): method test_entity_classification_no_padding_or_truncation (line 480) | def test_entity_classification_no_padding_or_truncation(self): method test_entity_classification_padding_pytorch_tensors (line 516) | def test_entity_classification_padding_pytorch_tensors(self): method test_entity_pair_classification_no_padding_or_truncation (line 544) | def test_entity_pair_classification_no_padding_or_truncation(self): method test_entity_pair_classification_padding_pytorch_tensors (line 579) | def test_entity_pair_classification_padding_pytorch_tensors(self): method test_entity_span_classification_no_padding_or_truncation (line 609) | def test_entity_span_classification_no_padding_or_truncation(self): method test_entity_span_classification_padding_pytorch_tensors (line 639) | def test_entity_span_classification_padding_pytorch_tensors(self): FILE: mplsandbox_for_rl/transformers/tests/models/lxmert/test_modeling_lxmert.py class LxmertModelTester (line 47) | class LxmertModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 131) | def prepare_config_and_inputs(self): method get_config (line 189) | def get_config(self): method create_and_check_lxmert_model (line 224) | def create_and_check_lxmert_model( method create_and_check_lxmert_for_question_answering (line 266) | def create_and_check_lxmert_for_question_answering( method create_and_check_lxmert_for_pretraining (line 314) | def create_and_check_lxmert_for_pretraining( method resize_lxmert_num_qa_labels (line 400) | def resize_lxmert_num_qa_labels( method prepare_config_and_inputs_for_common (line 499) | def prepare_config_and_inputs_for_common(self, return_obj_labels=False): class LxmertModelTest (line 532) | class LxmertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method _prepare_for_class (line 546) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 561) | def setUp(self): method test_config (line 565) | def test_config(self): method test_lxmert_model (line 568) | def test_lxmert_model(self): method test_lxmert_question_answering (line 572) | def test_lxmert_question_answering(self): method test_lxmert_pretraining (line 576) | def test_lxmert_pretraining(self): method test_lxmert_question_answering_labels_resize (line 580) | def test_lxmert_question_answering_labels_resize(self): method test_model_from_pretrained (line 585) | def test_model_from_pretrained(self): method test_attention_outputs (line 591) | def test_attention_outputs(self): method test_hidden_states_output (line 675) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 712) | def test_retain_grad_hidden_states_attentions(self): method prepare_tf_inputs_from_pt_inputs (line 745) | def prepare_tf_inputs_from_pt_inputs(self, pt_inputs_dict): method test_save_load_low_cpu_mem_usage (line 770) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 774) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 778) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method test_load_save_without_tied_weights (line 784) | def test_load_save_without_tied_weights(self): class LxmertModelIntegrationTest (line 789) | class LxmertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 791) | def test_inference_no_head_absolute_embedding(self): FILE: mplsandbox_for_rl/transformers/tests/models/lxmert/test_modeling_tf_lxmert.py class TFLxmertModelTester (line 37) | class TFLxmertModelTester: method __init__ (line 38) | def __init__( method prepare_config_and_inputs (line 121) | def prepare_config_and_inputs(self): method create_and_check_lxmert_model (line 211) | def create_and_check_lxmert_model( method prepare_config_and_inputs_for_common (line 251) | def prepare_config_and_inputs_for_common(self, return_obj_labels=False): method create_and_check_lxmert_for_pretraining (line 282) | def create_and_check_lxmert_for_pretraining( class TFLxmertModelTest (line 368) | class TFLxmertModelTest(TFModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 374) | def setUp(self): method test_config (line 378) | def test_config(self): method test_lxmert_model (line 381) | def test_lxmert_model(self): method test_lxmert_for_pretraining (line 385) | def test_lxmert_for_pretraining(self): method test_model_from_pretrained (line 390) | def test_model_from_pretrained(self): method test_attention_outputs (line 395) | def test_attention_outputs(self): method test_hidden_states_output (line 462) | def test_hidden_states_output(self): method prepare_pt_inputs_from_tf_inputs (line 493) | def prepare_pt_inputs_from_tf_inputs(self, tf_inputs_dict): method test_save_load (line 518) | def test_save_load(self): class TFLxmertModelIntegrationTest (line 536) | class TFLxmertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 538) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/lxmert/test_tokenization_lxmert.py class LxmertTokenizationTest (line 28) | class LxmertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_input_output_texts (line 57) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 62) | def test_full_tokenizer(self): method test_rust_and_python_full_tokenizers (line 69) | def test_rust_and_python_full_tokenizers(self): FILE: mplsandbox_for_rl/transformers/tests/models/m2m_100/test_modeling_m2m_100.py function prepare_m2m_100_inputs_dict (line 49) | def prepare_m2m_100_inputs_dict( class M2M100ModelTester (line 80) | class M2M100ModelTester: method __init__ (line 81) | def __init__( method prepare_config_and_inputs (line 123) | def prepare_config_and_inputs(self): method get_config (line 142) | def get_config(self): method prepare_config_and_inputs_for_common (line 162) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 166) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 200) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class M2M100ModelTest (line 234) | class M2M100ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method is_pipeline_test_to_skip (line 260) | def is_pipeline_test_to_skip( method setUp (line 270) | def setUp(self): method test_config (line 274) | def test_config(self): method test_save_load_strict (line 277) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 287) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 291) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 295) | def test_inputs_embeds(self): method test_generate_fp16 (line 325) | def test_generate_fp16(self): method test_load_save_without_tied_weights (line 337) | def test_load_save_without_tied_weights(self): function _long_tensor (line 341) | def _long_tensor(tok_lst): class M2M100ModelIntegrationTests (line 352) | class M2M100ModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 354) | def default_tokenizer(self): method test_inference_no_head (line 357) | def test_inference_no_head(self): method test_inference_head (line 372) | def test_inference_head(self): method test_seq_to_seq_generation (line 389) | def test_seq_to_seq_generation(self): method test_flash_attn_2_seq_to_seq_generation (line 428) | def test_flash_attn_2_seq_to_seq_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/m2m_100/test_tokenization_m2m_100.py class M2M100TokenizationTest (line 50) | class M2M100TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 57) | def setUp(self): method get_tokenizer (line 70) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 73) | def get_input_output_texts(self, tokenizer): method test_convert_token_and_id (line 79) | def test_convert_token_and_id(self): method test_get_vocab (line 87) | def test_get_vocab(self): method test_full_tokenizer (line 97) | def test_full_tokenizer(self): method test_tokenizer_integration (line 115) | def test_tokenizer_integration(self): class M2M100TokenizerIntegrationTest (line 128) | class M2M100TokenizerIntegrationTest(unittest.TestCase): method setUpClass (line 142) | def setUpClass(cls): method check_language_codes (line 149) | def check_language_codes(self): method test_get_vocab (line 155) | def test_get_vocab(self): method test_tokenizer_batch_encode_plus (line 161) | def test_tokenizer_batch_encode_plus(self): method test_tokenizer_decode_ignores_language_codes (line 166) | def test_tokenizer_decode_ignores_language_codes(self): method test_special_tokens_unaffacted_by_save_load (line 174) | def test_special_tokens_unaffacted_by_save_load(self): method test_batch_fairseq_parity (line 182) | def test_batch_fairseq_parity(self): method test_src_lang_setter (line 204) | def test_src_lang_setter(self): method test_tokenizer_target_mode (line 214) | def test_tokenizer_target_mode(self): method test_tokenizer_translation (line 230) | def test_tokenizer_translation(self): FILE: mplsandbox_for_rl/transformers/tests/models/mamba/test_modeling_mamba.py class MambaModelTester (line 46) | class MambaModelTester: method __init__ (line 47) | def __init__( method get_large_model_config (line 90) | def get_large_model_config(self): method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs( method get_config (line 122) | def get_config( method get_pipeline_config (line 141) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 146) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_mamba_model (line 165) | def create_and_check_mamba_model(self, config, input_ids, *args): method create_and_check_causal_lm (line 176) | def create_and_check_causal_lm(self, config, input_ids, *args): method create_and_check_state_equivalency (line 185) | def create_and_check_state_equivalency(self, config, input_ids, *args): method create_and_check_mamba_cached_slow_forward_and_backwards (line 212) | def create_and_check_mamba_cached_slow_forward_and_backwards( method create_and_check_mamba_lm_head_forward_and_backwards (line 235) | def create_and_check_mamba_lm_head_forward_and_backwards( method prepare_config_and_inputs_for_common (line 248) | def prepare_config_and_inputs_for_common(self): class MambaModelTest (line 265) | class MambaModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe... method setUp (line 279) | def setUp(self): method assertInterval (line 285) | def assertInterval(self, member, container, msg=None): method test_config (line 307) | def test_config(self): method test_multi_gpu_data_parallel_forward (line 311) | def test_multi_gpu_data_parallel_forward(self): method test_mamba_model (line 335) | def test_mamba_model(self): method test_mamba_lm_head_model (line 339) | def test_mamba_lm_head_model(self): method test_state_equivalency (line 343) | def test_state_equivalency(self): method test_mamba_cached_slow_forward_and_backwards (line 347) | def test_mamba_cached_slow_forward_and_backwards(self): method test_mamba_lm_head_forward_and_backwards (line 351) | def test_mamba_lm_head_forward_and_backwards(self): method test_initialization (line 355) | def test_initialization(self): method test_model_from_pretrained (line 379) | def test_model_from_pretrained(self): method test_model_outputs_equivalence (line 383) | def test_model_outputs_equivalence(self): method test_beam_sample_generate (line 440) | def test_beam_sample_generate(self): class MambaIntegrationTests (line 445) | class MambaIntegrationTests(unittest.TestCase): method setUp (line 446) | def setUp(self): method test_simple_generate (line 451) | def test_simple_generate(self, device): method test_simple_generate_cuda_kernels_tiny (line 480) | def test_simple_generate_cuda_kernels_tiny(self, device): method test_simple_generate_cuda_kernels_small (line 493) | def test_simple_generate_cuda_kernels_small(self, device): method test_simple_generate_cuda_kernels_mid (line 506) | def test_simple_generate_cuda_kernels_mid(self, device): method test_simple_generate_cuda_kernels_big (line 519) | def test_simple_generate_cuda_kernels_big(self, device): method test_compile_mamba_cache (line 531) | def test_compile_mamba_cache(self): FILE: mplsandbox_for_rl/transformers/tests/models/mamba2/test_modeling_mamba2.py class Mamba2ModelTester (line 44) | class Mamba2ModelTester: method __init__ (line 45) | def __init__( method get_large_model_config (line 98) | def get_large_model_config(self): method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs( method get_config (line 127) | def get_config(self, gradient_checkpointing=False): method prepare_config_and_inputs_for_common (line 149) | def prepare_config_and_inputs_for_common(self): class Mamba2ModelTest (line 166) | class Mamba2ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method setUp (line 181) | def setUp(self): method test_initialization (line 187) | def test_initialization(self): method test_tied_weights_keys (line 199) | def test_tied_weights_keys(self): method test_beam_search_generate_dict_outputs_use_cache (line 203) | def test_beam_search_generate_dict_outputs_use_cache(self): method test_beam_sample_generate (line 207) | def test_beam_sample_generate(self): method test_generate_without_input_ids (line 211) | def test_generate_without_input_ids(self): method test_greedy_generate_dict_outputs_use_cache (line 215) | def test_greedy_generate_dict_outputs_use_cache(self): method test_save_load_fast_init_from_base (line 219) | def test_save_load_fast_init_from_base(self): method test_multi_gpu_data_parallel_forward (line 223) | def test_multi_gpu_data_parallel_forward(self): method test_generate_from_inputs_embeds_decoder_only (line 227) | def test_generate_from_inputs_embeds_decoder_only(self): method test_model_outputs_equivalence (line 230) | def test_model_outputs_equivalence(self): method test_inputs_embeds_matches_input_ids_with_generate (line 289) | def test_inputs_embeds_matches_input_ids_with_generate(self): class Mamba2IntegrationTest (line 295) | class Mamba2IntegrationTest(unittest.TestCase): method setUp (line 296) | def setUp(self): method test_simple_generate (line 310) | def test_simple_generate(self, device): method test_batched_equivalence_with_cache (line 333) | def test_batched_equivalence_with_cache(self): method test_batched_equivalence_without_cache (line 365) | def test_batched_equivalence_without_cache(self): FILE: mplsandbox_for_rl/transformers/tests/models/marian/test_modeling_flax_marian.py function prepare_marian_inputs_dict (line 43) | def prepare_marian_inputs_dict( class FlaxMarianModelTester (line 71) | class FlaxMarianModelTester: method __init__ (line 72) | def __init__( method prepare_config_and_inputs (line 112) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 139) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 143) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 183) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxMarianModelTest (line 231) | class FlaxMarianModelTest(FlaxModelTesterMixin, unittest.TestCase, FlaxG... method setUp (line 236) | def setUp(self): method test_use_cache_forward (line 239) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 244) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 249) | def test_encode(self): method test_decode (line 272) | def test_decode(self): method test_model_from_pretrained (line 306) | def test_model_from_pretrained(self): class MarianIntegrationTest (line 318) | class MarianIntegrationTest(unittest.TestCase): method setUpClass (line 323) | def setUpClass(cls) -> None: method tokenizer (line 328) | def tokenizer(self): method eos_token_id (line 332) | def eos_token_id(self) -> int: method model (line 336) | def model(self): method _assert_generated_batch_equal_expected (line 341) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 345) | def translate_src_text(self, **tokenizer_kwargs): class TestMarian_EN_FR (line 360) | class TestMarian_EN_FR(MarianIntegrationTest): method test_batch_generation_en_fr (line 373) | def test_batch_generation_en_fr(self): class TestMarian_FR_EN (line 380) | class TestMarian_FR_EN(MarianIntegrationTest): method test_batch_generation_fr_en (line 393) | def test_batch_generation_fr_en(self): class TestMarian_MT_EN (line 400) | class TestMarian_MT_EN(MarianIntegrationTest): method test_batch_generation_mt_en (line 409) | def test_batch_generation_mt_en(self): class TestMarian_EN_DE (line 416) | class TestMarian_EN_DE(MarianIntegrationTest): method test_batch_generation_en_de (line 437) | def test_batch_generation_en_de(self): class TestMarian_en_zh (line 444) | class TestMarian_en_zh(MarianIntegrationTest): method test_batch_generation_eng_zho (line 451) | def test_batch_generation_eng_zho(self): class TestMarian_RU_FR (line 458) | class TestMarian_RU_FR(MarianIntegrationTest): method test_batch_generation_ru_fr (line 465) | def test_batch_generation_ru_fr(self): class TestMarian_en_ROMANCE (line 472) | class TestMarian_en_ROMANCE(MarianIntegrationTest): method test_batch_generation_en_ROMANCE_multi (line 489) | def test_batch_generation_en_ROMANCE_multi(self): FILE: mplsandbox_for_rl/transformers/tests/models/marian/test_modeling_marian.py function prepare_marian_inputs_dict (line 63) | def prepare_marian_inputs_dict( class MarianModelTester (line 94) | class MarianModelTester: method __init__ (line 95) | def __init__( method prepare_config_and_inputs (line 141) | def prepare_config_and_inputs(self): method get_config (line 153) | def get_config(self): method prepare_config_and_inputs_for_common (line 174) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 178) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 212) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class MarianModelTest (line 246) | class MarianModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method setUp (line 265) | def setUp(self): method test_config (line 269) | def test_config(self): method test_save_load_strict (line 272) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 282) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 286) | def test_encoder_decoder_model_standalone(self): method test_generate_fp16 (line 291) | def test_generate_fp16(self): method test_share_encoder_decoder_embeddings (line 300) | def test_share_encoder_decoder_embeddings(self): method test_resize_decoder_token_embeddings (line 326) | def test_resize_decoder_token_embeddings(self): method test_tie_word_embeddings_decoder (line 350) | def test_tie_word_embeddings_decoder(self): method test_training_gradient_checkpointing (line 356) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 362) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 368) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_low_cpu_mem_usage (line 372) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 376) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 380) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): function assert_tensors_close (line 384) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 403) | def _long_tensor(tok_lst): class ModelManagementTests (line 407) | class ModelManagementTests(unittest.TestCase): method test_model_names (line 410) | def test_model_names(self): class MarianIntegrationTest (line 421) | class MarianIntegrationTest(unittest.TestCase): method setUpClass (line 443) | def setUpClass(cls) -> None: method tokenizer (line 448) | def tokenizer(self): method eos_token_id (line 452) | def eos_token_id(self) -> int: method model (line 456) | def model(self): method _assert_generated_batch_equal_expected (line 468) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 472) | def translate_src_text(self, **tokenizer_kwargs): class TestMarian_EN_DE_More (line 490) | class TestMarian_EN_DE_More(MarianIntegrationTest): method test_forward (line 492) | def test_forward(self): method test_unk_support (line 516) | def test_unk_support(self): method test_pad_not_split (line 522) | def test_pad_not_split(self): method test_batch_generation_en_de (line 528) | def test_batch_generation_en_de(self): method test_auto_config (line 531) | def test_auto_config(self): class TestMarian_EN_FR (line 538) | class TestMarian_EN_FR(MarianIntegrationTest): method test_batch_generation_en_fr (line 551) | def test_batch_generation_en_fr(self): class TestMarian_FR_EN (line 557) | class TestMarian_FR_EN(MarianIntegrationTest): method test_batch_generation_fr_en (line 570) | def test_batch_generation_fr_en(self): class TestMarian_RU_FR (line 576) | class TestMarian_RU_FR(MarianIntegrationTest): method test_batch_generation_ru_fr (line 583) | def test_batch_generation_ru_fr(self): class TestMarian_MT_EN (line 589) | class TestMarian_MT_EN(MarianIntegrationTest): method test_batch_generation_mt_en (line 598) | def test_batch_generation_mt_en(self): class TestMarian_en_zh (line 604) | class TestMarian_en_zh(MarianIntegrationTest): method test_batch_generation_eng_zho (line 611) | def test_batch_generation_eng_zho(self): class TestMarian_en_ROMANCE (line 617) | class TestMarian_en_ROMANCE(MarianIntegrationTest): method test_batch_generation_en_ROMANCE_multi (line 634) | def test_batch_generation_en_ROMANCE_multi(self): method test_pipeline (line 639) | def test_pipeline(self): class TestMarian_FI_EN_V2 (line 647) | class TestMarian_FI_EN_V2(MarianIntegrationTest): method setUpClass (line 657) | def setUpClass(cls) -> None: method test_batch_generation_fi_en (line 662) | def test_batch_generation_fi_en(self): class TestConversionUtils (line 667) | class TestConversionUtils(unittest.TestCase): method test_renaming_multilingual (line 668) | def test_renaming_multilingual(self): method test_undoing_renaming (line 678) | def test_undoing_renaming(self): class MarianStandaloneDecoderModelTester (line 690) | class MarianStandaloneDecoderModelTester: method __init__ (line 691) | def __init__( method prepare_config_and_inputs (line 746) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 780) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 816) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 863) | def prepare_config_and_inputs_for_common(self): class MarianStandaloneDecoderModelTest (line 880) | class MarianStandaloneDecoderModelTest(ModelTesterMixin, GenerationTeste... method setUp (line 886) | def setUp( method test_config (line 892) | def test_config(self): method test_decoder_model_past (line 895) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 899) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 904) | def test_retain_grad_hidden_states_attentions(self): FILE: mplsandbox_for_rl/transformers/tests/models/marian/test_modeling_tf_marian.py class TFMarianModelTester (line 38) | class TFMarianModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs_for_common (line 80) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 108) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_marian_inputs_dict (line 144) | def prepare_marian_inputs_dict( class TFMarianModelTest (line 182) | class TFMarianModelTest(TFModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 199) | def setUp(self): method test_config (line 203) | def test_config(self): method test_decoder_model_past_large_inputs (line 206) | def test_decoder_model_past_large_inputs(self): class AbstractMarianIntegrationTest (line 212) | class AbstractMarianIntegrationTest(unittest.TestCase): method setUpClass (line 216) | def setUpClass(cls) -> None: method tokenizer (line 221) | def tokenizer(self) -> MarianTokenizer: method eos_token_id (line 225) | def eos_token_id(self) -> int: method model (line 229) | def model(self): method _assert_generated_batch_equal_expected (line 239) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 243) | def translate_src_text(self, **tokenizer_kwargs): class TestMarian_MT_EN (line 255) | class TestMarian_MT_EN(AbstractMarianIntegrationTest): method test_batch_generation_mt_en (line 265) | def test_batch_generation_mt_en(self): class TestMarian_en_zh (line 272) | class TestMarian_en_zh(AbstractMarianIntegrationTest): method test_batch_generation_en_zh (line 280) | def test_batch_generation_en_zh(self): class TestMarian_en_ROMANCE (line 287) | class TestMarian_en_ROMANCE(AbstractMarianIntegrationTest): method test_batch_generation_en_ROMANCE_multi (line 305) | def test_batch_generation_en_ROMANCE_multi(self): method test_pipeline (line 310) | def test_pipeline(self): FILE: mplsandbox_for_rl/transformers/tests/models/marian/test_tokenization_marian.py class MarianTokenizationTest (line 47) | class MarianTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 53) | def setUp(self): method get_tokenizer (line 67) | def get_tokenizer(self, **kwargs) -> MarianTokenizer: method get_input_output_texts (line 70) | def get_input_output_texts(self, tokenizer): method test_convert_token_and_id (line 76) | def test_convert_token_and_id(self): method test_get_vocab (line 84) | def test_get_vocab(self): method test_vocab_size (line 92) | def test_vocab_size(self): method test_tokenizer_equivalence_en_de (line 95) | def test_tokenizer_equivalence_en_de(self): method test_outputs_not_longer_than_maxlen (line 108) | def test_outputs_not_longer_than_maxlen(self): method test_outputs_can_be_shorter (line 117) | def test_outputs_can_be_shorter(self): method test_tokenizer_integration (line 124) | def test_tokenizer_integration(self): method test_tokenizer_integration_seperate_vocabs (line 133) | def test_tokenizer_integration_seperate_vocabs(self): method test_tokenizer_decode (line 151) | def test_tokenizer_decode(self): FILE: mplsandbox_for_rl/transformers/tests/models/markuplm/test_feature_extraction_markuplm.py class MarkupLMFeatureExtractionTester (line 29) | class MarkupLMFeatureExtractionTester(unittest.TestCase): method __init__ (line 30) | def __init__(self, parent): method prepare_feat_extract_dict (line 33) | def prepare_feat_extract_dict(self): function get_html_strings (line 37) | def get_html_strings(): class MarkupLMFeatureExtractionTest (line 76) | class MarkupLMFeatureExtractionTest(FeatureExtractionSavingTestMixin, un... method setUp (line 79) | def setUp(self): method feat_extract_dict (line 83) | def feat_extract_dict(self): method test_call (line 86) | def test_call(self): FILE: mplsandbox_for_rl/transformers/tests/models/markuplm/test_modeling_markuplm.py class MarkupLMModelTester (line 42) | class MarkupLMModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs(self): method get_config (line 139) | def get_config(self): method create_and_check_model (line 159) | def create_and_check_model( method create_and_check_for_sequence_classification (line 180) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 205) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 230) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 256) | def prepare_config_and_inputs_for_common(self): class MarkupLMModelTest (line 279) | class MarkupLMModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method is_pipeline_test_to_skip (line 303) | def is_pipeline_test_to_skip( method setUp (line 310) | def setUp(self): method test_config (line 314) | def test_config(self): method test_model (line 317) | def test_model(self): method test_for_sequence_classification (line 321) | def test_for_sequence_classification(self): method test_for_token_classification (line 325) | def test_for_token_classification(self): method test_for_question_answering (line 329) | def test_for_question_answering(self): function prepare_html_string (line 334) | def prepare_html_string(): class MarkupLMModelIntegrationTest (line 354) | class MarkupLMModelIntegrationTest(unittest.TestCase): method default_processor (line 356) | def default_processor(self): method test_forward_pass_no_head (line 364) | def test_forward_pass_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/markuplm/test_processor_markuplm.py class MarkupLMProcessorTest (line 43) | class MarkupLMProcessorTest(unittest.TestCase): method setUp (line 47) | def setUp(self): method get_tokenizer (line 72) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 75) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method get_tokenizers (line 78) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_feature_extractor (line 81) | def get_feature_extractor(self, **kwargs): method tearDown (line 84) | def tearDown(self): method test_save_load_pretrained_default (line 87) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 102) | def test_save_load_pretrained_additional_features(self): method test_model_input_names (line 134) | def test_model_input_names(self): class MarkupLMProcessorIntegrationTests (line 150) | class MarkupLMProcessorIntegrationTests(unittest.TestCase): method get_html_strings (line 152) | def get_html_strings(self): method get_tokenizers (line 184) | def get_tokenizers(self): method test_processor_case_1 (line 190) | def test_processor_case_1(self): method test_processor_case_2 (line 225) | def test_processor_case_2(self): method test_processor_case_3 (line 270) | def test_processor_case_3(self): method test_processor_case_4 (line 348) | def test_processor_case_4(self): method test_processor_case_5 (line 400) | def test_processor_case_5(self): FILE: mplsandbox_for_rl/transformers/tests/models/markuplm/test_tokenization_markuplm.py class MarkupLMTokenizationTest (line 43) | class MarkupLMTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 51) | def setUp(self): method get_nodes_and_xpaths (line 72) | def get_nodes_and_xpaths(self): method get_nodes_and_xpaths_batch (line 78) | def get_nodes_and_xpaths_batch(self): method get_question_nodes_and_xpaths (line 87) | def get_question_nodes_and_xpaths(self): method get_question_nodes_and_xpaths_batch (line 94) | def get_question_nodes_and_xpaths_batch(self): method test_chat_template_batched (line 105) | def test_chat_template_batched(self): method get_input_output_texts (line 108) | def get_input_output_texts(self, tokenizer): method test_add_special_tokens (line 113) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 129) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 193) | def test_encode_decode_with_spaces(self): method test_right_and_left_truncation (line 211) | def test_right_and_left_truncation(self): method test_encode_plus_with_padding (line 214) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 316) | def test_internal_consistency(self): method test_mask_output (line 334) | def test_mask_output(self): method test_number_of_added_tokens (line 348) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 376) | def test_padding_to_max_length(self): method test_padding (line 411) | def test_padding(self, max_length=50): method test_call (line 622) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 645) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 712) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 715) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 767) | def test_padding_to_multiple_of(self): method test_tokenizer_slow_store_full_signature (line 806) | def test_tokenizer_slow_store_full_signature(self): method test_build_inputs_with_special_tokens (line 814) | def test_build_inputs_with_special_tokens(self): method test_special_tokens_mask_input_pairs (line 839) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 862) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 879) | def test_save_and_load_tokenizer(self): method test_right_and_left_padding (line 906) | def test_right_and_left_padding(self): method test_token_type_ids (line 969) | def test_token_type_ids(self): method test_offsets_mapping (line 1000) | def test_offsets_mapping(self): method test_torch_encode_plus_sent_to_model (line 1048) | def test_torch_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 1089) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_python_rust_equals (line 1110) | def test_tokenization_python_rust_equals(self): method test_embeded_special_tokens (line 1172) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 1195) | def test_compare_add_special_tokens(self): method test_markuplm_truncation_integration_test (line 1232) | def test_markuplm_truncation_integration_test(self): method test_batch_encode_plus_tensors (line 1252) | def test_batch_encode_plus_tensors(self): method test_sequence_ids (line 1295) | def test_sequence_ids(self): method test_special_tokens_initialization (line 1319) | def test_special_tokens_initialization(self): method test_split_special_tokens (line 1354) | def test_split_special_tokens(self): method test_training_new_tokenizer (line 1367) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 1406) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_prepare_for_model (line 1505) | def test_prepare_for_model(self): method test_padding_different_model_input_name (line 1519) | def test_padding_different_model_input_name(self): method test_batch_encode_dynamic_overflowing (line 1555) | def test_batch_encode_dynamic_overflowing(self): method test_alignement_methods (line 1617) | def test_alignement_methods(self): method get_clean_sequence (line 1620) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_maximum_encoding_length_pair_input (line 1656) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 2035) | def test_maximum_encoding_length_single_input(self): method test_pretokenized_inputs (line 2156) | def test_pretokenized_inputs(self): method test_compare_pretokenized_inputs (line 2160) | def test_compare_pretokenized_inputs(self): method test_compare_prepare_for_model (line 2164) | def test_compare_prepare_for_model(self): method test_only_label_first_subword (line 2168) | def test_only_label_first_subword(self): method test_markuplm_integration_test (line 2191) | def test_markuplm_integration_test(self): method test_np_encode_plus_sent_to_model (line 2268) | def test_np_encode_plus_sent_to_model(self): method test_padding_warning_message_fast_tokenizer (line 2271) | def test_padding_warning_message_fast_tokenizer(self): method test_chat_template (line 2313) | def test_chat_template(self): method test_added_tokens_serialization (line 2317) | def test_added_tokens_serialization(self): method test_chat_template_return_assistant_tokens_mask (line 2321) | def test_chat_template_return_assistant_tokens_mask(self): FILE: mplsandbox_for_rl/transformers/tests/models/mask2former/test_image_processing_mask2former.py class Mask2FormerImageProcessingTester (line 41) | class Mask2FormerImageProcessingTester(unittest.TestCase): method __init__ (line 42) | def __init__( method prepare_image_processor_dict (line 79) | def prepare_image_processor_dict(self): method get_expected_values (line 92) | def get_expected_values(self, image_inputs, batched=False): method get_fake_mask2former_outputs (line 125) | def get_fake_mask2former_outputs(self): method expected_output_image_shape (line 132) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 136) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class Mask2FormerImageProcessingTest (line 150) | class Mask2FormerImageProcessingTest(ImageProcessingTestMixin, unittest.... method setUp (line 153) | def setUp(self): method image_processor_dict (line 158) | def image_processor_dict(self): method test_image_processor_properties (line 161) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 171) | def test_image_processor_from_dict_with_kwargs(self): method comm_get_image_processing_inputs (line 182) | def comm_get_image_processing_inputs( method test_with_size_divisor (line 212) | def test_with_size_divisor(self): method test_call_with_segmentation_maps (line 225) | def test_call_with_segmentation_maps(self): method test_integration_instance_segmentation (line 246) | def test_integration_instance_segmentation(self): method test_integration_semantic_segmentation (line 306) | def test_integration_semantic_segmentation(self): method test_integration_panoptic_segmentation (line 348) | def test_integration_panoptic_segmentation(self): method test_binary_mask_to_rle (line 409) | def test_binary_mask_to_rle(self): method test_post_process_semantic_segmentation (line 420) | def test_post_process_semantic_segmentation(self): method test_post_process_instance_segmentation (line 434) | def test_post_process_instance_segmentation(self): method test_post_process_panoptic_segmentation (line 458) | def test_post_process_panoptic_segmentation(self): method test_post_process_label_fusing (line 470) | def test_post_process_label_fusing(self): method test_removed_deprecated_kwargs (line 497) | def test_removed_deprecated_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/mask2former/test_modeling_mask2former.py class Mask2FormerModelTester (line 52) | class Mask2FormerModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 82) | def prepare_config_and_inputs(self): method get_config (line 97) | def get_config(self): method prepare_config_and_inputs_for_common (line 125) | def prepare_config_and_inputs_for_common(self): method check_output_hidden_state (line 130) | def check_output_hidden_state(self, output, config): method create_and_check_mask2former_model (line 139) | def create_and_check_mask2former_model(self, config, pixel_values, pix... method create_and_check_mask2former_instance_segmentation_head_model (line 159) | def create_and_check_mask2former_instance_segmentation_head_model( class Mask2FormerModelTest (line 199) | class Mask2FormerModelTest(ModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 208) | def setUp(self): method test_config (line 212) | def test_config(self): method test_mask2former_model (line 215) | def test_mask2former_model(self): method test_mask2former_instance_segmentation_head_model (line 219) | def test_mask2former_instance_segmentation_head_model(self): method test_inputs_embeds (line 224) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 228) | def test_model_get_set_embeddings(self): method test_generate_without_input_ids (line 232) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 236) | def test_resize_tokens_embeddings(self): method test_multi_gpu_data_parallel_forward (line 243) | def test_multi_gpu_data_parallel_forward(self): method test_model_from_pretrained (line 247) | def test_model_from_pretrained(self): method test_model_with_labels (line 252) | def test_model_with_labels(self): method test_hidden_states_output (line 265) | def test_hidden_states_output(self): method test_attention_outputs (line 269) | def test_attention_outputs(self): method test_training (line 277) | def test_training(self): method test_retain_grad_hidden_states_attentions (line 291) | def test_retain_grad_hidden_states_attentions(self): method test_backbone_selection (line 322) | def test_backbone_selection(self): function prepare_img (line 357) | def prepare_img(): class Mask2FormerModelIntegrationTest (line 364) | class Mask2FormerModelIntegrationTest(unittest.TestCase): method model_checkpoints (line 366) | def model_checkpoints(self): method default_image_processor (line 370) | def default_image_processor(self): method test_inference_no_head (line 373) | def test_inference_no_head(self): method test_inference_universal_segmentation_head (line 414) | def test_inference_universal_segmentation_head(self): method test_inference_fp16 (line 453) | def test_inference_fp16(self): method test_with_segmentation_maps_and_loss (line 466) | def test_with_segmentation_maps_and_loss(self): FILE: mplsandbox_for_rl/transformers/tests/models/maskformer/test_image_processing_maskformer.py class MaskFormerImageProcessingTester (line 41) | class MaskFormerImageProcessingTester(unittest.TestCase): method __init__ (line 42) | def __init__( method prepare_image_processor_dict (line 79) | def prepare_image_processor_dict(self): method get_expected_values (line 92) | def get_expected_values(self, image_inputs, batched=False): method get_fake_maskformer_outputs (line 125) | def get_fake_maskformer_outputs(self): method expected_output_image_shape (line 132) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 136) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class MaskFormerImageProcessingTest (line 150) | class MaskFormerImageProcessingTest(ImageProcessingTestMixin, unittest.T... method setUp (line 153) | def setUp(self): method image_processor_dict (line 158) | def image_processor_dict(self): method test_image_processor_properties (line 161) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 171) | def test_image_processor_from_dict_with_kwargs(self): method comm_get_image_processing_inputs (line 182) | def comm_get_image_processing_inputs( method test_with_size_divisor (line 212) | def test_with_size_divisor(self): method test_call_with_segmentation_maps (line 225) | def test_call_with_segmentation_maps(self): method test_integration_instance_segmentation (line 246) | def test_integration_instance_segmentation(self): method test_integration_semantic_segmentation (line 306) | def test_integration_semantic_segmentation(self): method test_integration_panoptic_segmentation (line 348) | def test_integration_panoptic_segmentation(self): method test_binary_mask_to_rle (line 409) | def test_binary_mask_to_rle(self): method test_post_process_segmentation (line 420) | def test_post_process_segmentation(self): method test_post_process_semantic_segmentation (line 443) | def test_post_process_semantic_segmentation(self): method test_post_process_instance_segmentation (line 463) | def test_post_process_instance_segmentation(self): method test_post_process_panoptic_segmentation (line 491) | def test_post_process_panoptic_segmentation(self): method test_post_process_label_fusing (line 505) | def test_post_process_label_fusing(self): method test_removed_deprecated_kwargs (line 532) | def test_removed_deprecated_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/maskformer/test_modeling_maskformer.py class MaskFormerModelTester (line 54) | class MaskFormerModelTester: method __init__ (line 55) | def __init__( method prepare_config_and_inputs (line 84) | def prepare_config_and_inputs(self): method get_config (line 99) | def get_config(self): method prepare_config_and_inputs_for_common (line 124) | def prepare_config_and_inputs_for_common(self): method check_output_hidden_state (line 129) | def check_output_hidden_state(self, output, config): method create_and_check_maskformer_model (line 138) | def create_and_check_maskformer_model(self, config, pixel_values, pixe... method create_and_check_maskformer_instance_segmentation_head_model (line 159) | def create_and_check_maskformer_instance_segmentation_head_model( class MaskFormerModelTest (line 199) | class MaskFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 213) | def setUp(self): method _prepare_for_class (line 217) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 238) | def test_config(self): method test_maskformer_model (line 241) | def test_maskformer_model(self): method test_maskformer_instance_segmentation_head_model (line 245) | def test_maskformer_instance_segmentation_head_model(self): method test_inputs_embeds (line 250) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 254) | def test_model_get_set_embeddings(self): method test_generate_without_input_ids (line 258) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 262) | def test_resize_tokens_embeddings(self): method test_multi_gpu_data_parallel_forward (line 269) | def test_multi_gpu_data_parallel_forward(self): method test_model_from_pretrained (line 273) | def test_model_from_pretrained(self): method test_model_with_labels (line 278) | def test_model_with_labels(self): method test_hidden_states_output (line 290) | def test_hidden_states_output(self): method test_attention_outputs (line 294) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 337) | def test_retain_grad_hidden_states_attentions(self): method test_forward_auxiliary_loss (line 369) | def test_forward_auxiliary_loss(self): method test_batching_equivalence (line 387) | def test_batching_equivalence(self): method test_backbone_selection (line 449) | def test_backbone_selection(self): function prepare_img (line 484) | def prepare_img(): class MaskFormerModelIntegrationTest (line 491) | class MaskFormerModelIntegrationTest(unittest.TestCase): method default_image_processor (line 493) | def default_image_processor(self): method test_inference_no_head (line 500) | def test_inference_no_head(self): method test_inference_instance_segmentation_head (line 541) | def test_inference_instance_segmentation_head(self): method test_inference_instance_segmentation_head_resnet_backbone (line 585) | def test_inference_instance_segmentation_head_resnet_backbone(self): method test_inference_fp16 (line 623) | def test_inference_fp16(self): method test_with_segmentation_maps_and_loss (line 636) | def test_with_segmentation_maps_and_loss(self): FILE: mplsandbox_for_rl/transformers/tests/models/maskformer/test_modeling_maskformer_swin.py class MaskFormerSwinModelTester (line 39) | class MaskFormerSwinModelTester: method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method get_config (line 107) | def get_config(self): method create_and_check_model (line 131) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_backbone (line 142) | def create_and_check_backbone(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 161) | def prepare_config_and_inputs_for_common(self): class MaskFormerSwinModelTest (line 169) | class MaskFormerSwinModelTest(ModelTesterMixin, PipelineTesterMixin, uni... method setUp (line 185) | def setUp(self): method test_multi_gpu_data_parallel_forward (line 202) | def test_multi_gpu_data_parallel_forward(self): method test_config (line 205) | def test_config(self): method test_model (line 208) | def test_model(self): method test_backbone (line 212) | def test_backbone(self): method test_inputs_embeds (line 217) | def test_inputs_embeds(self): method test_feed_forward_chunking (line 221) | def test_feed_forward_chunking(self): method test_model_get_set_embeddings (line 224) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 234) | def test_attention_outputs(self): method test_save_load_fast_init_to_base (line 238) | def test_save_load_fast_init_to_base(self): method check_hidden_states_output (line 241) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 270) | def test_hidden_states_output(self): method test_hidden_states_output_with_padding (line 289) | def test_hidden_states_output_with_padding(self): method test_model_from_pretrained (line 317) | def test_model_from_pretrained(self): method test_initialization (line 321) | def test_initialization(self): method test_gradient_checkpointing_backward_compatibility (line 325) | def test_gradient_checkpointing_backward_compatibility(self): method test_model_outputs_equivalence (line 328) | def test_model_outputs_equivalence(self): class MaskFormerSwinBackboneTest (line 389) | class MaskFormerSwinBackboneTest(unittest.TestCase, BackboneTesterMixin): method setUp (line 393) | def setUp(self): method test_backbone_outputs (line 397) | def test_backbone_outputs(self): FILE: mplsandbox_for_rl/transformers/tests/models/mbart/test_modeling_flax_mbart.py function prepare_mbart_inputs_dict (line 49) | def prepare_mbart_inputs_dict( class FlaxMBartModelTester (line 77) | class FlaxMBartModelTester(unittest.TestCase): method __init__ (line 78) | def __init__( method prepare_config_and_inputs (line 120) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 148) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 152) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 192) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class MBartHeadTests (line 240) | class MBartHeadTests(unittest.TestCase): method _get_config_and_data (line 243) | def _get_config_and_data(self): method test_sequence_classification_forward (line 280) | def test_sequence_classification_forward(self): method test_question_answering_forward (line 287) | def test_question_answering_forward(self): method test_lm_forward (line 296) | def test_lm_forward(self): method test_lm_uneven_forward (line 303) | def test_lm_uneven_forward(self): method test_shift_tokens_right (line 322) | def test_shift_tokens_right(self): class FlaxMBartModelTest (line 333) | class FlaxMBartModelTest(FlaxModelTesterMixin, unittest.TestCase, FlaxGe... method setUp (line 347) | def setUp(self): method test_use_cache_forward (line 350) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 355) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 360) | def test_encode(self): method test_decode (line 383) | def test_decode(self): method test_model_from_pretrained (line 417) | def test_model_from_pretrained(self): class FlaxMBartModelIntegrationTest (line 429) | class FlaxMBartModelIntegrationTest(unittest.TestCase): method tokenizer (line 439) | def tokenizer(self): method model (line 443) | def model(self): method _assert_generated_batch_equal_expected (line 447) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 451) | def translate_src_text(self, **tokenizer_kwargs): method test_batch_generation_en_ro (line 464) | def test_batch_generation_en_ro(self): FILE: mplsandbox_for_rl/transformers/tests/models/mbart/test_modeling_mbart.py function prepare_mbart_inputs_dict (line 53) | def prepare_mbart_inputs_dict( class MBartModelTester (line 84) | class MBartModelTester: method __init__ (line 85) | def __init__( method prepare_config_and_inputs (line 129) | def prepare_config_and_inputs(self): method get_config (line 142) | def get_config(self): method prepare_config_and_inputs_for_common (line 162) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 166) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 200) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class MBartModelTest (line 234) | class MBartModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe... method is_pipeline_test_to_skip (line 262) | def is_pipeline_test_to_skip( method setUp (line 270) | def setUp(self): method test_config (line 274) | def test_config(self): method test_save_load_strict (line 277) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 287) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 291) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 296) | def test_inputs_embeds(self): method test_generate_fp16 (line 326) | def test_generate_fp16(self): method test_ensure_weights_are_shared (line 335) | def test_ensure_weights_are_shared(self): method test_load_save_without_tied_weights (line 375) | def test_load_save_without_tied_weights(self): method test_resize_embeddings_persists_embeddings_type (line 378) | def test_resize_embeddings_persists_embeddings_type(self): function assert_tensors_close (line 391) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 410) | def _long_tensor(tok_lst): class AbstractSeq2SeqIntegrationTest (line 417) | class AbstractSeq2SeqIntegrationTest(unittest.TestCase): method setUpClass (line 422) | def setUpClass(cls): method model (line 427) | def model(self): class MBartEnroIntegrationTest (line 438) | class MBartEnroIntegrationTest(AbstractSeq2SeqIntegrationTest): method test_enro_generate_one (line 453) | def test_enro_generate_one(self): method test_enro_generate_batch (line 463) | def test_enro_generate_batch(self): method test_mbart_enro_config (line 471) | def test_mbart_enro_config(self): method test_mbart_fast_forward (line 483) | def test_mbart_fast_forward(self): class MBartCC25IntegrationTest (line 509) | class MBartCC25IntegrationTest(AbstractSeq2SeqIntegrationTest): method test_cc25_generate (line 518) | def test_cc25_generate(self): method test_fill_mask (line 528) | def test_fill_mask(self): class MBartStandaloneDecoderModelTester (line 539) | class MBartStandaloneDecoderModelTester: method __init__ (line 540) | def __init__( method prepare_config_and_inputs (line 595) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 629) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 665) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 712) | def prepare_config_and_inputs_for_common(self): class MBartStandaloneDecoderModelTest (line 729) | class MBartStandaloneDecoderModelTest(ModelTesterMixin, GenerationTester... method setUp (line 735) | def setUp( method test_config (line 741) | def test_config(self): method test_decoder_model_past (line 744) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 748) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 753) | def test_retain_grad_hidden_states_attentions(self): FILE: mplsandbox_for_rl/transformers/tests/models/mbart/test_modeling_tf_mbart.py class TFMBartModelTester (line 36) | class TFMBartModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs_for_common (line 77) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 105) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_mbart_inputs_dict (line 121) | def prepare_mbart_inputs_dict( class TFMBartModelTest (line 159) | class TFMBartModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest... method is_pipeline_test_to_skip (line 177) | def is_pipeline_test_to_skip( method setUp (line 186) | def setUp(self): method test_config (line 190) | def test_config(self): method test_decoder_model_past_large_inputs (line 193) | def test_decoder_model_past_large_inputs(self): class TFMBartModelIntegrationTest (line 201) | class TFMBartModelIntegrationTest(unittest.TestCase): method tokenizer (line 211) | def tokenizer(self): method model (line 215) | def model(self): method _assert_generated_batch_equal_expected (line 219) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 223) | def translate_src_text(self, **tokenizer_kwargs): method test_batch_generation_en_ro (line 232) | def test_batch_generation_en_ro(self): FILE: mplsandbox_for_rl/transformers/tests/models/mbart/test_tokenization_mbart.py class MBartTokenizationTest (line 43) | class MBartTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 50) | def setUp(self): method test_full_tokenizer (line 57) | def test_full_tokenizer(self): method test_save_pretrained (line 134) | def test_save_pretrained(self): method test_training_new_tokenizer (line 206) | def test_training_new_tokenizer(self): class MBartEnroIntegrationTest (line 213) | class MBartEnroIntegrationTest(unittest.TestCase): method setUpClass (line 228) | def setUpClass(cls): method check_language_codes (line 235) | def check_language_codes(self): method test_enro_tokenizer_batch_encode_plus (line 240) | def test_enro_tokenizer_batch_encode_plus(self): method test_enro_tokenizer_decode_ignores_language_codes (line 244) | def test_enro_tokenizer_decode_ignores_language_codes(self): method test_enro_tokenizer_truncation (line 252) | def test_enro_tokenizer_truncation(self): method test_mask_token (line 261) | def test_mask_token(self): method test_special_tokens_unaffacted_by_save_load (line 264) | def test_special_tokens_unaffacted_by_save_load(self): method test_batch_fairseq_parity (line 272) | def test_batch_fairseq_parity(self): method test_enro_tokenizer_prepare_batch (line 283) | def test_enro_tokenizer_prepare_batch(self): method test_seq2seq_max_length (line 306) | def test_seq2seq_max_length(self): method test_tokenizer_translation (line 318) | def test_tokenizer_translation(self): FILE: mplsandbox_for_rl/transformers/tests/models/mbart50/test_tokenization_mbart50.py class MBart50TokenizationTest (line 43) | class MBart50TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 50) | def setUp(self): method test_convert_token_and_id (line 57) | def test_convert_token_and_id(self): method test_get_vocab (line 65) | def test_get_vocab(self): method test_vocab_size (line 73) | def test_vocab_size(self): method test_full_tokenizer (line 76) | def test_full_tokenizer(self): method test_tokenizer_integration (line 102) | def test_tokenizer_integration(self): method test_save_pretrained (line 112) | def test_save_pretrained(self): class MBart50OneToManyIntegrationTest (line 187) | class MBart50OneToManyIntegrationTest(unittest.TestCase): method setUpClass (line 202) | def setUpClass(cls): method check_language_codes (line 209) | def check_language_codes(self): method test_tokenizer_batch_encode_plus (line 215) | def test_tokenizer_batch_encode_plus(self): method test_tokenizer_decode_ignores_language_codes (line 219) | def test_tokenizer_decode_ignores_language_codes(self): method test_tokenizer_truncation (line 227) | def test_tokenizer_truncation(self): method test_mask_token (line 236) | def test_mask_token(self): method test_special_tokens_unaffacted_by_save_load (line 239) | def test_special_tokens_unaffacted_by_save_load(self): method test_batch_fairseq_parity (line 247) | def test_batch_fairseq_parity(self): method test_tokenizer_prepare_batch (line 259) | def test_tokenizer_prepare_batch(self): method test_seq2seq_max_target_length (line 281) | def test_seq2seq_max_target_length(self): method test_tokenizer_translation (line 293) | def test_tokenizer_translation(self): FILE: mplsandbox_for_rl/transformers/tests/models/megatron_bert/test_modeling_megatron_bert.py class MegatronBertModelTester (line 47) | class MegatronBertModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 98) | def prepare_config_and_inputs(self): method get_config (line 121) | def get_config(self): method create_and_check_megatron_bert_model (line 138) | def create_and_check_megatron_bert_model( method create_and_check_megatron_bert_for_masked_lm (line 151) | def create_and_check_megatron_bert_for_masked_lm( method create_and_check_for_causal_lm (line 160) | def create_and_check_for_causal_lm( method create_and_check_megatron_bert_for_next_sequence_prediction (line 169) | def create_and_check_megatron_bert_for_next_sequence_prediction( method create_and_check_megatron_bert_for_pretraining (line 183) | def create_and_check_megatron_bert_for_pretraining( method create_and_check_megatron_bert_for_question_answering (line 199) | def create_and_check_megatron_bert_for_question_answering( method create_and_check_megatron_bert_for_sequence_classification (line 215) | def create_and_check_megatron_bert_for_sequence_classification( method create_and_check_megatron_bert_for_token_classification (line 225) | def create_and_check_megatron_bert_for_token_classification( method create_and_check_megatron_bert_for_multiple_choice (line 235) | def create_and_check_megatron_bert_for_multiple_choice( method prepare_config_and_inputs_for_common (line 253) | def prepare_config_and_inputs_for_common(self): class MegatronBertModelTest (line 269) | class MegatronBertModelTest(ModelTesterMixin, PipelineTesterMixin, unitt... method _prepare_for_class (line 303) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 316) | def setUp(self): method test_config (line 320) | def test_config(self): method test_megatron_bert_model (line 323) | def test_megatron_bert_model(self): method test_for_masked_lm (line 327) | def test_for_masked_lm(self): method test_for_multiple_choice (line 331) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 335) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 339) | def test_for_pretraining(self): method test_for_question_answering (line 343) | def test_for_question_answering(self): method test_for_sequence_classification (line 347) | def test_for_sequence_classification(self): method test_for_token_classification (line 351) | def test_for_token_classification(self): function _long_tensor (line 356) | def _long_tensor(tok_lst): class MegatronBertModelIntegrationTests (line 370) | class MegatronBertModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 373) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/megatron_gpt2/test_modeling_megatron_gpt2.py class MegatronGPT2IntegrationTest (line 32) | class MegatronGPT2IntegrationTest(unittest.TestCase): method test_inference_no_head (line 35) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/mgp_str/test_modeling_mgp_str.py class MgpstrModelTester (line 43) | class MgpstrModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 80) | def prepare_config_and_inputs(self): method get_config (line 85) | def get_config(self): method create_and_check_model (line 101) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 111) | def prepare_config_and_inputs_for_common(self): class MgpstrModelTest (line 119) | class MgpstrModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 133) | def setUp(self): method test_config (line 137) | def test_config(self): method test_model (line 140) | def test_model(self): method test_inputs_embeds (line 145) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 148) | def test_model_get_set_embeddings(self): method test_feed_forward_chunking (line 158) | def test_feed_forward_chunking(self): method test_gradient_checkpointing_backward_compatibility (line 161) | def test_gradient_checkpointing_backward_compatibility(self): method test_hidden_states_output (line 172) | def test_hidden_states_output(self): method test_initialization (line 206) | def test_initialization(self): method test_retain_grad_hidden_states_attentions (line 222) | def test_retain_grad_hidden_states_attentions(self): function prepare_img (line 227) | def prepare_img(): class MgpstrModelIntegrationTest (line 235) | class MgpstrModelIntegrationTest(unittest.TestCase): method test_inference (line 237) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/mgp_str/test_processor_mgp_str.py class MgpstrProcessorTest (line 44) | class MgpstrProcessorTest(unittest.TestCase): method image_processor_dict (line 48) | def image_processor_dict(self): method setUp (line 51) | def setUp(self): method get_tokenizer (line 73) | def get_tokenizer(self, **kwargs): method get_image_processor (line 76) | def get_image_processor(self, **kwargs): method tearDown (line 79) | def tearDown(self): method prepare_image_inputs (line 82) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 91) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 105) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 125) | def test_image_processor(self): method test_tokenizer (line 139) | def test_tokenizer(self): method test_processor (line 153) | def test_processor(self): method test_tokenizer_decode (line 170) | def test_tokenizer_decode(self): method test_model_input_names (line 184) | def test_model_input_names(self): method test_processor_batch_decode (line 197) | def test_processor_batch_decode(self): FILE: mplsandbox_for_rl/transformers/tests/models/mgp_str/test_tokenization_mgp_str.py class MgpstrTokenizationTest (line 29) | class MgpstrTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method get_tokenizer (line 46) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 49) | def get_input_output_texts(self, tokenizer): method test_added_tokens_do_lower_case (line 55) | def test_added_tokens_do_lower_case(self): method test_add_special_tokens (line 58) | def test_add_special_tokens(self): method test_internal_consistency (line 71) | def test_internal_consistency(self): method test_maximum_encoding_length_pair_input (line 90) | def test_maximum_encoding_length_pair_input(self): method test_pretokenized_inputs (line 94) | def test_pretokenized_inputs(self): FILE: mplsandbox_for_rl/transformers/tests/models/mistral/test_modeling_flax_mistral.py class FlaxMistralModelTester (line 40) | class FlaxMistralModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 87) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 115) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 122) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 153) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxMistralModelTest (line 188) | class FlaxMistralModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMix... method setUp (line 192) | def setUp(self): method test_use_cache_forward (line 195) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 200) | def test_use_cache_forward_with_attn_mask(self): method test_model_from_pretrained (line 208) | def test_model_from_pretrained(self): class FlaxMistralIntegrationTest (line 217) | class FlaxMistralIntegrationTest(unittest.TestCase): method setUp (line 218) | def setUp(self): method test_model_logits (line 223) | def test_model_logits(self): method test_generated_text (line 235) | def test_generated_text(self): FILE: mplsandbox_for_rl/transformers/tests/models/mistral/test_modeling_mistral.py class MistralModelTester (line 55) | class MistralModelTester: method __init__ (line 56) | def __init__( method prepare_config_and_inputs (line 109) | def prepare_config_and_inputs(self): method get_config (line 132) | def get_config(self): method create_and_check_model (line 151) | def create_and_check_model( method create_and_check_model_as_decoder (line 162) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 193) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 212) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 275) | def prepare_config_and_inputs_for_common(self): class MistralModelTest (line 291) | class MistralModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline... method is_pipeline_test_to_skip (line 314) | def is_pipeline_test_to_skip( method test_eager_matches_sdpa_generate (line 323) | def test_eager_matches_sdpa_generate(self): method setUp (line 326) | def setUp(self): method test_config (line 330) | def test_config(self): method test_model (line 333) | def test_model(self): method test_model_various_embeddings (line 337) | def test_model_various_embeddings(self): method test_Mistral_sequence_classification_model (line 343) | def test_Mistral_sequence_classification_model(self): method test_Mistral_sequence_classification_model_for_single_label (line 356) | def test_Mistral_sequence_classification_model_for_single_label(self): method test_Mistral_sequence_classification_model_for_multi_label (line 369) | def test_Mistral_sequence_classification_model_for_multi_label(self): method test_Mistral_token_classification_model (line 385) | def test_Mistral_token_classification_model(self): method test_save_load_fast_init_from_base (line 401) | def test_save_load_fast_init_from_base(self): method test_past_key_values_format (line 405) | def test_past_key_values_format(self): method test_flash_attn_2_generate_padding_right (line 412) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 446) | def test_flash_attn_2_generate_use_cache(self): method test_flash_attn_2_inference_equivalence_right_padding (line 491) | def test_flash_attn_2_inference_equivalence_right_padding(self): class MistralIntegrationTest (line 496) | class MistralIntegrationTest(unittest.TestCase): method setUpClass (line 502) | def setUpClass(cls): method tearDown (line 507) | def tearDown(self): method test_model_7b_logits (line 512) | def test_model_7b_logits(self): method test_model_7b_generation (line 540) | def test_model_7b_generation(self): method test_model_7b_dola_generation (line 556) | def test_model_7b_dola_generation(self): method test_model_7b_long_prompt (line 583) | def test_model_7b_long_prompt(self): method test_model_7b_long_prompt_sdpa (line 606) | def test_model_7b_long_prompt_sdpa(self): method test_speculative_generation (line 641) | def test_speculative_generation(self): method test_compile_static_cache (line 660) | def test_compile_static_cache(self): class Mask4DTestHard (line 723) | class Mask4DTestHard(unittest.TestCase): method tearDown (line 727) | def tearDown(self): method model (line 732) | def model(self): method setUp (line 739) | def setUp(self): method get_test_data (line 743) | def get_test_data(self): method test_stacked_causal_mask (line 787) | def test_stacked_causal_mask(self): method test_partial_stacked_causal_mask (line 812) | def test_partial_stacked_causal_mask(self): FILE: mplsandbox_for_rl/transformers/tests/models/mistral/test_modeling_tf_mistral.py class TFMistralModelTester (line 43) | class TFMistralModelTester: method __init__ (line 44) | def __init__(self, parent): method prepare_config_and_inputs (line 73) | def prepare_config_and_inputs(self): method create_and_check_model (line 119) | def create_and_check_model( method create_and_check_model_as_decoder (line 127) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 155) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 171) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 231) | def prepare_config_and_inputs_for_common(self): class TFMistralModelTest (line 247) | class TFMistralModelTest(TFModelTesterMixin, TFGenerationIntegrationTest... method is_pipeline_test_to_skip (line 268) | def is_pipeline_test_to_skip( method setUp (line 273) | def setUp(self): method test_config (line 277) | def test_config(self): method test_model (line 280) | def test_model(self): method test_model_various_embeddings (line 284) | def test_model_various_embeddings(self): method test_Mistral_sequence_classification_model (line 290) | def test_Mistral_sequence_classification_model(self): method test_Mistral_sequence_classification_model_for_single_label (line 300) | def test_Mistral_sequence_classification_model_for_single_label(self): method test_Mistral_sequence_classification_model_for_multi_label (line 311) | def test_Mistral_sequence_classification_model_for_multi_label(self): method test_save_load_fast_init_from_base (line 323) | def test_save_load_fast_init_from_base(self): method test_past_key_values_format (line 327) | def test_past_key_values_format(self): method test_save_load_after_resize_token_embeddings (line 331) | def test_save_load_after_resize_token_embeddings(self): class TFMistralIntegrationTest (line 336) | class TFMistralIntegrationTest(unittest.TestCase): method test_model_7b_logits (line 338) | def test_model_7b_logits(self): method test_model_7b_generation (line 355) | def test_model_7b_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/mixtral/test_modeling_mixtral.py class MixtralModelTester (line 50) | class MixtralModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 106) | def prepare_config_and_inputs(self): method get_config (line 129) | def get_config(self): method create_and_check_model (line 151) | def create_and_check_model( method create_and_check_model_as_decoder (line 162) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 193) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 212) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 275) | def prepare_config_and_inputs_for_common(self): class MixtralModelTest (line 292) | class MixtralModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline... method is_pipeline_test_to_skip (line 315) | def is_pipeline_test_to_skip( method test_eager_matches_sdpa_generate (line 324) | def test_eager_matches_sdpa_generate(self): method setUp (line 327) | def setUp(self): method test_config (line 331) | def test_config(self): method test_model (line 334) | def test_model(self): method test_model_various_embeddings (line 338) | def test_model_various_embeddings(self): method test_Mixtral_sequence_classification_model (line 344) | def test_Mixtral_sequence_classification_model(self): method test_Mixtral_sequence_classification_model_for_single_label (line 357) | def test_Mixtral_sequence_classification_model_for_single_label(self): method test_Mixtral_sequence_classification_model_for_multi_label (line 370) | def test_Mixtral_sequence_classification_model_for_multi_label(self): method test_Mixtral_token_classification_model (line 386) | def test_Mixtral_token_classification_model(self): method test_save_load_fast_init_from_base (line 402) | def test_save_load_fast_init_from_base(self): method test_past_key_values_format (line 406) | def test_past_key_values_format(self): method test_flash_attn_2_generate_padding_right (line 413) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 447) | def test_flash_attn_2_generate_use_cache(self): method test_flash_attn_2_inference_equivalence_right_padding (line 492) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_load_balancing_loss (line 496) | def test_load_balancing_loss(self): class MixtralIntegrationTest (line 533) | class MixtralIntegrationTest(unittest.TestCase): method setUpClass (line 539) | def setUpClass(cls): method test_small_model_logits (line 546) | def test_small_model_logits(self): method test_small_model_logits_batched (line 582) | def test_small_model_logits_batched(self): FILE: mplsandbox_for_rl/transformers/tests/models/mluke/test_tokenization_mluke.py class MLukeTokenizerTest (line 30) | class MLukeTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method get_tokenizer (line 41) | def get_tokenizer(self, task=None, **kwargs): method get_input_output_texts (line 47) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 52) | def test_full_tokenizer(self): method mluke_dict_integration_testing (line 63) | def mluke_dict_integration_testing(self): method test_sequence_builders (line 72) | def test_sequence_builders(self): method get_clean_sequence (line 91) | def get_clean_sequence(self, tokenizer, max_length=20) -> Tuple[str, l... method test_pretokenized_inputs (line 97) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 100) | def test_embeded_special_tokens(self): method test_padding_entity_inputs (line 127) | def test_padding_entity_inputs(self): method test_if_tokenize_single_text_raise_error_with_invalid_inputs (line 142) | def test_if_tokenize_single_text_raise_error_with_invalid_inputs(self): method test_if_tokenize_entity_classification_raise_error_with_invalid_inputs (line 164) | def test_if_tokenize_entity_classification_raise_error_with_invalid_in... method test_if_tokenize_entity_pair_classification_raise_error_with_invalid_inputs (line 179) | def test_if_tokenize_entity_pair_classification_raise_error_with_inval... method test_if_tokenize_entity_span_classification_raise_error_with_invalid_inputs (line 191) | def test_if_tokenize_entity_span_classification_raise_error_with_inval... class MLukeTokenizerIntegrationTests (line 205) | class MLukeTokenizerIntegrationTests(unittest.TestCase): method setUpClass (line 210) | def setUpClass(cls): method test_single_text_no_padding_or_truncation (line 223) | def test_single_text_no_padding_or_truncation(self): method test_single_text_only_entity_spans_no_padding_or_truncation (line 269) | def test_single_text_only_entity_spans_no_padding_or_truncation(self): method test_single_text_padding_pytorch_tensors (line 316) | def test_single_text_padding_pytorch_tensors(self): method test_text_pair_no_padding_or_truncation (line 345) | def test_text_pair_no_padding_or_truncation(self): method test_text_pair_only_entity_spans_no_padding_or_truncation (line 404) | def test_text_pair_only_entity_spans_no_padding_or_truncation(self): method test_text_pair_padding_pytorch_tensors (line 461) | def test_text_pair_padding_pytorch_tensors(self): method test_entity_classification_no_padding_or_truncation (line 496) | def test_entity_classification_no_padding_or_truncation(self): method test_entity_classification_padding_pytorch_tensors (line 530) | def test_entity_classification_padding_pytorch_tensors(self): method test_entity_pair_classification_no_padding_or_truncation (line 553) | def test_entity_pair_classification_no_padding_or_truncation(self): method test_entity_pair_classification_padding_pytorch_tensors (line 590) | def test_entity_pair_classification_padding_pytorch_tensors(self): method test_entity_span_classification_no_padding_or_truncation (line 619) | def test_entity_span_classification_no_padding_or_truncation(self): method test_entity_span_classification_padding_pytorch_tensors (line 648) | def test_entity_span_classification_padding_pytorch_tensors(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilebert/test_modeling_mobilebert.py class MobileBertModelTester (line 44) | class MobileBertModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method get_config (line 118) | def get_config(self): method create_and_check_mobilebert_model (line 135) | def create_and_check_mobilebert_model( method create_and_check_mobilebert_for_masked_lm (line 148) | def create_and_check_mobilebert_for_masked_lm( method create_and_check_mobilebert_for_next_sequence_prediction (line 157) | def create_and_check_mobilebert_for_next_sequence_prediction( method create_and_check_mobilebert_for_pretraining (line 171) | def create_and_check_mobilebert_for_pretraining( method create_and_check_mobilebert_for_question_answering (line 187) | def create_and_check_mobilebert_for_question_answering( method create_and_check_mobilebert_for_sequence_classification (line 203) | def create_and_check_mobilebert_for_sequence_classification( method create_and_check_mobilebert_for_token_classification (line 213) | def create_and_check_mobilebert_for_token_classification( method create_and_check_mobilebert_for_multiple_choice (line 223) | def create_and_check_mobilebert_for_multiple_choice( method prepare_config_and_inputs_for_common (line 241) | def prepare_config_and_inputs_for_common(self): class MobileBertModelTest (line 257) | class MobileBertModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method _prepare_for_class (line 287) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_resize_tokens_embeddings (line 302) | def test_resize_tokens_embeddings(self): method setUp (line 305) | def setUp(self): method test_config (line 309) | def test_config(self): method test_mobilebert_model (line 312) | def test_mobilebert_model(self): method test_for_masked_lm (line 316) | def test_for_masked_lm(self): method test_for_multiple_choice (line 320) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 324) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 328) | def test_for_pretraining(self): method test_for_question_answering (line 332) | def test_for_question_answering(self): method test_for_sequence_classification (line 336) | def test_for_sequence_classification(self): method test_for_token_classification (line 340) | def test_for_token_classification(self): function _long_tensor (line 345) | def _long_tensor(tok_lst): class MobileBertModelIntegrationTests (line 359) | class MobileBertModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 361) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilebert/test_modeling_tf_mobilebert.py class TFMobileBertModelTest (line 47) | class TFMobileBertModelTest(TFModelTesterMixin, PipelineTesterMixin, uni... method _prepare_for_class (line 78) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... class TFMobileBertModelTester (line 87) | class TFMobileBertModelTester: method __init__ (line 88) | def __init__( method prepare_config_and_inputs (line 138) | def prepare_config_and_inputs(self): method create_and_check_mobilebert_model (line 174) | def create_and_check_mobilebert_model( method create_and_check_mobilebert_for_masked_lm (line 191) | def create_and_check_mobilebert_for_masked_lm( method create_and_check_mobilebert_for_next_sequence_prediction (line 199) | def create_and_check_mobilebert_for_next_sequence_prediction( method create_and_check_mobilebert_for_pretraining (line 207) | def create_and_check_mobilebert_for_pretraining( method create_and_check_mobilebert_for_sequence_classification (line 218) | def create_and_check_mobilebert_for_sequence_classification( method create_and_check_mobilebert_for_multiple_choice (line 227) | def create_and_check_mobilebert_for_multiple_choice( method create_and_check_mobilebert_for_token_classification (line 243) | def create_and_check_mobilebert_for_token_classification( method create_and_check_mobilebert_for_question_answering (line 252) | def create_and_check_mobilebert_for_question_answering( method prepare_config_and_inputs_for_common (line 261) | def prepare_config_and_inputs_for_common(self): method setUp (line 275) | def setUp(self): method test_config (line 279) | def test_config(self): method test_mobilebert_model (line 282) | def test_mobilebert_model(self): method test_for_masked_lm (line 286) | def test_for_masked_lm(self): method test_for_multiple_choice (line 290) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 294) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 298) | def test_for_pretraining(self): method test_for_question_answering (line 302) | def test_for_question_answering(self): method test_for_sequence_classification (line 306) | def test_for_sequence_classification(self): method test_for_token_classification (line 310) | def test_for_token_classification(self): method test_model_from_pretrained (line 315) | def test_model_from_pretrained(self): class TFMobileBertModelIntegrationTest (line 323) | class TFMobileBertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 325) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilebert/test_tokenization_mobilebert.py class MobileBERTTokenizationTest (line 35) | class MobileBERTTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 44) | def setUp(self): method get_input_output_texts (line 74) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 80) | def test_full_tokenizer(self): method test_rust_and_python_full_tokenizers (line 88) | def test_rust_and_python_full_tokenizers(self): method test_chinese (line 130) | def test_chinese(self): method test_basic_tokenizer_lower (line 136) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 145) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 154) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 163) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 172) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 180) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 188) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 196) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_wordpiece_tokenizer (line 204) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 219) | def test_is_whitespace(self): method test_is_control (line 230) | def test_is_control(self): method test_is_punctuation (line 239) | def test_is_punctuation(self): method test_clean_text (line 249) | def test_clean_text(self): method test_sequence_builders (line 262) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 275) | def test_offsets_with_special_characters(self): method test_change_tokenize_chinese_chars (line 328) | def test_change_tokenize_chinese_chars(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilenet_v1/test_image_processing_mobilenet_v1.py class MobileNetV1ImageProcessingTester (line 29) | class MobileNetV1ImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 57) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 65) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 68) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class MobileNetV1ImageProcessingTest (line 82) | class MobileNetV1ImageProcessingTest(ImageProcessingTestMixin, unittest.... method setUp (line 85) | def setUp(self): method image_processor_dict (line 90) | def image_processor_dict(self): method test_image_processor_properties (line 93) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 100) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilenet_v1/test_modeling_mobilenet_v1.py class MobileNetV1ConfigTester (line 40) | class MobileNetV1ConfigTester(ConfigTester): method create_and_test_config_common_properties (line 41) | def create_and_test_config_common_properties(self): class MobileNetV1ModelTester (line 47) | class MobileNetV1ModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 84) | def prepare_config_and_inputs(self): method get_config (line 97) | def get_config(self): method create_and_check_model (line 109) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_image_classification (line 124) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 132) | def prepare_config_and_inputs_for_common(self): class MobileNetV1ModelTest (line 140) | class MobileNetV1ModelTest(ModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 158) | def setUp(self): method test_config (line 162) | def test_config(self): method test_inputs_embeds (line 166) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 170) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 174) | def test_attention_outputs(self): method test_model (line 177) | def test_model(self): method test_hidden_states_output (line 181) | def test_hidden_states_output(self): method test_for_image_classification (line 207) | def test_for_image_classification(self): method test_model_from_pretrained (line 212) | def test_model_from_pretrained(self): method test_batching_equivalence (line 218) | def test_batching_equivalence(self): function prepare_img (line 223) | def prepare_img(): class MobileNetV1ModelIntegrationTest (line 230) | class MobileNetV1ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 232) | def default_image_processor(self): method test_inference_image_classification_head (line 238) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilenet_v2/test_image_processing_mobilenet_v2.py class MobileNetV2ImageProcessingTester (line 29) | class MobileNetV2ImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 57) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 65) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 68) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class MobileNetV2ImageProcessingTest (line 82) | class MobileNetV2ImageProcessingTest(ImageProcessingTestMixin, unittest.... method setUp (line 85) | def setUp(self): method image_processor_dict (line 90) | def image_processor_dict(self): method test_image_processor_properties (line 93) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 100) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilenet_v2/test_modeling_mobilenet_v2.py class MobileNetV2ConfigTester (line 40) | class MobileNetV2ConfigTester(ConfigTester): method create_and_test_config_common_properties (line 41) | def create_and_test_config_common_properties(self): class MobileNetV2ModelTester (line 47) | class MobileNetV2ModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method get_config (line 105) | def get_config(self): method create_and_check_model (line 122) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_image_classification (line 141) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_semantic_segmentation (line 149) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 175) | def prepare_config_and_inputs_for_common(self): class MobileNetV2ModelTest (line 183) | class MobileNetV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 209) | def setUp(self): method test_config (line 213) | def test_config(self): method test_inputs_embeds (line 217) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 221) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 225) | def test_attention_outputs(self): method test_model (line 228) | def test_model(self): method test_hidden_states_output (line 232) | def test_hidden_states_output(self): method test_for_image_classification (line 258) | def test_for_image_classification(self): method test_for_semantic_segmentation (line 262) | def test_for_semantic_segmentation(self): method test_model_from_pretrained (line 267) | def test_model_from_pretrained(self): method test_batching_equivalence (line 273) | def test_batching_equivalence(self): function prepare_img (line 278) | def prepare_img(): class MobileNetV2ModelIntegrationTest (line 285) | class MobileNetV2ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 287) | def default_image_processor(self): method test_inference_image_classification_head (line 293) | def test_inference_image_classification_head(self): method test_inference_semantic_segmentation (line 313) | def test_inference_semantic_segmentation(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilevit/test_image_processing_mobilevit.py class MobileViTImageProcessingTester (line 36) | class MobileViTImageProcessingTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_image_processor_dict (line 66) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 75) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 78) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... function prepare_semantic_single_inputs (line 90) | def prepare_semantic_single_inputs(): function prepare_semantic_batch_inputs (line 99) | def prepare_semantic_batch_inputs(): class MobileViTImageProcessingTest (line 112) | class MobileViTImageProcessingTest(ImageProcessingTestMixin, unittest.Te... method setUp (line 115) | def setUp(self): method image_processor_dict (line 120) | def image_processor_dict(self): method test_image_processor_properties (line 123) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 131) | def test_image_processor_from_dict_with_kwargs(self): method test_call_segmentation_maps (line 140) | def test_call_segmentation_maps(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilevit/test_modeling_mobilevit.py class MobileViTConfigTester (line 40) | class MobileViTConfigTester(ConfigTester): method create_and_test_config_common_properties (line 41) | def create_and_test_config_common_properties(self): class MobileViTModelTester (line 48) | class MobileViTModelTester: method __init__ (line 49) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 102) | def get_config(self): method create_and_check_model (line 119) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_image_classification (line 134) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_semantic_segmentation (line 142) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 168) | def prepare_config_and_inputs_for_common(self): class MobileViTModelTest (line 176) | class MobileViTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest... method setUp (line 202) | def setUp(self): method test_config (line 206) | def test_config(self): method test_inputs_embeds (line 210) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 214) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 218) | def test_attention_outputs(self): method test_model (line 221) | def test_model(self): method test_hidden_states_output (line 225) | def test_hidden_states_output(self): method test_for_image_classification (line 263) | def test_for_image_classification(self): method test_for_semantic_segmentation (line 267) | def test_for_semantic_segmentation(self): method test_model_from_pretrained (line 272) | def test_model_from_pretrained(self): function prepare_img (line 279) | def prepare_img(): class MobileViTModelIntegrationTest (line 286) | class MobileViTModelIntegrationTest(unittest.TestCase): method default_image_processor (line 288) | def default_image_processor(self): method test_inference_image_classification_head (line 292) | def test_inference_image_classification_head(self): method test_inference_semantic_segmentation (line 312) | def test_inference_semantic_segmentation(self): method test_post_processing_semantic_segmentation (line 342) | def test_post_processing_semantic_segmentation(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilevit/test_modeling_tf_mobilevit.py class TFMobileViTConfigTester (line 44) | class TFMobileViTConfigTester(ConfigTester): method create_and_test_config_common_properties (line 45) | def create_and_test_config_common_properties(self): class TFMobileViTModelTester (line 52) | class TFMobileViTModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 106) | def get_config(self): method create_and_check_model (line 123) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_image_classification (line 131) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_semantic_segmentation (line 137) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 152) | def prepare_config_and_inputs_for_common(self): class TFMobileViTModelTest (line 160) | class TFMobileViTModelTest(TFModelTesterMixin, PipelineTesterMixin, unit... method setUp (line 183) | def setUp(self): method test_config (line 187) | def test_config(self): method test_inputs_embeds (line 191) | def test_inputs_embeds(self): method test_model_common_attributes (line 195) | def test_model_common_attributes(self): method test_attention_outputs (line 199) | def test_attention_outputs(self): method test_forward_signature (line 202) | def test_forward_signature(self): method test_model (line 214) | def test_model(self): method test_hidden_states_output (line 218) | def test_hidden_states_output(self): method test_for_image_classification (line 253) | def test_for_image_classification(self): method test_for_semantic_segmentation (line 257) | def test_for_semantic_segmentation(self): method test_dataset_conversion (line 265) | def test_dataset_conversion(self): method check_keras_fit_results (line 268) | def check_keras_fit_results(self, val_loss1, val_loss2, atol=2e-1, rto... method test_keras_fit (line 276) | def test_keras_fit(self): method test_loss_computation (line 289) | def test_loss_computation(self): method test_model_from_pretrained (line 366) | def test_model_from_pretrained(self): function prepare_img (line 373) | def prepare_img(): class TFMobileViTModelIntegrationTest (line 379) | class TFMobileViTModelIntegrationTest(unittest.TestCase): method test_inference_image_classification_head (line 381) | def test_inference_image_classification_head(self): method test_inference_semantic_segmentation (line 400) | def test_inference_semantic_segmentation(self): FILE: mplsandbox_for_rl/transformers/tests/models/mobilevitv2/test_modeling_mobilevitv2.py class MobileViTV2ConfigTester (line 43) | class MobileViTV2ConfigTester(ConfigTester): method create_and_test_config_common_properties (line 44) | def create_and_test_config_common_properties(self): class MobileViTV2ModelTester (line 49) | class MobileViTV2ModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 102) | def get_config(self): method create_and_check_model (line 120) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_image_classification (line 135) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_semantic_segmentation (line 143) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 169) | def prepare_config_and_inputs_for_common(self): class MobileViTV2ModelTest (line 177) | class MobileViTV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 204) | def setUp(self): method test_config (line 208) | def test_config(self): method test_inputs_embeds (line 212) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 216) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 220) | def test_attention_outputs(self): method test_multi_gpu_data_parallel_forward (line 225) | def test_multi_gpu_data_parallel_forward(self): method test_model (line 228) | def test_model(self): method test_hidden_states_output (line 232) | def test_hidden_states_output(self): method test_for_image_classification (line 270) | def test_for_image_classification(self): method test_for_semantic_segmentation (line 274) | def test_for_semantic_segmentation(self): method test_model_from_pretrained (line 279) | def test_model_from_pretrained(self): function prepare_img (line 286) | def prepare_img(): class MobileViTV2ModelIntegrationTest (line 293) | class MobileViTV2ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 295) | def default_image_processor(self): method test_inference_image_classification_head (line 303) | def test_inference_image_classification_head(self): method test_inference_semantic_segmentation (line 325) | def test_inference_semantic_segmentation(self): method test_post_processing_semantic_segmentation (line 355) | def test_post_processing_semantic_segmentation(self): FILE: mplsandbox_for_rl/transformers/tests/models/mpnet/test_modeling_mpnet.py class MPNetModelTester (line 40) | class MPNetModelTester: method __init__ (line 41) | def __init__( method get_large_model_config (line 89) | def get_large_model_config(self): method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method get_config (line 110) | def get_config(self): method create_and_check_mpnet_model (line 124) | def create_and_check_mpnet_model( method create_and_check_mpnet_for_question_answering (line 135) | def create_and_check_mpnet_for_question_answering( method create_and_check_mpnet_for_sequence_classification (line 150) | def create_and_check_mpnet_for_sequence_classification( method create_and_check_mpnet_for_multiple_choice (line 160) | def create_and_check_mpnet_for_multiple_choice( method create_and_check_mpnet_for_token_classification (line 176) | def create_and_check_mpnet_for_token_classification( method prepare_config_and_inputs_for_common (line 186) | def prepare_config_and_inputs_for_common(self): class MPNetModelTest (line 194) | class MPNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 222) | def setUp(self): method test_config (line 226) | def test_config(self): method test_mpnet_model (line 229) | def test_mpnet_model(self): method test_for_sequence_classification (line 233) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 237) | def test_for_multiple_choice(self): method test_for_token_classification (line 241) | def test_for_token_classification(self): method test_for_question_answering (line 245) | def test_for_question_answering(self): method test_tf_from_pt_safetensors (line 250) | def test_tf_from_pt_safetensors(self): class MPNetModelIntegrationTest (line 255) | class MPNetModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 257) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/mpnet/test_modeling_tf_mpnet.py class TFMPNetModelTester (line 42) | class TFMPNetModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 91) | def prepare_config_and_inputs(self): method create_and_check_mpnet_model (line 120) | def create_and_check_mpnet_model( method create_and_check_mpnet_for_masked_lm (line 130) | def create_and_check_mpnet_for_masked_lm( method create_and_check_mpnet_for_question_answering (line 138) | def create_and_check_mpnet_for_question_answering( method create_and_check_mpnet_for_sequence_classification (line 150) | def create_and_check_mpnet_for_sequence_classification( method create_and_check_mpnet_for_multiple_choice (line 159) | def create_and_check_mpnet_for_multiple_choice( method create_and_check_mpnet_for_token_classification (line 173) | def create_and_check_mpnet_for_token_classification( method prepare_config_and_inputs_for_common (line 182) | def prepare_config_and_inputs_for_common(self): class TFMPNetModelTest (line 190) | class TFMPNetModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest... method setUp (line 218) | def setUp(self): method test_config (line 222) | def test_config(self): method test_mpnet_model (line 225) | def test_mpnet_model(self): method test_for_masked_lm (line 229) | def test_for_masked_lm(self): method test_for_question_answering (line 233) | def test_for_question_answering(self): method test_for_sequence_classification (line 237) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 241) | def test_for_multiple_choice(self): method test_for_token_classification (line 245) | def test_for_token_classification(self): method test_model_from_pretrained (line 250) | def test_model_from_pretrained(self): class TFMPNetModelIntegrationTest (line 257) | class TFMPNetModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 259) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/mpnet/test_tokenization_mpnet.py class MPNetTokenizerTest (line 28) | class MPNetTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_input_output_texts (line 59) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 64) | def test_full_tokenizer(self): method test_sequence_builders (line 72) | def test_sequence_builders(self): FILE: mplsandbox_for_rl/transformers/tests/models/mpt/test_modeling_mpt.py class MptModelTester (line 43) | class MptModelTester: method __init__ (line 44) | def __init__( method get_large_model_config (line 96) | def get_large_model_config(self): method prepare_config_and_inputs (line 99) | def prepare_config_and_inputs(self, gradient_checkpointing=False): method get_config (line 114) | def get_config(self, gradient_checkpointing=False): method create_and_check_mpt_model (line 135) | def create_and_check_mpt_model(self, config, input_ids, input_mask, *a... method create_and_check_mpt_model_past (line 145) | def create_and_check_mpt_model_past(self, config, input_ids, input_mas... method create_and_check_mpt_model_attention_mask_past (line 178) | def create_and_check_mpt_model_attention_mask_past(self, config, input... method create_and_check_mpt_model_past_large_inputs (line 218) | def create_and_check_mpt_model_past_large_inputs(self, config, input_i... method create_and_check_lm_head_model (line 264) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_sequence_classification_model (line 273) | def create_and_check_sequence_classification_model(self, config, input... method create_and_check_token_classification_model (line 282) | def create_and_check_token_classification_model(self, config, input_id... method create_and_check_question_answering_model (line 290) | def create_and_check_question_answering_model(self, config, input_ids,... method create_and_check_forward_and_backwards (line 298) | def create_and_check_forward_and_backwards( method create_and_check_mpt_weight_initialization (line 311) | def create_and_check_mpt_weight_initialization(self, config, *args): method prepare_config_and_inputs_for_common (line 319) | def prepare_config_and_inputs_for_common(self): class MptConfigTester (line 329) | class MptConfigTester(ConfigTester): method __init__ (line 330) | def __init__(self, parent, config_class=None, has_text_modality=True, ... method test_attn_config_as_dict (line 333) | def test_attn_config_as_dict(self): method run_common_tests (line 338) | def run_common_tests(self): class MptModelTest (line 344) | class MptModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTest... method setUp (line 376) | def setUp(self): method test_config (line 380) | def test_config(self): method test_mpt_model (line 383) | def test_mpt_model(self): method test_mpt_model_alibi_tensor (line 387) | def test_mpt_model_alibi_tensor(self): method test_mpt_model_past (line 393) | def test_mpt_model_past(self): method test_mpt_model_att_mask_past (line 397) | def test_mpt_model_att_mask_past(self): method test_mpt_model_past_large_inputs (line 401) | def test_mpt_model_past_large_inputs(self): method test_mpt_lm_head_model (line 405) | def test_mpt_lm_head_model(self): method test_mpt_sequence_classification_model (line 409) | def test_mpt_sequence_classification_model(self): method test_mpt_token_classification_model (line 413) | def test_mpt_token_classification_model(self): method test_mpt_gradient_checkpointing (line 417) | def test_mpt_gradient_checkpointing(self): method test_mpt_weight_initialization (line 421) | def test_mpt_weight_initialization(self): method test_model_weights_reload_no_missing_tied_weights (line 426) | def test_model_weights_reload_no_missing_tied_weights(self): method test_model_from_pretrained (line 430) | def test_model_from_pretrained(self): class MptIntegrationTests (line 439) | class MptIntegrationTests(unittest.TestCase): method test_generation_8k (line 440) | def test_generation_8k(self): method test_generation (line 458) | def test_generation(self): method test_generation_batched (line 476) | def test_generation_batched(self): method test_model_logits (line 501) | def test_model_logits(self): FILE: mplsandbox_for_rl/transformers/tests/models/mra/test_modeling_mra.py class MraModelTester (line 40) | class MraModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method get_pipeline_config (line 128) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 133) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 160) | def create_and_check_model( method create_and_check_model_as_decoder (line 171) | def create_and_check_model_as_decoder( method create_and_check_for_masked_lm (line 203) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 212) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 228) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 238) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 248) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 266) | def prepare_config_and_inputs_for_common(self): class MraModelTest (line 282) | class MraModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 314) | def setUp(self): method test_config (line 318) | def test_config(self): method test_model (line 321) | def test_model(self): method test_model_various_embeddings (line 325) | def test_model_various_embeddings(self): method test_for_masked_lm (line 331) | def test_for_masked_lm(self): method test_for_multiple_choice (line 335) | def test_for_multiple_choice(self): method test_for_question_answering (line 339) | def test_for_question_answering(self): method test_for_sequence_classification (line 343) | def test_for_sequence_classification(self): method test_for_token_classification (line 347) | def test_for_token_classification(self): method test_model_from_pretrained (line 352) | def test_model_from_pretrained(self): method test_attention_outputs (line 358) | def test_attention_outputs(self): method test_training_gradient_checkpointing (line 364) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 370) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 376) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_batching_equivalence (line 382) | def test_batching_equivalence(self): class MraModelIntegrationTest (line 387) | class MraModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 389) | def test_inference_no_head(self): method test_inference_masked_lm (line 406) | def test_inference_masked_lm(self): method test_inference_masked_lm_long_input (line 425) | def test_inference_masked_lm_long_input(self): FILE: mplsandbox_for_rl/transformers/tests/models/mt5/test_modeling_flax_mt5.py class MT5IntegrationTest (line 33) | class MT5IntegrationTest(unittest.TestCase): method test_small_integration_test (line 35) | def test_small_integration_test(self): FILE: mplsandbox_for_rl/transformers/tests/models/mt5/test_modeling_mt5.py class MT5ModelTester (line 57) | class MT5ModelTester: method __init__ (line 58) | def __init__( method get_large_model_config (line 105) | def get_large_model_config(self): method prepare_config_and_inputs (line 108) | def prepare_config_and_inputs(self): method get_pipeline_config (line 134) | def get_pipeline_config(self): method get_config (line 152) | def get_config(self): method check_prepare_lm_labels_via_shift_left (line 170) | def check_prepare_lm_labels_via_shift_left( method create_and_check_model (line 209) | def create_and_check_model( method create_and_check_with_lm_head (line 239) | def create_and_check_with_lm_head( method create_and_check_with_sequence_classification_head (line 259) | def create_and_check_with_sequence_classification_head( method create_and_check_decoder_model_past (line 279) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 316) | def create_and_check_decoder_model_attention_mask_past( method create_and_check_decoder_model_past_large_inputs (line 367) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_generate_with_past_key_values (line 405) | def create_and_check_generate_with_past_key_values( method create_and_check_model_fp16_forward (line 423) | def create_and_check_model_fp16_forward( method create_and_check_encoder_decoder_shared_weights (line 436) | def create_and_check_encoder_decoder_shared_weights( method check_resize_embeddings_t5_v1_1 (line 512) | def check_resize_embeddings_t5_v1_1( method prepare_config_and_inputs_for_common (line 526) | def prepare_config_and_inputs_for_common(self): class MT5ModelTest (line 549) | class MT5ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTest... method setUp (line 578) | def setUp(self): method is_pipeline_test_to_skip (line 584) | def is_pipeline_test_to_skip( method _create_and_check_torch_fx_tracing (line 594) | def _create_and_check_torch_fx_tracing(self, config, inputs_dict, outp... method test_config (line 714) | def test_config(self): method test_shift_right (line 717) | def test_shift_right(self): method test_model (line 721) | def test_model(self): method test_model_v1_1 (line 725) | def test_model_v1_1(self): method test_inputs_embeds (line 734) | def test_inputs_embeds(self): method test_config_and_model_silu_gated (line 763) | def test_config_and_model_silu_gated(self): method test_with_lm_head (line 769) | def test_with_lm_head(self): method test_with_sequence_classification_head (line 773) | def test_with_sequence_classification_head(self): method test_decoder_model_past (line 777) | def test_decoder_model_past(self): method test_decoder_model_past_with_attn_mask (line 781) | def test_decoder_model_past_with_attn_mask(self): method test_decoder_model_past_with_3d_attn_mask (line 785) | def test_decoder_model_past_with_3d_attn_mask(self): method test_decoder_model_past_with_large_inputs (line 813) | def test_decoder_model_past_with_large_inputs(self): method test_generate_with_past_key_values (line 817) | def test_generate_with_past_key_values(self): method test_encoder_decoder_shared_weights (line 821) | def test_encoder_decoder_shared_weights(self): method test_model_fp16_forward (line 826) | def test_model_fp16_forward(self): method test_v1_1_resize_embeddings (line 830) | def test_v1_1_resize_embeddings(self): method test_model_from_pretrained (line 835) | def test_model_from_pretrained(self): method test_export_to_onnx (line 841) | def test_export_to_onnx(self): method test_generate_with_head_masking (line 854) | def test_generate_with_head_masking(self): class MT5EncoderOnlyModelTester (line 890) | class MT5EncoderOnlyModelTester: method __init__ (line 891) | def __init__( method get_large_model_config (line 932) | def get_large_model_config(self): method prepare_config_and_inputs (line 935) | def prepare_config_and_inputs(self): method create_and_check_model (line 964) | def create_and_check_model( method create_and_check_model_fp16_forward (line 982) | def create_and_check_model_fp16_forward( method create_and_check_with_token_classification_head (line 992) | def create_and_check_with_token_classification_head( method prepare_config_and_inputs_for_common (line 1008) | def prepare_config_and_inputs_for_common(self): class MT5EncoderOnlyModelTest (line 1024) | class MT5EncoderOnlyModelTest(ModelTesterMixin, PipelineTesterMixin, uni... method setUp (line 1038) | def setUp(self): method test_config (line 1042) | def test_config(self): method test_model (line 1045) | def test_model(self): method test_model_fp16_forward (line 1050) | def test_model_fp16_forward(self): method test_with_token_classification_head (line 1054) | def test_with_token_classification_head(self): class MT5IntegrationTest (line 1062) | class MT5IntegrationTest(unittest.TestCase): method test_small_integration_test (line 1064) | def test_small_integration_test(self): FILE: mplsandbox_for_rl/transformers/tests/models/mt5/test_modeling_tf_mt5.py class TFMT5ModelIntegrationTest (line 33) | class TFMT5ModelIntegrationTest(unittest.TestCase): method test_small_integration_test (line 35) | def test_small_integration_test(self): FILE: mplsandbox_for_rl/transformers/tests/models/musicgen/test_modeling_musicgen.py function _config_zero_init (line 69) | def _config_zero_init(config): function prepare_musicgen_decoder_inputs_dict (line 80) | def prepare_musicgen_decoder_inputs_dict( class MusicgenDecoderTester (line 108) | class MusicgenDecoderTester: method __init__ (line 109) | def __init__( method prepare_config_and_inputs (line 145) | def prepare_config_and_inputs(self): method get_config (line 157) | def get_config(self): method prepare_config_and_inputs_for_common (line 172) | def prepare_config_and_inputs_for_common(self): class MusicgenDecoderTest (line 178) | class MusicgenDecoderTest(ModelTesterMixin, GenerationTesterMixin, Pipel... method setUp (line 187) | def setUp(self): method test_config (line 191) | def test_config(self): method _prepare_for_class (line 195) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method check_training_gradient_checkpointing (line 206) | def check_training_gradient_checkpointing(self, gradient_checkpointing... method test_inputs_embeds (line 234) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 259) | def test_model_get_set_embeddings(self): method test_inputs_embeds_matches_input_ids (line 270) | def test_inputs_embeds_matches_input_ids(self): method test_model_outputs_equivalence (line 274) | def test_model_outputs_equivalence(self): method test_tie_model_weights (line 278) | def test_tie_model_weights(self): method test_tied_weights_keys (line 282) | def test_tied_weights_keys(self): method _get_input_ids_and_config (line 285) | def _get_input_ids_and_config(self, batch_size=2): method _get_logits_processor_kwargs (line 296) | def _get_logits_processor_kwargs(self, do_sample=False): method test_greedy_generate_stereo_outputs (line 300) | def test_greedy_generate_stereo_outputs(self): method test_flash_attn_2_inference_equivalence (line 324) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 404) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_flash_attn_2_generate_left_padding (line 483) | def test_flash_attn_2_generate_left_padding(self): method test_flash_attn_2_generate_padding_right (line 529) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 575) | def test_flash_attn_2_generate_use_cache(self): method test_eager_matches_sdpa_inference (line 620) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): method test_eager_matches_sdpa_generate (line 866) | def test_eager_matches_sdpa_generate(self): function prepare_musicgen_inputs_dict (line 932) | def prepare_musicgen_inputs_dict( class MusicgenTester (line 972) | class MusicgenTester: method __init__ (line 973) | def __init__( method prepare_config_and_inputs (line 1013) | def prepare_config_and_inputs(self): method get_config (line 1021) | def get_config(self): method prepare_config_and_inputs_for_common (line 1051) | def prepare_config_and_inputs_for_common(self): class MusicgenTest (line 1057) | class MusicgenTest(ModelTesterMixin, GenerationTesterMixin, PipelineTest... method setUp (line 1068) | def setUp(self): method _prepare_for_class (line 1072) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method check_training_gradient_checkpointing (line 1083) | def check_training_gradient_checkpointing(self, gradient_checkpointing... method _check_output_with_attentions (line 1112) | def _check_output_with_attentions(self, outputs, config, input_ids, de... method check_musicgen_model_output_attentions (line 1142) | def check_musicgen_model_output_attentions( method check_musicgen_model_output_attentions_from_config (line 1167) | def check_musicgen_model_output_attentions_from_config( method test_attention_outputs (line 1216) | def test_attention_outputs(self): method test_forward_signature (line 1224) | def test_forward_signature(self): method test_gradient_checkpointing_backward_compatibility (line 1249) | def test_gradient_checkpointing_backward_compatibility(self): method test_tie_model_weights (line 1263) | def test_tie_model_weights(self): method test_tied_model_weights_key_ignore (line 1267) | def test_tied_model_weights_key_ignore(self): method test_tied_weights_keys (line 1271) | def test_tied_weights_keys(self): method test_save_load_low_cpu_mem_usage (line 1275) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 1279) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 1283) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method test_retain_grad_hidden_states_attentions (line 1287) | def test_retain_grad_hidden_states_attentions(self): method test_hidden_states_output (line 1334) | def test_hidden_states_output(self): method test_initialization (line 1378) | def test_initialization(self): method test_model_get_set_embeddings (line 1401) | def test_model_get_set_embeddings(self): method _get_input_ids_and_config (line 1410) | def _get_input_ids_and_config(self, batch_size=2): method _greedy_generate (line 1423) | def _greedy_generate( method _sample_generate (line 1451) | def _sample_generate( method _get_logits_processor_kwargs (line 1480) | def _get_logits_processor_kwargs(self, do_sample=False): method test_greedy_generate_dict_outputs (line 1484) | def test_greedy_generate_dict_outputs(self): method test_greedy_generate_dict_outputs_use_cache (line 1504) | def test_greedy_generate_dict_outputs_use_cache(self): method test_sample_generate (line 1524) | def test_sample_generate(self): method test_sample_generate_dict_output (line 1538) | def test_sample_generate_dict_output(self): method test_generate_without_input_ids (line 1558) | def test_generate_without_input_ids(self): method test_generate_fp16 (line 1576) | def test_generate_fp16(self): method test_greedy_generate_stereo_outputs (line 1589) | def test_greedy_generate_stereo_outputs(self): method test_save_load_fast_init_from_base (line 1612) | def test_save_load_fast_init_from_base(self): method test_flash_attn_2_inference_equivalence (line 1620) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 1705) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_flash_attn_2_generate_left_padding (line 1787) | def test_flash_attn_2_generate_left_padding(self): method test_flash_attn_2_generate_padding_right (line 1836) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 1884) | def test_flash_attn_2_generate_use_cache(self): method test_eager_matches_sdpa_inference (line 1929) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): method test_eager_matches_sdpa_generate (line 2186) | def test_eager_matches_sdpa_generate(self): method test_requires_grad_with_frozen_encoders (line 2251) | def test_requires_grad_with_frozen_encoders(self): function get_bip_bip (line 2273) | def get_bip_bip(bip_duration=0.125, duration=0.5, sample_rate=32000): function place_dict_on_device (line 2282) | def place_dict_on_device(dict_to_place, device): class MusicgenIntegrationTests (line 2290) | class MusicgenIntegrationTests(unittest.TestCase): method model (line 2292) | def model(self): method processor (line 2296) | def processor(self): method test_logits_text_prompt (line 2300) | def test_logits_text_prompt(self): method test_logits_text_audio_prompt (line 2337) | def test_logits_text_audio_prompt(self): method test_generate_unconditional_greedy (line 2375) | def test_generate_unconditional_greedy(self): method test_generate_unconditional_sampling (line 2397) | def test_generate_unconditional_sampling(self): method test_generate_text_prompt_greedy (line 2420) | def test_generate_text_prompt_greedy(self): method test_generate_text_prompt_greedy_with_classifier_free_guidance (line 2447) | def test_generate_text_prompt_greedy_with_classifier_free_guidance(self): method test_generate_text_prompt_sampling (line 2474) | def test_generate_text_prompt_sampling(self): method test_generate_text_audio_prompt (line 2502) | def test_generate_text_audio_prompt(self): class MusicgenStereoIntegrationTests (line 2530) | class MusicgenStereoIntegrationTests(unittest.TestCase): method model (line 2532) | def model(self): method processor (line 2536) | def processor(self): method test_generate_unconditional_greedy (line 2540) | def test_generate_unconditional_greedy(self): method test_generate_text_audio_prompt (line 2570) | def test_generate_text_audio_prompt(self): FILE: mplsandbox_for_rl/transformers/tests/models/musicgen/test_processing_musicgen.py function floats_list (line 36) | def floats_list(shape, scale=1.0, rng=None, name=None): class MusicgenProcessorTest (line 52) | class MusicgenProcessorTest(unittest.TestCase): method setUp (line 53) | def setUp(self): method get_tokenizer (line 57) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 60) | def get_feature_extractor(self, **kwargs): method tearDown (line 63) | def tearDown(self): method test_save_load_pretrained_default (line 66) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 81) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 98) | def test_feature_extractor(self): method test_tokenizer (line 112) | def test_tokenizer(self): method test_tokenizer_decode (line 127) | def test_tokenizer_decode(self): method test_model_input_names (line 140) | def test_model_input_names(self): method test_decode_audio (line 152) | def test_decode_audio(self): FILE: mplsandbox_for_rl/transformers/tests/models/musicgen_melody/test_feature_extraction_musicgen_melody.py function floats_list (line 46) | def floats_list(shape, scale=1.0, rng=None, name=None): function get_bip_bip (line 61) | def get_bip_bip(bip_duration=0.125, duration=0.5, sample_rate=32000): class MusicgenMelodyFeatureExtractionTester (line 72) | class MusicgenMelodyFeatureExtractionTester(unittest.TestCase): method __init__ (line 73) | def __init__( method prepare_feat_extract_dict (line 95) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 104) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class MusicgenMelodyFeatureExtractionTest (line 123) | class MusicgenMelodyFeatureExtractionTest(SequenceFeatureExtractionTestM... method setUp (line 126) | def setUp(self): method test_feat_extract_from_and_save_pretrained (line 130) | def test_feat_extract_from_and_save_pretrained(self): method test_feat_extract_to_json_file (line 143) | def test_feat_extract_to_json_file(self): method test_call (line 155) | def test_call(self): method test_call_from_demucs (line 189) | def test_call_from_demucs(self): method test_double_precision_pad (line 207) | def test_double_precision_pad(self): method test_integration (line 220) | def test_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/musicgen_melody/test_modeling_musicgen_melody.py function _config_zero_init (line 72) | def _config_zero_init(config): function prepare_musicgen_melody_decoder_inputs_dict (line 83) | def prepare_musicgen_melody_decoder_inputs_dict( class MusicgenMelodyDecoderTester (line 107) | class MusicgenMelodyDecoderTester: method __init__ (line 108) | def __init__( method prepare_config_and_inputs (line 147) | def prepare_config_and_inputs(self): method get_config (line 159) | def get_config(self): method prepare_config_and_inputs_for_common (line 174) | def prepare_config_and_inputs_for_common(self): class MusicgenMelodyDecoderTest (line 180) | class MusicgenMelodyDecoderTest(ModelTesterMixin, GenerationTesterMixin,... method setUp (line 188) | def setUp(self): method test_config (line 192) | def test_config(self): method _prepare_for_class (line 197) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method check_training_gradient_checkpointing (line 209) | def check_training_gradient_checkpointing(self, gradient_checkpointing... method test_inputs_embeds (line 237) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 262) | def test_model_get_set_embeddings(self): method test_inputs_embeds_matches_input_ids (line 273) | def test_inputs_embeds_matches_input_ids(self): method test_model_outputs_equivalence (line 277) | def test_model_outputs_equivalence(self): method test_tie_model_weights (line 281) | def test_tie_model_weights(self): method test_tied_weights_keys (line 285) | def test_tied_weights_keys(self): method _get_input_ids_and_config (line 288) | def _get_input_ids_and_config(self, batch_size=2): method _get_logits_processor_kwargs (line 299) | def _get_logits_processor_kwargs(self, do_sample=False): method test_greedy_generate_stereo_outputs (line 303) | def test_greedy_generate_stereo_outputs(self): method test_flash_attn_2_inference_equivalence (line 326) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 406) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_flash_attn_2_generate_left_padding (line 485) | def test_flash_attn_2_generate_left_padding(self): method test_flash_attn_2_generate_padding_right (line 531) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 577) | def test_flash_attn_2_generate_use_cache(self): method test_eager_matches_sdpa_inference (line 622) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): method test_eager_matches_sdpa_generate (line 868) | def test_eager_matches_sdpa_generate(self): function prepare_musicgen_melody_inputs_dict (line 934) | def prepare_musicgen_melody_inputs_dict( class MusicgenMelodyTester (line 968) | class MusicgenMelodyTester: method __init__ (line 969) | def __init__( method prepare_config_and_inputs (line 1014) | def prepare_config_and_inputs(self): method get_config (line 1022) | def get_config(self): method prepare_config_and_inputs_for_common (line 1054) | def prepare_config_and_inputs_for_common(self): class MusicgenMelodyTest (line 1061) | class MusicgenMelodyTest(ModelTesterMixin, GenerationTesterMixin, Pipeli... method setUp (line 1072) | def setUp(self): method _prepare_for_class (line 1076) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method check_training_gradient_checkpointing (line 1087) | def check_training_gradient_checkpointing(self, gradient_checkpointing... method _check_output_with_attentions (line 1117) | def _check_output_with_attentions(self, outputs, config, input_ids, de... method check_musicgen_melody_model_output_attentions (line 1130) | def check_musicgen_melody_model_output_attentions( method check_musicgen_melody_model_output_attentions_from_config (line 1156) | def check_musicgen_melody_model_output_attentions_from_config( method test_attention_outputs (line 1203) | def test_attention_outputs(self): method test_forward_signature (line 1212) | def test_forward_signature(self): method test_gradient_checkpointing_backward_compatibility (line 1234) | def test_gradient_checkpointing_backward_compatibility(self): method test_tie_model_weights (line 1248) | def test_tie_model_weights(self): method test_tied_model_weights_key_ignore (line 1252) | def test_tied_model_weights_key_ignore(self): method test_tied_weights_keys (line 1256) | def test_tied_weights_keys(self): method test_save_load_low_cpu_mem_usage (line 1260) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 1264) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 1268) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method test_retain_grad_hidden_states_attentions (line 1273) | def test_retain_grad_hidden_states_attentions(self): method test_hidden_states_output (line 1312) | def test_hidden_states_output(self): method test_initialization (line 1362) | def test_initialization(self): method test_model_get_set_embeddings (line 1385) | def test_model_get_set_embeddings(self): method _get_input_ids_and_config (line 1394) | def _get_input_ids_and_config(self, batch_size=2): method _greedy_generate (line 1407) | def _greedy_generate( method _sample_generate (line 1435) | def _sample_generate( method _get_logits_processor_kwargs (line 1464) | def _get_logits_processor_kwargs(self, do_sample=False): method test_greedy_generate_dict_outputs (line 1468) | def test_greedy_generate_dict_outputs(self): method test_greedy_generate_dict_outputs_use_cache (line 1488) | def test_greedy_generate_dict_outputs_use_cache(self): method test_sample_generate (line 1508) | def test_sample_generate(self): method test_sample_generate_dict_output (line 1522) | def test_sample_generate_dict_output(self): method test_generate_without_input_ids (line 1542) | def test_generate_without_input_ids(self): method test_generate_fp16 (line 1560) | def test_generate_fp16(self): method test_greedy_generate_stereo_outputs (line 1573) | def test_greedy_generate_stereo_outputs(self): method test_save_load_fast_init_from_base (line 1596) | def test_save_load_fast_init_from_base(self): method test_flash_attn_2_inference_equivalence (line 1604) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 1689) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_flash_attn_2_generate_left_padding (line 1771) | def test_flash_attn_2_generate_left_padding(self): method test_flash_attn_2_generate_padding_right (line 1820) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 1868) | def test_flash_attn_2_generate_use_cache(self): method test_eager_matches_sdpa_inference (line 1913) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): method test_eager_matches_sdpa_generate (line 2167) | def test_eager_matches_sdpa_generate(self): method test_requires_grad_with_frozen_encoders (line 2232) | def test_requires_grad_with_frozen_encoders(self): function get_bip_bip (line 2255) | def get_bip_bip(bip_duration=0.125, duration=0.5, sample_rate=32000): class MusicgenMelodyIntegrationTests (line 2266) | class MusicgenMelodyIntegrationTests(unittest.TestCase): method model (line 2268) | def model(self): method processor (line 2272) | def processor(self): method test_logits_text_prompt (line 2276) | def test_logits_text_prompt(self): method test_logits_text_audio_prompt (line 2318) | def test_logits_text_audio_prompt(self): method test_generate_unconditional_greedy (line 2360) | def test_generate_unconditional_greedy(self): method test_generate_unconditional_sampling (line 2382) | def test_generate_unconditional_sampling(self): method test_generate_text_prompt_greedy (line 2407) | def test_generate_text_prompt_greedy(self): method test_generate_text_prompt_greedy_with_classifier_free_guidance (line 2434) | def test_generate_text_prompt_greedy_with_classifier_free_guidance(self): method test_generate_text_prompt_sampling (line 2462) | def test_generate_text_prompt_sampling(self): method test_generate_text_audio_prompt (line 2496) | def test_generate_text_audio_prompt(self): class MusicgenMelodyStereoIntegrationTests (line 2523) | class MusicgenMelodyStereoIntegrationTests(unittest.TestCase): method model (line 2525) | def model(self): method processor (line 2531) | def processor(self): method test_generate_unconditional_greedy (line 2535) | def test_generate_unconditional_greedy(self): method test_generate_text_audio_prompt (line 2559) | def test_generate_text_audio_prompt(self): FILE: mplsandbox_for_rl/transformers/tests/models/musicgen_melody/test_processor_musicgen_melody.py function floats_list (line 36) | def floats_list(shape, scale=1.0, rng=None, name=None): class MusicgenMelodyProcessorTest (line 54) | class MusicgenMelodyProcessorTest(unittest.TestCase): method setUp (line 55) | def setUp(self): method get_tokenizer (line 60) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 63) | def get_feature_extractor(self, **kwargs): method tearDown (line 66) | def tearDown(self): method test_save_load_pretrained_default (line 69) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 84) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 103) | def test_feature_extractor(self): method test_tokenizer (line 117) | def test_tokenizer(self): method test_tokenizer_decode (line 132) | def test_tokenizer_decode(self): method test_model_input_names (line 145) | def test_model_input_names(self): method test_decode_audio (line 158) | def test_decode_audio(self): FILE: mplsandbox_for_rl/transformers/tests/models/mvp/test_modeling_mvp.py function prepare_mvp_inputs_dict (line 54) | def prepare_mvp_inputs_dict( class MvpModelTester (line 85) | class MvpModelTester: method __init__ (line 86) | def __init__( method prepare_config_and_inputs (line 124) | def prepare_config_and_inputs(self): method get_config (line 137) | def get_config(self): method get_pipeline_config (line 155) | def get_pipeline_config(self): method prepare_config_and_inputs_for_common (line 161) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 165) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 199) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class MvpHeadTests (line 233) | class MvpHeadTests(unittest.TestCase): method _get_config_and_data (line 236) | def _get_config_and_data(self): method test_sequence_classification_forward (line 274) | def test_sequence_classification_forward(self): method test_question_answering_forward (line 285) | def test_question_answering_forward(self): method test_lm_forward (line 301) | def test_lm_forward(self): method test_lm_uneven_forward (line 311) | def test_lm_uneven_forward(self): method test_generate_beam_search (line 332) | def test_generate_beam_search(self): method test_shift_tokens_right (line 362) | def test_shift_tokens_right(self): method test_tokenization (line 372) | def test_tokenization(self): method test_generate_fp16 (line 384) | def test_generate_fp16(self): method test_dummy_inputs (line 392) | def test_dummy_inputs(self): method test_resize_tokens_embeddings_more (line 397) | def test_resize_tokens_embeddings_more(self): class MvpModelTest (line 415) | class MvpModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTest... method is_pipeline_test_to_skip (line 443) | def is_pipeline_test_to_skip( method setUp (line 458) | def setUp(self): method test_config (line 462) | def test_config(self): method test_save_load_strict (line 465) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 475) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 479) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 484) | def test_inputs_embeds(self): method test_generate_fp16 (line 514) | def test_generate_fp16(self): function assert_tensors_close (line 524) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 543) | def _long_tensor(tok_lst): class MvpModelIntegrationTests (line 550) | class MvpModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 552) | def default_tokenizer(self): method test_inference_no_head (line 556) | def test_inference_no_head(self): method test_summarization_inference (line 570) | def test_summarization_inference(self): class MvpStandaloneDecoderModelTester (line 586) | class MvpStandaloneDecoderModelTester: method __init__ (line 587) | def __init__( method prepare_config_and_inputs (line 642) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 677) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_decoder_model_past (line 697) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 733) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 780) | def prepare_config_and_inputs_for_common(self): class MvpStandaloneDecoderModelTest (line 797) | class MvpStandaloneDecoderModelTest(ModelTesterMixin, GenerationTesterMi... method setUp (line 804) | def setUp( method test_config (line 810) | def test_config(self): method test_decoder_model_past (line 813) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 817) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 822) | def test_retain_grad_hidden_states_attentions(self): FILE: mplsandbox_for_rl/transformers/tests/models/mvp/test_tokenization_mvp.py class TestTokenizationMvp (line 27) | class TestTokenizationMvp(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_tokenizer (line 70) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 74) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 78) | def get_input_output_texts(self, tokenizer): method default_tokenizer (line 82) | def default_tokenizer(self): method default_tokenizer_fast (line 86) | def default_tokenizer_fast(self): method test_prepare_batch (line 90) | def test_prepare_batch(self): method test_prepare_batch_empty_target_text (line 105) | def test_prepare_batch_empty_target_text(self): method test_tokenizer_as_target_length (line 116) | def test_tokenizer_as_target_length(self): method test_prepare_batch_not_longer_than_maxlen (line 126) | def test_prepare_batch_not_longer_than_maxlen(self): method test_special_tokens (line 135) | def test_special_tokens(self): method test_pretokenized_inputs (line 150) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 153) | def test_embeded_special_tokens(self): FILE: mplsandbox_for_rl/transformers/tests/models/nemotron/test_modeling_nemotron.py class NemotronModelTester (line 53) | class NemotronModelTester(GemmaModelTester): class NemotronModelTest (line 63) | class NemotronModelTest(GemmaModelTest): method setUp (line 98) | def setUp(self): method test_eager_matches_sdpa_inference (line 108) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): method test_model_outputs_equivalence (line 112) | def test_model_outputs_equivalence(self, **kwargs): method test_sdpa_equivalence (line 118) | def test_sdpa_equivalence(self): method test_flash_attn_2_equivalence (line 152) | def test_flash_attn_2_equivalence(self): class NemotronIntegrationTest (line 183) | class NemotronIntegrationTest(unittest.TestCase): method setUpClass (line 189) | def setUpClass(cls): method test_nemotron_8b_generation_sdpa (line 196) | def test_nemotron_8b_generation_sdpa(self): method test_nemotron_8b_generation_eager (line 214) | def test_nemotron_8b_generation_eager(self): method test_nemotron_8b_generation_fa2 (line 232) | def test_nemotron_8b_generation_fa2(self): FILE: mplsandbox_for_rl/transformers/tests/models/nllb/test_tokenization_nllb.py class NllbTokenizationTest (line 51) | class NllbTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 59) | def setUp(self): method test_full_tokenizer (line 66) | def test_full_tokenizer(self): method test_save_pretrained (line 142) | def test_save_pretrained(self): method test_prepare_seq2seq_batch (line 208) | def test_prepare_seq2seq_batch(self): method test_save_slow_from_fast_and_reload_fast (line 257) | def test_save_slow_from_fast_and_reload_fast(self): method test_special_tokens_initialization (line 260) | def test_special_tokens_initialization(self): method test_training_new_tokenizer (line 294) | def test_training_new_tokenizer(self): method test_new_language_codes (line 297) | def test_new_language_codes(self): class NllbDistilledIntegrationTest (line 332) | class NllbDistilledIntegrationTest(unittest.TestCase): method setUpClass (line 363) | def setUpClass(cls): method test_enro_tokenizer_batch_encode_plus (line 370) | def test_enro_tokenizer_batch_encode_plus(self): method test_enro_tokenizer_decode_ignores_language_codes (line 374) | def test_enro_tokenizer_decode_ignores_language_codes(self): method test_enro_tokenizer_truncation (line 383) | def test_enro_tokenizer_truncation(self): method test_mask_token (line 392) | def test_mask_token(self): method test_enro_tokenizer_prepare_batch (line 396) | def test_enro_tokenizer_prepare_batch(self): method test_seq2seq_max_length (line 420) | def test_seq2seq_max_length(self): method test_tokenizer_translation (line 436) | def test_tokenizer_translation(self): method test_legacy_behaviour (line 453) | def test_legacy_behaviour(self): FILE: mplsandbox_for_rl/transformers/tests/models/nllb_moe/test_modeling_nllb_moe.py class NllbMoeModelTester (line 45) | class NllbMoeModelTester: method __init__ (line 46) | def __init__( method prepare_nllb_moe_inputs_dict (line 98) | def prepare_nllb_moe_inputs_dict( method prepare_config_and_inputs (line 131) | def prepare_config_and_inputs(self): method get_config (line 150) | def get_config(self): method prepare_config_and_inputs_for_common (line 175) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 180) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 214) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class NllbMoeModelTest (line 248) | class NllbMoeModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline... method is_pipeline_test_to_skip (line 268) | def is_pipeline_test_to_skip( method setUp (line 274) | def setUp(self): method test_config (line 278) | def test_config(self): method test_save_load_strict (line 281) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 291) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 296) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 300) | def test_inputs_embeds(self): method test_generate_fp16 (line 330) | def test_generate_fp16(self): method test_get_loss (line 339) | def test_get_loss(self): method test_load_save_without_tied_weights (line 352) | def test_load_save_without_tied_weights(self): class NllbMoeModelIntegrationTests (line 360) | class NllbMoeModelIntegrationTests(unittest.TestCase): method model_inputs (line 363) | def model_inputs(self): method tokenizer (line 378) | def tokenizer(self): method big_model (line 382) | def big_model(self): method inference_no_head (line 385) | def inference_no_head(self): method test_inference_logits (line 399) | def test_inference_logits(self): method test_large_logits (line 413) | def test_large_logits(self): method test_seq_to_seq_generation (line 431) | def test_seq_to_seq_generation(self): class NllbMoeRouterTest (line 463) | class NllbMoeRouterTest(unittest.TestCase): method test_top_2_routing (line 481) | def test_top_2_routing(self): method test_batch_prioritized_routing (line 517) | def test_batch_prioritized_routing(self): method test_second_expert_policy (line 531) | def test_second_expert_policy(self): FILE: mplsandbox_for_rl/transformers/tests/models/nougat/test_image_processing_nougat.py class NougatImageProcessingTester (line 37) | class NougatImageProcessingTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_image_processor_dict (line 74) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 87) | def expected_output_image_shape(self, images): method prepare_dummy_image (line 90) | def prepare_dummy_image(self): method prepare_image_inputs (line 97) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class NougatImageProcessingTest (line 111) | class NougatImageProcessingTest(ImageProcessingTestMixin, unittest.TestC... method setUp (line 114) | def setUp(self): method image_processor_dict (line 119) | def image_processor_dict(self): method image_processor (line 123) | def image_processor(self): method test_image_processor_properties (line 126) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 134) | def test_image_processor_from_dict_with_kwargs(self): method test_expected_output (line 141) | def test_expected_output(self): method test_crop_margin_all_white (line 147) | def test_crop_margin_all_white(self): method test_crop_margin_centered_black_square (line 153) | def test_crop_margin_centered_black_square(self): method test_align_long_axis_no_rotation (line 161) | def test_align_long_axis_no_rotation(self): method test_align_long_axis_with_rotation (line 168) | def test_align_long_axis_with_rotation(self): method test_align_long_axis_data_format (line 175) | def test_align_long_axis_data_format(self): method prepare_dummy_np_image (line 183) | def prepare_dummy_np_image(self): method test_crop_margin_equality_cv2_python (line 190) | def test_crop_margin_equality_cv2_python(self): FILE: mplsandbox_for_rl/transformers/tests/models/nougat/test_tokenization_nougat.py class NougatTokenizationTest (line 26) | class NougatTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method get_rust_tokenizer (line 41) | def get_rust_tokenizer(self, **kwargs): method test_padding (line 45) | def test_padding(self, max_length=6): method test_rust_tokenizer_signature (line 106) | def test_rust_tokenizer_signature(self): method test_pretokenized_inputs (line 110) | def test_pretokenized_inputs(self): method test_prepare_for_model (line 114) | def test_prepare_for_model(self): method test_encode_decode_with_spaces (line 118) | def test_encode_decode_with_spaces(self): class MarkdownCompatibleTest (line 122) | class MarkdownCompatibleTest(unittest.TestCase): method test_equation_tag (line 123) | def test_equation_tag(self): method test_equation_tag_letters (line 128) | def test_equation_tag_letters(self): method test_bold_formatting (line 133) | def test_bold_formatting(self): method test_url_conversion (line 138) | def test_url_conversion(self): method test_algorithm_code_block (line 143) | def test_algorithm_code_block(self): method test_escape_characters (line 148) | def test_escape_characters(self): method test_nested_tags (line 153) | def test_nested_tags(self): class TestNormalizeListLikeLines (line 159) | class TestNormalizeListLikeLines(unittest.TestCase): method test_two_level_lines (line 160) | def test_two_level_lines(self): method test_three_level_lines (line 165) | def test_three_level_lines(self): method test_nested_lines (line 170) | def test_nested_lines(self): class NougatPostProcessingTest (line 177) | class NougatPostProcessingTest(unittest.TestCase): method setUp (line 178) | def setUp(self): method test_correct_tables_basic (line 182) | def test_correct_tables_basic(self): method test_correct_tables_high_count (line 187) | def test_correct_tables_high_count(self): method test_postprocess_as_nougat_no_markdown (line 194) | def test_postprocess_as_nougat_no_markdown(self): FILE: mplsandbox_for_rl/transformers/tests/models/nystromformer/test_modeling_nystromformer.py class NystromformerModelTester (line 40) | class NystromformerModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method create_and_check_model (line 128) | def create_and_check_model( method create_and_check_for_masked_lm (line 139) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 148) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 164) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 174) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 184) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 202) | def prepare_config_and_inputs_for_common(self): class NystromformerModelTest (line 218) | class NystromformerModelTest(ModelTesterMixin, PipelineTesterMixin, unit... method setUp (line 246) | def setUp(self): method test_config (line 250) | def test_config(self): method test_model (line 253) | def test_model(self): method test_model_various_embeddings (line 257) | def test_model_various_embeddings(self): method test_for_masked_lm (line 263) | def test_for_masked_lm(self): method test_for_multiple_choice (line 267) | def test_for_multiple_choice(self): method test_for_question_answering (line 271) | def test_for_question_answering(self): method test_for_sequence_classification (line 275) | def test_for_sequence_classification(self): method test_for_token_classification (line 279) | def test_for_token_classification(self): method test_model_from_pretrained (line 284) | def test_model_from_pretrained(self): class NystromformerModelIntegrationTest (line 291) | class NystromformerModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 293) | def test_inference_no_head(self): method test_masked_lm_end_to_end (line 310) | def test_masked_lm_end_to_end(self): FILE: mplsandbox_for_rl/transformers/tests/models/olmo/test_modeling_olmo.py class OlmoModelTester (line 48) | class OlmoModelTester: method __init__ (line 49) | def __init__( method prepare_config_and_inputs (line 99) | def prepare_config_and_inputs(self): method get_config (line 122) | def get_config(self): method create_and_check_model (line 139) | def create_and_check_model( method create_and_check_model_as_decoder (line 149) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 179) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 197) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 259) | def prepare_config_and_inputs_for_common(self): class OlmoModelTest (line 275) | class OlmoModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method setUp (line 293) | def setUp(self): method test_config (line 297) | def test_config(self): method test_model (line 300) | def test_model(self): method test_headmasking (line 305) | def test_headmasking(self): method test_model_various_embeddings (line 308) | def test_model_various_embeddings(self): method test_save_load_fast_init_from_base (line 315) | def test_save_load_fast_init_from_base(self): method test_eager_matches_sdpa_generate (line 322) | def test_eager_matches_sdpa_generate(self): method test_model_rope_scaling (line 326) | def test_model_rope_scaling(self, scaling_type): class OlmoIntegrationTest (line 358) | class OlmoIntegrationTest(unittest.TestCase): method test_model_1b_logits (line 360) | def test_model_1b_logits(self): method test_model_7b_logits (line 372) | def test_model_7b_logits(self): method test_model_7b_twin_2t_logits (line 384) | def test_model_7b_twin_2t_logits(self): method test_model_7b_greedy_generation (line 396) | def test_model_7b_greedy_generation(self): method test_fast_special_tokens (line 409) | def test_fast_special_tokens(self): method test_simple_encode_decode (line 425) | def test_simple_encode_decode(self): FILE: mplsandbox_for_rl/transformers/tests/models/oneformer/test_image_processing_oneformer.py class OneFormerImageProcessorTester (line 42) | class OneFormerImageProcessorTester(unittest.TestCase): method __init__ (line 43) | def __init__( method prepare_image_processor_dict (line 86) | def prepare_image_processor_dict(self): method get_expected_values (line 100) | def get_expected_values(self, image_inputs, batched=False): method get_fake_oneformer_outputs (line 133) | def get_fake_oneformer_outputs(self): method expected_output_image_shape (line 140) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 144) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class OneFormerImageProcessingTest (line 158) | class OneFormerImageProcessingTest(ImageProcessingTestMixin, unittest.Te... method setUp (line 163) | def setUp(self): method image_processor_dict (line 168) | def image_processor_dict(self): method test_image_proc_properties (line 171) | def test_image_proc_properties(self): method comm_get_image_processor_inputs (line 185) | def comm_get_image_processor_inputs( method test_init_without_params (line 217) | def test_init_without_params(self): method test_call_with_segmentation_maps (line 220) | def test_call_with_segmentation_maps(self): method test_binary_mask_to_rle (line 243) | def test_binary_mask_to_rle(self): method test_post_process_semantic_segmentation (line 254) | def test_post_process_semantic_segmentation(self): method test_post_process_instance_segmentation (line 281) | def test_post_process_instance_segmentation(self): method test_post_process_panoptic_segmentation (line 315) | def test_post_process_panoptic_segmentation(self): method test_can_load_with_local_metadata (line 336) | def test_can_load_with_local_metadata(self): method test_removed_deprecated_kwargs (line 357) | def test_removed_deprecated_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/oneformer/test_modeling_oneformer.py function _config_zero_init (line 54) | def _config_zero_init(config): class OneFormerModelTester (line 62) | class OneFormerModelTester: method __init__ (line 63) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 120) | def get_config(self): method prepare_config_and_inputs_for_common (line 151) | def prepare_config_and_inputs_for_common(self): method check_output_hidden_state (line 156) | def check_output_hidden_state(self, output, config): method create_and_check_oneformer_model (line 165) | def create_and_check_oneformer_model( method create_and_check_oneformer_universal_segmentation_head_model (line 188) | def create_and_check_oneformer_universal_segmentation_head_model( class OneFormerModelTest (line 239) | class OneFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest... method is_pipeline_test_to_skip (line 249) | def is_pipeline_test_to_skip( method setUp (line 257) | def setUp(self): method test_config (line 261) | def test_config(self): method test_oneformer_model (line 264) | def test_oneformer_model(self): method test_oneformer_universal_segmentation_head_model (line 268) | def test_oneformer_universal_segmentation_head_model(self): method test_model_main_input_name (line 272) | def test_model_main_input_name(self): method test_torchscript_simple (line 280) | def test_torchscript_simple(self): method test_torchscript_output_attentions (line 284) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 288) | def test_torchscript_output_hidden_state(self): method test_inputs_embeds (line 292) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 296) | def test_model_get_set_embeddings(self): method test_generate_without_input_ids (line 300) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 304) | def test_resize_tokens_embeddings(self): method test_multi_gpu_data_parallel_forward (line 311) | def test_multi_gpu_data_parallel_forward(self): method test_forward_signature (line 314) | def test_forward_signature(self): method test_model_from_pretrained (line 327) | def test_model_from_pretrained(self): method test_model_with_labels (line 332) | def test_model_with_labels(self): method test_hidden_states_output (line 351) | def test_hidden_states_output(self): method test_attention_outputs (line 355) | def test_attention_outputs(self): method test_initialization (line 363) | def test_initialization(self): method test_training (line 378) | def test_training(self): method test_retain_grad_hidden_states_attentions (line 403) | def test_retain_grad_hidden_states_attentions(self): method test_backbone_selection (line 451) | def test_backbone_selection(self): function prepare_img (line 486) | def prepare_img(): class OneFormerModelIntegrationTest (line 493) | class OneFormerModelIntegrationTest(unittest.TestCase): method model_checkpoints (line 495) | def model_checkpoints(self): method default_processor (line 499) | def default_processor(self): method test_inference_no_head (line 502) | def test_inference_no_head(self): method test_inference_universal_segmentation_head (line 545) | def test_inference_universal_segmentation_head(self): method test_inference_fp16 (line 579) | def test_inference_fp16(self): method test_with_segmentation_maps_and_loss (line 592) | def test_with_segmentation_maps_and_loss(self): FILE: mplsandbox_for_rl/transformers/tests/models/oneformer/test_processor_oneformer.py function prepare_metadata (line 44) | def prepare_metadata(class_info_file, repo_path="shi-labs/oneformer_demo"): class OneFormerProcessorTester (line 62) | class OneFormerProcessorTester(unittest.TestCase): method __init__ (line 63) | def __init__( method prepare_processor_dict (line 111) | def prepare_processor_dict(self): method get_expected_values (line 136) | def get_expected_values(self, image_inputs, batched=False): method get_fake_oneformer_outputs (line 172) | def get_fake_oneformer_outputs(self): method prepare_image_inputs (line 179) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class OneFormerProcessingTest (line 193) | class OneFormerProcessingTest(unittest.TestCase): method setUp (line 198) | def setUp(self): method processor_dict (line 202) | def processor_dict(self): method test_feat_extract_properties (line 205) | def test_feat_extract_properties(self): method test_batch_feature (line 213) | def test_batch_feature(self): method test_call_pil (line 216) | def test_call_pil(self): method test_call_numpy (line 268) | def test_call_numpy(self): method test_call_pytorch (line 320) | def test_call_pytorch(self): method comm_get_processor_inputs (line 372) | def comm_get_processor_inputs(self, with_segmentation_maps=False, is_i... method test_init_without_params (line 402) | def test_init_without_params(self): method test_feat_extract_from_and_save_pretrained (line 405) | def test_feat_extract_from_and_save_pretrained(self): method test_call_with_segmentation_maps (line 417) | def test_call_with_segmentation_maps(self): method test_integration_semantic_segmentation (line 440) | def test_integration_semantic_segmentation(self): method test_integration_instance_segmentation (line 528) | def test_integration_instance_segmentation(self): method test_integration_panoptic_segmentation (line 616) | def test_integration_panoptic_segmentation(self): method test_binary_mask_to_rle (line 704) | def test_binary_mask_to_rle(self): method test_post_process_semantic_segmentation (line 715) | def test_post_process_semantic_segmentation(self): method test_post_process_instance_segmentation (line 749) | def test_post_process_instance_segmentation(self): method test_post_process_panoptic_segmentation (line 775) | def test_post_process_panoptic_segmentation(self): FILE: mplsandbox_for_rl/transformers/tests/models/openai/test_modeling_openai.py class OpenAIGPTModelTester (line 40) | class OpenAIGPTModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 88) | def prepare_config_and_inputs(self): method create_and_check_openai_gpt_model (line 130) | def create_and_check_openai_gpt_model(self, config, input_ids, head_ma... method create_and_check_lm_head_model (line 141) | def create_and_check_lm_head_model(self, config, input_ids, head_mask,... method create_and_check_double_lm_head_model (line 150) | def create_and_check_double_lm_head_model(self, config, input_ids, hea... method create_and_check_openai_gpt_for_sequence_classification (line 159) | def create_and_check_openai_gpt_for_sequence_classification( method prepare_config_and_inputs_for_common (line 171) | def prepare_config_and_inputs_for_common(self): class OpenAIGPTModelTest (line 192) | class OpenAIGPTModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeli... method is_pipeline_test_to_skip (line 213) | def is_pipeline_test_to_skip( method _prepare_for_class (line 225) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 247) | def setUp(self): method test_config (line 251) | def test_config(self): method test_openai_gpt_model (line 254) | def test_openai_gpt_model(self): method test_openai_gpt_lm_head_model (line 258) | def test_openai_gpt_lm_head_model(self): method test_openai_gpt_double_lm_head_model (line 262) | def test_openai_gpt_double_lm_head_model(self): method test_openai_gpt_classification_model (line 266) | def test_openai_gpt_classification_model(self): method test_model_from_pretrained (line 271) | def test_model_from_pretrained(self): class OPENAIGPTModelLanguageGenerationTest (line 278) | class OPENAIGPTModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_openai_gpt (line 280) | def test_lm_generate_openai_gpt(self): FILE: mplsandbox_for_rl/transformers/tests/models/openai/test_modeling_tf_openai.py class TFOpenAIGPTModelTester (line 40) | class TFOpenAIGPTModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 70) | def prepare_config_and_inputs(self): method create_and_check_openai_gpt_model (line 122) | def create_and_check_openai_gpt_model(self, config, input_ids, input_m... method create_and_check_openai_gpt_lm_head (line 134) | def create_and_check_openai_gpt_lm_head(self, config, input_ids, input... method create_and_check_openai_gpt_double_head (line 140) | def create_and_check_openai_gpt_double_head( method create_and_check_openai_gpt_for_sequence_classification (line 161) | def create_and_check_openai_gpt_for_sequence_classification( method prepare_config_and_inputs_for_common (line 176) | def prepare_config_and_inputs_for_common(self): class TFOpenAIGPTModelTest (line 196) | class TFOpenAIGPTModelTest(TFModelTesterMixin, PipelineTesterMixin, unit... method is_pipeline_test_to_skip (line 219) | def is_pipeline_test_to_skip( method setUp (line 230) | def setUp(self): method test_config (line 234) | def test_config(self): method test_openai_gpt_model (line 237) | def test_openai_gpt_model(self): method test_openai_gpt_lm_head (line 241) | def test_openai_gpt_lm_head(self): method test_openai_gpt_double_head (line 245) | def test_openai_gpt_double_head(self): method test_openai_gpt_sequence_classification_model (line 249) | def test_openai_gpt_sequence_classification_model(self): method test_model_from_pretrained (line 254) | def test_model_from_pretrained(self): class TFOPENAIGPTModelLanguageGenerationTest (line 261) | class TFOPENAIGPTModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_openai_gpt (line 263) | def test_lm_generate_openai_gpt(self): FILE: mplsandbox_for_rl/transformers/tests/models/openai/test_tokenization_openai.py class OpenAIGPTTokenizationTest (line 29) | class OpenAIGPTTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 38) | def setUp(self): method get_input_output_texts (line 75) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 78) | def test_full_tokenizer(self): method test_padding (line 90) | def test_padding(self, max_length=15): method test_padding_different_model_input_name (line 135) | def test_padding_different_model_input_name(self): class OpenAIGPTTokenizationTestWithSpacy (line 142) | class OpenAIGPTTokenizationTestWithSpacy(OpenAIGPTTokenizationTest): FILE: mplsandbox_for_rl/transformers/tests/models/opt/test_modeling_flax_opt.py function prepare_opt_inputs_dict (line 40) | def prepare_opt_inputs_dict(config, input_ids, attention_mask=None, head... class FlaxOPTModelTester (line 50) | class FlaxOPTModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 121) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 125) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 159) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxOPTModelTest (line 203) | class FlaxOPTModelTest(FlaxModelTesterMixin, unittest.TestCase, FlaxGene... method setUp (line 207) | def setUp(self): method test_use_cache_forward (line 210) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 215) | def test_use_cache_forward_with_attn_mask(self): method test_model_from_pretrained (line 221) | def test_model_from_pretrained(self): class FlaxOPTModelIntegrationTests (line 231) | class FlaxOPTModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 233) | def test_inference_no_head(self): class FlaxOPTEmbeddingsTest (line 247) | class FlaxOPTEmbeddingsTest(unittest.TestCase): method setUp (line 248) | def setUp(self): method test_logits (line 252) | def test_logits(self): class FlaxOPTGenerationTest (line 282) | class FlaxOPTGenerationTest(unittest.TestCase): method prompts (line 284) | def prompts(self): method test_generation_pre_attn_layer_norm (line 292) | def test_generation_pre_attn_layer_norm(self): method test_generation_post_attn_layer_norm (line 318) | def test_generation_post_attn_layer_norm(self): method test_jitted_batch_generation (line 343) | def test_jitted_batch_generation(self): method test_batch_generation (line 368) | def test_batch_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/opt/test_modeling_opt.py function prepare_opt_inputs_dict (line 44) | def prepare_opt_inputs_dict( class OPTModelTester (line 62) | class OPTModelTester: method __init__ (line 63) | def __init__( method prepare_config_and_inputs (line 110) | def prepare_config_and_inputs(self): method get_config (line 122) | def get_config(self): method get_pipeline_config (line 140) | def get_pipeline_config(self): method prepare_config_and_inputs_for_common (line 145) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 149) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... class OPTModelTest (line 199) | class OPTModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTest... method is_pipeline_test_to_skip (line 223) | def is_pipeline_test_to_skip( method setUp (line 238) | def setUp(self): method test_config (line 242) | def test_config(self): method test_save_load_strict (line 245) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 255) | def test_decoder_model_past_with_large_inputs(self): method test_inputs_embeds (line 259) | def test_inputs_embeds(self): method test_generate_fp16 (line 289) | def test_generate_fp16(self): method test_opt_sequence_classification_model (line 298) | def test_opt_sequence_classification_model(self): method test_opt_sequence_classification_model_for_multi_label (line 310) | def test_opt_sequence_classification_model_for_multi_label(self): method test_model_parallelism (line 326) | def test_model_parallelism(self): function assert_tensors_close (line 330) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 349) | def _long_tensor(tok_lst): class OPTModelIntegrationTests (line 354) | class OPTModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 356) | def test_inference_no_head(self): class OPTEmbeddingsTest (line 379) | class OPTEmbeddingsTest(unittest.TestCase): method setUp (line 380) | def setUp(self): method test_load_model (line 384) | def test_load_model(self): method test_logits (line 390) | def test_logits(self): class OPTGenerationTest (line 417) | class OPTGenerationTest(unittest.TestCase): method prompts (line 419) | def prompts(self): method test_generation_pre_attn_layer_norm (line 427) | def test_generation_pre_attn_layer_norm(self): method test_batch_generation (line 451) | def test_batch_generation(self): method test_generation_post_attn_layer_norm (line 492) | def test_generation_post_attn_layer_norm(self): method test_batched_nan_fp16 (line 518) | def test_batched_nan_fp16(self): method test_contrastive_search_opt (line 540) | def test_contrastive_search_opt(self): FILE: mplsandbox_for_rl/transformers/tests/models/opt/test_modeling_tf_opt.py function prepare_opt_inputs_dict (line 36) | def prepare_opt_inputs_dict(config, input_ids, attention_mask=None, head... class TFOPTModelTester (line 43) | class TFOPTModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs_for_common (line 91) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 116) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): class TFOPTModelTest (line 152) | class TFOPTModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 163) | def setUp(self): method test_config (line 167) | def test_config(self): method test_decoder_model_past_large_inputs (line 170) | def test_decoder_model_past_large_inputs(self): method test_resize_token_embeddings (line 174) | def test_resize_token_embeddings(self): function _long_tensor (line 223) | def _long_tensor(tok_lst): class TFOPTHeadTests (line 228) | class TFOPTHeadTests(unittest.TestCase): method _get_config_and_data (line 231) | def _get_config_and_data(self): class OPTModelIntegrationTests (line 251) | class OPTModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 253) | def test_inference_no_head(self): class TFOPTEmbeddingsTest (line 273) | class TFOPTEmbeddingsTest(unittest.TestCase): method setUp (line 274) | def setUp(self): method test_logits (line 278) | def test_logits(self): class TFOPTGenerationTest (line 308) | class TFOPTGenerationTest(unittest.TestCase): method prompts (line 310) | def prompts(self): method test_generation_pre_attn_layer_norm (line 318) | def test_generation_pre_attn_layer_norm(self): method test_batch_generation (line 342) | def test_batch_generation(self): method test_generation_post_attn_layer_norm (line 381) | def test_generation_post_attn_layer_norm(self): FILE: mplsandbox_for_rl/transformers/tests/models/owlv2/test_image_processing_owlv2.py class Owlv2ImageProcessingTester (line 34) | class Owlv2ImageProcessingTester(unittest.TestCase): method __init__ (line 35) | def __init__( method prepare_image_processor_dict (line 64) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 73) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 76) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class Owlv2ImageProcessingTest (line 90) | class Owlv2ImageProcessingTest(ImageProcessingTestMixin, unittest.TestCa... method setUp (line 93) | def setUp(self): method image_processor_dict (line 98) | def image_processor_dict(self): method test_image_processor_properties (line 101) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 109) | def test_image_processor_from_dict_with_kwargs(self): method test_image_processor_integration_test (line 119) | def test_image_processor_integration_test(self): method test_image_processor_integration_test_resize (line 129) | def test_image_processor_integration_test_resize(self): method test_call_numpy_4_channels (line 173) | def test_call_numpy_4_channels(self): FILE: mplsandbox_for_rl/transformers/tests/models/owlv2/test_modeling_owlv2.py class Owlv2VisionModelTester (line 61) | class Owlv2VisionModelTester: method __init__ (line 62) | def __init__( method prepare_config_and_inputs (line 98) | def prepare_config_and_inputs(self): method get_config (line 104) | def get_config(self): method create_and_check_model (line 118) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 131) | def prepare_config_and_inputs_for_common(self): class Owlv2VisionModelTest (line 140) | class Owlv2VisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 152) | def setUp(self): method test_config (line 158) | def test_config(self): method test_inputs_embeds (line 162) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 165) | def test_model_get_set_embeddings(self): method test_forward_signature (line 174) | def test_forward_signature(self): method test_model (line 186) | def test_model(self): method test_training (line 191) | def test_training(self): method test_training_gradient_checkpointing (line 195) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 201) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 207) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 211) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 215) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 219) | def test_model_from_pretrained(self): class Owlv2TextModelTester (line 226) | class Owlv2TextModelTester: method __init__ (line 227) | def __init__( method prepare_config_and_inputs (line 265) | def prepare_config_and_inputs(self): method get_config (line 284) | def get_config(self): method create_and_check_model (line 297) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 308) | def prepare_config_and_inputs_for_common(self): class Owlv2TextModelTest (line 317) | class Owlv2TextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 323) | def setUp(self): method test_config (line 327) | def test_config(self): method test_model (line 330) | def test_model(self): method test_training (line 335) | def test_training(self): method test_training_gradient_checkpointing (line 339) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 345) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 351) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 355) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 359) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 363) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 367) | def test_model_from_pretrained(self): class Owlv2ModelTester (line 373) | class Owlv2ModelTester: method __init__ (line 374) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 388) | def prepare_config_and_inputs(self): method get_config (line 394) | def get_config(self): method create_and_check_model (line 397) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 418) | def prepare_config_and_inputs_for_common(self): class Owlv2ModelTest (line 432) | class Owlv2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 448) | def setUp(self): method test_model (line 451) | def test_model(self): method test_hidden_states_output (line 456) | def test_hidden_states_output(self): method test_inputs_embeds (line 460) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 464) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 468) | def test_model_get_set_embeddings(self): method test_initialization (line 472) | def test_initialization(self): method _create_and_check_torchscript (line 495) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 562) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 578) | def test_model_from_pretrained(self): class Owlv2ForObjectDetectionTester (line 585) | class Owlv2ForObjectDetectionTester: method __init__ (line 586) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 595) | def prepare_config_and_inputs(self): method get_config (line 601) | def get_config(self): method create_and_check_model (line 604) | def create_and_check_model(self, config, pixel_values, input_ids, atte... method prepare_config_and_inputs_for_common (line 633) | def prepare_config_and_inputs_for_common(self): class Owlv2ForObjectDetectionTest (line 646) | class Owlv2ForObjectDetectionTest(ModelTesterMixin, unittest.TestCase): method setUp (line 654) | def setUp(self): method test_model (line 657) | def test_model(self): method test_hidden_states_output (line 662) | def test_hidden_states_output(self): method test_inputs_embeds (line 666) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 670) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 674) | def test_model_get_set_embeddings(self): method test_initialization (line 678) | def test_initialization(self): method test_forward_signature (line 682) | def test_forward_signature(self): method test_save_load_fast_init_from_base (line 686) | def test_save_load_fast_init_from_base(self): method test_training (line 690) | def test_training(self): method test_training_gradient_checkpointing (line 694) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 700) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 706) | def test_training_gradient_checkpointing_use_reentrant_false(self): method _create_and_check_torchscript (line 709) | def _create_and_check_torchscript(self, config, inputs_dict): method test_model_from_pretrained (line 777) | def test_model_from_pretrained(self): function prepare_img (line 784) | def prepare_img(): class Owlv2ModelIntegrationTest (line 792) | class Owlv2ModelIntegrationTest(unittest.TestCase): method test_inference (line 794) | def test_inference(self): method test_inference_object_detection (line 825) | def test_inference_object_detection(self): method test_inference_one_shot_object_detection (line 856) | def test_inference_one_shot_object_detection(self): method test_inference_one_shot_object_detection_fp16 (line 886) | def test_inference_one_shot_object_detection_fp16(self): FILE: mplsandbox_for_rl/transformers/tests/models/owlvit/test_image_processing_owlvit.py class OwlViTImageProcessingTester (line 29) | class OwlViTImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 63) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 75) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 78) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class OwlViTImageProcessingTest (line 92) | class OwlViTImageProcessingTest(ImageProcessingTestMixin, unittest.TestC... method setUp (line 95) | def setUp(self): method image_processor_dict (line 100) | def image_processor_dict(self): method test_image_processor_properties (line 103) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 114) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/owlvit/test_modeling_owlvit.py class OwlViTVisionModelTester (line 60) | class OwlViTVisionModelTester: method __init__ (line 61) | def __init__( method prepare_config_and_inputs (line 97) | def prepare_config_and_inputs(self): method get_config (line 103) | def get_config(self): method create_and_check_model (line 117) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 130) | def prepare_config_and_inputs_for_common(self): class OwlViTVisionModelTest (line 138) | class OwlViTVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 150) | def setUp(self): method test_config (line 156) | def test_config(self): method test_inputs_embeds (line 160) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 163) | def test_model_get_set_embeddings(self): method test_forward_signature (line 172) | def test_forward_signature(self): method test_model (line 184) | def test_model(self): method test_training (line 189) | def test_training(self): method test_training_gradient_checkpointing (line 193) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 199) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 205) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 209) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 213) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 217) | def test_model_from_pretrained(self): class OwlViTTextModelTester (line 223) | class OwlViTTextModelTester: method __init__ (line 224) | def __init__( method prepare_config_and_inputs (line 262) | def prepare_config_and_inputs(self): method get_config (line 281) | def get_config(self): method create_and_check_model (line 294) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 305) | def prepare_config_and_inputs_for_common(self): class OwlViTTextModelTest (line 313) | class OwlViTTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 319) | def setUp(self): method test_config (line 323) | def test_config(self): method test_model (line 326) | def test_model(self): method test_training (line 331) | def test_training(self): method test_training_gradient_checkpointing (line 335) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 341) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 347) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 351) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 355) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 359) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 363) | def test_model_from_pretrained(self): class OwlViTModelTester (line 369) | class OwlViTModelTester: method __init__ (line 370) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 384) | def prepare_config_and_inputs(self): method get_config (line 390) | def get_config(self): method create_and_check_model (line 393) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 414) | def prepare_config_and_inputs_for_common(self): class OwlViTModelTest (line 427) | class OwlViTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 443) | def setUp(self): method test_model (line 446) | def test_model(self): method test_hidden_states_output (line 451) | def test_hidden_states_output(self): method test_inputs_embeds (line 455) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 459) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 463) | def test_model_get_set_embeddings(self): method test_initialization (line 467) | def test_initialization(self): method _create_and_check_torchscript (line 490) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 557) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 573) | def test_model_from_pretrained(self): class OwlViTForObjectDetectionTester (line 579) | class OwlViTForObjectDetectionTester: method __init__ (line 580) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 589) | def prepare_config_and_inputs(self): method get_config (line 595) | def get_config(self): method create_and_check_model (line 598) | def create_and_check_model(self, config, pixel_values, input_ids, atte... method prepare_config_and_inputs_for_common (line 627) | def prepare_config_and_inputs_for_common(self): class OwlViTForObjectDetectionTest (line 639) | class OwlViTForObjectDetectionTest(ModelTesterMixin, unittest.TestCase): method setUp (line 647) | def setUp(self): method test_model (line 650) | def test_model(self): method test_hidden_states_output (line 655) | def test_hidden_states_output(self): method test_inputs_embeds (line 659) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 663) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 667) | def test_model_get_set_embeddings(self): method test_initialization (line 671) | def test_initialization(self): method test_forward_signature (line 675) | def test_forward_signature(self): method test_save_load_fast_init_from_base (line 679) | def test_save_load_fast_init_from_base(self): method test_training (line 683) | def test_training(self): method test_training_gradient_checkpointing (line 687) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 693) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 699) | def test_training_gradient_checkpointing_use_reentrant_false(self): method _create_and_check_torchscript (line 702) | def _create_and_check_torchscript(self, config, inputs_dict): method test_model_from_pretrained (line 770) | def test_model_from_pretrained(self): function prepare_img (line 777) | def prepare_img(): class OwlViTModelIntegrationTest (line 785) | class OwlViTModelIntegrationTest(unittest.TestCase): method test_inference (line 787) | def test_inference(self): method test_inference_object_detection (line 818) | def test_inference_object_detection(self): method test_inference_one_shot_object_detection (line 845) | def test_inference_one_shot_object_detection(self): method test_inference_one_shot_object_detection_fp16 (line 875) | def test_inference_one_shot_object_detection_fp16(self): FILE: mplsandbox_for_rl/transformers/tests/models/owlvit/test_processor_owlvit.py class OwlViTProcessorTest (line 37) | class OwlViTProcessorTest(unittest.TestCase): method setUp (line 38) | def setUp(self): method get_tokenizer (line 66) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 69) | def get_rust_tokenizer(self, **kwargs): method get_image_processor (line 72) | def get_image_processor(self, **kwargs): method tearDown (line 75) | def tearDown(self): method prepare_image_inputs (line 78) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 89) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 113) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 130) | def test_image_processor(self): method test_tokenizer (line 144) | def test_tokenizer(self): method test_processor (line 159) | def test_processor(self): method test_processor_with_text_list (line 176) | def test_processor_with_text_list(self): method test_processor_with_nested_text_list (line 191) | def test_processor_with_nested_text_list(self): method test_processor_case (line 209) | def test_processor_case(self): method test_processor_case2 (line 228) | def test_processor_case2(self): method test_tokenizer_decode (line 245) | def test_tokenizer_decode(self): FILE: mplsandbox_for_rl/transformers/tests/models/paligemma/test_modeling_paligemma.py class PaliGemmaVisionText2TextModelTester (line 51) | class PaliGemmaVisionText2TextModelTester: method __init__ (line 52) | def __init__( method get_config (line 131) | def get_config(self): method prepare_config_and_inputs (line 143) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 156) | def prepare_config_and_inputs_for_common(self): class PaliGemmaForConditionalGenerationModelTest (line 176) | class PaliGemmaForConditionalGenerationModelTest(ModelTesterMixin, unitt... method setUp (line 187) | def setUp(self): method test_inputs_embeds (line 192) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 214) | def test_inputs_embeds_matches_input_ids(self): method test_training_gradient_checkpointing (line 237) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 243) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 249) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_cpu_offload (line 253) | def test_cpu_offload(self): method test_disk_offload_bin (line 257) | def test_disk_offload_bin(self): method test_disk_offload_safetensors (line 261) | def test_disk_offload_safetensors(self): method test_model_parallelism (line 265) | def test_model_parallelism(self): method test_eager_matches_sdpa_inference (line 271) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): method test_initialization (line 279) | def test_initialization(self): method test_model_outputs_equivalence (line 284) | def test_model_outputs_equivalence(self): method test_determinism (line 289) | def test_determinism(self): method test_feed_forward_chunking (line 293) | def test_feed_forward_chunking(self): method test_save_load_low_cpu_mem_usage (line 297) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 301) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 305) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): class PaliGemmaForConditionalGenerationIntegrationTest (line 312) | class PaliGemmaForConditionalGenerationIntegrationTest(unittest.TestCase): method setUp (line 313) | def setUp(self): method tearDown (line 316) | def tearDown(self): method test_small_model_integration_test (line 322) | def test_small_model_integration_test(self): method test_small_model_integration_test_paligemma_VQA (line 345) | def test_small_model_integration_test_paligemma_VQA(self): method test_small_model_integration_test_paligemma_empty_prompt (line 366) | def test_small_model_integration_test_paligemma_empty_prompt(self): method test_small_model_integration_test_paligemma_batched (line 388) | def test_small_model_integration_test_paligemma_batched(self): method test_small_model_integration_test_paligemma_batched_bf16 (line 417) | def test_small_model_integration_test_paligemma_batched_bf16(self): method test_small_model_integration_test_paligemma_batched_f16 (line 449) | def test_small_model_integration_test_paligemma_batched_f16(self): method test_integration_detection_bug (line 482) | def test_integration_detection_bug(self): method test_paligemma_index_error_bug (line 507) | def test_paligemma_index_error_bug(self): method test_paligemma_finetuning_with_suffixes_bf16 (line 533) | def test_paligemma_finetuning_with_suffixes_bf16(self): FILE: mplsandbox_for_rl/transformers/tests/models/patchtsmixer/test_modeling_patchtsmixer.py class PatchTSMixerModelTester (line 64) | class PatchTSMixerModelTester: method __init__ (line 65) | def __init__( method get_config (line 150) | def get_config(self): method prepare_patchtsmixer_inputs_dict (line 187) | def prepare_patchtsmixer_inputs_dict(self, config): method prepare_config_and_inputs (line 199) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 204) | def prepare_config_and_inputs_for_common(self): class PatchTSMixerModelTest (line 210) | class PatchTSMixerModelTest(ModelTesterMixin, PipelineTesterMixin, unitt... method setUp (line 239) | def setUp(self): method test_config (line 249) | def test_config(self): method _prepare_for_class (line 252) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_save_load_strict (line 278) | def test_save_load_strict(self): method test_hidden_states_output (line 288) | def test_hidden_states_output(self): method test_resize_tokens_embeddings (line 321) | def test_resize_tokens_embeddings(self): method test_model_outputs_equivalence (line 324) | def test_model_outputs_equivalence(self): method test_model_main_input_name (line 397) | def test_model_main_input_name(self): method test_forward_signature (line 403) | def test_forward_signature(self): method test_retain_grad_hidden_states_attentions (line 447) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 451) | def test_model_get_set_embeddings(self): function prepare_batch (line 455) | def prepare_batch(repo_id="ibm/patchtsmixer-etth1-test-data", file="pret... class PatchTSMixerModelIntegrationTests (line 464) | class PatchTSMixerModelIntegrationTests(unittest.TestCase): method test_pretrain_head (line 465) | def test_pretrain_head(self): method test_forecasting_head (line 488) | def test_forecasting_head(self): method test_prediction_generation (line 509) | def test_prediction_generation(self): class PatchTSMixerFunctionalTests (line 533) | class PatchTSMixerFunctionalTests(unittest.TestCase): method setUpClass (line 535) | def setUpClass(cls): method test_patchtsmixer_encoder (line 636) | def test_patchtsmixer_encoder(self): method test_patchmodel (line 642) | def test_patchmodel(self): method test_pretrainhead (line 649) | def test_pretrainhead(self): method test_pretrain_full (line 658) | def test_pretrain_full(self): method test_pretrain_full_with_return_dict (line 669) | def test_pretrain_full_with_return_dict(self): method test_forecast_head (line 677) | def test_forecast_head(self): method check_module (line 687) | def check_module( method test_forecast (line 772) | def test_forecast(self, mode, self_attn, scaling, gated_attn, predicti... method test_classification (line 796) | def test_classification(self, mode, self_attn, scaling, gated_attn, he... method test_regression (line 820) | def test_regression(self, mode, self_attn, scaling, gated_attn, head_a... method test_pretrain (line 846) | def test_pretrain( method forecast_full_module (line 869) | def forecast_full_module(self, params=None, output_hidden_states=False... method test_forecast_full (line 908) | def test_forecast_full(self): method test_forecast_full_2 (line 912) | def test_forecast_full_2(self): method test_forecast_full_2_with_return_dict (line 919) | def test_forecast_full_2_with_return_dict(self): method test_forecast_full_3 (line 926) | def test_forecast_full_3(self): method test_forecast_full_5 (line 933) | def test_forecast_full_5(self): method test_forecast_full_4 (line 942) | def test_forecast_full_4(self): method test_forecast_full_distributional (line 950) | def test_forecast_full_distributional(self): method test_forecast_full_distributional_2 (line 961) | def test_forecast_full_distributional_2(self): method test_forecast_full_distributional_3 (line 971) | def test_forecast_full_distributional_3(self): method test_forecast_full_distributional_4 (line 981) | def test_forecast_full_distributional_4(self): method test_classification_head (line 991) | def test_classification_head(self): method test_classification_full (line 1001) | def test_classification_full(self): method test_classification_full_with_return_dict (line 1015) | def test_classification_full_with_return_dict(self): method test_regression_head (line 1032) | def test_regression_head(self): method test_regression_full (line 1040) | def test_regression_full(self): method test_regression_full_with_return_dict (line 1051) | def test_regression_full_with_return_dict(self): method test_regression_full_distribute (line 1068) | def test_regression_full_distribute(self): method test_regression_full_distribute_2 (line 1094) | def test_regression_full_distribute_2(self): FILE: mplsandbox_for_rl/transformers/tests/models/patchtst/test_modeling_patchtst.py class PatchTSTModelTester (line 51) | class PatchTSTModelTester: method __init__ (line 52) | def __init__( method get_config (line 102) | def get_config(self): method prepare_patchtst_inputs_dict (line 122) | def prepare_patchtst_inputs_dict(self, config): method prepare_config_and_inputs (line 137) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 142) | def prepare_config_and_inputs_for_common(self): class PatchTSTModelTest (line 148) | class PatchTSTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 175) | def setUp(self): method test_config (line 184) | def test_config(self): method _prepare_for_class (line 187) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_save_load_strict (line 206) | def test_save_load_strict(self): method test_hidden_states_output (line 216) | def test_hidden_states_output(self): method test_resize_tokens_embeddings (line 251) | def test_resize_tokens_embeddings(self): method test_model_main_input_name (line 254) | def test_model_main_input_name(self): method test_forward_signature (line 260) | def test_forward_signature(self): method test_retain_grad_hidden_states_attentions (line 296) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 300) | def test_model_get_set_embeddings(self): function prepare_batch (line 304) | def prepare_batch(repo_id="hf-internal-testing/etth1-hourly-batch", file... class PatchTSTModelIntegrationTests (line 313) | class PatchTSTModelIntegrationTests(unittest.TestCase): method test_pretrain_head (line 315) | def test_pretrain_head(self): method test_prediction_head (line 335) | def test_prediction_head(self): method test_prediction_generation (line 354) | def test_prediction_generation(self): method test_regression_generation (line 372) | def test_regression_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/pegasus/test_modeling_flax_pegasus.py class FlaxPegasusModelTester (line 41) | class FlaxPegasusModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs_for_common (line 83) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 111) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 151) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... function prepare_pegasus_inputs_dict (line 198) | def prepare_pegasus_inputs_dict( class FlaxPegasusModelTest (line 224) | class FlaxPegasusModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 239) | def setUp(self): method test_config (line 243) | def test_config(self): method test_use_cache_forward (line 246) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 251) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 256) | def test_encode(self): method test_decode (line 279) | def test_decode(self): method test_model_from_pretrained (line 313) | def test_model_from_pretrained(self): method test_pegasus_xsum_summary (line 321) | def test_pegasus_xsum_summary(self): FILE: mplsandbox_for_rl/transformers/tests/models/pegasus/test_modeling_pegasus.py function prepare_pegasus_inputs_dict (line 45) | def prepare_pegasus_inputs_dict( class PegasusModelTester (line 76) | class PegasusModelTester: method __init__ (line 77) | def __init__( method prepare_config_and_inputs (line 121) | def prepare_config_and_inputs(self): method get_pipeline_config (line 134) | def get_pipeline_config(self): method get_config (line 152) | def get_config(self): method prepare_config_and_inputs_for_common (line 172) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 176) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 210) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class PegasusModelTest (line 244) | class PegasusModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline... method setUp (line 264) | def setUp(self): method test_config (line 268) | def test_config(self): method test_save_load_strict (line 271) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 281) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 285) | def test_encoder_decoder_model_standalone(self): method test_generate_fp16 (line 290) | def test_generate_fp16(self): method test_training_gradient_checkpointing (line 302) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 308) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 314) | def test_training_gradient_checkpointing_use_reentrant_false(self): function assert_tensors_close (line 318) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 337) | def _long_tensor(tok_lst): class PegasusXSUMIntegrationTest (line 344) | class PegasusXSUMIntegrationTest(AbstractSeq2SeqIntegrationTest): method model (line 357) | def model(self): method test_pegasus_xsum_summary (line 362) | def test_pegasus_xsum_summary(self): class PegasusStandaloneDecoderModelTester (line 381) | class PegasusStandaloneDecoderModelTester: method __init__ (line 382) | def __init__( method prepare_config_and_inputs (line 437) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 471) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 507) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 554) | def prepare_config_and_inputs_for_common(self): class PegasusStandaloneDecoderModelTest (line 571) | class PegasusStandaloneDecoderModelTest(ModelTesterMixin, GenerationTest... method setUp (line 578) | def setUp( method test_config (line 584) | def test_config(self): method test_decoder_model_past (line 587) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 591) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 596) | def test_retain_grad_hidden_states_attentions(self): FILE: mplsandbox_for_rl/transformers/tests/models/pegasus/test_modeling_tf_pegasus.py class TFPegasusModelTester (line 36) | class TFPegasusModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs_for_common (line 78) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 106) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_pegasus_inputs_dict (line 142) | def prepare_pegasus_inputs_dict( class TFPegasusModelTest (line 180) | class TFPegasusModelTest(TFModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 197) | def setUp(self): method test_config (line 201) | def test_config(self): method test_decoder_model_past_large_inputs (line 204) | def test_decoder_model_past_large_inputs(self): class TFPegasusIntegrationTests (line 212) | class TFPegasusIntegrationTests(unittest.TestCase): method tokenizer (line 225) | def tokenizer(self): method model (line 229) | def model(self): method _assert_generated_batch_equal_expected (line 233) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 237) | def translate_src_text(self, **tokenizer_kwargs): method test_batch_generation (line 249) | def test_batch_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/pegasus/test_tokenization_pegasus.py class PegasusTokenizationTest (line 29) | class PegasusTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method _large_tokenizer (line 44) | def _large_tokenizer(self): method get_tokenizer (line 47) | def get_tokenizer(self, **kwargs) -> PegasusTokenizer: method get_input_output_texts (line 50) | def get_input_output_texts(self, tokenizer): method test_convert_token_and_id (line 53) | def test_convert_token_and_id(self): method test_get_vocab (line 61) | def test_get_vocab(self): method test_vocab_size (line 69) | def test_vocab_size(self): method test_mask_tokens_rust_pegasus (line 72) | def test_mask_tokens_rust_pegasus(self): method test_large_mask_tokens (line 83) | def test_large_mask_tokens(self): method test_large_tokenizer_settings (line 91) | def test_large_tokenizer_settings(self): method test_large_seq2seq_truncation (line 108) | def test_large_seq2seq_truncation(self): method test_tokenizer_integration (line 122) | def test_tokenizer_integration(self): class BigBirdPegasusTokenizationTest (line 134) | class BigBirdPegasusTokenizationTest(TokenizerTesterMixin, unittest.Test... method setUp (line 141) | def setUp(self): method _large_tokenizer (line 149) | def _large_tokenizer(self): method get_tokenizer (line 152) | def get_tokenizer(self, **kwargs) -> PegasusTokenizer: method get_input_output_texts (line 155) | def get_input_output_texts(self, tokenizer): method test_mask_tokens_rust_pegasus (line 158) | def test_mask_tokens_rust_pegasus(self): method test_large_seq2seq_truncation (line 170) | def test_large_seq2seq_truncation(self): method test_equivalence_to_orig_tokenizer (line 183) | def test_equivalence_to_orig_tokenizer(self): FILE: mplsandbox_for_rl/transformers/tests/models/pegasus_x/test_modeling_pegasus_x.py function prepare_pegasus_x_inputs_dict (line 46) | def prepare_pegasus_x_inputs_dict( class PegasusXModelTester (line 66) | class PegasusXModelTester: method __init__ (line 67) | def __init__( method prepare_config_and_inputs (line 105) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 133) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 137) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 170) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class PegasusXModelTest (line 204) | class PegasusXModelTest(ModelTesterMixin, GenerationTesterMixin, Pipelin... method setUp (line 222) | def setUp(self): method test_torchscript_output_attentions (line 229) | def test_torchscript_output_attentions(self): method test_config (line 232) | def test_config(self): method test_save_load_strict (line 235) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 245) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 249) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 253) | def test_inputs_embeds(self): method test_generate_fp16 (line 283) | def test_generate_fp16(self): method test_attention_outputs (line 292) | def test_attention_outputs(self): method _check_encoder_attention_for_generate (line 402) | def _check_encoder_attention_for_generate(self, attentions, batch_size... method _check_encoder_hidden_states_for_generate (line 416) | def _check_encoder_hidden_states_for_generate(self, hidden_states, bat... method test_hidden_states_output (line 430) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 483) | def test_retain_grad_hidden_states_attentions(self): method round_up (line 545) | def round_up(cls, n, k): function assert_tensors_close (line 549) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 568) | def _long_tensor(tok_lst): class PegasusXModelIntegrationTests (line 579) | class PegasusXModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 581) | def default_tokenizer(self): method test_inference_no_head (line 584) | def test_inference_no_head(self): method test_inference_head (line 600) | def test_inference_head(self): method test_seq_to_seq_generation (line 617) | def test_seq_to_seq_generation(self): class PegasusXStandaloneDecoderModelTester (line 663) | class PegasusXStandaloneDecoderModelTester: method __init__ (line 664) | def __init__( method prepare_config_and_inputs (line 719) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 753) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 789) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 834) | def prepare_config_and_inputs_for_common(self): class PegasusXStandaloneDecoderModelTest (line 851) | class PegasusXStandaloneDecoderModelTest(ModelTesterMixin, GenerationTes... method setUp (line 858) | def setUp( method test_config (line 864) | def test_config(self): method test_decoder_model_past (line 867) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 871) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 876) | def test_retain_grad_hidden_states_attentions(self): FILE: mplsandbox_for_rl/transformers/tests/models/perceiver/test_modeling_perceiver.py class PerceiverModelTester (line 74) | class PerceiverModelTester: method __init__ (line 75) | def __init__( method prepare_config_and_inputs (line 145) | def prepare_config_and_inputs(self, model_class=None): method get_config (line 189) | def get_config(self): method get_pipeline_config (line 217) | def get_pipeline_config(self): method create_and_check_for_masked_lm (line 224) | def create_and_check_for_masked_lm(self, config, inputs, input_mask, s... method create_and_check_for_sequence_classification (line 231) | def create_and_check_for_sequence_classification(self, config, inputs,... method create_and_check_for_image_classification_learned (line 238) | def create_and_check_for_image_classification_learned( method create_and_check_for_image_classification_fourier (line 247) | def create_and_check_for_image_classification_fourier( method create_and_check_for_image_classification_conv (line 256) | def create_and_check_for_image_classification_conv( method prepare_config_and_inputs_for_common (line 265) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_model_class (line 271) | def prepare_config_and_inputs_for_model_class(self, model_class): class PerceiverModelTest (line 280) | class PerceiverModelTest(ModelTesterMixin, PipelineTesterMixin, unittest... method setUp (line 316) | def setUp(self): method _prepare_for_class (line 325) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 351) | def test_config(self): method test_for_masked_lm (line 354) | def test_for_masked_lm(self): method test_for_sequence_classification (line 358) | def test_for_sequence_classification(self): method test_for_image_classification_learned (line 362) | def test_for_image_classification_learned(self): method test_for_image_classification_fourier (line 368) | def test_for_image_classification_fourier(self): method test_for_image_classification_conv (line 374) | def test_for_image_classification_conv(self): method test_model_get_set_embeddings (line 380) | def test_model_get_set_embeddings(self): method test_training (line 388) | def test_training(self): method test_forward_signature (line 410) | def test_forward_signature(self): method test_determinism (line 422) | def test_determinism(self): method test_attention_outputs (line 451) | def test_attention_outputs(self): method test_hidden_states_output (line 518) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 551) | def test_model_outputs_equivalence(self): method test_retain_grad_hidden_states_attentions (line 633) | def test_retain_grad_hidden_states_attentions(self): method test_feed_forward_chunking (line 661) | def test_feed_forward_chunking(self): method test_save_load (line 688) | def test_save_load(self): method test_correct_missing_keys (line 733) | def test_correct_missing_keys(self): method test_problem_types (line 761) | def test_problem_types(self): method test_multi_gpu_data_parallel_forward (line 812) | def test_multi_gpu_data_parallel_forward(self): method test_save_load_fast_init_from_base (line 816) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 820) | def test_save_load_fast_init_to_base(self): method test_resize_tokens_embeddings (line 824) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 828) | def test_resize_embeddings_untied(self): method test_inputs_embeds (line 832) | def test_inputs_embeds(self): method test_load_with_mismatched_shapes (line 836) | def test_load_with_mismatched_shapes(self): method test_model_from_pretrained (line 840) | def test_model_from_pretrained(self): function prepare_img (line 847) | def prepare_img(): function prepare_optical_flow_images (line 853) | def prepare_optical_flow_images(): function normalize (line 861) | def normalize(img): function extract_image_patches (line 865) | def extract_image_patches(x, kernel, stride=1, dilation=1): class PerceiverModelIntegrationTest (line 883) | class PerceiverModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 885) | def test_inference_masked_lm(self): method test_inference_image_classification (line 919) | def test_inference_image_classification(self): method test_inference_image_classification_fourier (line 944) | def test_inference_image_classification_fourier(self): method test_inference_image_classification_conv (line 968) | def test_inference_image_classification_conv(self): method test_inference_optical_flow (line 992) | def test_inference_optical_flow(self): method test_inference_interpolate_pos_encoding (line 1036) | def test_inference_interpolate_pos_encoding(self): FILE: mplsandbox_for_rl/transformers/tests/models/perceiver/test_tokenization_perceiver.py class PerceiverTokenizationTest (line 38) | class PerceiverTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 43) | def setUp(self): method perceiver_tokenizer (line 49) | def perceiver_tokenizer(self): method get_tokenizer (line 52) | def get_tokenizer(self, **kwargs) -> PerceiverTokenizer: method get_clean_sequence (line 55) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_multibytes_char (line 93) | def test_multibytes_char(self): method test_prepare_batch_integration (line 114) | def test_prepare_batch_integration(self): method test_empty_target_text (line 131) | def test_empty_target_text(self): method test_max_length_integration (line 141) | def test_max_length_integration(self): method test_save_and_load_tokenizer (line 153) | def test_save_and_load_tokenizer(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 206) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_decode_invalid_byte_id (line 269) | def test_decode_invalid_byte_id(self): method test_get_vocab (line 274) | def test_get_vocab(self): method test_pretokenized_inputs (line 278) | def test_pretokenized_inputs(self): method test_conversion_reversible (line 283) | def test_conversion_reversible(self): method test_convert_tokens_to_string_format (line 286) | def test_convert_tokens_to_string_format(self): FILE: mplsandbox_for_rl/transformers/tests/models/persimmon/test_modeling_persimmon.py class PersimmonModelTester (line 57) | class PersimmonModelTester: method __init__ (line 58) | def __init__( method prepare_config_and_inputs (line 108) | def prepare_config_and_inputs(self): method get_config (line 131) | def get_config(self): method create_and_check_model (line 148) | def create_and_check_model( method create_and_check_model_as_decoder (line 158) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 188) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 206) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 268) | def prepare_config_and_inputs_for_common(self): class PersimmonModelTest (line 284) | class PersimmonModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeli... method setUp (line 308) | def setUp(self): method test_config (line 313) | def test_config(self): method test_model (line 317) | def test_model(self): method test_model_various_embeddings (line 322) | def test_model_various_embeddings(self): method test_persimmon_sequence_classification_model (line 329) | def test_persimmon_sequence_classification_model(self): method test_persimmon_sequence_classification_model_for_single_label (line 342) | def test_persimmon_sequence_classification_model_for_single_label(self): method test_persimmon_sequence_classification_model_for_multi_label (line 356) | def test_persimmon_sequence_classification_model_for_multi_label(self): method test_persimmon_token_classification_model (line 372) | def test_persimmon_token_classification_model(self): method test_save_load_fast_init_from_base (line 389) | def test_save_load_fast_init_from_base(self): method test_model_rope_scaling_from_config (line 394) | def test_model_rope_scaling_from_config(self, scaling_type): method test_model_rope_scaling (line 425) | def test_model_rope_scaling(self): class PersimmonIntegrationTest (line 486) | class PersimmonIntegrationTest(unittest.TestCase): method test_model_8b_chat_logits (line 490) | def test_model_8b_chat_logits(self): method test_model_8b_chat_greedy_generation (line 518) | def test_model_8b_chat_greedy_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/phi/test_modeling_phi.py class PhiModelTester (line 56) | class PhiModelTester: method __init__ (line 57) | def __init__( method prepare_config_and_inputs (line 107) | def prepare_config_and_inputs(self): method get_config (line 130) | def get_config(self): method create_and_check_model (line 147) | def create_and_check_model( method create_and_check_model_as_decoder (line 157) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 187) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 205) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 267) | def prepare_config_and_inputs_for_common(self): class PhiModelTest (line 283) | class PhiModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTest... method is_pipeline_test_to_skip (line 306) | def is_pipeline_test_to_skip( method setUp (line 312) | def setUp(self): method test_config (line 317) | def test_config(self): method test_model (line 321) | def test_model(self): method test_phi_sequence_classification_model (line 326) | def test_phi_sequence_classification_model(self): method test_phi_sequence_classification_model_for_single_label (line 339) | def test_phi_sequence_classification_model_for_single_label(self): method test_phi_sequence_classification_model_for_multi_label (line 353) | def test_phi_sequence_classification_model_for_multi_label(self): method test_model_rope_scaling_from_config (line 370) | def test_model_rope_scaling_from_config(self, scaling_type): method test_model_rope_scaling (line 401) | def test_model_rope_scaling(self): method test_flash_attn_2_generate_padding_right (line 466) | def test_flash_attn_2_generate_padding_right(self): class PhiIntegrationTest (line 500) | class PhiIntegrationTest(unittest.TestCase): method test_model_phi_1_logits (line 501) | def test_model_phi_1_logits(self): method test_model_phi_1_5_logits (line 517) | def test_model_phi_1_5_logits(self): method test_model_phi_2_logits (line 533) | def test_model_phi_2_logits(self): method test_phi_2_generation (line 549) | def test_phi_2_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/phi3/test_modeling_phi3.py class Phi3MiniWithStaticCache (line 49) | class Phi3MiniWithStaticCache(torch.nn.Module): method __init__ (line 50) | def __init__(self, model: Phi3ForCausalLM, batch_size: int, max_seq_le... method forward (line 61) | def forward( method generate (line 73) | def generate(model: Phi3ForCausalLM, prompt_tokens: torch.LongTensor, ... class Phi3ModelTester (line 97) | class Phi3ModelTester: method __init__ (line 98) | def __init__( method prepare_config_and_inputs (line 149) | def prepare_config_and_inputs(self): method get_config (line 172) | def get_config(self): method create_and_check_model (line 190) | def create_and_check_model( method create_and_check_model_as_decoder (line 201) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 232) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 251) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 314) | def prepare_config_and_inputs_for_common(self): class Phi3ModelTest (line 330) | class Phi3ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method is_pipeline_test_to_skip (line 353) | def is_pipeline_test_to_skip( method setUp (line 359) | def setUp(self): method test_config (line 364) | def test_config(self): method test_model (line 368) | def test_model(self): method test_phi3_sequence_classification_model (line 373) | def test_phi3_sequence_classification_model(self): method test_phi3_sequence_classification_model_for_single_label (line 386) | def test_phi3_sequence_classification_model_for_single_label(self): method test_phi3_sequence_classification_model_for_multi_label (line 400) | def test_phi3_sequence_classification_model_for_multi_label(self): method test_model_rope_scaling_from_config (line 416) | def test_model_rope_scaling_from_config(self, scaling_type): class Phi3IntegrationTest (line 448) | class Phi3IntegrationTest(unittest.TestCase): method test_model_phi3_mini_4k_instruct_logits (line 449) | def test_model_phi3_mini_4k_instruct_logits(self): method test_phi3_mini_4k_instruct_generation (line 465) | def test_phi3_mini_4k_instruct_generation(self): method test_phi3_mini_4k_instruct_with_static_cache (line 487) | def test_phi3_mini_4k_instruct_with_static_cache(self): method test_model_phi3_mini_128k_instruct_logits (line 510) | def test_model_phi3_mini_128k_instruct_logits(self): method test_phi3_mini_128k_instruct_generation (line 526) | def test_phi3_mini_128k_instruct_generation(self): method test_phi3_mini_128k_instruct_with_static_cache (line 548) | def test_phi3_mini_128k_instruct_with_static_cache(self): FILE: mplsandbox_for_rl/transformers/tests/models/phobert/test_tokenization_phobert.py class PhobertTokenizationTest (line 24) | class PhobertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 29) | def setUp(self): method get_tokenizer (line 47) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 51) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 56) | def test_full_tokenizer(self): FILE: mplsandbox_for_rl/transformers/tests/models/pix2struct/test_image_processing_pix2struct.py class Pix2StructImageProcessingTester (line 37) | class Pix2StructImageProcessingTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_image_processor_dict (line 64) | def prepare_image_processor_dict(self): method prepare_dummy_image (line 67) | def prepare_dummy_image(self): method prepare_image_inputs (line 72) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class Pix2StructImageProcessingTest (line 86) | class Pix2StructImageProcessingTest(ImageProcessingTestMixin, unittest.T... method setUp (line 89) | def setUp(self): method image_processor_dict (line 94) | def image_processor_dict(self): method test_image_processor_properties (line 97) | def test_image_processor_properties(self): method test_expected_patches (line 102) | def test_expected_patches(self): method test_call_pil (line 111) | def test_call_pil(self): method test_call_vqa (line 144) | def test_call_vqa(self): method test_call_numpy (line 186) | def test_call_numpy(self): method test_call_numpy_4_channels (line 218) | def test_call_numpy_4_channels(self): method test_call_pytorch (line 252) | def test_call_pytorch(self): class Pix2StructImageProcessingTestFourChannels (line 288) | class Pix2StructImageProcessingTestFourChannels(ImageProcessingTestMixin... method setUp (line 291) | def setUp(self): method image_processor_dict (line 297) | def image_processor_dict(self): method test_image_processor_properties (line 300) | def test_image_processor_properties(self): method test_call_pil (line 305) | def test_call_pil(self): method test_call_numpy (line 339) | def test_call_numpy(self): method test_call_pytorch (line 343) | def test_call_pytorch(self): method test_call_numpy_4_channels (line 349) | def test_call_numpy_4_channels(self): FILE: mplsandbox_for_rl/transformers/tests/models/pix2struct/test_modeling_pix2struct.py class Pix2StructVisionModelTester (line 57) | class Pix2StructVisionModelTester: method __init__ (line 58) | def __init__( method prepare_config_and_inputs (line 99) | def prepare_config_and_inputs(self): method get_config (line 105) | def get_config(self): method create_and_check_model (line 121) | def create_and_check_model(self, config, flattened_patches): method prepare_config_and_inputs_for_common (line 129) | def prepare_config_and_inputs_for_common(self): class Pix2StructVisionModelTest (line 140) | class Pix2StructVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 152) | def setUp(self): method test_config (line 158) | def test_config(self): method test_inputs_embeds (line 162) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 165) | def test_model_get_set_embeddings(self): method test_forward_signature (line 174) | def test_forward_signature(self): method test_model (line 186) | def test_model(self): method test_training (line 191) | def test_training(self): method test_training_gradient_checkpointing (line 195) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 201) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 207) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_retain_grad_hidden_states_attentions (line 211) | def test_retain_grad_hidden_states_attentions(self): method test_save_load_fast_init_from_base (line 215) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 219) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 223) | def test_model_from_pretrained(self): class Pix2StructTextModelTester (line 229) | class Pix2StructTextModelTester: method __init__ (line 230) | def __init__( method prepare_config_and_inputs (line 271) | def prepare_config_and_inputs(self): method get_config (line 289) | def get_config(self): method create_and_check_model (line 305) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 314) | def prepare_config_and_inputs_for_common(self): class Pix2StructTextModelTest (line 322) | class Pix2StructTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 328) | def setUp(self): method test_config (line 332) | def test_config(self): method test_model (line 335) | def test_model(self): method test_training (line 340) | def test_training(self): method test_training_gradient_checkpointing (line 344) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 350) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 356) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 360) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 364) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 368) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 372) | def test_model_from_pretrained(self): class Pix2StructModelTester (line 378) | class Pix2StructModelTester: method __init__ (line 379) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 392) | def prepare_config_and_inputs(self): method get_config (line 400) | def get_config(self, text_config, vision_config): method prepare_config_and_inputs_for_common (line 403) | def prepare_config_and_inputs_for_common(self): class Pix2StructModelTest (line 420) | class Pix2StructModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 430) | def setUp(self): method test_model (line 433) | def test_model(self): method test_hidden_states_output (line 449) | def test_hidden_states_output(self): method test_inputs_embeds (line 453) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 457) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 461) | def test_model_get_set_embeddings(self): method test_forward_signature (line 464) | def test_forward_signature(self): method test_training (line 490) | def test_training(self): method test_training_gradient_checkpointing (line 509) | def test_training_gradient_checkpointing(self): method test_initialization (line 531) | def test_initialization(self): method test_resize_tokens_embeddings (line 555) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 602) | def test_resize_embeddings_untied(self): method test_tied_model_weights_key_ignore (line 650) | def test_tied_model_weights_key_ignore(self): method _create_and_check_torchscript (line 653) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 724) | def test_load_vision_text_config(self): function prepare_img (line 741) | def prepare_img(): class Pix2StructIntegrationTest (line 750) | class Pix2StructIntegrationTest(unittest.TestCase): method test_inference_image_captioning (line 751) | def test_inference_image_captioning(self): method test_batched_inference_image_captioning (line 765) | def test_batched_inference_image_captioning(self): method test_batched_inference_image_captioning_conditioned (line 789) | def test_batched_inference_image_captioning_conditioned(self): method test_vqa_model (line 815) | def test_vqa_model(self): method test_vqa_model_batched (line 834) | def test_vqa_model_batched(self): FILE: mplsandbox_for_rl/transformers/tests/models/pix2struct/test_processor_pix2struct.py class Pix2StructProcessorTest (line 39) | class Pix2StructProcessorTest(unittest.TestCase): method setUp (line 40) | def setUp(self): method get_tokenizer (line 50) | def get_tokenizer(self, **kwargs): method get_image_processor (line 53) | def get_image_processor(self, **kwargs): method tearDown (line 56) | def tearDown(self): method prepare_image_inputs (line 59) | def prepare_image_inputs(self): method test_save_load_pretrained_additional_features (line 70) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 87) | def test_image_processor(self): method test_tokenizer (line 101) | def test_tokenizer(self): method test_processor (line 116) | def test_processor(self): method test_processor_max_patches (line 135) | def test_processor_max_patches(self): method test_tokenizer_decode (line 160) | def test_tokenizer_decode(self): method test_model_input_names (line 173) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/plbart/test_modeling_plbart.py function prepare_plbart_inputs_dict (line 51) | def prepare_plbart_inputs_dict( class PLBartModelTester (line 82) | class PLBartModelTester: method __init__ (line 83) | def __init__( method prepare_config_and_inputs (line 121) | def prepare_config_and_inputs(self): method get_config (line 132) | def get_config(self): method prepare_config_and_inputs_for_common (line 150) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 154) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 189) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class PLBartModelTest (line 223) | class PLBartModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT... method is_pipeline_test_to_skip (line 247) | def is_pipeline_test_to_skip( method setUp (line 257) | def setUp(self): method test_config (line 261) | def test_config(self): method test_save_load_strict (line 264) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 274) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 278) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 283) | def test_inputs_embeds(self): method test_generate_fp16 (line 313) | def test_generate_fp16(self): method test_sample_generate (line 323) | def test_sample_generate(self): method test_load_save_without_tied_weights (line 329) | def test_load_save_without_tied_weights(self): function assert_tensors_close (line 333) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 352) | def _long_tensor(tok_lst): class AbstractSeq2SeqIntegrationTest (line 359) | class AbstractSeq2SeqIntegrationTest(unittest.TestCase): method setUpClass (line 364) | def setUpClass(cls): method model (line 369) | def model(self): class PLBartJavaCsIntegrationTest (line 380) | class PLBartJavaCsIntegrationTest(AbstractSeq2SeqIntegrationTest): method test_java_cs_generate_one (line 392) | def test_java_cs_generate_one(self): method test_java_cs_generate_batch (line 403) | def test_java_cs_generate_batch(self): method test_plbart_java_cs_config (line 410) | def test_plbart_java_cs_config(self): method test_plbart_fast_forward (line 422) | def test_plbart_fast_forward(self): class PLBartBaseIntegrationTest (line 448) | class PLBartBaseIntegrationTest(AbstractSeq2SeqIntegrationTest): method test_base_generate (line 453) | def test_base_generate(self): method test_fill_mask (line 464) | def test_fill_mask(self): class PLBartStandaloneDecoderModelTester (line 476) | class PLBartStandaloneDecoderModelTester: method __init__ (line 477) | def __init__( method prepare_config_and_inputs (line 532) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 561) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 597) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 644) | def prepare_config_and_inputs_for_common(self): class PLBartStandaloneDecoderModelTest (line 652) | class PLBartStandaloneDecoderModelTest(ModelTesterMixin, GenerationTeste... method setUp (line 658) | def setUp(self): method test_config (line 662) | def test_config(self): method test_decoder_model_past (line 665) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 669) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 674) | def test_retain_grad_hidden_states_attentions(self): FILE: mplsandbox_for_rl/transformers/tests/models/plbart/test_tokenization_plbart.py class PLBartTokenizationTest (line 42) | class PLBartTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 48) | def setUp(self): method test_full_base_tokenizer (line 55) | def test_full_base_tokenizer(self): method test_full_multi_tokenizer (line 142) | def test_full_multi_tokenizer(self): class PLBartPythonEnIntegrationTest (line 233) | class PLBartPythonEnIntegrationTest(unittest.TestCase): method setUpClass (line 273) | def setUpClass(cls): method check_language_codes (line 280) | def check_language_codes(self): method test_python_en_tokenizer_batch_encode_plus (line 285) | def test_python_en_tokenizer_batch_encode_plus(self): method test_python_en_tokenizer_decode_ignores_language_codes (line 289) | def test_python_en_tokenizer_decode_ignores_language_codes(self): method test_python_en_tokenizer_truncation (line 297) | def test_python_en_tokenizer_truncation(self): method test_mask_token (line 306) | def test_mask_token(self): method test_special_tokens_unaffacted_by_save_load (line 309) | def test_special_tokens_unaffacted_by_save_load(self): method test_batch_fairseq_parity (line 317) | def test_batch_fairseq_parity(self): method test_python_en_tokenizer_prepare_batch (line 328) | def test_python_en_tokenizer_prepare_batch(self): method test_seq2seq_max_length (line 350) | def test_seq2seq_max_length(self): method test_tokenizer_translation (line 362) | def test_tokenizer_translation(self): FILE: mplsandbox_for_rl/transformers/tests/models/poolformer/test_image_processing_poolformer.py class PoolFormerImageProcessingTester (line 28) | class PoolFormerImageProcessingTester(unittest.TestCase): method __init__ (line 29) | def __init__( method prepare_image_processor_dict (line 60) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 71) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 74) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class PoolFormerImageProcessingTest (line 88) | class PoolFormerImageProcessingTest(ImageProcessingTestMixin, unittest.T... method setUp (line 91) | def setUp(self): method image_processor_dict (line 96) | def image_processor_dict(self): method test_image_processor_properties (line 99) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 108) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/poolformer/test_modeling_poolformer.py class PoolFormerConfigTester (line 40) | class PoolFormerConfigTester(ConfigTester): method create_and_test_config_common_properties (line 41) | def create_and_test_config_common_properties(self): class PoolFormerModelTester (line 47) | class PoolFormerModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 84) | def prepare_config_and_inputs(self): method create_and_check_model (line 104) | def create_and_check_model(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 114) | def prepare_config_and_inputs_for_common(self): class PoolFormerModelTest (line 122) | class PoolFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 136) | def setUp(self): method test_config (line 140) | def test_config(self): method test_model (line 143) | def test_model(self): method test_inputs_embeds (line 148) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 152) | def test_model_get_set_embeddings(self): method test_hidden_states_output (line 155) | def test_hidden_states_output(self): method test_training (line 191) | def test_training(self): method test_model_from_pretrained (line 209) | def test_model_from_pretrained(self): function prepare_img (line 216) | def prepare_img(): class PoolFormerModelIntegrationTest (line 222) | class PoolFormerModelIntegrationTest(unittest.TestCase): method test_inference_image_classification_head (line 224) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/pop2piano/test_feature_extraction_pop2piano.py class Pop2PianoFeatureExtractionTester (line 51) | class Pop2PianoFeatureExtractionTester(unittest.TestCase): method __init__ (line 52) | def __init__( method prepare_feat_extract_dict (line 74) | def prepare_feat_extract_dict(self): class Pop2PianoFeatureExtractionTest (line 91) | class Pop2PianoFeatureExtractionTest(SequenceFeatureExtractionTestMixin,... method setUp (line 94) | def setUp(self): method test_feat_extract_from_and_save_pretrained (line 97) | def test_feat_extract_from_and_save_pretrained(self): method test_feat_extract_to_json_file (line 112) | def test_feat_extract_to_json_file(self): method test_call (line 127) | def test_call(self): method test_integration (line 138) | def test_integration(self): method test_attention_mask (line 153) | def test_attention_mask(self): method test_batch_feature (line 180) | def test_batch_feature(self): method test_batch_feature_np (line 197) | def test_batch_feature_np(self): method test_batch_feature_pt (line 216) | def test_batch_feature_pt(self): method test_batch_feature_tf (line 236) | def test_batch_feature_tf(self): method test_padding_accepts_tensors_pt (line 260) | def test_padding_accepts_tensors_pt(self): method test_padding_accepts_tensors_tf (line 266) | def test_padding_accepts_tensors_tf(self): method test_padding_from_list (line 272) | def test_padding_from_list(self): method test_padding_from_array (line 278) | def test_padding_from_array(self): method test_attention_mask_with_truncation (line 282) | def test_attention_mask_with_truncation(self): method test_truncation_from_array (line 286) | def test_truncation_from_array(self): method test_truncation_from_list (line 290) | def test_truncation_from_list(self): FILE: mplsandbox_for_rl/transformers/tests/models/pop2piano/test_modeling_pop2piano.py class Pop2PianoModelTester (line 50) | class Pop2PianoModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 98) | def prepare_config_and_inputs(self): method get_pipeline_config (line 114) | def get_pipeline_config(self): method get_config (line 132) | def get_config(self): method check_prepare_lm_labels_via_shift_left (line 150) | def check_prepare_lm_labels_via_shift_left( method create_and_check_model (line 189) | def create_and_check_model( method create_and_check_with_lm_head (line 217) | def create_and_check_with_lm_head( method create_and_check_decoder_model_past (line 237) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 274) | def create_and_check_decoder_model_attention_mask_past( method create_and_check_decoder_model_past_large_inputs (line 325) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_generate_with_past_key_values (line 363) | def create_and_check_generate_with_past_key_values( method create_and_check_model_fp16_forward (line 381) | def create_and_check_model_fp16_forward( method create_and_check_encoder_decoder_shared_weights (line 396) | def create_and_check_encoder_decoder_shared_weights( method check_resize_embeddings_pop2piano_v1_1 (line 472) | def check_resize_embeddings_pop2piano_v1_1( method prepare_config_and_inputs_for_common (line 486) | def prepare_config_and_inputs_for_common(self): class Pop2PianoModelTest (line 508) | class Pop2PianoModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeli... method setUp (line 521) | def setUp(self): method test_config (line 525) | def test_config(self): method test_shift_right (line 528) | def test_shift_right(self): method test_model (line 532) | def test_model(self): method test_model_v1_1 (line 536) | def test_model_v1_1(self): method test_config_and_model_silu_gated (line 544) | def test_config_and_model_silu_gated(self): method test_with_lm_head (line 550) | def test_with_lm_head(self): method test_decoder_model_past (line 554) | def test_decoder_model_past(self): method test_decoder_model_past_with_attn_mask (line 558) | def test_decoder_model_past_with_attn_mask(self): method test_decoder_model_past_with_3d_attn_mask (line 562) | def test_decoder_model_past_with_3d_attn_mask(self): method test_decoder_model_past_with_large_inputs (line 590) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_shared_weights (line 594) | def test_encoder_decoder_shared_weights(self): method test_model_fp16_forward (line 599) | def test_model_fp16_forward(self): method test_v1_1_resize_embeddings (line 603) | def test_v1_1_resize_embeddings(self): method test_model_from_pretrained (line 608) | def test_model_from_pretrained(self): method test_export_to_onnx (line 614) | def test_export_to_onnx(self): method test_pass_with_input_features (line 627) | def test_pass_with_input_features(self): method test_pass_with_batched_input_features (line 640) | def test_pass_with_batched_input_features(self): class Pop2PianoModelIntegrationTests (line 672) | class Pop2PianoModelIntegrationTests(unittest.TestCase): method test_mel_conditioner_integration (line 674) | def test_mel_conditioner_integration(self): method test_full_model_integration (line 700) | def test_full_model_integration(self): method test_real_music (line 728) | def test_real_music(self): FILE: mplsandbox_for_rl/transformers/tests/models/pop2piano/test_processor_pop2piano.py class Pop2PianoProcessorTest (line 64) | class Pop2PianoProcessorTest(unittest.TestCase): method setUp (line 65) | def setUp(self): method get_tokenizer (line 74) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 77) | def get_feature_extractor(self, **kwargs): method tearDown (line 80) | def tearDown(self): method test_save_load_pretrained_additional_features (line 83) | def test_save_load_pretrained_additional_features(self): method get_inputs (line 112) | def get_inputs(self): method test_feature_extractor (line 139) | def test_feature_extractor(self): method test_processor_batch_decode (line 158) | def test_processor_batch_decode(self): method test_tokenizer_call (line 201) | def test_tokenizer_call(self): method test_processor (line 218) | def test_processor(self): method test_model_input_names (line 244) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/pop2piano/test_tokenization_pop2piano.py class Pop2PianoTokenizerTest (line 48) | class Pop2PianoTokenizerTest(unittest.TestCase): method setUp (line 49) | def setUp(self): method get_input_notes (line 53) | def get_input_notes(self): method test_call (line 69) | def test_call(self): method test_batch_decode (line 93) | def test_batch_decode(self): method test_batch_decode_outputs (line 138) | def test_batch_decode_outputs(self): method test_get_vocab (line 192) | def test_get_vocab(self): method test_save_and_load_tokenizer (line 204) | def test_save_and_load_tokenizer(self): method test_pickle_tokenizer (line 228) | def test_pickle_tokenizer(self): method test_padding_side_in_kwargs (line 245) | def test_padding_side_in_kwargs(self): method test_truncation_side_in_kwargs (line 259) | def test_truncation_side_in_kwargs(self): method test_right_and_left_padding (line 273) | def test_right_and_left_padding(self): method test_right_and_left_truncation (line 324) | def test_right_and_left_truncation(self): method test_padding_to_multiple_of (line 371) | def test_padding_to_multiple_of(self): method test_padding_with_attention_mask (line 401) | def test_padding_with_attention_mask(self): FILE: mplsandbox_for_rl/transformers/tests/models/prophetnet/test_modeling_prophetnet.py class ProphetNetModelTester (line 43) | class ProphetNetModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 111) | def prepare_config_and_inputs(self): method get_config (line 136) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 158) | def prepare_config_and_inputs_for_decoder(self): method check_prepare_lm_labels_via_shift_left (line 180) | def check_prepare_lm_labels_via_shift_left( method create_and_check_model (line 219) | def create_and_check_model( method create_and_check_with_lm_head (line 249) | def create_and_check_with_lm_head( method create_and_check_causal_lm_decoder (line 269) | def create_and_check_causal_lm_decoder( method create_and_check_generate_with_past_key_value_states (line 288) | def create_and_check_generate_with_past_key_value_states( method create_and_check_decoder_generate_with_past_key_value_states (line 306) | def create_and_check_decoder_generate_with_past_key_value_states( method create_and_check_model_fp16_forward (line 324) | def create_and_check_model_fp16_forward( method create_and_check_encoder_decoder_shared_weights (line 337) | def create_and_check_encoder_decoder_shared_weights( method check_fast_integration (line 417) | def check_fast_integration( method check_model_with_attn_mask (line 447) | def check_model_with_attn_mask(self, config, input_ids, decoder_input_... method check_causal_lm_from_pretrained (line 490) | def check_causal_lm_from_pretrained( method prepare_config_and_inputs_for_common (line 515) | def prepare_config_and_inputs_for_common(self): class ProphetNetStandaloneDecoderModelTester (line 536) | class ProphetNetStandaloneDecoderModelTester: method __init__ (line 537) | def __init__( method prepare_config_and_inputs (line 609) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 650) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_decoder_model_past (line 670) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 706) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 751) | def prepare_config_and_inputs_for_common(self): class ProphetNetStandaloneEncoderModelTester (line 767) | class ProphetNetStandaloneEncoderModelTester: method __init__ (line 768) | def __init__( method prepare_config_and_inputs (line 838) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 873) | def prepare_config_and_inputs_for_common(self): class ProphetNetModelTest (line 889) | class ProphetNetModelTest(ModelTesterMixin, GenerationTesterMixin, Pipel... method is_pipeline_test_to_skip (line 908) | def is_pipeline_test_to_skip( method setUp (line 919) | def setUp(self): method test_config (line 923) | def test_config(self): method test_model (line 926) | def test_model(self): method test_lm_model (line 930) | def test_lm_model(self): method test_only_decoder_causal_model (line 934) | def test_only_decoder_causal_model(self): method test_fast_integration (line 938) | def test_fast_integration(self): method test_shared_weights (line 942) | def test_shared_weights(self): method test_shift_labels_via_shift_left (line 946) | def test_shift_labels_via_shift_left(self): method test_decoder_model_generate (line 951) | def test_decoder_model_generate(self): method test_encoder_decoder_model_generate (line 955) | def test_encoder_decoder_model_generate(self): method test_attn_mask_model (line 959) | def test_attn_mask_model(self): method test_config_save (line 963) | def test_config_save(self): method test_causal_lm_from_pretrained (line 972) | def test_causal_lm_from_pretrained(self): method test_fp16_forward (line 977) | def test_fp16_forward(self): method test_attention_outputs (line 982) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 1089) | def test_retain_grad_hidden_states_attentions(self): method test_generate_with_head_masking (line 1116) | def test_generate_with_head_masking(self): class ProphetNetStandaloneDecoderModelTest (line 1121) | class ProphetNetStandaloneDecoderModelTest(ModelTesterMixin, GenerationT... method setUp (line 1129) | def setUp(self): method test_config (line 1133) | def test_config(self): method test_decoder_model_past (line 1136) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 1140) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 1145) | def test_retain_grad_hidden_states_attentions(self): class ProphetNetStandaloneEncoderModelTest (line 1150) | class ProphetNetStandaloneEncoderModelTest(ModelTesterMixin, unittest.Te... method setUp (line 1157) | def setUp(self): method test_config (line 1161) | def test_config(self): class ProphetNetModelIntegrationTest (line 1166) | class ProphetNetModelIntegrationTest(unittest.TestCase): method test_pretrained_checkpoint_hidden_states (line 1168) | def test_pretrained_checkpoint_hidden_states(self): method test_cnndm_inference (line 1245) | def test_cnndm_inference(self): method test_question_gen_inference (line 1300) | def test_question_gen_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/prophetnet/test_tokenization_prophetnet.py class ProphetNetTokenizationTest (line 34) | class ProphetNetTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 39) | def setUp(self): method get_input_output_texts (line 63) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 68) | def test_full_tokenizer(self): method test_chinese (line 75) | def test_chinese(self): method test_basic_tokenizer_lower (line 80) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 88) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 96) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 104) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 112) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 119) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 126) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 133) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_wordpiece_tokenizer (line 140) | def test_wordpiece_tokenizer(self): method test_prepare_batch (line 155) | def test_prepare_batch(self): method test_is_whitespace (line 168) | def test_is_whitespace(self): method test_is_control (line 178) | def test_is_control(self): method test_is_punctuation (line 186) | def test_is_punctuation(self): method test_sequence_builders (line 196) | def test_sequence_builders(self): FILE: mplsandbox_for_rl/transformers/tests/models/pvt/test_image_processing_pvt.py class PvtImageProcessingTester (line 29) | class PvtImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 58) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 67) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 70) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class PvtImageProcessingTest (line 84) | class PvtImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 87) | def setUp(self): method image_processor_dict (line 92) | def image_processor_dict(self): method test_image_processor_properties (line 95) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 103) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/pvt/test_modeling_pvt.py class PvtConfigTester (line 45) | class PvtConfigTester(ConfigTester): method run_common_tests (line 46) | def run_common_tests(self): class PvtModelTester (line 52) | class PvtModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 103) | def get_config(self): method create_and_check_model (line 117) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 124) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 142) | def prepare_config_and_inputs_for_common(self): function prepare_img (line 150) | def prepare_img(): class PvtModelTest (line 156) | class PvtModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 170) | def setUp(self): method test_config (line 174) | def test_config(self): method test_model (line 177) | def test_model(self): method test_inputs_embeds (line 182) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 186) | def test_model_get_set_embeddings(self): method test_initialization (line 189) | def test_initialization(self): method test_hidden_states_output (line 200) | def test_hidden_states_output(self): method test_training (line 236) | def test_training(self): method test_model_from_pretrained (line 254) | def test_model_from_pretrained(self): class PvtModelIntegrationTest (line 261) | class PvtModelIntegrationTest(unittest.TestCase): method test_inference_image_classification (line 263) | def test_inference_image_classification(self): method test_inference_model (line 283) | def test_inference_model(self): method test_inference_fp16 (line 309) | def test_inference_fp16(self): FILE: mplsandbox_for_rl/transformers/tests/models/pvt_v2/test_modeling_pvt_v2.py class PvtV2ConfigTester (line 48) | class PvtV2ConfigTester(ConfigTester): method run_common_tests (line 49) | def run_common_tests(self): class PvtV2ModelTester (line 55) | class PvtV2ModelTester(ModelTesterMixin): method __init__ (line 56) | def __init__( method prepare_config_and_inputs (line 98) | def prepare_config_and_inputs(self): method get_config (line 108) | def get_config(self): method create_and_check_model (line 124) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_backbone (line 131) | def create_and_check_backbone(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 160) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 178) | def prepare_config_and_inputs_for_common(self): function prepare_img (line 186) | def prepare_img(): class PvtV2ModelTest (line 192) | class PvtV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 206) | def setUp(self): method test_config (line 210) | def test_config(self): method test_model (line 213) | def test_model(self): method test_inputs_embeds (line 218) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 222) | def test_model_get_set_embeddings(self): method test_training_gradient_checkpointing (line 226) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 231) | def test_training_gradient_checkpointing_use_reentrant(self): method test_initialization (line 236) | def test_initialization(self): method test_hidden_states_output (line 247) | def test_hidden_states_output(self): method test_training (line 283) | def test_training(self): method test_forward_signature (line 300) | def test_forward_signature(self): method test_model_from_pretrained (line 313) | def test_model_from_pretrained(self): class PvtV2ModelIntegrationTest (line 320) | class PvtV2ModelIntegrationTest(unittest.TestCase): method test_inference_image_classification (line 322) | def test_inference_image_classification(self): method test_inference_model (line 342) | def test_inference_model(self): method test_inference_fp16 (line 368) | def test_inference_fp16(self): class PvtV2BackboneTest (line 386) | class PvtV2BackboneTest(BackboneTesterMixin, unittest.TestCase): method test_config (line 391) | def test_config(self): method test_config_save_pretrained (line 427) | def test_config_save_pretrained(self): method setUp (line 441) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/qwen2/test_modeling_qwen2.py class Qwen2ModelTester (line 52) | class Qwen2ModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 114) | def prepare_config_and_inputs(self): method get_config (line 137) | def get_config(self): method create_and_check_model (line 160) | def create_and_check_model( method create_and_check_model_as_decoder (line 171) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 202) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 221) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 284) | def prepare_config_and_inputs_for_common(self): class Qwen2ModelTest (line 301) | class Qwen2ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe... method is_pipeline_test_to_skip (line 324) | def is_pipeline_test_to_skip( method test_eager_matches_sdpa_generate (line 334) | def test_eager_matches_sdpa_generate(self): method setUp (line 337) | def setUp(self): method test_config (line 341) | def test_config(self): method test_model (line 344) | def test_model(self): method test_model_various_embeddings (line 348) | def test_model_various_embeddings(self): method test_Qwen2_sequence_classification_model (line 354) | def test_Qwen2_sequence_classification_model(self): method test_Qwen2_sequence_classification_model_for_single_label (line 367) | def test_Qwen2_sequence_classification_model_for_single_label(self): method test_Qwen2_sequence_classification_model_for_multi_label (line 380) | def test_Qwen2_sequence_classification_model_for_multi_label(self): method test_Qwen2_token_classification_model (line 396) | def test_Qwen2_token_classification_model(self): method test_save_load_fast_init_from_base (line 412) | def test_save_load_fast_init_from_base(self): method test_past_key_values_format (line 416) | def test_past_key_values_format(self): method test_flash_attn_2_generate_padding_right (line 423) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 457) | def test_flash_attn_2_generate_use_cache(self): method test_flash_attn_2_inference_equivalence_right_padding (line 502) | def test_flash_attn_2_inference_equivalence_right_padding(self): class Qwen2IntegrationTest (line 507) | class Qwen2IntegrationTest(unittest.TestCase): method test_model_450m_logits (line 509) | def test_model_450m_logits(self): method test_model_450m_generation (line 528) | def test_model_450m_generation(self): method test_model_450m_long_prompt (line 548) | def test_model_450m_long_prompt(self): method test_model_450m_long_prompt_sdpa (line 576) | def test_model_450m_long_prompt_sdpa(self): method test_speculative_generation (line 613) | def test_speculative_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/qwen2/test_tokenization_qwen2.py class Qwen2TokenizationTest (line 29) | class Qwen2TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 39) | def setUp(self): method get_tokenizer (line 93) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 97) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 101) | def get_input_output_texts(self, tokenizer): method test_python_full_tokenizer (line 109) | def test_python_full_tokenizer(self): method test_pretokenized_inputs (line 140) | def test_pretokenized_inputs(self): method test_clean_up_tokenization_spaces (line 147) | def test_clean_up_tokenization_spaces(self): method test_nfc_normalization (line 151) | def test_nfc_normalization(self): method test_slow_tokenizer_token_with_number_sign (line 170) | def test_slow_tokenizer_token_with_number_sign(self): method test_slow_tokenizer_decode_spaces_between_special_tokens_default (line 180) | def test_slow_tokenizer_decode_spaces_between_special_tokens_default(s... method test_tokenizer_integration (line 206) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/qwen2_audio/test_modeling_qwen2_audio.py class Qwen2AudioModelTester (line 46) | class Qwen2AudioModelTester: method __init__ (line 47) | def __init__( method get_config (line 96) | def get_config(self): method prepare_config_and_inputs (line 104) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 116) | def prepare_config_and_inputs_for_common(self): method create_and_check_qwen2audio_model_fp16_forward (line 132) | def create_and_check_qwen2audio_model_fp16_forward(self, config, input... class Qwen2AudioForConditionalGenerationModelTest (line 147) | class Qwen2AudioForConditionalGenerationModelTest(ModelTesterMixin, unit... method setUp (line 156) | def setUp(self): method test_sdpa_can_compile_dynamic (line 161) | def test_sdpa_can_compile_dynamic(self): method test_sdpa_can_dispatch_on_flash (line 165) | def test_sdpa_can_dispatch_on_flash(self): class Qwen2AudioForConditionalGenerationIntegrationTest (line 170) | class Qwen2AudioForConditionalGenerationIntegrationTest(unittest.TestCase): method setUp (line 171) | def setUp(self): method tearDown (line 174) | def tearDown(self): method test_small_model_integration_test_single (line 179) | def test_small_model_integration_test_single(self): method test_small_model_integration_test_batch (line 251) | def test_small_model_integration_test_batch(self): method test_small_model_integration_test_multiturn (line 326) | def test_small_model_integration_test_multiturn(self): FILE: mplsandbox_for_rl/transformers/tests/models/qwen2_audio/test_processor_qwen2_audio.py class Qwen2AudioProcessorTest (line 23) | class Qwen2AudioProcessorTest(unittest.TestCase): method setUp (line 24) | def setUp(self): method test_can_load_various_tokenizers (line 28) | def test_can_load_various_tokenizers(self): method test_save_load_pretrained_default (line 33) | def test_save_load_pretrained_default(self): method test_tokenizer_integration (line 47) | def test_tokenizer_integration(self): method test_chat_template (line 84) | def test_chat_template(self): FILE: mplsandbox_for_rl/transformers/tests/models/qwen2_moe/test_modeling_qwen2_moe.py class Qwen2MoeModelTester (line 52) | class Qwen2MoeModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 132) | def prepare_config_and_inputs(self): method get_config (line 155) | def get_config(self): method create_and_check_model (line 187) | def create_and_check_model( method create_and_check_model_as_decoder (line 198) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 229) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 248) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 311) | def prepare_config_and_inputs_for_common(self): class Qwen2MoeModelTest (line 328) | class Qwen2MoeModelTest(ModelTesterMixin, GenerationTesterMixin, Pipelin... method is_pipeline_test_to_skip (line 351) | def is_pipeline_test_to_skip( method test_eager_matches_sdpa_generate (line 359) | def test_eager_matches_sdpa_generate(self): method setUp (line 362) | def setUp(self): method test_config (line 366) | def test_config(self): method test_model (line 369) | def test_model(self): method test_model_various_embeddings (line 373) | def test_model_various_embeddings(self): method test_Qwen2Moe_sequence_classification_model (line 379) | def test_Qwen2Moe_sequence_classification_model(self): method test_Qwen2Moe_sequence_classification_model_for_single_label (line 392) | def test_Qwen2Moe_sequence_classification_model_for_single_label(self): method test_Qwen2Moe_sequence_classification_model_for_multi_label (line 405) | def test_Qwen2Moe_sequence_classification_model_for_multi_label(self): method test_Qwen2Moe_token_classification_model (line 421) | def test_Qwen2Moe_token_classification_model(self): method test_save_load_fast_init_from_base (line 437) | def test_save_load_fast_init_from_base(self): method test_past_key_values_format (line 441) | def test_past_key_values_format(self): method test_flash_attn_2_generate_padding_right (line 448) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 482) | def test_flash_attn_2_generate_use_cache(self): method test_flash_attn_2_inference_equivalence_right_padding (line 527) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_load_balancing_loss (line 531) | def test_load_balancing_loss(self): class Qwen2MoeIntegrationTest (line 569) | class Qwen2MoeIntegrationTest(unittest.TestCase): method test_model_a2_7b_logits (line 571) | def test_model_a2_7b_logits(self): method test_model_a2_7b_generation (line 590) | def test_model_a2_7b_generation(self): method test_model_a2_7b_long_prompt (line 610) | def test_model_a2_7b_long_prompt(self): method test_model_a2_7b_long_prompt_sdpa (line 638) | def test_model_a2_7b_long_prompt_sdpa(self): method test_speculative_generation (line 675) | def test_speculative_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/rag/test_modeling_rag.py function _assert_tensors_equal (line 70) | def _assert_tensors_equal(a, b, atol=1e-12, prefix=""): function require_retrieval (line 85) | def require_retrieval(test_case): class RagTestMixin (line 101) | class RagTestMixin: method setUp (line 112) | def setUp(self): method dpr_tokenizer (line 180) | def dpr_tokenizer(self) -> DPRQuestionEncoderTokenizer: method dpr_ctx_encoder_tokenizer (line 184) | def dpr_ctx_encoder_tokenizer(self) -> DPRContextEncoderTokenizer: method bart_tokenizer (line 188) | def bart_tokenizer(self) -> BartTokenizer: method t5_tokenizer (line 192) | def t5_tokenizer(self) -> BartTokenizer: method tearDown (line 195) | def tearDown(self): method get_retriever (line 202) | def get_retriever(self, config): method check_model_with_retriever (line 226) | def check_model_with_retriever( method check_model_with_end2end_retriever (line 258) | def check_model_with_end2end_retriever( method check_model_generate_from_context_input_ids (line 298) | def check_model_generate_from_context_input_ids( method check_model_generate (line 345) | def check_model_generate( method check_model_without_retriever (line 366) | def check_model_without_retriever( method check_model_custom_n_docs (line 425) | def check_model_custom_n_docs( method check_model_with_mismatch_n_docs_value (line 486) | def check_model_with_mismatch_n_docs_value( method check_model_with_encoder_outputs (line 544) | def check_model_with_encoder_outputs( method test_model_with_retriever (line 586) | def test_model_with_retriever(self): method test_model_with_end2end_retriever (line 590) | def test_model_with_end2end_retriever(self): method test_model_without_retriever (line 594) | def test_model_without_retriever(self): method test_model_with_encoder_outputs (line 598) | def test_model_with_encoder_outputs(self): method test_model_generate (line 602) | def test_model_generate(self): method test_model_with_custom_n_docs (line 606) | def test_model_with_custom_n_docs(self): method test_model_with_mismatch_n_docs_value (line 611) | def test_model_with_mismatch_n_docs_value(self): class RagDPRBartTest (line 620) | class RagDPRBartTest(RagTestMixin, unittest.TestCase): method config_and_inputs (line 622) | def config_and_inputs(self): class RagDPRT5Test (line 651) | class RagDPRT5Test(RagTestMixin, unittest.TestCase): method config_and_inputs (line 653) | def config_and_inputs(self): class RagModelIntegrationTests (line 683) | class RagModelIntegrationTests(unittest.TestCase): method tearDown (line 684) | def tearDown(self): method sequence_model (line 691) | def sequence_model(self): method token_model (line 701) | def token_model(self): method get_rag_config (line 710) | def get_rag_config(self): method test_rag_sequence_inference (line 737) | def test_rag_sequence_inference(self): method test_rag_token_inference (line 776) | def test_rag_token_inference(self): method test_rag_token_generate_beam (line 815) | def test_rag_token_generate_beam(self): method test_rag_sequence_generate_beam (line 854) | def test_rag_sequence_generate_beam(self): method test_data_questions (line 893) | def test_data_questions(self): method test_rag_sequence_generate_batch (line 906) | def test_rag_sequence_generate_batch(self): method test_rag_sequence_generate_batch_from_context_input_ids (line 945) | def test_rag_sequence_generate_batch_from_context_input_ids(self): method test_rag_token_generate_batch (line 998) | def test_rag_token_generate_batch(self): class RagModelSaveLoadTests (line 1042) | class RagModelSaveLoadTests(unittest.TestCase): method tearDown (line 1043) | def tearDown(self): method get_rag_config (line 1049) | def get_rag_config(self): method test_rag_sequence_from_pretrained (line 1076) | def test_rag_sequence_from_pretrained(self): method test_rag_token_from_pretrained (line 1135) | def test_rag_token_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/rag/test_modeling_tf_rag.py function require_retrieval (line 45) | def require_retrieval(test_case): class TFRagTestMixin (line 61) | class TFRagTestMixin: method setUp (line 77) | def setUp(self): method dpr_tokenizer (line 141) | def dpr_tokenizer(self) -> DPRQuestionEncoderTokenizer: method bart_tokenizer (line 145) | def bart_tokenizer(self) -> BartTokenizer: method tearDown (line 148) | def tearDown(self): method get_retriever (line 151) | def get_retriever(self, config): method check_model_with_retriever (line 175) | def check_model_with_retriever( method check_model_generate_from_context_input_ids (line 206) | def check_model_generate_from_context_input_ids( method check_model_generate (line 248) | def check_model_generate( method check_model_without_retriever (line 270) | def check_model_without_retriever( method check_model_custom_n_docs (line 328) | def check_model_custom_n_docs( method check_model_with_mismatch_n_docs_value (line 387) | def check_model_with_mismatch_n_docs_value( method check_model_with_encoder_outputs (line 443) | def check_model_with_encoder_outputs( method test_model_with_retriever (line 485) | def test_model_with_retriever(self): method test_model_without_retriever (line 489) | def test_model_without_retriever(self): method test_model_generate_from_context_input_ids (line 494) | def test_model_generate_from_context_input_ids(self): method test_model_with_encoder_outputs (line 498) | def test_model_with_encoder_outputs(self): method test_model_generate (line 503) | def test_model_generate(self): method test_model_with_custom_n_docs (line 507) | def test_model_with_custom_n_docs(self): method test_model_with_mismatch_n_docs_value (line 512) | def test_model_with_mismatch_n_docs_value(self): class TFRagDPRBartTest (line 521) | class TFRagDPRBartTest(TFRagTestMixin, unittest.TestCase): method config_and_inputs (line 523) | def config_and_inputs(self): class TFRagModelIntegrationTests (line 554) | class TFRagModelIntegrationTests(unittest.TestCase): method token_model (line 556) | def token_model(self): method sequence_model (line 562) | def sequence_model(self): method token_model_nq_checkpoint (line 567) | def token_model_nq_checkpoint(self, retriever): method get_rag_config (line 570) | def get_rag_config(self): method test_rag_sequence_inference (line 597) | def test_rag_sequence_inference(self): method test_rag_token_inference (line 632) | def test_rag_token_inference(self): method test_rag_token_inference_nq_checkpoint (line 667) | def test_rag_token_inference_nq_checkpoint(self): method test_rag_token_inference_save_pretrained (line 706) | def test_rag_token_inference_save_pretrained(self): method test_init_and_from_pretrained (line 752) | def test_init_and_from_pretrained(self): method test_data_questions (line 783) | def test_data_questions(self): method test_rag_token_greedy_search (line 796) | def test_rag_token_greedy_search(self): method test_rag_token_generate_batch (line 831) | def test_rag_token_generate_batch(self): method test_rag_sequence_generate_batch (line 876) | def test_rag_sequence_generate_batch(self): method test_rag_sequence_generate_batch_from_context_input_ids (line 916) | def test_rag_sequence_generate_batch_from_context_input_ids(self): class TFRagModelSaveLoadTests (line 963) | class TFRagModelSaveLoadTests(unittest.TestCase): method get_rag_config (line 964) | def get_rag_config(self): method test_rag_sequence_from_pretrained (line 991) | def test_rag_sequence_from_pretrained(self): method test_rag_token_from_pretrained (line 1043) | def test_rag_token_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/rag/test_retrieval_rag.py class RagRetrieverTest (line 42) | class RagRetrieverTest(TestCase): method setUp (line 43) | def setUp(self): method get_dpr_tokenizer (line 107) | def get_dpr_tokenizer(self) -> DPRQuestionEncoderTokenizer: method get_dpr_ctx_encoder_tokenizer (line 110) | def get_dpr_ctx_encoder_tokenizer(self) -> DPRContextEncoderTokenizer: method get_bart_tokenizer (line 113) | def get_bart_tokenizer(self) -> BartTokenizer: method tearDown (line 116) | def tearDown(self): method get_dummy_dataset (line 119) | def get_dummy_dataset(self): method get_dummy_canonical_hf_index_retriever (line 131) | def get_dummy_canonical_hf_index_retriever(self): method get_dummy_custom_hf_index_retriever (line 147) | def get_dummy_custom_hf_index_retriever(self, from_disk: bool): method test_canonical_hf_index_retriever_retrieve (line 176) | def test_canonical_hf_index_retriever_retrieve(self): method test_canonical_hf_index_retriever_save_and_from_pretrained (line 191) | def test_canonical_hf_index_retriever_save_and_from_pretrained(self): method test_custom_hf_index_retriever_retrieve (line 205) | def test_custom_hf_index_retriever_retrieve(self): method test_custom_hf_index_retriever_save_and_from_pretrained (line 220) | def test_custom_hf_index_retriever_save_and_from_pretrained(self): method test_custom_hf_index_retriever_retrieve_from_disk (line 232) | def test_custom_hf_index_retriever_retrieve_from_disk(self): method test_custom_hf_index_retriever_save_and_from_pretrained_from_disk (line 247) | def test_custom_hf_index_retriever_save_and_from_pretrained_from_disk(... method test_hf_index_retriever_call (line 262) | def test_hf_index_retriever_call(self): method test_custom_hf_index_end2end_retriever_call (line 303) | def test_custom_hf_index_end2end_retriever_call(self): FILE: mplsandbox_for_rl/transformers/tests/models/rag/test_tokenization_rag.py class RagTokenizerTest (line 37) | class RagTokenizerTest(TestCase): method setUp (line 38) | def setUp(self): method get_dpr_tokenizer (line 102) | def get_dpr_tokenizer(self) -> DPRQuestionEncoderTokenizer: method get_bart_tokenizer (line 105) | def get_bart_tokenizer(self) -> BartTokenizer: method tearDown (line 108) | def tearDown(self): method test_save_load_pretrained_with_saved_config (line 112) | def test_save_load_pretrained_with_saved_config(self): method test_pretrained_token_nq_tokenizer (line 125) | def test_pretrained_token_nq_tokenizer(self): method test_pretrained_sequence_nq_tokenizer (line 148) | def test_pretrained_sequence_nq_tokenizer(self): FILE: mplsandbox_for_rl/transformers/tests/models/recurrent_gemma/test_modeling_recurrent_gemma.py class RecurrentGemmaModelTester (line 41) | class RecurrentGemmaModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs(self): method get_config (line 124) | def get_config(self): method create_and_check_model (line 144) | def create_and_check_model( method create_and_check_model_as_decoder (line 155) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 186) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 205) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 268) | def prepare_config_and_inputs_for_common(self): class RecurrentGemmaModelTest (line 284) | class RecurrentGemmaModelTest(ModelTesterMixin, GenerationTesterMixin, P... method is_pipeline_test_to_skip (line 307) | def is_pipeline_test_to_skip( method setUp (line 312) | def setUp(self): method test_config (line 318) | def test_config(self): method test_model (line 321) | def test_model(self): method test_model_various_embeddings (line 325) | def test_model_various_embeddings(self): method test_save_load_fast_init_from_base (line 332) | def test_save_load_fast_init_from_base(self): method test_past_key_values_format (line 336) | def test_past_key_values_format(self): method test_eager_matches_sdpa_generate (line 340) | def test_eager_matches_sdpa_generate(self): method test_eager_matches_sdpa_inference (line 344) | def test_eager_matches_sdpa_inference(self): method test_contrastive_generate_low_memory (line 348) | def test_contrastive_generate_low_memory(self): method test_contrastive_generate_dict_outputs_use_cache (line 352) | def test_contrastive_generate_dict_outputs_use_cache(self): method test_contrastive_generate (line 356) | def test_contrastive_generate(self): method test_training_gradient_checkpointing_use_reentrant_false (line 360) | def test_training_gradient_checkpointing_use_reentrant_false(self): method _check_attentions_for_generate (line 363) | def _check_attentions_for_generate(self, *args, **kwargs): method test_prompt_lookup_decoding_matches_greedy_search (line 367) | def test_prompt_lookup_decoding_matches_greedy_search(self): method test_model_parallelism (line 371) | def test_model_parallelism(self): method test_model_parallel_beam_search (line 375) | def test_model_parallel_beam_search(self): method _check_past_key_values_for_generate (line 378) | def _check_past_key_values_for_generate(self, *args, **kwargs): method test_assisted_decoding_matches_greedy_search (line 382) | def test_assisted_decoding_matches_greedy_search(self): method test_left_padding_compatibility (line 386) | def test_left_padding_compatibility(self): method test_assisted_decoding_sample (line 390) | def test_assisted_decoding_sample(self): method _check_hidden_states_for_generate (line 393) | def _check_hidden_states_for_generate( method test_initialization (line 413) | def test_initialization(self): method test_inputs_embeds_matches_input_ids_with_generate (line 417) | def test_inputs_embeds_matches_input_ids_with_generate(self): class RecurrentGemmaIntegrationTest (line 423) | class RecurrentGemmaIntegrationTest(unittest.TestCase): method test_2b_generate (line 428) | def test_2b_generate(self): method test_2b_sample (line 461) | def test_2b_sample(self): method test_model_2b_8bit (line 475) | def test_model_2b_8bit(self): method test_long_context (line 491) | def test_long_context(self): FILE: mplsandbox_for_rl/transformers/tests/models/reformer/test_modeling_reformer.py class ReformerModelTester (line 50) | class ReformerModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 141) | def prepare_config_and_inputs(self): method get_config (line 161) | def get_config(self): method get_pipeline_config (line 190) | def get_pipeline_config(self): method create_and_check_reformer_model (line 198) | def create_and_check_reformer_model(self, config, input_ids, input_mas... method create_and_check_reformer_model_with_lm_backward (line 210) | def create_and_check_reformer_model_with_lm_backward(self, config, inp... method create_and_check_reformer_with_lm (line 219) | def create_and_check_reformer_with_lm(self, config, input_ids, input_m... method create_and_check_reformer_with_mlm (line 228) | def create_and_check_reformer_with_mlm(self, config, input_ids, input_... method create_and_check_reformer_model_with_attn_mask (line 236) | def create_and_check_reformer_model_with_attn_mask( method create_and_check_reformer_layer_dropout_seed (line 284) | def create_and_check_reformer_layer_dropout_seed( method create_and_check_reformer_feed_backward_chunking (line 327) | def create_and_check_reformer_feed_backward_chunking(self, config, inp... method create_and_check_reformer_random_seed (line 368) | def create_and_check_reformer_random_seed(self, config, input_ids, inp... method create_and_check_reformer_model_fp16_forward (line 399) | def create_and_check_reformer_model_fp16_forward(self, config, input_i... method create_and_check_reformer_model_generate (line 407) | def create_and_check_reformer_model_generate(self, config, input_ids, ... method create_and_check_reformer_model_fp16_generate (line 420) | def create_and_check_reformer_model_fp16_generate(self, config, input_... method create_and_check_reformer_no_chunking (line 431) | def create_and_check_reformer_no_chunking(self, config, input_ids, inp... method create_and_check_reformer_for_question_answering (line 443) | def create_and_check_reformer_for_question_answering(self, config, inp... method create_and_check_past_buckets_states (line 456) | def create_and_check_past_buckets_states(self, config, input_ids, inpu... method prepare_config_and_inputs_for_common (line 483) | def prepare_config_and_inputs_for_common(self): method create_and_check_reformer_for_sequence_classification (line 489) | def create_and_check_reformer_for_sequence_classification( class ReformerTesterMixin (line 501) | class ReformerTesterMixin: method test_config (line 506) | def test_config(self): method test_reformer_model (line 509) | def test_reformer_model(self): method test_reformer_lm_model_backward (line 513) | def test_reformer_lm_model_backward(self): method test_reformer_model_attn_masking (line 519) | def test_reformer_model_attn_masking(self): method test_reformer_with_lm (line 524) | def test_reformer_with_lm(self): method test_reformer_with_mlm (line 528) | def test_reformer_with_mlm(self): method test_reformer_layer_training_dropout (line 532) | def test_reformer_layer_training_dropout(self): method test_reformer_chunking_backward_equality (line 537) | def test_reformer_chunking_backward_equality(self): method test_reformer_no_chunking (line 543) | def test_reformer_no_chunking(self): method test_reformer_qa_answering (line 547) | def test_reformer_qa_answering(self): method test_reformer_cached_inference (line 551) | def test_reformer_cached_inference(self): method test_reformer_cached_generate (line 555) | def test_reformer_cached_generate(self): method test_dropout_random_seed_is_changing (line 560) | def test_dropout_random_seed_is_changing(self): method test_reformer_model_fp16_forward (line 565) | def test_reformer_model_fp16_forward(self): method test_reformer_model_fp16_generate (line 570) | def test_reformer_model_fp16_generate(self): method test_multi_gpu_data_parallel_forward (line 581) | def test_multi_gpu_data_parallel_forward(self): method test_for_sequence_classification (line 584) | def test_for_sequence_classification(self): method test_retain_grad_hidden_states_attentions (line 589) | def test_retain_grad_hidden_states_attentions(self): method test_resize_embeddings_untied (line 593) | def test_resize_embeddings_untied(self): class ReformerLocalAttnModelTest (line 598) | class ReformerLocalAttnModelTest(ReformerTesterMixin, GenerationTesterMi... method setUp (line 610) | def setUp(self): method test_model_from_pretrained (line 615) | def test_model_from_pretrained(self): method _check_attentions_for_generate (line 620) | def _check_attentions_for_generate( method _check_hidden_states_for_generate (line 657) | def _check_hidden_states_for_generate( method test_left_padding_compatibility (line 684) | def test_left_padding_compatibility(self): method _get_input_ids_and_config (line 687) | def _get_input_ids_and_config(self, batch_size=2): class ReformerLSHAttnModelTest (line 701) | class ReformerLSHAttnModelTest( method is_pipeline_test_to_skip (line 727) | def is_pipeline_test_to_skip( method setUp (line 742) | def setUp(self): method _check_attentions_for_generate (line 784) | def _check_attentions_for_generate( method _check_hidden_states_for_generate (line 822) | def _check_hidden_states_for_generate( method test_problem_types (line 849) | def test_problem_types(self): method test_past_key_values_format (line 853) | def test_past_key_values_format(self): method test_left_padding_compatibility (line 857) | def test_left_padding_compatibility(self): class ReformerIntegrationTests (line 864) | class ReformerIntegrationTests(unittest.TestCase): method _get_basic_config_and_input (line 869) | def _get_basic_config_and_input(self): method _get_hidden_states (line 903) | def _get_hidden_states(self): method _get_attn_mask (line 985) | def _get_attn_mask(self): method _get_input_ids_and_mask (line 988) | def _get_input_ids_and_mask(self): method test_lsh_layer_forward (line 1075) | def test_lsh_layer_forward(self): method test_lsh_layer_forward_complex (line 1093) | def test_lsh_layer_forward_complex(self): method test_local_layer_forward (line 1116) | def test_local_layer_forward(self): method test_local_layer_forward_complex (line 1134) | def test_local_layer_forward_complex(self): method test_lsh_model_forward (line 1156) | def test_lsh_model_forward(self): method test_local_model_forward (line 1173) | def test_local_model_forward(self): method test_lm_model_forward (line 1189) | def test_lm_model_forward(self): method test_local_lm_model_grad (line 1208) | def test_local_lm_model_grad(self): method test_lsh_lm_model_grad (line 1246) | def test_lsh_lm_model_grad(self): method test_pretrained_generate_crime_and_punish (line 1286) | def test_pretrained_generate_crime_and_punish(self): method test_pretrained_generate_use_cache_equality (line 1303) | def test_pretrained_generate_use_cache_equality(self): FILE: mplsandbox_for_rl/transformers/tests/models/reformer/test_tokenization_reformer.py class ReformerTokenizationTest (line 29) | class ReformerTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 37) | def setUp(self): method test_convert_token_and_id (line 43) | def test_convert_token_and_id(self): method test_get_vocab (line 51) | def test_get_vocab(self): method test_vocab_size (line 59) | def test_vocab_size(self): method test_rust_and_python_full_tokenizers (line 62) | def test_rust_and_python_full_tokenizers(self): method test_padding (line 84) | def test_padding(self, max_length=15): method test_padding_different_model_input_name (line 129) | def test_padding_different_model_input_name(self): method test_full_tokenizer (line 132) | def test_full_tokenizer(self): method big_tokenizer (line 205) | def big_tokenizer(self): method test_tokenization_base_easy_symbols (line 209) | def test_tokenization_base_easy_symbols(self): method test_tokenization_base_hard_symbols (line 216) | def test_tokenization_base_hard_symbols(self): method test_torch_encode_plus_sent_to_model (line 330) | def test_torch_encode_plus_sent_to_model(self): method test_tokenizer_integration (line 354) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/regnet/test_modeling_flax_regnet.py class FlaxRegNetModelTester (line 39) | class FlaxRegNetModelTester(unittest.TestCase): method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 69) | def prepare_config_and_inputs(self): method get_config (line 76) | def get_config(self): method create_and_check_model (line 87) | def create_and_check_model(self, config, pixel_values): method create_and_check_for_image_classification (line 97) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 103) | def prepare_config_and_inputs_for_common(self): class FlaxResNetModelTest (line 111) | class FlaxResNetModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 118) | def setUp(self) -> None: method test_config (line 122) | def test_config(self): method create_and_test_config_common_properties (line 131) | def create_and_test_config_common_properties(self): method test_model (line 134) | def test_model(self): method test_for_image_classification (line 138) | def test_for_image_classification(self): method test_inputs_embeds (line 143) | def test_inputs_embeds(self): method test_model_common_attributes (line 147) | def test_model_common_attributes(self): method test_forward_signature (line 150) | def test_forward_signature(self): method test_hidden_states_output (line 162) | def test_hidden_states_output(self): method test_jit_compilation (line 185) | def test_jit_compilation(self): function prepare_img (line 210) | def prepare_img(): class FlaxRegNetModelIntegrationTest (line 216) | class FlaxRegNetModelIntegrationTest(unittest.TestCase): method default_image_processor (line 218) | def default_image_processor(self): method test_inference_image_classification_head (line 222) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/regnet/test_modeling_regnet.py class RegNetModelTester (line 41) | class RegNetModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 71) | def prepare_config_and_inputs(self): method get_config (line 82) | def get_config(self): method create_and_check_model (line 92) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 103) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 111) | def prepare_config_and_inputs_for_common(self): class RegNetModelTest (line 119) | class RegNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 137) | def setUp(self): method test_config (line 146) | def test_config(self): method test_inputs_embeds (line 150) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 154) | def test_model_get_set_embeddings(self): method test_model (line 157) | def test_model(self): method test_initialization (line 161) | def test_initialization(self): method test_hidden_states_output (line 177) | def test_hidden_states_output(self): method test_for_image_classification (line 211) | def test_for_image_classification(self): method test_model_from_pretrained (line 216) | def test_model_from_pretrained(self): function prepare_img (line 223) | def prepare_img(): class RegNetModelIntegrationTest (line 230) | class RegNetModelIntegrationTest(unittest.TestCase): method default_image_processor (line 232) | def default_image_processor(self): method test_inference_image_classification_head (line 236) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/regnet/test_modeling_tf_regnet.py class TFRegNetModelTester (line 44) | class TFRegNetModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 74) | def prepare_config_and_inputs(self): method get_config (line 84) | def get_config(self): method create_and_check_model (line 94) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 103) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 109) | def prepare_config_and_inputs_for_common(self): class TFRegNetModelTest (line 117) | class TFRegNetModelTest(TFModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 136) | def setUp(self): method create_and_test_config_common_properties (line 140) | def create_and_test_config_common_properties(self): method test_inputs_embeds (line 144) | def test_inputs_embeds(self): method test_keras_fit (line 152) | def test_keras_fit(self): method test_model_common_attributes (line 156) | def test_model_common_attributes(self): method test_forward_signature (line 159) | def test_forward_signature(self): method test_model (line 171) | def test_model(self): method test_hidden_states_output (line 175) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 206) | def test_model_outputs_equivalence(self): method test_for_image_classification (line 249) | def test_for_image_classification(self): method test_model_from_pretrained (line 254) | def test_model_from_pretrained(self): function prepare_img (line 261) | def prepare_img(): class RegNetModelIntegrationTest (line 268) | class RegNetModelIntegrationTest(unittest.TestCase): method default_image_processor (line 270) | def default_image_processor(self): method test_inference_image_classification_head (line 274) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/rembert/test_modeling_rembert.py class RemBertModelTester (line 42) | class RemBertModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 133) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 160) | def create_and_check_model( method create_and_check_model_as_decoder (line 171) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 203) | def create_and_check_for_causal_lm( method create_and_check_for_masked_lm (line 221) | def create_and_check_for_masked_lm( method create_and_check_decoder_model_past_large_inputs (line 230) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_question_answering (line 292) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 308) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 318) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 328) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 346) | def prepare_config_and_inputs_for_common(self): class RemBertModelTest (line 362) | class RemBertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 391) | def setUp(self): method test_config (line 395) | def test_config(self): method test_model (line 398) | def test_model(self): method test_model_various_embeddings (line 402) | def test_model_various_embeddings(self): method test_for_masked_lm (line 408) | def test_for_masked_lm(self): method test_for_multiple_choice (line 412) | def test_for_multiple_choice(self): method test_decoder_model_past_with_large_inputs (line 416) | def test_decoder_model_past_with_large_inputs(self): method test_for_question_answering (line 420) | def test_for_question_answering(self): method test_for_sequence_classification (line 424) | def test_for_sequence_classification(self): method test_for_token_classification (line 428) | def test_for_token_classification(self): method test_model_as_decoder (line 432) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 436) | def test_model_as_decoder_with_default_input_mask(self): method test_model_from_pretrained (line 465) | def test_model_from_pretrained(self): class RemBertModelIntegrationTest (line 472) | class RemBertModelIntegrationTest(unittest.TestCase): method test_inference_model (line 474) | def test_inference_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/rembert/test_modeling_tf_rembert.py class TFRemBertModelTester (line 43) | class TFRemBertModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 134) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 161) | def create_and_check_model( method create_and_check_causal_lm_base_model (line 174) | def create_and_check_causal_lm_base_model( method create_and_check_model_as_decoder (line 190) | def create_and_check_model_as_decoder( method create_and_check_causal_lm_model (line 222) | def create_and_check_causal_lm_model( method create_and_check_causal_lm_model_as_decoder (line 237) | def create_and_check_causal_lm_model_as_decoder( method create_and_check_causal_lm_model_past (line 269) | def create_and_check_causal_lm_model_past( method create_and_check_causal_lm_model_past_with_attn_mask (line 312) | def create_and_check_causal_lm_model_past_with_attn_mask( method create_and_check_causal_lm_model_past_large_inputs (line 373) | def create_and_check_causal_lm_model_past_large_inputs( method create_and_check_decoder_model_past_large_inputs (line 425) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 491) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 503) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 517) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 533) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 546) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 560) | def prepare_config_and_inputs_for_common(self): class TFRemBertModelTest (line 576) | class TFRemBertModelTest(TFModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 607) | def setUp(self): method test_config (line 611) | def test_config(self): method test_model (line 614) | def test_model(self): method test_causal_lm_base_model (line 619) | def test_causal_lm_base_model(self): method test_model_as_decoder (line 627) | def test_model_as_decoder(self): method test_for_masked_lm (line 635) | def test_for_masked_lm(self): method test_for_causal_lm (line 639) | def test_for_causal_lm(self): method test_causal_lm_model_as_decoder (line 644) | def test_causal_lm_model_as_decoder(self): method test_causal_lm_model_past (line 649) | def test_causal_lm_model_past(self): method test_causal_lm_model_past_with_attn_mask (line 654) | def test_causal_lm_model_past_with_attn_mask(self): method test_causal_lm_model_past_with_large_inputs (line 659) | def test_causal_lm_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs (line 664) | def test_decoder_model_past_with_large_inputs(self): method test_for_multiple_choice (line 669) | def test_for_multiple_choice(self): method test_for_question_answering (line 673) | def test_for_question_answering(self): method test_for_sequence_classification (line 677) | def test_for_sequence_classification(self): method test_for_token_classification (line 681) | def test_for_token_classification(self): method test_model_from_pretrained (line 686) | def test_model_from_pretrained(self): class TFRemBertModelIntegrationTest (line 692) | class TFRemBertModelIntegrationTest(unittest.TestCase): method test_inference_model (line 694) | def test_inference_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/rembert/test_tokenization_rembert.py class RemBertTokenizationTest (line 33) | class RemBertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 42) | def setUp(self): method get_input_output_texts (line 49) | def get_input_output_texts(self, tokenizer): method test_get_vocab (line 54) | def test_get_vocab(self): method test_vocab_size (line 62) | def test_vocab_size(self): method test_full_tokenizer (line 65) | def test_full_tokenizer(self): method test_encode_decode_round_trip (line 81) | def test_encode_decode_round_trip(self): method test_sequence_builders (line 154) | def test_sequence_builders(self): method test_added_tokens_serialization (line 168) | def test_added_tokens_serialization(self): FILE: mplsandbox_for_rl/transformers/tests/models/resnet/test_modeling_flax_resnet.py class FlaxResNetModelTester (line 38) | class FlaxResNetModelTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 68) | def prepare_config_and_inputs(self): method get_config (line 75) | def get_config(self): method create_and_check_model (line 86) | def create_and_check_model(self, config, pixel_values): method create_and_check_for_image_classification (line 96) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 102) | def prepare_config_and_inputs_for_common(self): class FlaxResNetModelTest (line 110) | class FlaxResNetModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 117) | def setUp(self) -> None: method test_config (line 121) | def test_config(self): method create_and_test_config_common_properties (line 130) | def create_and_test_config_common_properties(self): method test_model (line 133) | def test_model(self): method test_for_image_classification (line 137) | def test_for_image_classification(self): method test_inputs_embeds (line 142) | def test_inputs_embeds(self): method test_model_common_attributes (line 146) | def test_model_common_attributes(self): method test_forward_signature (line 149) | def test_forward_signature(self): method test_hidden_states_output (line 161) | def test_hidden_states_output(self): method test_feed_forward_chunking (line 173) | def test_feed_forward_chunking(self): method test_jit_compilation (line 176) | def test_jit_compilation(self): function prepare_img (line 201) | def prepare_img(): class FlaxResNetModelIntegrationTest (line 207) | class FlaxResNetModelIntegrationTest(unittest.TestCase): method default_image_processor (line 209) | def default_image_processor(self): method test_inference_image_classification_head (line 213) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/resnet/test_modeling_resnet.py class ResNetModelTester (line 42) | class ResNetModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 76) | def prepare_config_and_inputs(self): method get_config (line 87) | def get_config(self): method create_and_check_model (line 99) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 110) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_backbone (line 118) | def create_and_check_backbone(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 147) | def prepare_config_and_inputs_for_common(self): class ResNetModelTest (line 155) | class ResNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 182) | def setUp(self): method test_config (line 191) | def test_config(self): method test_inputs_embeds (line 195) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 199) | def test_model_get_set_embeddings(self): method test_model (line 202) | def test_model(self): method test_backbone (line 206) | def test_backbone(self): method test_initialization (line 210) | def test_initialization(self): method test_hidden_states_output (line 226) | def test_hidden_states_output(self): method test_feed_forward_chunking (line 261) | def test_feed_forward_chunking(self): method test_for_image_classification (line 264) | def test_for_image_classification(self): method test_model_from_pretrained (line 269) | def test_model_from_pretrained(self): function prepare_img (line 276) | def prepare_img(): class ResNetModelIntegrationTest (line 283) | class ResNetModelIntegrationTest(unittest.TestCase): method default_image_processor (line 285) | def default_image_processor(self): method test_inference_image_classification_head (line 289) | def test_inference_image_classification_head(self): class ResNetBackboneTest (line 310) | class ResNetBackboneTest(BackboneTesterMixin, unittest.TestCase): method setUp (line 315) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/resnet/test_modeling_tf_resnet.py class TFResNetModelTester (line 45) | class TFResNetModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 75) | def prepare_config_and_inputs(self): method get_config (line 86) | def get_config(self): method create_and_check_model (line 97) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 106) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 112) | def prepare_config_and_inputs_for_common(self): class TFResNetModelTest (line 120) | class TFResNetModelTest(TFModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 139) | def setUp(self): method test_config (line 143) | def test_config(self): method create_and_test_config_common_properties (line 152) | def create_and_test_config_common_properties(self): method test_inputs_embeds (line 156) | def test_inputs_embeds(self): method test_model_common_attributes (line 160) | def test_model_common_attributes(self): method test_forward_signature (line 163) | def test_forward_signature(self): method test_model (line 175) | def test_model(self): method test_hidden_states_output (line 179) | def test_hidden_states_output(self): method test_for_image_classification (line 209) | def test_for_image_classification(self): method test_model_from_pretrained (line 214) | def test_model_from_pretrained(self): function prepare_img (line 221) | def prepare_img(): class TFResNetModelIntegrationTest (line 228) | class TFResNetModelIntegrationTest(unittest.TestCase): method default_image_processor (line 230) | def default_image_processor(self): method test_inference_image_classification_head (line 234) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/roberta/test_modeling_flax_roberta.py class FlaxRobertaModelTester (line 37) | class FlaxRobertaModelTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_config_and_inputs (line 82) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 110) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_decoder (line 116) | def prepare_config_and_inputs_for_decoder(self): class FlaxRobertaModelTest (line 134) | class FlaxRobertaModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 151) | def setUp(self): method test_model_from_pretrained (line 155) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/roberta/test_modeling_roberta.py class RobertaModelTester (line 48) | class RobertaModelTester: method __init__ (line 49) | def __init__( method prepare_config_and_inputs (line 97) | def prepare_config_and_inputs(self): method get_config (line 120) | def get_config(self): method get_pipeline_config (line 135) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 140) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 167) | def create_and_check_model( method create_and_check_model_as_decoder (line 180) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 213) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 231) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 299) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 308) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 318) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 336) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 352) | def prepare_config_and_inputs_for_common(self): class RobertaModelTest (line 368) | class RobertaModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline... method setUp (line 399) | def setUp(self): method test_config (line 403) | def test_config(self): method test_model (line 406) | def test_model(self): method test_model_various_embeddings (line 410) | def test_model_various_embeddings(self): method test_model_as_decoder (line 416) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 420) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 448) | def test_for_causal_lm(self): method test_decoder_model_past_with_large_inputs (line 452) | def test_decoder_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs_relative_pos_emb (line 456) | def test_decoder_model_past_with_large_inputs_relative_pos_emb(self): method test_for_masked_lm (line 461) | def test_for_masked_lm(self): method test_for_token_classification (line 465) | def test_for_token_classification(self): method test_for_multiple_choice (line 469) | def test_for_multiple_choice(self): method test_for_question_answering (line 473) | def test_for_question_answering(self): method test_model_from_pretrained (line 478) | def test_model_from_pretrained(self): method test_create_position_ids_respects_padding_index (line 483) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 501) | def test_create_position_ids_from_inputs_embeds(self): class RobertaModelIntegrationTest (line 524) | class RobertaModelIntegrationTest(TestCasePlus): method test_inference_masked_lm (line 526) | def test_inference_masked_lm(self): method test_inference_no_head (line 546) | def test_inference_no_head(self): method test_inference_classification_head (line 564) | def test_inference_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/roberta/test_modeling_tf_roberta.py class TFRobertaModelTester (line 44) | class TFRobertaModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 72) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 107) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 134) | def create_and_check_model( method create_and_check_causal_lm_base_model (line 148) | def create_and_check_causal_lm_base_model( method create_and_check_model_as_decoder (line 164) | def create_and_check_model_as_decoder( method create_and_check_causal_lm_model (line 196) | def create_and_check_causal_lm_model( method create_and_check_causal_lm_model_as_decoder (line 212) | def create_and_check_causal_lm_model_as_decoder( method create_and_check_causal_lm_model_past (line 244) | def create_and_check_causal_lm_model_past( method create_and_check_causal_lm_model_past_with_attn_mask (line 293) | def create_and_check_causal_lm_model_past_with_attn_mask( method create_and_check_causal_lm_model_past_large_inputs (line 363) | def create_and_check_causal_lm_model_past_large_inputs( method create_and_check_decoder_model_past_large_inputs (line 422) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 495) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 502) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 511) | def create_and_check_for_question_answering( method create_and_check_for_multiple_choice (line 520) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 536) | def prepare_config_and_inputs_for_common(self): class TFRobertaModelTest (line 552) | class TFRobertaModelTest(TFModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 581) | def setUp(self): method test_config (line 585) | def test_config(self): method test_model (line 588) | def test_model(self): method test_causal_lm_base_model (line 593) | def test_causal_lm_base_model(self): method test_model_as_decoder (line 601) | def test_model_as_decoder(self): method test_for_masked_lm (line 609) | def test_for_masked_lm(self): method test_for_causal_lm (line 613) | def test_for_causal_lm(self): method test_causal_lm_model_as_decoder (line 618) | def test_causal_lm_model_as_decoder(self): method test_causal_lm_model_past (line 623) | def test_causal_lm_model_past(self): method test_causal_lm_model_past_with_attn_mask (line 628) | def test_causal_lm_model_past_with_attn_mask(self): method test_causal_lm_model_past_with_large_inputs (line 633) | def test_causal_lm_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs (line 638) | def test_decoder_model_past_with_large_inputs(self): method test_for_token_classification (line 643) | def test_for_token_classification(self): method test_for_question_answering (line 647) | def test_for_question_answering(self): method test_for_multiple_choice (line 651) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 656) | def test_model_from_pretrained(self): class TFRobertaModelIntegrationTest (line 665) | class TFRobertaModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 667) | def test_inference_masked_lm(self): method test_inference_no_head (line 681) | def test_inference_no_head(self): method test_inference_classification_head (line 693) | def test_inference_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/roberta/test_tokenization_roberta.py class RobertaTokenizationTest (line 30) | class RobertaTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 37) | def setUp(self): method get_tokenizer (line 74) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 78) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 82) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 87) | def test_full_tokenizer(self): method roberta_dict_integration_testing (line 98) | def roberta_dict_integration_testing(self): method test_sequence_builders (line 108) | def test_sequence_builders(self): method test_space_encoding (line 127) | def test_space_encoding(self): method test_pretokenized_inputs (line 168) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 171) | def test_embeded_special_tokens(self): method test_change_add_prefix_space_and_trim_offsets_args (line 203) | def test_change_add_prefix_space_and_trim_offsets_args(self): method test_offsets_mapping_with_different_add_prefix_space_and_trim_space_arguments (line 217) | def test_offsets_mapping_with_different_add_prefix_space_and_trim_spac... FILE: mplsandbox_for_rl/transformers/tests/models/roberta_prelayernorm/test_modeling_flax_roberta_prelayernorm.py class FlaxRobertaPreLayerNormModelTester (line 40) | class FlaxRobertaPreLayerNormModelTester(unittest.TestCase): method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 85) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 113) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_decoder (line 119) | def prepare_config_and_inputs_for_decoder(self): class FlaxRobertaPreLayerNormModelTest (line 138) | class FlaxRobertaPreLayerNormModelTest(FlaxModelTesterMixin, unittest.Te... method setUp (line 155) | def setUp(self): method test_model_from_pretrained (line 159) | def test_model_from_pretrained(self): class TFRobertaPreLayerNormModelIntegrationTest (line 167) | class TFRobertaPreLayerNormModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 169) | def test_inference_masked_lm(self): method test_inference_no_head (line 183) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/roberta_prelayernorm/test_modeling_roberta_prelayernorm.py class RobertaPreLayerNormModelTester (line 47) | class RobertaPreLayerNormModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method get_config (line 119) | def get_config(self): method get_pipeline_config (line 134) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 139) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 166) | def create_and_check_model( method create_and_check_model_as_decoder (line 179) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 212) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 230) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 298) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 307) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 317) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 335) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 351) | def prepare_config_and_inputs_for_common(self): class RobertaPreLayerNormModelTest (line 367) | class RobertaPreLayerNormModelTest(ModelTesterMixin, GenerationTesterMix... method setUp (line 399) | def setUp(self): method test_config (line 404) | def test_config(self): method test_model (line 408) | def test_model(self): method test_model_various_embeddings (line 413) | def test_model_various_embeddings(self): method test_model_as_decoder (line 420) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 425) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 454) | def test_for_causal_lm(self): method test_decoder_model_past_with_large_inputs (line 459) | def test_decoder_model_past_with_large_inputs(self): method test_for_masked_lm (line 464) | def test_for_masked_lm(self): method test_for_token_classification (line 469) | def test_for_token_classification(self): method test_for_multiple_choice (line 474) | def test_for_multiple_choice(self): method test_for_question_answering (line 479) | def test_for_question_answering(self): method test_model_from_pretrained (line 484) | def test_model_from_pretrained(self): method test_create_position_ids_respects_padding_index (line 490) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 509) | def test_create_position_ids_from_inputs_embeds(self): class RobertaPreLayerNormModelIntegrationTest (line 532) | class RobertaPreLayerNormModelIntegrationTest(TestCasePlus): method test_inference_masked_lm (line 534) | def test_inference_masked_lm(self): method test_inference_no_head (line 550) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/roberta_prelayernorm/test_modeling_tf_roberta_prelayernorm.py class TFRobertaPreLayerNormModelTester (line 45) | class TFRobertaPreLayerNormModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 73) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 108) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 135) | def create_and_check_model( method create_and_check_causal_lm_base_model (line 149) | def create_and_check_causal_lm_base_model( method create_and_check_model_as_decoder (line 165) | def create_and_check_model_as_decoder( method create_and_check_causal_lm_model (line 197) | def create_and_check_causal_lm_model( method create_and_check_causal_lm_model_as_decoder (line 213) | def create_and_check_causal_lm_model_as_decoder( method create_and_check_causal_lm_model_past (line 245) | def create_and_check_causal_lm_model_past( method create_and_check_causal_lm_model_past_with_attn_mask (line 294) | def create_and_check_causal_lm_model_past_with_attn_mask( method create_and_check_causal_lm_model_past_large_inputs (line 364) | def create_and_check_causal_lm_model_past_large_inputs( method create_and_check_decoder_model_past_large_inputs (line 423) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 496) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 503) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 512) | def create_and_check_for_question_answering( method create_and_check_for_multiple_choice (line 521) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 537) | def prepare_config_and_inputs_for_common(self): class TFRobertaPreLayerNormModelTest (line 554) | class TFRobertaPreLayerNormModelTest(TFModelTesterMixin, PipelineTesterM... method setUp (line 583) | def setUp(self): method test_config (line 587) | def test_config(self): method test_model (line 590) | def test_model(self): method test_causal_lm_base_model (line 595) | def test_causal_lm_base_model(self): method test_model_as_decoder (line 603) | def test_model_as_decoder(self): method test_for_masked_lm (line 611) | def test_for_masked_lm(self): method test_for_causal_lm (line 615) | def test_for_causal_lm(self): method test_causal_lm_model_as_decoder (line 620) | def test_causal_lm_model_as_decoder(self): method test_causal_lm_model_past (line 625) | def test_causal_lm_model_past(self): method test_causal_lm_model_past_with_attn_mask (line 630) | def test_causal_lm_model_past_with_attn_mask(self): method test_causal_lm_model_past_with_large_inputs (line 635) | def test_causal_lm_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs (line 640) | def test_decoder_model_past_with_large_inputs(self): method test_for_token_classification (line 645) | def test_for_token_classification(self): method test_for_question_answering (line 649) | def test_for_question_answering(self): method test_for_multiple_choice (line 653) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 658) | def test_model_from_pretrained(self): class TFRobertaPreLayerNormModelIntegrationTest (line 667) | class TFRobertaPreLayerNormModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 669) | def test_inference_masked_lm(self): method test_inference_no_head (line 683) | def test_inference_no_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/roc_bert/test_modeling_roc_bert.py class RoCBertModelTester (line 44) | class RoCBertModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs(self): method get_config (line 136) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 156) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 187) | def create_and_check_model( method create_and_check_model_as_decoder (line 218) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 262) | def create_and_check_for_causal_lm( method create_and_check_for_masked_lm (line 289) | def create_and_check_for_masked_lm( method create_and_check_decoder_model_past_large_inputs (line 314) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_question_answering (line 388) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 415) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 441) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 467) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 500) | def prepare_config_and_inputs_for_common(self): method create_and_check_for_pretraining (line 522) | def create_and_check_for_pretraining( class RoCBertModelTest (line 558) | class RoCBertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method is_pipeline_test_to_skip (line 589) | def is_pipeline_test_to_skip( method _prepare_for_class (line 607) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 632) | def setUp(self): method test_config (line 636) | def test_config(self): method test_model (line 639) | def test_model(self): method test_model_various_embeddings (line 643) | def test_model_various_embeddings(self): method test_for_masked_lm (line 649) | def test_for_masked_lm(self): method test_for_multiple_choice (line 653) | def test_for_multiple_choice(self): method test_decoder_model_past_with_large_inputs (line 657) | def test_decoder_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs_relative_pos_emb (line 661) | def test_decoder_model_past_with_large_inputs_relative_pos_emb(self): method test_for_question_answering (line 666) | def test_for_question_answering(self): method test_for_sequence_classification (line 670) | def test_for_sequence_classification(self): method test_for_token_classification (line 674) | def test_for_token_classification(self): method test_for_pretraining (line 678) | def test_for_pretraining(self): method test_model_as_decoder (line 682) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 686) | def test_model_as_decoder_with_default_input_mask(self): method test_model_from_pretrained (line 719) | def test_model_from_pretrained(self): class RoCBertModelIntegrationTest (line 726) | class RoCBertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 728) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/roc_bert/test_tokenization_roc_bert.py class BertTokenizationTest (line 36) | class BertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 44) | def setUp(self): method test_full_tokenizer (line 63) | def test_full_tokenizer(self): method test_chinese (line 73) | def test_chinese(self): method test_basic_tokenizer_lower (line 79) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 88) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 97) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 106) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 115) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 123) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 131) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 139) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_wordpiece_tokenizer (line 147) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 162) | def test_is_whitespace(self): method test_is_control (line 173) | def test_is_control(self): method test_is_punctuation (line 182) | def test_is_punctuation(self): method test_clean_text (line 191) | def test_clean_text(self): method test_offsets_with_special_characters (line 204) | def test_offsets_with_special_characters(self): method test_change_tokenize_chinese_chars (line 257) | def test_change_tokenize_chinese_chars(self): method test_sequence_builders (line 294) | def test_sequence_builders(self): method test_prepare_for_model (line 306) | def test_prepare_for_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/roformer/test_modeling_flax_roformer.py class FlaxRoFormerModelTester (line 38) | class FlaxRoFormerModelTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 83) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 111) | def prepare_config_and_inputs_for_common(self): class FlaxRoFormerModelTest (line 119) | class FlaxRoFormerModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 135) | def setUp(self): method test_model_from_pretrained (line 139) | def test_model_from_pretrained(self): class FlaxRoFormerModelIntegrationTest (line 147) | class FlaxRoFormerModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 149) | def test_inference_masked_lm(self): FILE: mplsandbox_for_rl/transformers/tests/models/roformer/test_modeling_roformer.py class RoFormerModelTester (line 45) | class RoFormerModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 94) | def prepare_config_and_inputs(self): method get_config (line 117) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 133) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 160) | def create_and_check_model( method create_and_check_model_as_decoder (line 171) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 203) | def create_and_check_for_causal_lm( method create_and_check_for_generate_causal_lm (line 221) | def create_and_check_for_generate_causal_lm( method create_and_check_for_masked_lm (line 240) | def create_and_check_for_masked_lm( method create_and_check_decoder_model_past_large_inputs (line 249) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_question_answering (line 311) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 327) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 337) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 347) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 365) | def prepare_config_and_inputs_for_common(self): class RoFormerModelTest (line 381) | class RoFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 410) | def setUp(self): method test_config (line 414) | def test_config(self): method test_model (line 417) | def test_model(self): method test_for_masked_lm (line 421) | def test_for_masked_lm(self): method test_for_generate_causal_lm (line 425) | def test_for_generate_causal_lm(self): method test_for_multiple_choice (line 429) | def test_for_multiple_choice(self): method test_decoder_model_past_with_large_inputs (line 433) | def test_decoder_model_past_with_large_inputs(self): method test_for_question_answering (line 437) | def test_for_question_answering(self): method test_for_sequence_classification (line 441) | def test_for_sequence_classification(self): method test_for_token_classification (line 445) | def test_for_token_classification(self): method test_model_as_decoder (line 449) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 453) | def test_model_as_decoder_with_default_input_mask(self): method test_model_from_pretrained (line 482) | def test_model_from_pretrained(self): method test_training_gradient_checkpointing (line 490) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 496) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 502) | def test_training_gradient_checkpointing_use_reentrant_false(self): class RoFormerModelIntegrationTest (line 507) | class RoFormerModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 509) | def test_inference_masked_lm(self): class RoFormerSinusoidalPositionalEmbeddingTest (line 530) | class RoFormerSinusoidalPositionalEmbeddingTest(unittest.TestCase): method test_basic (line 533) | def test_basic(self): method test_positional_emb_weights_against_roformer (line 545) | def test_positional_emb_weights_against_roformer(self): class RoFormerSelfAttentionRotaryPositionEmbeddingTest (line 563) | class RoFormerSelfAttentionRotaryPositionEmbeddingTest(unittest.TestCase): method test_apply_rotary_position_embeddings (line 566) | def test_apply_rotary_position_embeddings(self): FILE: mplsandbox_for_rl/transformers/tests/models/roformer/test_modeling_tf_roformer.py class TFRoFormerModelTester (line 47) | class TFRoFormerModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method create_and_check_model (line 132) | def create_and_check_model( method create_and_check_lm_head (line 145) | def create_and_check_lm_head( method create_and_check_for_masked_lm (line 160) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 172) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 186) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 202) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 215) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 229) | def prepare_config_and_inputs_for_common(self): class TFRoFormerModelTest (line 245) | class TFRoFormerModelTest(TFModelTesterMixin, PipelineTesterMixin, unitt... method is_pipeline_test_to_skip (line 277) | def is_pipeline_test_to_skip( method setUp (line 285) | def setUp(self): method test_config (line 289) | def test_config(self): method test_model (line 292) | def test_model(self): method test_for_masked_lm (line 296) | def test_for_masked_lm(self): method test_for_causal_lm (line 300) | def test_for_causal_lm(self): method test_for_multiple_choice (line 304) | def test_for_multiple_choice(self): method test_for_question_answering (line 308) | def test_for_question_answering(self): method test_for_sequence_classification (line 312) | def test_for_sequence_classification(self): method test_for_token_classification (line 316) | def test_for_token_classification(self): method test_model_from_pretrained (line 321) | def test_model_from_pretrained(self): class TFRoFormerModelIntegrationTest (line 327) | class TFRoFormerModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 329) | def test_inference_masked_lm(self): class TFRoFormerSinusoidalPositionalEmbeddingTest (line 356) | class TFRoFormerSinusoidalPositionalEmbeddingTest(unittest.TestCase): method test_basic (line 359) | def test_basic(self): method test_positional_emb_weights_against_roformer (line 370) | def test_positional_emb_weights_against_roformer(self): class TFRoFormerSelfAttentionRotaryPositionEmbeddingTest (line 386) | class TFRoFormerSelfAttentionRotaryPositionEmbeddingTest(unittest.TestCa... method test_apply_rotary_position_embeddings (line 389) | def test_apply_rotary_position_embeddings(self): FILE: mplsandbox_for_rl/transformers/tests/models/roformer/test_tokenization_roformer.py class RoFormerTokenizationTest (line 27) | class RoFormerTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 34) | def setUp(self): method get_tokenizer (line 37) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 40) | def get_rust_tokenizer(self, **kwargs): method get_chinese_input_output_texts (line 43) | def get_chinese_input_output_texts(self): method test_tokenizer (line 48) | def test_tokenizer(self): method test_rust_tokenizer (line 59) | def test_rust_tokenizer(self): # noqa: F811 method test_training_new_tokenizer (line 69) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 73) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_save_slow_from_fast_and_reload_fast (line 76) | def test_save_slow_from_fast_and_reload_fast(self): FILE: mplsandbox_for_rl/transformers/tests/models/rt_detr/test_image_processing_rt_detr.py class RTDetrImageProcessingTester (line 34) | class RTDetrImageProcessingTester(unittest.TestCase): method __init__ (line 35) | def __init__( method prepare_image_processor_dict (line 60) | def prepare_image_processor_dict(self): method get_expected_values (line 71) | def get_expected_values(self): method expected_output_image_shape (line 74) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 78) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class RtDetrImageProcessingTest (line 92) | class RtDetrImageProcessingTest(ImageProcessingTestMixin, unittest.TestC... method setUp (line 95) | def setUp(self): method image_processor_dict (line 100) | def image_processor_dict(self): method test_image_processor_properties (line 103) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 112) | def test_image_processor_from_dict_with_kwargs(self): method test_valid_coco_detection_annotations (line 116) | def test_valid_coco_detection_annotations(self): method test_call_pytorch_with_coco_detection_annotations (line 152) | def test_call_pytorch_with_coco_detection_annotations(self): method test_image_processor_outputs (line 196) | def test_image_processor_outputs(self): method test_multiple_images_processor_outputs (line 210) | def test_multiple_images_processor_outputs(self): method test_batched_coco_detection_annotations (line 254) | def test_batched_coco_detection_annotations(self): FILE: mplsandbox_for_rl/transformers/tests/models/rt_detr/test_modeling_rt_detr.py class RTDetrModelTester (line 51) | class RTDetrModelTester: method __init__ (line 52) | def __init__( method prepare_config_and_inputs (line 146) | def prepare_config_and_inputs(self): method get_config (line 167) | def get_config(self): method prepare_config_and_inputs_for_common (line 212) | def prepare_config_and_inputs_for_common(self): method create_and_check_rt_detr_model (line 217) | def create_and_check_rt_detr_model(self, config, pixel_values, pixel_m... method create_and_check_rt_detr_object_detection_head_model (line 227) | def create_and_check_rt_detr_object_detection_head_model(self, config,... class RTDetrModelTest (line 246) | class RTDetrModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method _prepare_for_class (line 260) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 279) | def setUp(self): method test_config (line 288) | def test_config(self): method test_rt_detr_model (line 291) | def test_rt_detr_model(self): method test_rt_detr_object_detection_head_model (line 295) | def test_rt_detr_object_detection_head_model(self): method test_inputs_embeds (line 300) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 304) | def test_inputs_embeds_matches_input_ids(self): method test_model_get_set_embeddings (line 308) | def test_model_get_set_embeddings(self): method test_model_common_attributes (line 312) | def test_model_common_attributes(self): method test_resize_tokens_embeddings (line 316) | def test_resize_tokens_embeddings(self): method test_feed_forward_chunking (line 320) | def test_feed_forward_chunking(self): method test_attention_outputs (line 323) | def test_attention_outputs(self): method test_hidden_states_output (line 425) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 476) | def test_retain_grad_hidden_states_attentions(self): method test_forward_signature (line 510) | def test_forward_signature(self): method test_different_timm_backbone (line 520) | def test_different_timm_backbone(self): method test_hf_backbone (line 551) | def test_hf_backbone(self): method test_initialization (line 583) | def test_initialization(self): method test_inference_with_different_dtypes (line 636) | def test_inference_with_different_dtypes(self, torch_dtype_str): method test_inference_equivalence_for_static_and_dynamic_anchors (line 658) | def test_inference_equivalence_for_static_and_dynamic_anchors(self, to... function prepare_img (line 702) | def prepare_img(): class RTDetrModelIntegrationTest (line 709) | class RTDetrModelIntegrationTest(unittest.TestCase): method default_image_processor (line 711) | def default_image_processor(self): method test_inference_object_detection_head (line 714) | def test_inference_object_detection_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/rt_detr/test_modeling_rt_detr_resnet.py class RTDetrResNetModelTester (line 30) | class RTDetrResNetModelTester: method __init__ (line 31) | def __init__( method prepare_config_and_inputs (line 64) | def prepare_config_and_inputs(self): method get_config (line 75) | def get_config(self): method create_and_check_backbone (line 87) | def create_and_check_backbone(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 116) | def prepare_config_and_inputs_for_common(self): class RTDetrResNetBackboneTest (line 124) | class RTDetrResNetBackboneTest(BackboneTesterMixin, unittest.TestCase): method setUp (line 129) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/rwkv/test_modeling_rwkv.py class RwkvModelTester (line 41) | class RwkvModelTester: method __init__ (line 42) | def __init__( method get_large_model_config (line 91) | def get_large_model_config(self): method prepare_config_and_inputs (line 94) | def prepare_config_and_inputs( method get_config (line 137) | def get_config( method get_pipeline_config (line 159) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 164) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_rwkv_model (line 193) | def create_and_check_rwkv_model(self, config, input_ids, input_mask, h... method create_and_check_causl_lm (line 204) | def create_and_check_causl_lm(self, config, input_ids, input_mask, hea... method create_and_check_state_equivalency (line 213) | def create_and_check_state_equivalency(self, config, input_ids, input_... method create_and_check_forward_and_backwards (line 230) | def create_and_check_forward_and_backwards( method prepare_config_and_inputs_for_common (line 243) | def prepare_config_and_inputs_for_common(self): class RwkvModelTest (line 267) | class RwkvModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method setUp (line 279) | def setUp(self): method assertInterval (line 285) | def assertInterval(self, member, container, msg=None): method test_config (line 307) | def test_config(self): method test_rwkv_model (line 310) | def test_rwkv_model(self): method test_rwkv_lm_head_model (line 314) | def test_rwkv_lm_head_model(self): method test_state_equivalency (line 318) | def test_state_equivalency(self): method test_initialization (line 322) | def test_initialization(self): method test_attention_outputs (line 351) | def test_attention_outputs(self): method test_model_from_pretrained (line 420) | def test_model_from_pretrained(self): method test_beam_sample_generate_dict_output (line 425) | def test_beam_sample_generate_dict_output(self): method test_beam_search_generate_dict_output (line 432) | def test_beam_search_generate_dict_output(self): method test_constrained_beam_search_generate_dict_output (line 439) | def test_constrained_beam_search_generate_dict_output(self): method test_greedy_generate_dict_outputs (line 446) | def test_greedy_generate_dict_outputs(self): method test_group_beam_search_generate_dict_output (line 453) | def test_group_beam_search_generate_dict_output(self): method test_sample_generate_dict_output (line 460) | def test_sample_generate_dict_output(self): method test_left_padding_compatibility (line 468) | def test_left_padding_compatibility(self): class RWKVIntegrationTests (line 476) | class RWKVIntegrationTests(unittest.TestCase): method setUp (line 477) | def setUp(self): method test_simple_generate (line 481) | def test_simple_generate(self): method test_simple_generate_bf16 (line 491) | def test_simple_generate_bf16(self): FILE: mplsandbox_for_rl/transformers/tests/models/sam/test_modeling_sam.py class SamPromptEncoderTester (line 42) | class SamPromptEncoderTester: method __init__ (line 43) | def __init__( method get_config (line 59) | def get_config(self): method prepare_config_and_inputs (line 69) | def prepare_config_and_inputs(self): class SamMaskDecoderTester (line 76) | class SamMaskDecoderTester: method __init__ (line 77) | def __init__( method get_config (line 101) | def get_config(self): method prepare_config_and_inputs (line 115) | def prepare_config_and_inputs(self): class SamModelTester (line 125) | class SamModelTester: method __init__ (line 126) | def __init__( method prepare_config_and_inputs (line 189) | def prepare_config_and_inputs(self): method get_config (line 195) | def get_config(self): method create_and_check_model (line 231) | def create_and_check_model(self, config, pixel_values): method create_and_check_get_image_features (line 240) | def create_and_check_get_image_features(self, config, pixel_values): method create_and_check_get_image_hidden_states (line 248) | def create_and_check_get_image_hidden_states(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 276) | def prepare_config_and_inputs_for_common(self): class SamModelTest (line 284) | class SamModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method is_pipeline_test_to_skip (line 301) | def is_pipeline_test_to_skip( method setUp (line 306) | def setUp(self): method test_config (line 320) | def test_config(self): method test_inputs_embeds (line 326) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 329) | def test_model_get_set_embeddings(self): method test_model (line 338) | def test_model(self): method test_get_image_features (line 342) | def test_get_image_features(self): method test_image_hidden_states (line 346) | def test_image_hidden_states(self): method test_attention_outputs (line 350) | def test_attention_outputs(self): method test_training (line 402) | def test_training(self): method test_training_gradient_checkpointing (line 406) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 412) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 418) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 422) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 426) | def test_save_load_fast_init_to_base(self): method test_retain_grad_hidden_states_attentions (line 430) | def test_retain_grad_hidden_states_attentions(self): method test_hidden_states_output (line 434) | def test_hidden_states_output(self): method check_pt_tf_outputs (line 437) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method test_model_from_pretrained (line 442) | def test_model_from_pretrained(self): function prepare_image (line 448) | def prepare_image(): function prepare_dog_img (line 454) | def prepare_dog_img(): class SamModelIntegrationTest (line 461) | class SamModelIntegrationTest(unittest.TestCase): method tearDown (line 462) | def tearDown(self): method test_inference_mask_generation_no_point (line 468) | def test_inference_mask_generation_no_point(self): method test_inference_mask_generation_one_point_one_bb (line 485) | def test_inference_mask_generation_one_point_one_bb(self): method test_inference_mask_generation_batched_points_batched_images (line 509) | def test_inference_mask_generation_batched_points_batched_images(self): method test_inference_mask_generation_one_point_one_bb_zero (line 551) | def test_inference_mask_generation_one_point_one_bb_zero(self): method test_inference_mask_generation_one_point (line 577) | def test_inference_mask_generation_one_point(self): method test_inference_mask_generation_two_points (line 608) | def test_inference_mask_generation_two_points(self): method test_inference_mask_generation_two_points_batched (line 638) | def test_inference_mask_generation_two_points_batched(self): method test_inference_mask_generation_one_box (line 660) | def test_inference_mask_generation_one_box(self): method test_inference_mask_generation_batched_image_one_point (line 678) | def test_inference_mask_generation_batched_image_one_point(self): method test_inference_mask_generation_two_points_point_batch (line 707) | def test_inference_mask_generation_two_points_point_batch(self): method test_inference_mask_generation_three_boxes_point_batch (line 731) | def test_inference_mask_generation_three_boxes_point_batch(self): method test_dummy_pipeline_generation (line 757) | def test_dummy_pipeline_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/sam/test_modeling_tf_sam.py class TFSamPromptEncoderTester (line 44) | class TFSamPromptEncoderTester: method __init__ (line 45) | def __init__( method get_config (line 61) | def get_config(self): method prepare_config_and_inputs (line 71) | def prepare_config_and_inputs(self): class TFSamMaskDecoderTester (line 78) | class TFSamMaskDecoderTester: method __init__ (line 79) | def __init__( method get_config (line 103) | def get_config(self): method prepare_config_and_inputs (line 117) | def prepare_config_and_inputs(self): class TFSamModelTester (line 127) | class TFSamModelTester: method __init__ (line 128) | def __init__( method prepare_config_and_inputs (line 191) | def prepare_config_and_inputs(self): method get_config (line 197) | def get_config(self): method create_and_check_model (line 233) | def create_and_check_model(self, config, pixel_values): method create_and_check_get_image_features (line 239) | def create_and_check_get_image_features(self, config, pixel_values): method create_and_check_get_image_hidden_states (line 244) | def create_and_check_get_image_hidden_states(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 268) | def prepare_config_and_inputs_for_common(self): class TFSamModelTest (line 276) | class TFSamModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T... method is_pipeline_test_to_skip (line 292) | def is_pipeline_test_to_skip( method setUp (line 297) | def setUp(self): method test_config (line 311) | def test_config(self): method test_inputs_embeds (line 317) | def test_inputs_embeds(self): method test_model_common_attributes (line 320) | def test_model_common_attributes(self): method test_forward_signature (line 329) | def test_forward_signature(self): method test_model (line 341) | def test_model(self): method test_get_image_features (line 345) | def test_get_image_features(self): method test_image_hidden_states (line 349) | def test_image_hidden_states(self): method test_attention_outputs (line 353) | def test_attention_outputs(self): method test_hidden_states_output (line 399) | def test_hidden_states_output(self): method test_model_from_pretrained (line 403) | def test_model_from_pretrained(self): method check_pt_tf_outputs (line 407) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... function prepare_image (line 418) | def prepare_image(): function prepare_dog_img (line 424) | def prepare_dog_img(): class TFSamModelIntegrationTest (line 432) | class TFSamModelIntegrationTest(unittest.TestCase): method test_inference_mask_generation_no_point (line 433) | def test_inference_mask_generation_no_point(self): method test_inference_mask_generation_one_point_one_bb (line 446) | def test_inference_mask_generation_one_point_one_bb(self): method test_inference_mask_generation_batched_points_batched_images (line 463) | def test_inference_mask_generation_batched_points_batched_images(self): method test_inference_mask_generation_one_point_one_bb_zero (line 499) | def test_inference_mask_generation_one_point_one_bb_zero(self): method test_inference_mask_generation_one_point (line 520) | def test_inference_mask_generation_one_point(self): method test_inference_mask_generation_two_points (line 546) | def test_inference_mask_generation_two_points(self): method test_inference_mask_generation_two_points_batched (line 569) | def test_inference_mask_generation_two_points_batched(self): method test_inference_mask_generation_one_box (line 588) | def test_inference_mask_generation_one_box(self): method test_inference_mask_generation_batched_image_one_point (line 603) | def test_inference_mask_generation_batched_image_one_point(self): method test_inference_mask_generation_two_points_point_batch (line 625) | def test_inference_mask_generation_two_points_point_batch(self): method test_inference_mask_generation_three_boxes_point_batch (line 650) | def test_inference_mask_generation_three_boxes_point_batch(self): FILE: mplsandbox_for_rl/transformers/tests/models/sam/test_processor_sam.py class SamProcessorTest (line 44) | class SamProcessorTest(unittest.TestCase): method setUp (line 45) | def setUp(self): method get_image_processor (line 51) | def get_image_processor(self, **kwargs): method tearDown (line 54) | def tearDown(self): method prepare_image_inputs (line 57) | def prepare_image_inputs(self): method prepare_mask_inputs (line 65) | def prepare_mask_inputs(self): method test_save_load_pretrained_additional_features (line 73) | def test_save_load_pretrained_additional_features(self): method test_image_processor_no_masks (line 84) | def test_image_processor_no_masks(self): method test_image_processor_with_masks (line 108) | def test_image_processor_with_masks(self): method test_post_process_masks (line 126) | def test_post_process_masks(self): class TFSamProcessorTest (line 156) | class TFSamProcessorTest(unittest.TestCase): method setUp (line 157) | def setUp(self): method get_image_processor (line 163) | def get_image_processor(self, **kwargs): method tearDown (line 166) | def tearDown(self): method prepare_image_inputs (line 169) | def prepare_image_inputs(self): method test_save_load_pretrained_additional_features (line 180) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 191) | def test_image_processor(self): method test_post_process_masks (line 208) | def test_post_process_masks(self): class SamProcessorEquivalenceTest (line 245) | class SamProcessorEquivalenceTest(unittest.TestCase): method setUp (line 246) | def setUp(self): method get_image_processor (line 252) | def get_image_processor(self, **kwargs): method tearDown (line 255) | def tearDown(self): method prepare_image_inputs (line 258) | def prepare_image_inputs(self): method test_post_process_masks_equivalence (line 270) | def test_post_process_masks_equivalence(self): method test_image_processor_equivalence (line 291) | def test_image_processor_equivalence(self): FILE: mplsandbox_for_rl/transformers/tests/models/seamless_m4t/test_feature_extraction_seamless_m4t.py function floats_list (line 40) | def floats_list(shape, scale=1.0, rng=None, name=None): class SeamlessM4TFeatureExtractionTester (line 55) | class SeamlessM4TFeatureExtractionTester(unittest.TestCase): method __init__ (line 56) | def __init__( method prepare_feat_extract_dict (line 82) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 94) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class SeamlessM4TFeatureExtractionTest (line 112) | class SeamlessM4TFeatureExtractionTest(SequenceFeatureExtractionTestMixi... method setUp (line 115) | def setUp(self): method test_feat_extract_from_and_save_pretrained (line 118) | def test_feat_extract_from_and_save_pretrained(self): method test_feat_extract_to_json_file (line 130) | def test_feat_extract_to_json_file(self): method test_call_numpy (line 142) | def test_call_numpy(self): method test_call_with_padded_input_not_multiple_of_stride (line 174) | def test_call_with_padded_input_not_multiple_of_stride(self): method test_call_without_attention_mask (line 231) | def test_call_without_attention_mask(self): method test_attention_mask (line 249) | def test_attention_mask(self): method test_call_torch (line 268) | def test_call_torch(self): method test_double_precision_pad (line 304) | def test_double_precision_pad(self): method _load_datasample (line 317) | def _load_datasample(self, id): method test_integration (line 324) | def test_integration(self): method test_zero_mean_unit_variance_normalization_trunc_np_longest (line 344) | def test_zero_mean_unit_variance_normalization_trunc_np_longest(self): FILE: mplsandbox_for_rl/transformers/tests/models/seamless_m4t/test_modeling_seamless_m4t.py class SeamlessM4TModelTester (line 53) | class SeamlessM4TModelTester: method __init__ (line 54) | def __init__( method prepare_config_and_inputs (line 149) | def prepare_config_and_inputs(self): method get_config (line 167) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 209) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 233) | def create_and_check_model(self, config, input_ids, decoder_input_ids,... method create_and_check_decoder_model_past_large_inputs (line 263) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 320) | def prepare_config_and_inputs_for_common(self): class SeamlessM4TModelWithSpeechInputTest (line 342) | class SeamlessM4TModelWithSpeechInputTest(ModelTesterMixin, unittest.Tes... method setUp (line 365) | def setUp(self): method test_config (line 369) | def test_config(self): method test_model (line 372) | def test_model(self): method test_model_from_pretrained (line 377) | def test_model_from_pretrained(self): method _get_input_ids_and_config (line 382) | def _get_input_ids_and_config(self, batch_size=2): method _get_encoder_outputs (line 403) | def _get_encoder_outputs( method test_initialization (line 425) | def test_initialization(self): method test_inputs_embeds (line 464) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 468) | def test_inputs_embeds_matches_input_ids(self): method test_model_weights_reload_no_missing_tied_weights (line 474) | def test_model_weights_reload_no_missing_tied_weights(self): method test_save_load_fast_init_to_base (line 480) | def test_save_load_fast_init_to_base(self): method test_forward_signature (line 484) | def test_forward_signature(self): method test_save_load_fast_init_from_base (line 488) | def test_save_load_fast_init_from_base(self): method test_training_gradient_checkpointing (line 494) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 500) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 506) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_load_save_without_tied_weights (line 512) | def test_load_save_without_tied_weights(self): method test_attention_outputs (line 515) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 621) | def test_retain_grad_hidden_states_attentions(self): class SeamlessM4TModelWithTextInputTest (line 629) | class SeamlessM4TModelWithTextInputTest( method setUp (line 664) | def setUp(self): method test_config (line 668) | def test_config(self): method test_model (line 671) | def test_model(self): method test_model_from_pretrained (line 676) | def test_model_from_pretrained(self): method test_initialization (line 681) | def test_initialization(self): method test_model_weights_reload_no_missing_tied_weights (line 722) | def test_model_weights_reload_no_missing_tied_weights(self): method test_forward_signature (line 726) | def test_forward_signature(self): method test_decoder_model_past_with_large_inputs (line 729) | def test_decoder_model_past_with_large_inputs(self): method test_save_load_fast_init_to_base (line 736) | def test_save_load_fast_init_to_base(self): method test_save_load_fast_init_from_base (line 740) | def test_save_load_fast_init_from_base(self): method test_training_gradient_checkpointing (line 746) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 752) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 758) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_retain_grad_hidden_states_attentions (line 764) | def test_retain_grad_hidden_states_attentions(self): method test_load_save_without_tied_weights (line 770) | def test_load_save_without_tied_weights(self): class SeamlessM4TGenerationTest (line 775) | class SeamlessM4TGenerationTest(unittest.TestCase): method setUp (line 779) | def setUp(self): method update_generation (line 784) | def update_generation(self, model): method prepare_text_input (line 800) | def prepare_text_input(self): method prepare_speech_input (line 813) | def prepare_speech_input(self): method prepare_speech_and_text_input (line 826) | def prepare_speech_and_text_input(self): method factory_generation_speech_test (line 848) | def factory_generation_speech_test(self, model, inputs): method test_speech_generation (line 853) | def test_speech_generation(self): method test_text_generation (line 900) | def test_text_generation(self): method test_generation (line 951) | def test_generation(self): class SeamlessM4TModelIntegrationTest (line 987) | class SeamlessM4TModelIntegrationTest(unittest.TestCase): method assertListAlmostEqual (line 990) | def assertListAlmostEqual(self, list1, list2, tol=1e-3): method processor (line 996) | def processor(self): method input_text (line 1000) | def input_text(self): method input_audio (line 1017) | def input_audio(self): method factory_test_task (line 1027) | def factory_test_task(self, class1, class2, inputs, class1_kwargs, cla... method test_to_eng_text (line 1044) | def test_to_eng_text(self): method test_to_swh_text (line 1072) | def test_to_swh_text(self): method test_to_rus_speech (line 1098) | def test_to_rus_speech(self): method test_text_to_text_model (line 1125) | def test_text_to_text_model(self): method test_speech_to_text_model (line 1136) | def test_speech_to_text_model(self): method test_speech_to_speech_model (line 1147) | def test_speech_to_speech_model(self): method test_text_to_speech_model (line 1152) | def test_text_to_speech_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/seamless_m4t/test_processor_seamless_m4t.py class SeamlessM4TProcessorTest (line 30) | class SeamlessM4TProcessorTest(unittest.TestCase): method setUp (line 31) | def setUp(self): method get_tokenizer (line 35) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 38) | def get_feature_extractor(self, **kwargs): method tearDown (line 41) | def tearDown(self): method test_save_load_pretrained_default (line 44) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 62) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 84) | def test_feature_extractor(self): method test_tokenizer (line 99) | def test_tokenizer(self): method test_tokenizer_decode (line 115) | def test_tokenizer_decode(self): FILE: mplsandbox_for_rl/transformers/tests/models/seamless_m4t/test_tokenization_seamless_m4t.py class SeamlessM4TTokenizationTest (line 54) | class SeamlessM4TTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 62) | def setUp(self): method test_full_tokenizer (line 69) | def test_full_tokenizer(self): method test_maximum_encoding_length_single_input (line 145) | def test_maximum_encoding_length_single_input(self): method test_maximum_encoding_length_pair_input (line 248) | def test_maximum_encoding_length_pair_input(self): method test_padding_to_multiple_of (line 251) | def test_padding_to_multiple_of(self): method test_prepare_seq2seq_batch (line 287) | def test_prepare_seq2seq_batch(self): method test_save_slow_from_fast_and_reload_fast (line 347) | def test_save_slow_from_fast_and_reload_fast(self): method test_special_tokens_initialization (line 351) | def test_special_tokens_initialization(self): method test_call (line 387) | def test_call(self): method test_training_new_tokenizer (line 390) | def test_training_new_tokenizer(self): method test_pickle_subword_regularization_tokenizer (line 429) | def test_pickle_subword_regularization_tokenizer(self): method test_subword_regularization_tokenizer (line 433) | def test_subword_regularization_tokenizer(self): class SeamlessM4TDistilledIntegrationTest (line 440) | class SeamlessM4TDistilledIntegrationTest(unittest.TestCase): method setUpClass (line 456) | def setUpClass(cls): method test_language_codes (line 463) | def test_language_codes(self): method test_tokenizer_tgt_lang (line 470) | def test_tokenizer_tgt_lang(self): method test_enro_tokenizer_decode_ignores_language_codes (line 483) | def test_enro_tokenizer_decode_ignores_language_codes(self): method test_enro_tokenizer_truncation (line 492) | def test_enro_tokenizer_truncation(self): method test_enro_tokenizer_prepare_batch (line 502) | def test_enro_tokenizer_prepare_batch(self): method test_seq2seq_max_length (line 527) | def test_seq2seq_max_length(self): method test_tokenizer_translation (line 545) | def test_tokenizer_translation(self): class CommonSpmIntegrationTests (line 564) | class CommonSpmIntegrationTests(unittest.TestCase): method setUpClass (line 570) | def setUpClass(cls): method test_add_dummy_prefix (line 576) | def test_add_dummy_prefix(self): method test_remove_extra_whitespaces (line 600) | def test_remove_extra_whitespaces(self): method test_character_after_special_token (line 634) | def test_character_after_special_token(self): method test_special_tokens_strip (line 651) | def test_special_tokens_strip(self): FILE: mplsandbox_for_rl/transformers/tests/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py class SeamlessM4Tv2ModelTester (line 52) | class SeamlessM4Tv2ModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 159) | def prepare_config_and_inputs(self): method get_config (line 177) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 225) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 249) | def create_and_check_model(self, config, input_ids, decoder_input_ids,... method create_and_check_decoder_model_past_large_inputs (line 279) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 336) | def prepare_config_and_inputs_for_common(self): class SeamlessM4Tv2ModelWithSpeechInputTest (line 358) | class SeamlessM4Tv2ModelWithSpeechInputTest(ModelTesterMixin, unittest.T... method setUp (line 381) | def setUp(self): method test_config (line 385) | def test_config(self): method test_model (line 388) | def test_model(self): method test_model_from_pretrained (line 393) | def test_model_from_pretrained(self): method _get_input_ids_and_config (line 398) | def _get_input_ids_and_config(self, batch_size=2): method _get_encoder_outputs (line 419) | def _get_encoder_outputs( method test_initialization (line 441) | def test_initialization(self): method test_inputs_embeds (line 480) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 484) | def test_inputs_embeds_matches_input_ids(self): method test_model_weights_reload_no_missing_tied_weights (line 490) | def test_model_weights_reload_no_missing_tied_weights(self): method test_save_load_fast_init_to_base (line 496) | def test_save_load_fast_init_to_base(self): method test_forward_signature (line 500) | def test_forward_signature(self): method test_save_load_fast_init_from_base (line 504) | def test_save_load_fast_init_from_base(self): method test_training_gradient_checkpointing (line 510) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 516) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 522) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_load_save_without_tied_weights (line 528) | def test_load_save_without_tied_weights(self): method test_attention_outputs (line 531) | def test_attention_outputs(self): class SeamlessM4Tv2ModelWithTextInputTest (line 639) | class SeamlessM4Tv2ModelWithTextInputTest(ModelTesterMixin, GenerationTe... method setUp (line 660) | def setUp(self): method test_config (line 664) | def test_config(self): method test_model (line 667) | def test_model(self): method test_model_from_pretrained (line 672) | def test_model_from_pretrained(self): method test_initialization (line 677) | def test_initialization(self): method test_model_weights_reload_no_missing_tied_weights (line 718) | def test_model_weights_reload_no_missing_tied_weights(self): method test_forward_signature (line 722) | def test_forward_signature(self): method test_decoder_model_past_with_large_inputs (line 725) | def test_decoder_model_past_with_large_inputs(self): method test_save_load_fast_init_to_base (line 732) | def test_save_load_fast_init_to_base(self): method test_save_load_fast_init_from_base (line 736) | def test_save_load_fast_init_from_base(self): method test_training_gradient_checkpointing (line 742) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 748) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 754) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_load_save_without_tied_weights (line 760) | def test_load_save_without_tied_weights(self): class SeamlessM4Tv2GenerationTest (line 765) | class SeamlessM4Tv2GenerationTest(unittest.TestCase): method setUp (line 769) | def setUp(self): method update_generation (line 774) | def update_generation(self, model): method prepare_text_input (line 807) | def prepare_text_input(self, tgt_lang): method prepare_speech_input (line 820) | def prepare_speech_input(self): method prepare_speech_and_text_input (line 833) | def prepare_speech_and_text_input(self): method factory_generation_speech_test (line 855) | def factory_generation_speech_test(self, model, inputs): method test_generation_languages (line 860) | def test_generation_languages(self): method test_speech_generation (line 880) | def test_speech_generation(self): method test_text_generation (line 927) | def test_text_generation(self): method test_generation (line 978) | def test_generation(self): class SeamlessM4Tv2ModelIntegrationTest (line 1016) | class SeamlessM4Tv2ModelIntegrationTest(unittest.TestCase): method assertListAlmostEqual (line 1019) | def assertListAlmostEqual(self, list1, list2, tol=1e-4): method processor (line 1025) | def processor(self): method input_text (line 1029) | def input_text(self): method input_audio (line 1046) | def input_audio(self): method factory_test_task (line 1056) | def factory_test_task(self, class1, class2, inputs, class1_kwargs, cla... method test_to_eng_text (line 1074) | def test_to_eng_text(self): method test_to_swh_text (line 1108) | def test_to_swh_text(self): method test_to_rus_speech (line 1142) | def test_to_rus_speech(self): method test_text_to_text_model (line 1175) | def test_text_to_text_model(self): method test_speech_to_text_model (line 1186) | def test_speech_to_text_model(self): method test_speech_to_speech_model (line 1197) | def test_speech_to_speech_model(self): method test_text_to_speech_model (line 1202) | def test_text_to_speech_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/segformer/test_image_processing_segformer.py class SegformerImageProcessingTester (line 36) | class SegformerImageProcessingTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_image_processor_dict (line 64) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 74) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 77) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... function prepare_semantic_single_inputs (line 89) | def prepare_semantic_single_inputs(): function prepare_semantic_batch_inputs (line 98) | def prepare_semantic_batch_inputs(): class SegformerImageProcessingTest (line 111) | class SegformerImageProcessingTest(ImageProcessingTestMixin, unittest.Te... method setUp (line 114) | def setUp(self): method image_processor_dict (line 119) | def image_processor_dict(self): method test_image_processor_properties (line 122) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 131) | def test_image_processor_from_dict_with_kwargs(self): method test_call_segmentation_maps (line 142) | def test_call_segmentation_maps(self): method test_reduce_labels (line 248) | def test_reduce_labels(self): method test_removed_deprecated_kwargs (line 263) | def test_removed_deprecated_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/segformer/test_modeling_segformer.py class SegformerConfigTester (line 44) | class SegformerConfigTester(ConfigTester): method create_and_test_config_common_properties (line 45) | def create_and_test_config_common_properties(self): class SegformerModelTester (line 52) | class SegformerModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 103) | def get_config(self): method create_and_check_model (line 117) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_segmentation (line 127) | def create_and_check_for_image_segmentation(self, config, pixel_values... method create_and_check_for_binary_image_segmentation (line 142) | def create_and_check_for_binary_image_segmentation(self, config, pixel... method prepare_config_and_inputs_for_common (line 151) | def prepare_config_and_inputs_for_common(self): class SegformerModelTest (line 159) | class SegformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest... method setUp (line 184) | def setUp(self): method test_config (line 188) | def test_config(self): method test_model (line 191) | def test_model(self): method test_for_binary_image_segmentation (line 195) | def test_for_binary_image_segmentation(self): method test_for_image_segmentation (line 199) | def test_for_image_segmentation(self): method test_inputs_embeds (line 204) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 208) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 211) | def test_attention_outputs(self): method test_hidden_states_output (line 280) | def test_hidden_states_output(self): method test_training (line 316) | def test_training(self): method test_model_from_pretrained (line 335) | def test_model_from_pretrained(self): function prepare_img (line 342) | def prepare_img(): class SegformerModelIntegrationTest (line 348) | class SegformerModelIntegrationTest(unittest.TestCase): method test_inference_image_segmentation_ade (line 350) | def test_inference_image_segmentation_ade(self): method test_inference_image_segmentation_city (line 379) | def test_inference_image_segmentation_city(self): method test_post_processing_semantic_segmentation (line 408) | def test_post_processing_semantic_segmentation(self): FILE: mplsandbox_for_rl/transformers/tests/models/segformer/test_modeling_tf_segformer.py class TFSegformerConfigTester (line 44) | class TFSegformerConfigTester(ConfigTester): method create_and_test_config_common_properties (line 45) | def create_and_test_config_common_properties(self): class TFSegformerModelTester (line 52) | class TFSegformerModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 103) | def get_config(self): method create_and_check_model (line 118) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_segmentation (line 126) | def create_and_check_for_image_segmentation(self, config, pixel_values... method prepare_config_and_inputs_for_common (line 138) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_keras_fit (line 144) | def prepare_config_and_inputs_for_keras_fit(self, for_segmentation: bo... class TFSegformerModelTest (line 155) | class TFSegformerModelTest(TFModelTesterMixin, PipelineTesterMixin, unit... method setUp (line 172) | def setUp(self): method test_model (line 176) | def test_model(self): method test_inputs_embeds (line 181) | def test_inputs_embeds(self): method test_model_common_attributes (line 185) | def test_model_common_attributes(self): method test_forward_signature (line 188) | def test_forward_signature(self): method test_attention_outputs (line 200) | def test_attention_outputs(self): method test_hidden_states_output (line 260) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 293) | def test_model_outputs_equivalence(self): method test_dataset_conversion (line 339) | def test_dataset_conversion(self): method check_keras_fit_results (line 342) | def check_keras_fit_results(self, val_loss1, val_loss2, atol=2e-1, rto... method test_keras_fit (line 350) | def test_keras_fit(self): method test_loss_computation (line 360) | def test_loss_computation(self): method check_pt_tf_outputs (line 434) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method test_model_from_pretrained (line 439) | def test_model_from_pretrained(self): function prepare_img (line 446) | def prepare_img(): class TFSegformerModelIntegrationTest (line 452) | class TFSegformerModelIntegrationTest(unittest.TestCase): method test_inference_image_segmentation_ade (line 454) | def test_inference_image_segmentation_ade(self): method test_inference_image_segmentation_city (line 480) | def test_inference_image_segmentation_city(self): FILE: mplsandbox_for_rl/transformers/tests/models/seggpt/test_image_processing_seggpt.py class SegGptImageProcessingTester (line 38) | class SegGptImageProcessingTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_image_processor_dict (line 66) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 75) | def expected_output_image_shape(self, images): method expected_post_processed_shape (line 78) | def expected_post_processed_shape(self): method get_fake_image_segmentation_output (line 81) | def get_fake_image_segmentation_output(self): method prepare_image_inputs (line 87) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... function prepare_mask (line 99) | def prepare_mask(): function prepare_img (line 104) | def prepare_img(): class SegGptImageProcessingTest (line 113) | class SegGptImageProcessingTest(ImageProcessingTestMixin, unittest.TestC... method setUp (line 116) | def setUp(self): method image_processor_dict (line 121) | def image_processor_dict(self): method test_image_processor_properties (line 124) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 132) | def test_image_processor_from_dict_with_kwargs(self): method test_image_processor_palette (line 139) | def test_image_processor_palette(self): method test_mask_equivalence (line 146) | def test_mask_equivalence(self): method test_mask_to_rgb (line 157) | def test_mask_to_rgb(self): method test_post_processing_semantic_segmentation (line 182) | def test_post_processing_semantic_segmentation(self): method test_pixel_values (line 193) | def test_pixel_values(self): method test_prompt_mask_equivalence (line 240) | def test_prompt_mask_equivalence(self): FILE: mplsandbox_for_rl/transformers/tests/models/seggpt/test_modeling_seggpt.py class SegGptModelTester (line 49) | class SegGptModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method get_config (line 111) | def get_config(self): method create_and_check_model (line 129) | def create_and_check_model(self, config, pixel_values, prompt_pixel_va... method prepare_config_and_inputs_for_common (line 144) | def prepare_config_and_inputs_for_common(self): class SegGptModelTest (line 162) | class SegGptModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 179) | def setUp(self): method test_config (line 183) | def test_config(self): method test_inputs_embeds (line 187) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 190) | def test_model_get_set_embeddings(self): method test_forward_signature (line 197) | def test_forward_signature(self): method test_model (line 209) | def test_model(self): method test_hidden_states_output (line 213) | def test_hidden_states_output(self): method test_batching_equivalence (line 248) | def test_batching_equivalence(self): method test_seggpt_loss (line 302) | def test_seggpt_loss(self): method test_model_from_pretrained (line 319) | def test_model_from_pretrained(self): function prepare_img (line 325) | def prepare_img(): function prepare_bool_masked_pos (line 332) | def prepare_bool_masked_pos(config: SegGptConfig): class SegGptModelIntegrationTest (line 348) | class SegGptModelIntegrationTest(unittest.TestCase): method default_image_processor (line 350) | def default_image_processor(self): method test_one_shot_inference (line 354) | def test_one_shot_inference(self): method test_few_shot_inference (line 400) | def test_few_shot_inference(self): method test_one_shot_with_label (line 434) | def test_one_shot_with_label(self): FILE: mplsandbox_for_rl/transformers/tests/models/sew/test_modeling_sew.py class SEWModelTester (line 49) | class SEWModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 110) | def prepare_config_and_inputs(self): method get_config (line 118) | def get_config(self): method create_and_check_model (line 141) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 150) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 176) | def check_ctc_loss(self, config, input_values, *args): method check_ctc_training (line 204) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_loss (line 233) | def check_seq_classifier_loss(self, config, input_values, *args): method check_seq_classifier_training (line 258) | def check_seq_classifier_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 281) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 295) | def prepare_config_and_inputs_for_common(self): class SEWModelTest (line 302) | class SEWModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 316) | def setUp(self): method test_config (line 320) | def test_config(self): method test_model (line 323) | def test_model(self): method test_ctc_loss_inference (line 327) | def test_ctc_loss_inference(self): method test_ctc_train (line 331) | def test_ctc_train(self): method test_labels_out_of_vocab (line 335) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 340) | def test_inputs_embeds(self): method test_forward_signature (line 344) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 348) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 352) | def test_model_get_set_embeddings(self): method test_save_load_low_cpu_mem_usage (line 356) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 360) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 364) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method test_retain_grad_hidden_states_attentions (line 367) | def test_retain_grad_hidden_states_attentions(self): method test_seq_classifier_loss_inference (line 407) | def test_seq_classifier_loss_inference(self): method test_seq_classifier_train (line 411) | def test_seq_classifier_train(self): method test_initialization (line 415) | def test_initialization(self): method _mock_init_weights (line 441) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 454) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 458) | def test_model_from_pretrained(self): class SEWUtilsTest (line 464) | class SEWUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 465) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 476) | def test_compute_mask_indices_overlap(self): class SEWModelIntegrationTest (line 493) | class SEWModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 494) | def _load_datasamples(self, num_samples): method test_inference_pretrained_batched (line 505) | def test_inference_pretrained_batched(self): method test_inference_ctc_batched (line 559) | def test_inference_ctc_batched(self): FILE: mplsandbox_for_rl/transformers/tests/models/sew_d/test_modeling_sew_d.py class SEWDModelTester (line 49) | class SEWDModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 124) | def prepare_config_and_inputs(self): method get_config (line 132) | def get_config(self): method create_and_check_model (line 162) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 171) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 197) | def check_ctc_loss(self, config, input_values, *args): method check_ctc_training (line 225) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_loss (line 254) | def check_seq_classifier_loss(self, config, input_values, *args): method check_seq_classifier_training (line 279) | def check_seq_classifier_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 302) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 316) | def prepare_config_and_inputs_for_common(self): class SEWDModelTest (line 323) | class SEWDModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 338) | def setUp(self): method test_config (line 342) | def test_config(self): method test_model (line 345) | def test_model(self): method test_ctc_loss_inference (line 349) | def test_ctc_loss_inference(self): method test_ctc_train (line 353) | def test_ctc_train(self): method test_labels_out_of_vocab (line 357) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 362) | def test_inputs_embeds(self): method test_forward_signature (line 366) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 370) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 374) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 377) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 417) | def test_initialization(self): method _mock_init_weights (line 443) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 456) | def test_feed_forward_chunking(self): method test_save_load_low_cpu_mem_usage (line 460) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 464) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 468) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method test_model_from_pretrained (line 472) | def test_model_from_pretrained(self): class SEWDUtilsTest (line 478) | class SEWDUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 479) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 490) | def test_compute_mask_indices_overlap(self): class SEWDModelIntegrationTest (line 507) | class SEWDModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 508) | def _load_datasamples(self, num_samples): method test_inference_pretrained_batched (line 519) | def test_inference_pretrained_batched(self): method test_inference_ctc_batched (line 573) | def test_inference_ctc_batched(self): FILE: mplsandbox_for_rl/transformers/tests/models/siglip/test_image_processing_siglip.py class SiglipImageProcessingTester (line 29) | class SiglipImageProcessingTester(unittest.TestCase): method __init__ (line 30) | def __init__( method prepare_image_processor_dict (line 62) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 73) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 76) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class SiglipImageProcessingTest (line 91) | class SiglipImageProcessingTest(ImageProcessingTestMixin, unittest.TestC... method setUp (line 94) | def setUp(self): method image_processor_dict (line 99) | def image_processor_dict(self): method test_image_processor_properties (line 103) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 115) | def test_image_processor_from_dict_with_kwargs(self): method test_call_numpy_4_channels (line 126) | def test_call_numpy_4_channels(self): FILE: mplsandbox_for_rl/transformers/tests/models/siglip/test_modeling_siglip.py class SiglipModelTesterMixin (line 73) | class SiglipModelTesterMixin(ModelTesterMixin): method test_eager_matches_sdpa_inference (line 74) | def test_eager_matches_sdpa_inference( class SiglipVisionModelTester (line 222) | class SiglipVisionModelTester: method __init__ (line 223) | def __init__( method prepare_config_and_inputs (line 260) | def prepare_config_and_inputs(self): method get_config (line 266) | def get_config(self): method create_and_check_model (line 280) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 294) | def prepare_config_and_inputs_for_common(self): class SiglipVisionModelTest (line 302) | class SiglipVisionModelTest(SiglipModelTesterMixin, unittest.TestCase): method setUp (line 320) | def setUp(self): method test_config (line 326) | def test_config(self): method test_inputs_embeds (line 330) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 333) | def test_model_get_set_embeddings(self): method test_forward_signature (line 342) | def test_forward_signature(self): method test_model (line 354) | def test_model(self): method test_training (line 359) | def test_training(self): method test_training_gradient_checkpointing (line 363) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 367) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 371) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 375) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 379) | def test_save_load_fast_init_to_base(self): method test_initialization (line 383) | def test_initialization(self): method test_model_from_pretrained (line 387) | def test_model_from_pretrained(self): method test_eager_matches_sdpa_inference (line 396) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): class SiglipTextModelTester (line 404) | class SiglipTextModelTester: method __init__ (line 405) | def __init__( method prepare_config_and_inputs (line 442) | def prepare_config_and_inputs(self): method get_config (line 460) | def get_config(self): method create_and_check_model (line 473) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 484) | def prepare_config_and_inputs_for_common(self): class SiglipTextModelTest (line 492) | class SiglipTextModelTest(SiglipModelTesterMixin, unittest.TestCase): method setUp (line 500) | def setUp(self): method test_config (line 505) | def test_config(self): method test_model (line 509) | def test_model(self): method test_training (line 514) | def test_training(self): method test_training_gradient_checkpointing (line 518) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 522) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 526) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 531) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 536) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 541) | def test_save_load_fast_init_to_base(self): method test_initialization (line 545) | def test_initialization(self): method test_model_from_pretrained (line 549) | def test_model_from_pretrained(self): method test_eager_matches_sdpa_inference (line 558) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): class SiglipModelTester (line 566) | class SiglipModelTester: method __init__ (line 567) | def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_tr... method prepare_config_and_inputs (line 580) | def prepare_config_and_inputs(self): method get_config (line 588) | def get_config(self): method create_and_check_model (line 594) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 605) | def prepare_config_and_inputs_for_common(self): class SiglipModelTest (line 618) | class SiglipModelTest(SiglipModelTesterMixin, PipelineTesterMixin, unitt... method setUp (line 634) | def setUp(self): method test_model (line 638) | def test_model(self): method test_hidden_states_output (line 644) | def test_hidden_states_output(self): method test_inputs_embeds (line 649) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 654) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 659) | def test_model_get_set_embeddings(self): method test_initialization (line 663) | def test_initialization(self): method _create_and_check_torchscript (line 667) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 739) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 755) | def test_model_from_pretrained(self): method test_flash_attn_2_inference_equivalence (line 764) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 840) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_eager_matches_sdpa_inference (line 847) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): class SiglipForImageClassificationModelTester (line 855) | class SiglipForImageClassificationModelTester(SiglipModelTester): method __init__ (line 856) | def __init__(self, parent): method prepare_config_and_inputs (line 863) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 869) | def prepare_config_and_inputs_for_common(self): class SiglipForImageClassificationModelTest (line 877) | class SiglipForImageClassificationModelTest(SiglipModelTesterMixin, Pipe... method setUp (line 892) | def setUp(self): method test_inputs_embeds (line 896) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 900) | def test_model_get_set_embeddings(self): method test_training_gradient_checkpointing (line 904) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 908) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 912) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_initialization (line 916) | def test_initialization(self): method test_eager_matches_sdpa_inference (line 923) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): function prepare_img (line 930) | def prepare_img(): class SiglipModelIntegrationTest (line 938) | class SiglipModelIntegrationTest(unittest.TestCase): method test_inference (line 940) | def test_inference(self): method test_inference_interpolate_pos_encoding (line 976) | def test_inference_interpolate_pos_encoding(self): FILE: mplsandbox_for_rl/transformers/tests/models/siglip/test_tokenization_siglip.py class SiglipTokenizationTest (line 40) | class SiglipTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 48) | def setUp(self): method test_convert_token_and_id (line 56) | def test_convert_token_and_id(self): method test_get_vocab (line 64) | def test_get_vocab(self): method test_full_tokenizer (line 70) | def test_full_tokenizer(self): method siglip_tokenizer (line 135) | def siglip_tokenizer(self): method get_tokenizer (line 139) | def get_tokenizer(self, **kwargs) -> SiglipTokenizer: method test_rust_and_python_full_tokenizers (line 143) | def test_rust_and_python_full_tokenizers(self): method test_eos_treatment (line 165) | def test_eos_treatment(self): method test_prepare_batch (line 171) | def test_prepare_batch(self): method test_empty_target_text (line 187) | def test_empty_target_text(self): method test_max_length (line 196) | def test_max_length(self): method test_eos_in_input (line 204) | def test_eos_in_input(self): method test_subword_regularization_tokenizer (line 217) | def test_subword_regularization_tokenizer(self): method test_pickle_subword_regularization_tokenizer (line 221) | def test_pickle_subword_regularization_tokenizer(self): method test_special_tokens_initialization (line 225) | def test_special_tokens_initialization(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 253) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_sentencepiece_tokenize_and_convert_tokens_to_string (line 317) | def test_sentencepiece_tokenize_and_convert_tokens_to_string(self): method test_tokenizer_integration (line 352) | def test_tokenizer_integration(self): method test_some_edge_cases (line 375) | def test_some_edge_cases(self): class CommonSpmIntegrationTests (line 403) | class CommonSpmIntegrationTests(unittest.TestCase): method setUpClass (line 409) | def setUpClass(cls): method test_add_dummy_prefix (line 416) | def test_add_dummy_prefix(self): method test_remove_extra_whitespaces (line 437) | def test_remove_extra_whitespaces(self): FILE: mplsandbox_for_rl/transformers/tests/models/speech_encoder_decoder/test_modeling_flax_speech_encoder_decoder.py class FlaxEncoderDecoderMixin (line 58) | class FlaxEncoderDecoderMixin: method get_encoder_decoder_model (line 59) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 62) | def prepare_config_and_inputs(self): method get_pretrained_model (line 65) | def get_pretrained_model(self): method check_encoder_decoder_model_from_pretrained_configs (line 68) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 98) | def check_encoder_decoder_model( method check_encoder_decoder_model_from_pretrained (line 136) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 164) | def check_save_and_load( method check_encoder_decoder_model_from_encoder_decoder_pretrained (line 203) | def check_encoder_decoder_model_from_encoder_decoder_pretrained( method check_encoder_decoder_model_output_attentions (line 248) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 302) | def check_encoder_decoder_model_generate(self, inputs, config, decoder... method check_freeze_feature_encoder (line 331) | def check_freeze_feature_encoder( method check_pt_flax_equivalence (line 409) | def check_pt_flax_equivalence(self, pt_model, fx_model, inputs_dict): method check_equivalence_pt_to_flax (line 450) | def check_equivalence_pt_to_flax(self, config, decoder_config, inputs_... method check_equivalence_flax_to_pt (line 461) | def check_equivalence_flax_to_pt(self, config, decoder_config, inputs_... method test_encoder_decoder_model_from_pretrained_configs (line 471) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 475) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 479) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 483) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_from_encoder_decoder_pretrained (line 487) | def test_encoder_decoder_model_from_encoder_decoder_pretrained(self): method test_encoder_decoder_model_output_attentions (line 491) | def test_encoder_decoder_model_output_attentions(self): method test_freeze_feature_encoder (line 495) | def test_freeze_feature_encoder(self): method test_encoder_decoder_model_generate (line 499) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 503) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_flax_equivalence (line 508) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 548) | def test_real_model_save_load_from_pretrained(self): class FlaxWav2Vec2GPT2ModelTest (line 578) | class FlaxWav2Vec2GPT2ModelTest(FlaxEncoderDecoderMixin, unittest.TestCa... method get_pretrained_model_and_inputs (line 579) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 597) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 602) | def prepare_config_and_inputs(self): method test_flaxwav2vec2gpt2_pt_flax_equivalence (line 629) | def test_flaxwav2vec2gpt2_pt_flax_equivalence(self): class FlaxWav2Vec2BartModelTest (line 695) | class FlaxWav2Vec2BartModelTest(FlaxEncoderDecoderMixin, unittest.TestCa... method get_pretrained_model_and_inputs (line 696) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 714) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 719) | def prepare_config_and_inputs(self): method test_flaxwav2vec2bart_pt_flax_equivalence (line 746) | def test_flaxwav2vec2bart_pt_flax_equivalence(self): class FlaxWav2Vec2BertModelTest (line 812) | class FlaxWav2Vec2BertModelTest(FlaxEncoderDecoderMixin, unittest.TestCa... method get_pretrained_model_and_inputs (line 813) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 831) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 836) | def prepare_config_and_inputs(self): method test_flaxwav2vec2bert_pt_flax_equivalence (line 863) | def test_flaxwav2vec2bert_pt_flax_equivalence(self): FILE: mplsandbox_for_rl/transformers/tests/models/speech_encoder_decoder/test_modeling_speech_encoder_decoder.py class EncoderDecoderMixin (line 44) | class EncoderDecoderMixin: method get_encoder_decoder_model (line 45) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 48) | def prepare_config_and_inputs(self): method get_pretrained_model_and_inputs (line 51) | def get_pretrained_model_and_inputs(self): method check_encoder_decoder_model_from_pretrained_configs (line 54) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 87) | def check_encoder_decoder_model( method check_encoder_decoder_model_with_inputs (line 127) | def check_encoder_decoder_model_with_inputs( method check_encoder_decoder_model_from_pretrained (line 164) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 194) | def check_save_and_load( method check_save_and_load_encoder_decoder_model (line 237) | def check_save_and_load_encoder_decoder_model( method check_encoder_decoder_model_output_attentions (line 283) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 340) | def check_encoder_decoder_model_generate( method test_encoder_decoder_model (line 363) | def test_encoder_decoder_model(self): method test_encoder_decoder_model_with_inputs (line 367) | def test_encoder_decoder_model_with_inputs(self): method test_encoder_decoder_model_from_pretrained_configs (line 371) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 375) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 379) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 383) | def test_save_and_load_from_pretrained(self): method test_save_and_load_from_encoder_decoder_pretrained (line 387) | def test_save_and_load_from_encoder_decoder_pretrained(self): method test_encoder_decoder_model_output_attentions (line 391) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_generate (line 395) | def test_encoder_decoder_model_generate(self): method test_training_gradient_checkpointing (line 399) | def test_training_gradient_checkpointing(self): method test_real_model_save_load_from_pretrained (line 424) | def test_real_model_save_load_from_pretrained(self): class Wav2Vec2BertModelTest (line 446) | class Wav2Vec2BertModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 447) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 465) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 470) | def prepare_config_and_inputs(self): class Speech2TextBertModelTest (line 510) | class Speech2TextBertModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 511) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 529) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 534) | def prepare_config_and_inputs(self): method test_encoder_decoder_model_from_pretrained_configs (line 573) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_save_and_load_from_pretrained (line 577) | def test_save_and_load_from_pretrained(self): method test_real_model_save_load_from_pretrained (line 582) | def test_real_model_save_load_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/speech_to_text/test_feature_extraction_speech_to_text.py function floats_list (line 35) | def floats_list(shape, scale=1.0, rng=None, name=None): class Speech2TextFeatureExtractionTester (line 51) | class Speech2TextFeatureExtractionTester(unittest.TestCase): method __init__ (line 52) | def __init__( method prepare_feat_extract_dict (line 77) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 87) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class Speech2TextFeatureExtractionTest (line 106) | class Speech2TextFeatureExtractionTest(SequenceFeatureExtractionTestMixi... method setUp (line 109) | def setUp(self): method _check_zero_mean_unit_variance (line 112) | def _check_zero_mean_unit_variance(self, input_vector): method test_call (line 116) | def test_call(self): method test_cepstral_mean_and_variance_normalization (line 147) | def test_cepstral_mean_and_variance_normalization(self): method test_cepstral_mean_and_variance_normalization_np (line 165) | def test_cepstral_mean_and_variance_normalization_np(self): method test_cepstral_mean_and_variance_normalization_trunc_max_length (line 185) | def test_cepstral_mean_and_variance_normalization_trunc_max_length(self): method test_cepstral_mean_and_variance_normalization_trunc_longest (line 204) | def test_cepstral_mean_and_variance_normalization_trunc_longest(self): method test_double_precision_pad (line 246) | def test_double_precision_pad(self): method _load_datasamples (line 259) | def _load_datasamples(self, num_samples): method test_integration (line 268) | def test_integration(self): method test_feat_extract_from_and_save_pretrained (line 283) | def test_feat_extract_from_and_save_pretrained(self): method test_feat_extract_to_json_file (line 295) | def test_feat_extract_to_json_file(self): class Speech2TextFeatureExtractionWithoutTorchaudioTest (line 313) | class Speech2TextFeatureExtractionWithoutTorchaudioTest(Speech2TextFeatu... method test_using_audio_utils (line 314) | def test_using_audio_utils(self): FILE: mplsandbox_for_rl/transformers/tests/models/speech_to_text/test_modeling_speech_to_text.py function prepare_speech_to_text_inputs_dict (line 49) | def prepare_speech_to_text_inputs_dict( class Speech2TextModelTester (line 82) | class Speech2TextModelTester: method __init__ (line 83) | def __init__( method prepare_config_and_inputs (line 135) | def prepare_config_and_inputs(self): method get_config (line 151) | def get_config(self): method prepare_config_and_inputs_for_common (line 176) | def prepare_config_and_inputs_for_common(self): method get_subsampled_output_lengths (line 180) | def get_subsampled_output_lengths(self, input_lengths): method create_and_check_model_forward (line 190) | def create_and_check_model_forward(self, config, inputs_dict): method create_and_check_decoder_model_past_large_inputs (line 201) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 234) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class Speech2TextModelTest (line 272) | class Speech2TextModelTest(ModelTesterMixin, GenerationTesterMixin, Pipe... method _get_input_ids_and_config (line 287) | def _get_input_ids_and_config(self, batch_size=2): method setUp (line 299) | def setUp(self): method test_config (line 304) | def test_config(self): method test_save_load_strict (line 307) | def test_save_load_strict(self): method test_model_forward (line 317) | def test_model_forward(self): method test_decoder_model_past_with_large_inputs (line 321) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 325) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 330) | def test_inputs_embeds(self): method test_training (line 334) | def test_training(self): method test_training_gradient_checkpointing (line 338) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 344) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 350) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_generate_fp16 (line 354) | def test_generate_fp16(self): method test_forward_signature (line 364) | def test_forward_signature(self): method test_hidden_states_output (line 386) | def test_hidden_states_output(self): method test_attention_outputs (line 439) | def test_attention_outputs(self): method test_resize_tokens_embeddings (line 534) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 582) | def test_resize_embeddings_untied(self): method test_generate_without_input_ids (line 632) | def test_generate_without_input_ids(self): method _get_encoder_outputs (line 636) | def _get_encoder_outputs( method _check_outputs (line 656) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method _create_and_check_torchscript (line 698) | def _create_and_check_torchscript(self, config, inputs_dict): method test_pt_tf_model_equivalence (line 774) | def test_pt_tf_model_equivalence(self, allow_missing_keys=True): method test_tf_from_pt_safetensors (line 779) | def test_tf_from_pt_safetensors(self): class Speech2TextModelIntegrationTests (line 788) | class Speech2TextModelIntegrationTests(unittest.TestCase): method default_processor (line 790) | def default_processor(self): method _load_datasamples (line 793) | def _load_datasamples(self, num_samples): method test_generation_librispeech (line 802) | def test_generation_librispeech(self): method test_generation_librispeech_batched (line 819) | def test_generation_librispeech_batched(self): FILE: mplsandbox_for_rl/transformers/tests/models/speech_to_text/test_modeling_tf_speech_to_text.py function prepare_speech_to_text_inputs_dict (line 37) | def prepare_speech_to_text_inputs_dict( class TFSpeech2TextModelTester (line 69) | class TFSpeech2TextModelTester: method __init__ (line 70) | def __init__( method prepare_config_and_inputs (line 124) | def prepare_config_and_inputs(self): method get_config (line 140) | def get_config(self): method prepare_config_and_inputs_for_common (line 166) | def prepare_config_and_inputs_for_common(self): method get_subsampled_output_lengths (line 170) | def get_subsampled_output_lengths(self, input_lengths): method create_and_check_decoder_model_past_large_inputs (line 180) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... class TFSpeech2TextModelTest (line 215) | class TFSpeech2TextModelTest(TFModelTesterMixin, PipelineTesterMixin, un... method setUp (line 226) | def setUp(self): method test_config (line 231) | def test_config(self): method test_decoder_model_past_with_large_inputs (line 234) | def test_decoder_model_past_with_large_inputs(self): method test_inputs_embeds (line 239) | def test_inputs_embeds(self): method test_training (line 243) | def test_training(self): method test_training_gradient_checkpointing (line 246) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 252) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 258) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_generate_fp16 (line 261) | def test_generate_fp16(self): method test_hidden_states_output (line 264) | def test_hidden_states_output(self): method test_attention_outputs (line 313) | def test_attention_outputs(self): method test_resize_token_embeddings (line 401) | def test_resize_token_embeddings(self): method test_resize_tokens_embeddings (line 405) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 409) | def test_resize_embeddings_untied(self): method test_generate_without_input_ids (line 416) | def test_generate_without_input_ids(self): method _get_encoder_outputs (line 420) | def _get_encoder_outputs( method _check_outputs (line 437) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method test_lm_head_model_random_no_beam_search_generate (line 481) | def test_lm_head_model_random_no_beam_search_generate(self): method test_lm_head_model_random_beam_search_generate (line 516) | def test_lm_head_model_random_beam_search_generate(self): method test_forward_signature (line 556) | def test_forward_signature(self): method test_pt_tf_model_equivalence (line 573) | def test_pt_tf_model_equivalence(self, allow_missing_keys=True): class TFSpeech2TextModelIntegrationTests (line 582) | class TFSpeech2TextModelIntegrationTests(unittest.TestCase): method default_processor (line 584) | def default_processor(self): method _load_datasamples (line 587) | def _load_datasamples(self, num_samples): method test_generation_librispeech (line 596) | def test_generation_librispeech(self): method test_generation_librispeech_batched (line 612) | def test_generation_librispeech_batched(self): FILE: mplsandbox_for_rl/transformers/tests/models/speech_to_text/test_processor_speech_to_text.py class Speech2TextProcessorTest (line 35) | class Speech2TextProcessorTest(unittest.TestCase): method setUp (line 36) | def setUp(self): method get_tokenizer (line 59) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 62) | def get_feature_extractor(self, **kwargs): method tearDown (line 65) | def tearDown(self): method test_save_load_pretrained_default (line 68) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 83) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 102) | def test_feature_extractor(self): method test_tokenizer (line 116) | def test_tokenizer(self): method test_tokenizer_decode (line 131) | def test_tokenizer_decode(self): method test_model_input_names (line 144) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/speech_to_text/test_tokenization_speech_to_text.py class SpeechToTextTokenizerTest (line 39) | class SpeechToTextTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 45) | def setUp(self): method test_convert_token_and_id (line 63) | def test_convert_token_and_id(self): method test_get_vocab (line 71) | def test_get_vocab(self): method test_vocab_size (line 79) | def test_vocab_size(self): method test_full_tokenizer (line 82) | def test_full_tokenizer(self): method test_tokenizer_integration (line 102) | def test_tokenizer_integration(self): class SpeechToTextTokenizerMultilinguialTest (line 113) | class SpeechToTextTokenizerMultilinguialTest(unittest.TestCase): method setUpClass (line 120) | def setUpClass(cls): method check_language_codes (line 124) | def check_language_codes(self): method test_vocab_size (line 130) | def test_vocab_size(self): method test_tokenizer_decode_ignores_language_codes (line 133) | def test_tokenizer_decode_ignores_language_codes(self): method test_tokenizer_adds_special_tokens (line 141) | def test_tokenizer_adds_special_tokens(self): method test_tgt_lang_setter (line 147) | def test_tgt_lang_setter(self): FILE: mplsandbox_for_rl/transformers/tests/models/speecht5/test_feature_extraction_speecht5.py function floats_list (line 38) | def floats_list(shape, scale=1.0, rng=None, name=None): class SpeechT5FeatureExtractionTester (line 53) | class SpeechT5FeatureExtractionTester(unittest.TestCase): method __init__ (line 54) | def __init__( method prepare_feat_extract_dict (line 91) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 107) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): method prepare_inputs_for_target (line 125) | def prepare_inputs_for_target(self, equal_length=False, numpify=False): class SpeechT5FeatureExtractionTest (line 142) | class SpeechT5FeatureExtractionTest(SequenceFeatureExtractionTestMixin, ... method setUp (line 145) | def setUp(self): method _check_zero_mean_unit_variance (line 148) | def _check_zero_mean_unit_variance(self, input_vector): method test_call (line 152) | def test_call(self): method test_zero_mean_unit_variance_normalization_np (line 170) | def test_zero_mean_unit_variance_normalization_np(self): method test_zero_mean_unit_variance_normalization (line 186) | def test_zero_mean_unit_variance_normalization(self): method test_zero_mean_unit_variance_normalization_trunc_np_max_length (line 202) | def test_zero_mean_unit_variance_normalization_trunc_np_max_length(self): method test_zero_mean_unit_variance_normalization_trunc_np_longest (line 214) | def test_zero_mean_unit_variance_normalization_trunc_np_longest(self): method test_double_precision_pad (line 242) | def test_double_precision_pad(self): method test_call_target (line 253) | def test_call_target(self): method test_batch_feature_target (line 284) | def test_batch_feature_target(self): method test_batch_feature_target_pt (line 307) | def test_batch_feature_target_pt(self): method test_padding_accepts_tensors_target_pt (line 325) | def test_padding_accepts_tensors_target_pt(self): method test_attention_mask_target (line 339) | def test_attention_mask_target(self): method test_attention_mask_with_truncation_target (line 356) | def test_attention_mask_with_truncation_target(self): method _load_datasamples (line 380) | def _load_datasamples(self, num_samples): method test_integration (line 389) | def test_integration(self): method test_integration_target (line 407) | def test_integration_target(self): FILE: mplsandbox_for_rl/transformers/tests/models/speecht5/test_modeling_speecht5.py function prepare_inputs_dict (line 59) | def prepare_inputs_dict( class SpeechT5ModelTester (line 100) | class SpeechT5ModelTester: method __init__ (line 101) | def __init__( method prepare_config_and_inputs (line 123) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 140) | def prepare_config_and_inputs_for_common(self): method get_config (line 144) | def get_config(self): method create_and_check_model_forward (line 156) | def create_and_check_model_forward(self, config, inputs_dict): class SpeechT5ModelTest (line 168) | class SpeechT5ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 182) | def setUp(self): method test_config (line 186) | def test_config(self): method test_model_forward (line 189) | def test_model_forward(self): method test_forward_signature (line 193) | def test_forward_signature(self): method test_inputs_embeds (line 216) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 220) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 224) | def test_retain_grad_hidden_states_attentions(self): method test_torchscript_output_attentions (line 229) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 234) | def test_torchscript_output_hidden_state(self): method test_torchscript_simple (line 239) | def test_torchscript_simple(self): class SpeechT5ForSpeechToTextTester (line 244) | class SpeechT5ForSpeechToTextTester: method __init__ (line 245) | def __init__( method prepare_config_and_inputs (line 281) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 298) | def prepare_config_and_inputs_for_common(self): method get_config (line 302) | def get_config(self): method create_and_check_model_forward (line 320) | def create_and_check_model_forward(self, config, inputs_dict): method create_and_check_decoder_model_past_large_inputs (line 330) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... class SpeechT5ForSpeechToTextTest (line 365) | class SpeechT5ForSpeechToTextTest(ModelTesterMixin, unittest.TestCase): method setUp (line 374) | def setUp(self): method test_config (line 378) | def test_config(self): method test_save_load_strict (line 381) | def test_save_load_strict(self): method test_model_forward (line 391) | def test_model_forward(self): method test_decoder_model_past_with_large_inputs (line 395) | def test_decoder_model_past_with_large_inputs(self): method test_attention_outputs (line 399) | def test_attention_outputs(self): method test_forward_signature (line 498) | def test_forward_signature(self): method test_hidden_states_output (line 520) | def test_hidden_states_output(self): method test_initialization (line 573) | def test_initialization(self): method test_inputs_embeds (line 602) | def test_inputs_embeds(self): method test_resize_embeddings_untied (line 605) | def test_resize_embeddings_untied(self): method test_resize_tokens_embeddings (line 651) | def test_resize_tokens_embeddings(self): method test_retain_grad_hidden_states_attentions (line 697) | def test_retain_grad_hidden_states_attentions(self): method test_training (line 702) | def test_training(self): method test_training_gradient_checkpointing (line 706) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 712) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 718) | def test_training_gradient_checkpointing_use_reentrant_false(self): method _mock_init_weights (line 722) | def _mock_init_weights(self, module): class SpeechT5ForSpeechToTextIntegrationTests (line 739) | class SpeechT5ForSpeechToTextIntegrationTests(unittest.TestCase): method default_processor (line 741) | def default_processor(self): method _load_datasamples (line 744) | def _load_datasamples(self, num_samples): method test_generation_librispeech (line 753) | def test_generation_librispeech(self): method test_generation_librispeech_batched (line 770) | def test_generation_librispeech_batched(self): class SpeechT5ForTextToSpeechTester (line 797) | class SpeechT5ForTextToSpeechTester: method __init__ (line 798) | def __init__( method prepare_config_and_inputs (line 832) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 849) | def prepare_config_and_inputs_for_common(self): method get_config (line 853) | def get_config(self): method create_and_check_model_forward (line 870) | def create_and_check_model_forward(self, config, inputs_dict): class SpeechT5ForTextToSpeechTest (line 885) | class SpeechT5ForTextToSpeechTest(ModelTesterMixin, unittest.TestCase): method setUp (line 894) | def setUp(self): method test_config (line 898) | def test_config(self): method test_save_load_strict (line 901) | def test_save_load_strict(self): method test_model_forward (line 911) | def test_model_forward(self): method test_model_forward_with_labels (line 915) | def test_model_forward_with_labels(self): method test_decoder_model_past_with_large_inputs (line 933) | def test_decoder_model_past_with_large_inputs(self): method test_determinism (line 937) | def test_determinism(self): method test_batching_equivalence (line 941) | def test_batching_equivalence(self): method test_forward_signature (line 944) | def test_forward_signature(self): method test_initialization (line 966) | def test_initialization(self): method test_inputs_embeds (line 990) | def test_inputs_embeds(self): method test_model_outputs_equivalence (line 994) | def test_model_outputs_equivalence(self): method test_save_load (line 998) | def test_save_load(self): method test_retain_grad_hidden_states_attentions (line 1002) | def test_retain_grad_hidden_states_attentions(self): method test_torchscript_output_attentions (line 1007) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 1012) | def test_torchscript_output_hidden_state(self): method test_torchscript_simple (line 1017) | def test_torchscript_simple(self): method test_training (line 1022) | def test_training(self): method test_training_gradient_checkpointing (line 1026) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 1032) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 1038) | def test_training_gradient_checkpointing_use_reentrant_false(self): method _mock_init_weights (line 1042) | def _mock_init_weights(self, module): class SpeechT5ForTextToSpeechIntegrationTests (line 1056) | class SpeechT5ForTextToSpeechIntegrationTests(unittest.TestCase): method default_model (line 1058) | def default_model(self): method default_processor (line 1062) | def default_processor(self): method default_vocoder (line 1066) | def default_vocoder(self): method test_generation (line 1069) | def test_generation(self): method test_one_to_many_generation (line 1098) | def test_one_to_many_generation(self): method test_batch_generation (line 1206) | def test_batch_generation(self): class SpeechT5ForSpeechToSpeechTester (line 1324) | class SpeechT5ForSpeechToSpeechTester: method __init__ (line 1325) | def __init__( method prepare_config_and_inputs (line 1371) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 1388) | def prepare_config_and_inputs_for_common(self): method get_config (line 1392) | def get_config(self): method create_and_check_model_forward (line 1415) | def create_and_check_model_forward(self, config, inputs_dict): class SpeechT5ForSpeechToSpeechTest (line 1430) | class SpeechT5ForSpeechToSpeechTest(ModelTesterMixin, unittest.TestCase): method setUp (line 1440) | def setUp(self): method test_config (line 1444) | def test_config(self): method test_save_load_strict (line 1447) | def test_save_load_strict(self): method test_model_forward (line 1457) | def test_model_forward(self): method test_model_forward_with_labels (line 1461) | def test_model_forward_with_labels(self): method test_decoder_model_past_with_large_inputs (line 1479) | def test_decoder_model_past_with_large_inputs(self): method test_determinism (line 1483) | def test_determinism(self): method test_batching_equivalence (line 1487) | def test_batching_equivalence(self): method test_attention_outputs (line 1490) | def test_attention_outputs(self): method test_forward_signature (line 1589) | def test_forward_signature(self): method test_hidden_states_output (line 1611) | def test_hidden_states_output(self): method test_initialization (line 1664) | def test_initialization(self): method test_inputs_embeds (line 1692) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 1696) | def test_model_get_set_embeddings(self): method test_model_outputs_equivalence (line 1700) | def test_model_outputs_equivalence(self): method test_retain_grad_hidden_states_attentions (line 1704) | def test_retain_grad_hidden_states_attentions(self): method test_save_load (line 1708) | def test_save_load(self): method test_torchscript_output_attentions (line 1713) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 1718) | def test_torchscript_output_hidden_state(self): method test_torchscript_simple (line 1723) | def test_torchscript_simple(self): method test_training (line 1727) | def test_training(self): method test_training_gradient_checkpointing (line 1731) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 1737) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 1743) | def test_training_gradient_checkpointing_use_reentrant_false(self): method _mock_init_weights (line 1747) | def _mock_init_weights(self, module): class SpeechT5ForSpeechToSpeechIntegrationTests (line 1764) | class SpeechT5ForSpeechToSpeechIntegrationTests(unittest.TestCase): method default_processor (line 1766) | def default_processor(self): method _load_datasamples (line 1769) | def _load_datasamples(self, num_samples): method test_generation_librispeech (line 1778) | def test_generation_librispeech(self): class SpeechT5HifiGanTester (line 1794) | class SpeechT5HifiGanTester: method __init__ (line 1795) | def __init__( method prepare_config_and_inputs (line 1809) | def prepare_config_and_inputs(self): method get_config (line 1814) | def get_config(self): method create_and_check_model (line 1820) | def create_and_check_model(self, config, input_values): method prepare_config_and_inputs_for_common (line 1825) | def prepare_config_and_inputs_for_common(self): class SpeechT5HifiGanTest (line 1832) | class SpeechT5HifiGanTest(ModelTesterMixin, unittest.TestCase): method setUp (line 1847) | def setUp(self): method test_config (line 1851) | def test_config(self): method test_model (line 1860) | def test_model(self): method test_forward_signature (line 1864) | def test_forward_signature(self): method test_hidden_states_output (line 1879) | def test_hidden_states_output(self): method test_initialization (line 1883) | def test_initialization(self): method test_inputs_embeds (line 1887) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 1891) | def test_model_get_set_embeddings(self): method test_model_outputs_equivalence (line 1895) | def test_model_outputs_equivalence(self): method test_retain_grad_hidden_states_attentions (line 1899) | def test_retain_grad_hidden_states_attentions(self): method test_save_load_fast_init_from_base (line 1903) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 1907) | def test_save_load_fast_init_to_base(self): method test_batched_inputs_outputs (line 1910) | def test_batched_inputs_outputs(self): method test_unbatched_inputs_outputs (line 1926) | def test_unbatched_inputs_outputs(self): FILE: mplsandbox_for_rl/transformers/tests/models/speecht5/test_processor_speecht5.py class SpeechT5ProcessorTest (line 38) | class SpeechT5ProcessorTest(unittest.TestCase): method setUp (line 39) | def setUp(self): method get_tokenizer (line 65) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 68) | def get_feature_extractor(self, **kwargs): method tearDown (line 71) | def tearDown(self): method test_save_load_pretrained_default (line 74) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 89) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 106) | def test_feature_extractor(self): method test_feature_extractor_target (line 120) | def test_feature_extractor_target(self): method test_tokenizer (line 134) | def test_tokenizer(self): method test_tokenizer_target (line 148) | def test_tokenizer_target(self): method test_tokenizer_decode (line 162) | def test_tokenizer_decode(self): method test_model_input_names (line 175) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/speecht5/test_tokenization_speecht5.py class SpeechT5TokenizerTest (line 32) | class SpeechT5TokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 38) | def setUp(self): method get_input_output_texts (line 51) | def get_input_output_texts(self, tokenizer): method get_numeric_input_output_texts (line 56) | def get_numeric_input_output_texts(self): method get_clean_sequence (line 61) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_tokenizer_normalization (line 67) | def test_tokenizer_normalization(self): method test_convert_token_and_id (line 74) | def test_convert_token_and_id(self): method test_get_vocab (line 82) | def test_get_vocab(self): method test_vocab_size (line 92) | def test_vocab_size(self): method test_add_tokens_tokenizer (line 95) | def test_add_tokens_tokenizer(self): method test_pickle_subword_regularization_tokenizer (line 147) | def test_pickle_subword_regularization_tokenizer(self): method test_subword_regularization_tokenizer (line 151) | def test_subword_regularization_tokenizer(self): method test_full_tokenizer (line 154) | def test_full_tokenizer(self): method test_tokenizer_integration (line 175) | def test_tokenizer_integration(self): method test_encode_decode (line 209) | def test_encode_decode(self): FILE: mplsandbox_for_rl/transformers/tests/models/splinter/test_modeling_splinter.py class SplinterModelTester (line 34) | class SplinterModelTester: method __init__ (line 35) | def __init__( method prepare_config_and_inputs (line 87) | def prepare_config_and_inputs(self): method create_and_check_model (line 125) | def create_and_check_model( method create_and_check_for_question_answering (line 143) | def create_and_check_for_question_answering( method create_and_check_for_pretraining (line 166) | def create_and_check_for_pretraining( method prepare_config_and_inputs_for_common (line 190) | def prepare_config_and_inputs_for_common(self): class SplinterModelTest (line 210) | class SplinterModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method is_pipeline_test_to_skip (line 227) | def is_pipeline_test_to_skip( method _prepare_for_class (line 237) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 269) | def setUp(self): method test_config (line 273) | def test_config(self): method test_model (line 276) | def test_model(self): method test_model_various_embeddings (line 280) | def test_model_various_embeddings(self): method test_for_question_answering (line 286) | def test_for_question_answering(self): method test_for_pretraining (line 290) | def test_for_pretraining(self): method test_inputs_embeds (line 294) | def test_inputs_embeds(self): method test_model_from_pretrained (line 329) | def test_model_from_pretrained(self): method test_multi_gpu_data_parallel_forward (line 339) | def test_multi_gpu_data_parallel_forward(self): class SplinterModelIntegrationTest (line 371) | class SplinterModelIntegrationTest(unittest.TestCase): method test_splinter_question_answering (line 373) | def test_splinter_question_answering(self): method test_splinter_pretraining (line 391) | def test_splinter_pretraining(self): method test_splinter_pretraining_loss_requires_question_positions (line 412) | def test_splinter_pretraining_loss_requires_question_positions(self): method test_splinter_pretraining_loss (line 430) | def test_splinter_pretraining_loss(self): method test_splinter_pretraining_loss_with_padding (line 453) | def test_splinter_pretraining_loss_with_padding(self): method test_splinter_pretraining_prepare_question_positions (line 492) | def test_splinter_pretraining_prepare_question_positions(self): FILE: mplsandbox_for_rl/transformers/tests/models/squeezebert/test_modeling_squeezebert.py class SqueezeBertModelTester (line 40) | class SqueezeBertModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs(self): method get_config (line 120) | def get_config(self): method create_and_check_squeezebert_model (line 141) | def create_and_check_squeezebert_model( method create_and_check_squeezebert_for_masked_lm (line 151) | def create_and_check_squeezebert_for_masked_lm( method create_and_check_squeezebert_for_question_answering (line 160) | def create_and_check_squeezebert_for_question_answering( method create_and_check_squeezebert_for_sequence_classification (line 172) | def create_and_check_squeezebert_for_sequence_classification( method create_and_check_squeezebert_for_token_classification (line 182) | def create_and_check_squeezebert_for_token_classification( method create_and_check_squeezebert_for_multiple_choice (line 193) | def create_and_check_squeezebert_for_multiple_choice( method prepare_config_and_inputs_for_common (line 209) | def prepare_config_and_inputs_for_common(self): class SqueezeBertModelTest (line 217) | class SqueezeBertModelTest(ModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 246) | def setUp(self): method test_config (line 250) | def test_config(self): method test_squeezebert_model (line 253) | def test_squeezebert_model(self): method test_for_masked_lm (line 257) | def test_for_masked_lm(self): method test_for_question_answering (line 261) | def test_for_question_answering(self): method test_for_sequence_classification (line 265) | def test_for_sequence_classification(self): method test_for_token_classification (line 269) | def test_for_token_classification(self): method test_for_multiple_choice (line 273) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 278) | def test_model_from_pretrained(self): class SqueezeBertModelIntegrationTest (line 287) | class SqueezeBertModelIntegrationTest(unittest.TestCase): method test_inference_classification_head (line 289) | def test_inference_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/squeezebert/test_tokenization_squeezebert.py class SqueezeBertTokenizationTest (line 24) | class SqueezeBertTokenizationTest(BertTokenizationTest): method get_rust_tokenizer (line 30) | def get_rust_tokenizer(self, **kwargs): method test_sequence_builders (line 34) | def test_sequence_builders(self): FILE: mplsandbox_for_rl/transformers/tests/models/stablelm/test_modeling_stablelm.py class StableLmModelTester (line 57) | class StableLmModelTester: method __init__ (line 59) | def __init__( method prepare_config_and_inputs (line 111) | def prepare_config_and_inputs(self): method get_config (line 134) | def get_config(self): method create_and_check_model (line 152) | def create_and_check_model( method create_and_check_model_as_decoder (line 162) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 192) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 210) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 272) | def prepare_config_and_inputs_for_common(self): class StableLmModelTest (line 289) | class StableLmModelTest(ModelTesterMixin, GenerationTesterMixin, Pipelin... method setUp (line 312) | def setUp(self): method test_config (line 316) | def test_config(self): method test_model (line 319) | def test_model(self): method test_stablelm_sequence_classification_model (line 323) | def test_stablelm_sequence_classification_model(self): method test_stablelm_sequence_classification_model_for_single_label (line 335) | def test_stablelm_sequence_classification_model_for_single_label(self): method test_stablelm_sequence_classification_model_for_multi_label (line 348) | def test_stablelm_sequence_classification_model_for_multi_label(self): method test_stablelm_token_classification_model (line 364) | def test_stablelm_token_classification_model(self): method test_model_rope_scaling_from_config (line 381) | def test_model_rope_scaling_from_config(self, scaling_type): method test_model_rope_scaling (line 412) | def test_model_rope_scaling(self): class StableLmModelIntegrationTest (line 473) | class StableLmModelIntegrationTest(unittest.TestCase): method test_model_stablelm_3b_4e1t_logits (line 475) | def test_model_stablelm_3b_4e1t_logits(self): method test_model_stablelm_3b_4e1t_generation (line 492) | def test_model_stablelm_3b_4e1t_generation(self): method test_model_tiny_random_stablelm_2_logits (line 507) | def test_model_tiny_random_stablelm_2_logits(self): method test_model_tiny_random_stablelm_2_generation (line 525) | def test_model_tiny_random_stablelm_2_generation(self): method test_model_3b_long_prompt (line 544) | def test_model_3b_long_prompt(self): method test_eager_matches_sdpa_generate (line 563) | def test_eager_matches_sdpa_generate(self): FILE: mplsandbox_for_rl/transformers/tests/models/starcoder2/test_modeling_starcoder2.py class Starcoder2ModelTester (line 51) | class Starcoder2ModelTester: method __init__ (line 52) | def __init__( method prepare_config_and_inputs (line 105) | def prepare_config_and_inputs(self): method get_config (line 129) | def get_config(self): method create_and_check_model (line 150) | def create_and_check_model( method create_and_check_model_as_decoder (line 161) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 192) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 211) | def create_and_check_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 274) | def prepare_config_and_inputs_for_common(self): class Starcoder2ModelTest (line 291) | class Starcoder2ModelTest(ModelTesterMixin, GenerationTesterMixin, Pipel... method is_pipeline_test_to_skip (line 313) | def is_pipeline_test_to_skip( method setUp (line 318) | def setUp(self): method test_config (line 322) | def test_config(self): method test_model (line 325) | def test_model(self): method test_model_various_embeddings (line 329) | def test_model_various_embeddings(self): method test_Starcoder2_sequence_classification_model (line 335) | def test_Starcoder2_sequence_classification_model(self): method test_Starcoder2_sequence_classification_model_for_single_label (line 348) | def test_Starcoder2_sequence_classification_model_for_single_label(self): method test_Starcoder2_sequence_classification_model_for_multi_label (line 361) | def test_Starcoder2_sequence_classification_model_for_multi_label(self): method test_Starcoder2_token_classification_model (line 377) | def test_Starcoder2_token_classification_model(self): method test_save_load_fast_init_from_base (line 393) | def test_save_load_fast_init_from_base(self): method test_past_key_values_format (line 397) | def test_past_key_values_format(self): method test_flash_attn_2_generate_padding_right (line 404) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_generate_use_cache (line 438) | def test_flash_attn_2_generate_use_cache(self): method test_flash_attn_2_inference_equivalence_right_padding (line 483) | def test_flash_attn_2_inference_equivalence_right_padding(self): class Starcoder2IntegrationTest (line 489) | class Starcoder2IntegrationTest(unittest.TestCase): method test_starcoder2_batched_generation_sdpa (line 490) | def test_starcoder2_batched_generation_sdpa(self): method test_starcoder2_batched_generation_eager (line 510) | def test_starcoder2_batched_generation_eager(self): method test_starcoder2_batched_generation_fa2 (line 532) | def test_starcoder2_batched_generation_fa2(self): method test_starcoder2_batched_generation_4bit (line 553) | def test_starcoder2_batched_generation_4bit(self): FILE: mplsandbox_for_rl/transformers/tests/models/superpoint/test_image_processing_superpoint.py class SuperPointImageProcessingTester (line 31) | class SuperPointImageProcessingTester(unittest.TestCase): method __init__ (line 32) | def __init__( method prepare_image_processor_dict (line 53) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 59) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 62) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class SuperPointImageProcessingTest (line 76) | class SuperPointImageProcessingTest(ImageProcessingTestMixin, unittest.T... method setUp (line 79) | def setUp(self) -> None: method image_processor_dict (line 84) | def image_processor_dict(self): method test_image_processing (line 87) | def test_image_processing(self): method test_image_processor_from_dict_with_kwargs (line 94) | def test_image_processor_from_dict_with_kwargs(self): method test_call_numpy_4_channels (line 104) | def test_call_numpy_4_channels(self): method test_input_image_properly_converted_to_grayscale (line 107) | def test_input_image_properly_converted_to_grayscale(self): FILE: mplsandbox_for_rl/transformers/tests/models/superpoint/test_modeling_superpoint.py class SuperPointModelTester (line 39) | class SuperPointModelTester: method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 69) | def prepare_config_and_inputs(self): method get_config (line 75) | def get_config(self): method create_and_check_keypoint_detection (line 87) | def create_and_check_keypoint_detection(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 106) | def prepare_config_and_inputs_for_common(self): class SuperPointModelTest (line 114) | class SuperPointModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 125) | def setUp(self): method test_config (line 135) | def test_config(self): method test_inputs_embeds (line 139) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 143) | def test_model_get_set_embeddings(self): method test_feed_forward_chunking (line 147) | def test_feed_forward_chunking(self): method test_training (line 151) | def test_training(self): method test_training_gradient_checkpointing (line 155) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 159) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 163) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_retain_grad_hidden_states_attentions (line 167) | def test_retain_grad_hidden_states_attentions(self): method test_keypoint_detection (line 170) | def test_keypoint_detection(self): method test_forward_signature (line 174) | def test_forward_signature(self): method test_hidden_states_output (line 186) | def test_hidden_states_output(self): method test_model_from_pretrained (line 221) | def test_model_from_pretrained(self): method test_forward_labels_should_be_none (line 225) | def test_forward_labels_should_be_none(self): function prepare_imgs (line 242) | def prepare_imgs(): class SuperPointModelIntegrationTest (line 250) | class SuperPointModelIntegrationTest(unittest.TestCase): method default_image_processor (line 252) | def default_image_processor(self): method test_inference (line 256) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/swiftformer/test_modeling_swiftformer.py class SwiftFormerModelTester (line 47) | class SwiftFormerModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 74) | def prepare_config_and_inputs(self): method get_config (line 85) | def get_config(self): method create_and_check_model (line 102) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 109) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 125) | def prepare_config_and_inputs_for_common(self): class SwiftFormerModelTest (line 132) | class SwiftFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 151) | def setUp(self): method test_config (line 162) | def test_config(self): method test_inputs_embeds (line 166) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 169) | def test_model_get_set_embeddings(self): method test_model (line 177) | def test_model(self): method test_for_image_classification (line 181) | def test_for_image_classification(self): method test_model_from_pretrained (line 186) | def test_model_from_pretrained(self): method test_attention_outputs (line 192) | def test_attention_outputs(self): method test_hidden_states_output (line 195) | def test_hidden_states_output(self): method test_initialization (line 236) | def test_initialization(self): function prepare_img (line 262) | def prepare_img(): class SwiftFormerModelIntegrationTest (line 269) | class SwiftFormerModelIntegrationTest(unittest.TestCase): method default_image_processor (line 271) | def default_image_processor(self): method test_inference_image_classification_head (line 275) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/swiftformer/test_modeling_tf_swiftformer.py class TFSwiftFormerModelTester (line 46) | class TFSwiftFormerModelTester: method __init__ (line 47) | def __init__( method prepare_config_and_inputs (line 73) | def prepare_config_and_inputs(self): method get_config (line 84) | def get_config(self): method create_and_check_model (line 101) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 106) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 118) | def prepare_config_and_inputs_for_common(self): class TFSwiftFormerModelTest (line 125) | class TFSwiftFormerModelTest(TFModelTesterMixin, PipelineTesterMixin, un... method setUp (line 147) | def setUp(self): method test_config (line 158) | def test_config(self): method test_inputs_embeds (line 162) | def test_inputs_embeds(self): method test_model_common_attributes (line 165) | def test_model_common_attributes(self): method test_forward_signature (line 174) | def test_forward_signature(self): method test_model (line 186) | def test_model(self): method test_for_image_classification (line 190) | def test_for_image_classification(self): method test_model_from_pretrained (line 195) | def test_model_from_pretrained(self): method test_attention_outputs (line 200) | def test_attention_outputs(self): method test_hidden_states_output (line 203) | def test_hidden_states_output(self): function prepare_img (line 243) | def prepare_img(): class TFSwiftFormerModelIntegrationTest (line 250) | class TFSwiftFormerModelIntegrationTest(unittest.TestCase): method default_image_processor (line 252) | def default_image_processor(self): method test_inference_image_classification_head (line 256) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/swin/test_modeling_swin.py class SwinModelTester (line 43) | class SwinModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 100) | def prepare_config_and_inputs(self): method get_config (line 111) | def get_config(self): method create_and_check_model (line 135) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_backbone (line 146) | def create_and_check_backbone(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 173) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 192) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 210) | def prepare_config_and_inputs_for_common(self): class SwinModelTest (line 222) | class SwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 244) | def setUp(self): method test_config (line 254) | def test_config(self): method test_model (line 257) | def test_model(self): method test_multi_gpu_data_parallel_forward (line 263) | def test_multi_gpu_data_parallel_forward(self): method test_training_gradient_checkpointing (line 266) | def test_training_gradient_checkpointing(self): method test_backbone (line 269) | def test_backbone(self): method test_for_masked_image_modeling (line 273) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 277) | def test_for_image_classification(self): method test_inputs_embeds (line 282) | def test_inputs_embeds(self): method test_feed_forward_chunking (line 286) | def test_feed_forward_chunking(self): method test_model_get_set_embeddings (line 289) | def test_model_get_set_embeddings(self): method test_attention_outputs (line 298) | def test_attention_outputs(self): method check_hidden_states_output (line 355) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 397) | def test_hidden_states_output(self): method test_hidden_states_output_with_padding (line 416) | def test_hidden_states_output_with_padding(self): method test_model_from_pretrained (line 444) | def test_model_from_pretrained(self): method test_initialization (line 449) | def test_initialization(self): class SwinModelIntegrationTest (line 466) | class SwinModelIntegrationTest(unittest.TestCase): method default_image_processor (line 468) | def default_image_processor(self): method test_inference_image_classification_head (line 476) | def test_inference_image_classification_head(self): method test_inference_interpolate_pos_encoding (line 494) | def test_inference_interpolate_pos_encoding(self): class SwinBackboneTest (line 515) | class SwinBackboneTest(unittest.TestCase, BackboneTesterMixin): method setUp (line 519) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/swin/test_modeling_tf_swin.py class TFSwinModelTester (line 50) | class TFSwinModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 103) | def prepare_config_and_inputs(self): method get_config (line 114) | def get_config(self): method create_and_check_model (line 136) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 145) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 160) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 173) | def prepare_config_and_inputs_for_common(self): class TFSwinModelTest (line 181) | class TFSwinModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 202) | def setUp(self): method test_config (line 206) | def test_config(self): method create_and_test_config_common_properties (line 215) | def create_and_test_config_common_properties(self): method test_model (line 218) | def test_model(self): method test_for_masked_image_modeling (line 222) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 226) | def test_for_image_classification(self): method test_inputs_embeds (line 231) | def test_inputs_embeds(self): method test_model_common_attributes (line 234) | def test_model_common_attributes(self): method test_forward_signature (line 243) | def test_forward_signature(self): method test_attention_outputs (line 255) | def test_attention_outputs(self): method check_hidden_states_output (line 306) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 339) | def test_hidden_states_output(self): method test_inputs_requiring_padding (line 354) | def test_inputs_requiring_padding(self): method test_model_from_pretrained (line 374) | def test_model_from_pretrained(self): class TFSwinModelIntegrationTest (line 382) | class TFSwinModelIntegrationTest(unittest.TestCase): method default_image_processor (line 384) | def default_image_processor(self): method test_inference_image_classification_head (line 392) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/swin2sr/test_image_processing_swin2sr.py class Swin2SRImageProcessingTester (line 37) | class Swin2SRImageProcessingTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_image_processor_dict (line 63) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 71) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 86) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class Swin2SRImageProcessingTest (line 100) | class Swin2SRImageProcessingTest(ImageProcessingTestMixin, unittest.Test... method setUp (line 103) | def setUp(self): method image_processor_dict (line 108) | def image_processor_dict(self): method test_image_processor_properties (line 111) | def test_image_processor_properties(self): method calculate_expected_size (line 118) | def calculate_expected_size(self, image): method test_call_pil (line 127) | def test_call_pil(self): method test_call_numpy (line 141) | def test_call_numpy(self): method test_call_numpy_4_channels (line 155) | def test_call_numpy_4_channels(self): method test_call_pytorch (line 173) | def test_call_pytorch(self): FILE: mplsandbox_for_rl/transformers/tests/models/swin2sr/test_modeling_swin2sr.py class Swin2SRModelTester (line 40) | class Swin2SRModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 98) | def prepare_config_and_inputs(self): method get_config (line 109) | def get_config(self): method create_and_check_model (line 132) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_super_resolution (line 142) | def create_and_check_for_image_super_resolution(self, config, pixel_va... method prepare_config_and_inputs_for_common (line 154) | def prepare_config_and_inputs_for_common(self): class Swin2SRModelTest (line 162) | class Swin2SRModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 176) | def setUp(self): method test_config (line 186) | def test_config(self): method test_model (line 189) | def test_model(self): method test_model_for_image_super_resolution (line 193) | def test_model_for_image_super_resolution(self): method test_multi_gpu_data_parallel_forward (line 199) | def test_multi_gpu_data_parallel_forward(self): method test_inputs_embeds (line 203) | def test_inputs_embeds(self): method test_training (line 207) | def test_training(self): method test_training_gradient_checkpointing (line 211) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 217) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 223) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_get_set_embeddings (line 226) | def test_model_get_set_embeddings(self): method test_model_from_pretrained (line 236) | def test_model_from_pretrained(self): method test_initialization (line 242) | def test_initialization(self): method test_attention_outputs (line 258) | def test_attention_outputs(self): class Swin2SRModelIntegrationTest (line 317) | class Swin2SRModelIntegrationTest(unittest.TestCase): method test_inference_image_super_resolution_head (line 318) | def test_inference_image_super_resolution_head(self): method test_inference_fp16 (line 337) | def test_inference_fp16(self): FILE: mplsandbox_for_rl/transformers/tests/models/swinv2/test_modeling_swinv2.py class Swinv2ModelTester (line 43) | class Swinv2ModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 100) | def prepare_config_and_inputs(self): method get_config (line 111) | def get_config(self): method create_and_check_model (line 135) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_backbone (line 146) | def create_and_check_backbone(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 173) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 192) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 200) | def prepare_config_and_inputs_for_common(self): class Swinv2ModelTest (line 208) | class Swinv2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 230) | def setUp(self): method test_config (line 240) | def test_config(self): method test_model (line 243) | def test_model(self): method test_backbone (line 247) | def test_backbone(self): method test_multi_gpu_data_parallel_forward (line 253) | def test_multi_gpu_data_parallel_forward(self): method test_inputs_embeds (line 257) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 260) | def test_model_get_set_embeddings(self): method test_forward_signature (line 269) | def test_forward_signature(self): method test_attention_outputs (line 281) | def test_attention_outputs(self): method check_hidden_states_output (line 338) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 380) | def test_hidden_states_output(self): method test_hidden_states_output_with_padding (line 399) | def test_hidden_states_output_with_padding(self): method test_for_masked_image_modeling (line 426) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 430) | def test_for_image_classification(self): method test_model_from_pretrained (line 435) | def test_model_from_pretrained(self): method test_feed_forward_chunking (line 441) | def test_feed_forward_chunking(self): method test_initialization (line 444) | def test_initialization(self): class Swinv2ModelIntegrationTest (line 461) | class Swinv2ModelIntegrationTest(unittest.TestCase): method default_image_processor (line 463) | def default_image_processor(self): method test_inference_image_classification_head (line 471) | def test_inference_image_classification_head(self): method test_inference_fp16 (line 491) | def test_inference_fp16(self): method test_inference_interpolate_pos_encoding (line 511) | def test_inference_interpolate_pos_encoding(self): class Swinv2BackboneTest (line 532) | class Swinv2BackboneTest(unittest.TestCase, BackboneTesterMixin): method setUp (line 536) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/switch_transformers/test_modeling_switch_transformers.py class SwitchTransformersModelTester (line 53) | class SwitchTransformersModelTester: method __init__ (line 54) | def __init__( method get_large_model_config (line 110) | def get_large_model_config(self): method prepare_config_and_inputs (line 113) | def prepare_config_and_inputs(self): method get_pipeline_config (line 138) | def get_pipeline_config(self): method get_config (line 158) | def get_config(self): method check_prepare_lm_labels_via_shift_left (line 179) | def check_prepare_lm_labels_via_shift_left( method create_and_check_model (line 218) | def create_and_check_model( method create_and_check_with_lm_head (line 248) | def create_and_check_with_lm_head( method create_and_check_decoder_model_past (line 268) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 307) | def create_and_check_decoder_model_attention_mask_past( method create_and_check_decoder_model_past_large_inputs (line 362) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_generate_with_past_key_values (line 406) | def create_and_check_generate_with_past_key_values( method create_and_check_model_fp16_forward (line 429) | def create_and_check_model_fp16_forward( method create_and_check_encoder_decoder_shared_weights (line 442) | def create_and_check_encoder_decoder_shared_weights( method check_resize_embeddings_switch_transformers_v1_1 (line 518) | def check_resize_embeddings_switch_transformers_v1_1( method prepare_config_and_inputs_for_common (line 532) | def prepare_config_and_inputs_for_common(self): class SwitchTransformersModelTest (line 555) | class SwitchTransformersModelTest(ModelTesterMixin, GenerationTesterMixi... method setUp (line 579) | def setUp(self): method test_config (line 583) | def test_config(self): method test_shift_right (line 586) | def test_shift_right(self): method test_model (line 590) | def test_model(self): method test_model_v1_1 (line 594) | def test_model_v1_1(self): method test_config_and_model_silu_gated (line 602) | def test_config_and_model_silu_gated(self): method test_with_lm_head (line 608) | def test_with_lm_head(self): method test_decoder_model_past (line 612) | def test_decoder_model_past(self): method test_decoder_model_past_with_attn_mask (line 616) | def test_decoder_model_past_with_attn_mask(self): method test_decoder_model_past_with_3d_attn_mask (line 620) | def test_decoder_model_past_with_3d_attn_mask(self): method test_decoder_model_past_with_large_inputs (line 648) | def test_decoder_model_past_with_large_inputs(self): method test_generate_with_past_key_values (line 652) | def test_generate_with_past_key_values(self): method test_encoder_decoder_shared_weights (line 656) | def test_encoder_decoder_shared_weights(self): method test_model_fp16_forward (line 661) | def test_model_fp16_forward(self): method test_v1_1_resize_embeddings (line 665) | def test_v1_1_resize_embeddings(self): method test_model_from_pretrained (line 670) | def test_model_from_pretrained(self): method test_export_to_onnx (line 676) | def test_export_to_onnx(self): method test_generate_with_head_masking (line 689) | def test_generate_with_head_masking(self): method test_load_save_without_tied_weights (line 726) | def test_load_save_without_tied_weights(self): class SwitchTransformersEncoderOnlyModelTester (line 730) | class SwitchTransformersEncoderOnlyModelTester: method __init__ (line 731) | def __init__( method get_large_model_config (line 772) | def get_large_model_config(self): method prepare_config_and_inputs (line 775) | def prepare_config_and_inputs(self): method create_and_check_model (line 800) | def create_and_check_model(self, config, input_ids, attention_mask): method create_and_check_model_fp16_forward (line 813) | def create_and_check_model_fp16_forward(self, config, input_ids, atten... method prepare_config_and_inputs_for_common (line 818) | def prepare_config_and_inputs_for_common(self): class SwitchTransformersEncoderOnlyModelTest (line 829) | class SwitchTransformersEncoderOnlyModelTest(ModelTesterMixin, unittest.... method setUp (line 836) | def setUp(self): method test_config (line 840) | def test_config(self): method test_model (line 843) | def test_model(self): method test_model_fp16_forward (line 848) | def test_model_fp16_forward(self): method test_load_save_without_tied_weights (line 855) | def test_load_save_without_tied_weights(self): function use_task_specific_params (line 859) | def use_task_specific_params(model, task): class TestAsymmetricSwitchTransformers (line 864) | class TestAsymmetricSwitchTransformers(unittest.TestCase): method build_model_and_check_forward_pass (line 865) | def build_model_and_check_forward_pass(self, **kwargs): method test_small_decoder (line 889) | def test_small_decoder(self): method test_defaulting_to_symmetry (line 895) | def test_defaulting_to_symmetry(self): class SwitchTransformerRouterTest (line 902) | class SwitchTransformerRouterTest(unittest.TestCase): method test_equivalency_balancy_loss (line 919) | def test_equivalency_balancy_loss(self): method test_equivalency_router_z_loss (line 939) | def test_equivalency_router_z_loss(self): method test_equivalency_token_chose_masked_router (line 968) | def test_equivalency_token_chose_masked_router(self): method test_max_routing_capacity (line 1013) | def test_max_routing_capacity(self): class SwitchTransformerModelIntegrationTests (line 1033) | class SwitchTransformerModelIntegrationTests(unittest.TestCase): method test_small_logits (line 1036) | def test_small_logits(self): method test_small_generate (line 1068) | def test_small_generate(self): method test_small_batch_generate (line 1097) | def test_small_batch_generate(self): FILE: mplsandbox_for_rl/transformers/tests/models/t5/test_modeling_flax_t5.py class FlaxT5ModelTester (line 60) | class FlaxT5ModelTester: method __init__ (line 61) | def __init__( method prepare_config_and_inputs (line 108) | def prepare_config_and_inputs(self): method create_and_check_model (line 143) | def create_and_check_model( method check_use_cache_forward_with_attn_mask (line 165) | def check_use_cache_forward_with_attn_mask( method prepare_config_and_inputs_for_common (line 210) | def prepare_config_and_inputs_for_common(self): class FlaxT5ModelTest (line 230) | class FlaxT5ModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixin, u... method setUp (line 235) | def setUp(self): method test_config (line 239) | def test_config(self): method test_model (line 242) | def test_model(self): method test_model_v1_1 (line 246) | def test_model_v1_1(self): method test_use_cache_forward_with_attn_mask (line 254) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 259) | def test_encode(self): method test_decode (line 282) | def test_decode(self): method test_shift_right (line 315) | def test_shift_right(self): method test_save_load_from_base (line 333) | def test_save_load_from_base(self): method test_save_load_to_base (line 356) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 380) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 410) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 439) | def test_save_load_bf16_to_base_pt(self): class FlaxT5EncoderOnlyModelTester (line 468) | class FlaxT5EncoderOnlyModelTester: method __init__ (line 469) | def __init__( method prepare_config_and_inputs (line 513) | def prepare_config_and_inputs(self): method create_and_check_model (line 544) | def create_and_check_model( method prepare_config_and_inputs_for_common (line 560) | def prepare_config_and_inputs_for_common(self): class FlaxT5EncoderOnlyModelTest (line 576) | class FlaxT5EncoderOnlyModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 580) | def setUp(self): method test_config (line 584) | def test_config(self): method test_model (line 587) | def test_model(self): method test_model_v1_1 (line 591) | def test_model_v1_1(self): method test_encode (line 599) | def test_encode(self): method test_save_load_from_base (line 623) | def test_save_load_from_base(self): method test_save_load_to_base (line 646) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 670) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 700) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 729) | def test_save_load_bf16_to_base_pt(self): class FlaxT5ModelIntegrationTests (line 761) | class FlaxT5ModelIntegrationTests(unittest.TestCase): method test_small_integration_test (line 763) | def test_small_integration_test(self): method test_small_v1_1_integration_test (line 793) | def test_small_v1_1_integration_test(self): method test_small_byt5_integration_test (line 823) | def test_small_byt5_integration_test(self): method test_small_generation (line 851) | def test_small_generation(self): method test_small_generation_bfloat16 (line 866) | def test_small_generation_bfloat16(self): method test_summarization (line 881) | def test_summarization(self): FILE: mplsandbox_for_rl/transformers/tests/models/t5/test_modeling_t5.py class T5ModelTester (line 61) | class T5ModelTester: method __init__ (line 62) | def __init__( method get_large_model_config (line 109) | def get_large_model_config(self): method prepare_config_and_inputs (line 112) | def prepare_config_and_inputs(self): method get_pipeline_config (line 138) | def get_pipeline_config(self): method get_config (line 156) | def get_config(self): method check_prepare_lm_labels_via_shift_left (line 174) | def check_prepare_lm_labels_via_shift_left( method create_and_check_model (line 213) | def create_and_check_model( method create_and_check_with_lm_head (line 243) | def create_and_check_with_lm_head( method create_and_check_with_sequence_classification_head (line 263) | def create_and_check_with_sequence_classification_head( method create_and_check_decoder_model_past (line 283) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 320) | def create_and_check_decoder_model_attention_mask_past( method create_and_check_decoder_model_past_large_inputs (line 371) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_generate_with_past_key_values (line 409) | def create_and_check_generate_with_past_key_values( method create_and_check_model_fp16_forward (line 427) | def create_and_check_model_fp16_forward( method create_and_check_encoder_decoder_shared_weights (line 440) | def create_and_check_encoder_decoder_shared_weights( method check_resize_embeddings_t5_v1_1 (line 516) | def check_resize_embeddings_t5_v1_1( method prepare_config_and_inputs_for_common (line 530) | def prepare_config_and_inputs_for_common(self): class T5ModelTest (line 552) | class T5ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTeste... method setUp (line 581) | def setUp(self): method is_pipeline_test_to_skip (line 587) | def is_pipeline_test_to_skip( method _create_and_check_torch_fx_tracing (line 597) | def _create_and_check_torch_fx_tracing(self, config, inputs_dict, outp... method test_config (line 717) | def test_config(self): method test_shift_right (line 720) | def test_shift_right(self): method test_model (line 724) | def test_model(self): method test_model_v1_1 (line 728) | def test_model_v1_1(self): method test_inputs_embeds (line 737) | def test_inputs_embeds(self): method test_config_and_model_silu_gated (line 766) | def test_config_and_model_silu_gated(self): method test_with_lm_head (line 772) | def test_with_lm_head(self): method test_with_sequence_classification_head (line 776) | def test_with_sequence_classification_head(self): method test_decoder_model_past (line 780) | def test_decoder_model_past(self): method test_decoder_model_past_with_attn_mask (line 784) | def test_decoder_model_past_with_attn_mask(self): method test_decoder_model_past_with_3d_attn_mask (line 788) | def test_decoder_model_past_with_3d_attn_mask(self): method test_decoder_model_past_with_large_inputs (line 816) | def test_decoder_model_past_with_large_inputs(self): method test_generate_with_past_key_values (line 820) | def test_generate_with_past_key_values(self): method test_encoder_decoder_shared_weights (line 824) | def test_encoder_decoder_shared_weights(self): method test_model_fp16_forward (line 829) | def test_model_fp16_forward(self): method test_v1_1_resize_embeddings (line 833) | def test_v1_1_resize_embeddings(self): method test_model_from_pretrained (line 838) | def test_model_from_pretrained(self): method test_export_to_onnx (line 844) | def test_export_to_onnx(self): method test_generate_with_head_masking (line 857) | def test_generate_with_head_masking(self): class T5EncoderOnlyModelTester (line 892) | class T5EncoderOnlyModelTester: method __init__ (line 893) | def __init__( method get_large_model_config (line 934) | def get_large_model_config(self): method prepare_config_and_inputs (line 937) | def prepare_config_and_inputs(self): method create_and_check_model (line 966) | def create_and_check_model( method create_and_check_model_fp16_forward (line 984) | def create_and_check_model_fp16_forward( method create_and_check_with_token_classification_head (line 994) | def create_and_check_with_token_classification_head( method prepare_config_and_inputs_for_common (line 1010) | def prepare_config_and_inputs_for_common(self): class T5EncoderOnlyModelTest (line 1025) | class T5EncoderOnlyModelTest(ModelTesterMixin, PipelineTesterMixin, unit... method setUp (line 1039) | def setUp(self): method test_config (line 1043) | def test_config(self): method test_model (line 1046) | def test_model(self): method test_model_fp16_forward (line 1051) | def test_model_fp16_forward(self): method test_with_token_classification_head (line 1055) | def test_with_token_classification_head(self): function use_task_specific_params (line 1060) | def use_task_specific_params(model, task): class T5ModelFp16Tests (line 1068) | class T5ModelFp16Tests(unittest.TestCase): method test_fp16_fp32_conversion (line 1069) | def test_fp16_fp32_conversion(self): class T5ModelIntegrationTests (line 1130) | class T5ModelIntegrationTests(unittest.TestCase): method model (line 1132) | def model(self): method tokenizer (line 1136) | def tokenizer(self): method test_torch_quant (line 1140) | def test_torch_quant(self): method test_small_generation (line 1153) | def test_small_generation(self): method test_small_integration_test (line 1168) | def test_small_integration_test(self): method test_small_v1_1_integration_test (line 1194) | def test_small_v1_1_integration_test(self): method test_small_byt5_integration_test (line 1220) | def test_small_byt5_integration_test(self): method test_summarization (line 1244) | def test_summarization(self): method test_translation_en_to_de (line 1480) | def test_translation_en_to_de(self): method test_translation_en_to_fr (line 1497) | def test_translation_en_to_fr(self): method test_translation_en_to_ro (line 1531) | def test_translation_en_to_ro(self): method test_contrastive_search_t5 (line 1544) | def test_contrastive_search_t5(self): class TestAsymmetricT5 (line 1590) | class TestAsymmetricT5(unittest.TestCase): method build_model_and_check_forward_pass (line 1591) | def build_model_and_check_forward_pass(self, **kwargs): method test_small_decoder (line 1614) | def test_small_decoder(self): method test_defaulting_to_symmetry (line 1620) | def test_defaulting_to_symmetry(self): FILE: mplsandbox_for_rl/transformers/tests/models/t5/test_modeling_tf_t5.py class TFT5ModelTester (line 35) | class TFT5ModelTester: method __init__ (line 36) | def __init__( method prepare_config_and_inputs (line 59) | def prepare_config_and_inputs(self): method create_and_check_t5_model (line 89) | def create_and_check_t5_model(self, config, input_ids, input_mask, tok... method create_and_check_t5_with_lm_head (line 109) | def create_and_check_t5_with_lm_head(self, config, input_ids, input_ma... method create_and_check_t5_decoder_model_past (line 121) | def create_and_check_t5_decoder_model_past(self, config, input_ids, de... method create_and_check_t5_decoder_model_attention_mask_past (line 153) | def create_and_check_t5_decoder_model_attention_mask_past( method create_and_check_t5_decoder_model_past_large_inputs (line 198) | def create_and_check_t5_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 233) | def prepare_config_and_inputs_for_common(self): class TFT5ModelTest (line 245) | class TFT5ModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 261) | def setUp(self): method test_config (line 265) | def test_config(self): method test_t5_model (line 268) | def test_t5_model(self): method test_t5_model_v1_1 (line 272) | def test_t5_model_v1_1(self): method test_with_lm_head (line 279) | def test_with_lm_head(self): method test_t5_decoder_model_past (line 283) | def test_t5_decoder_model_past(self): method test_t5_decoder_model_past_with_attn_mask (line 287) | def test_t5_decoder_model_past_with_attn_mask(self): method test_t5_decoder_model_past_large_inputs (line 291) | def test_t5_decoder_model_past_large_inputs(self): method test_model_from_pretrained (line 303) | def test_model_from_pretrained(self): method test_generate_with_headmasking (line 307) | def test_generate_with_headmasking(self): method test_keras_save_load (line 313) | def test_keras_save_load(self): class TFT5EncoderOnlyModelTester (line 317) | class TFT5EncoderOnlyModelTester: method __init__ (line 318) | def __init__( method prepare_config_and_inputs (line 359) | def prepare_config_and_inputs(self): method create_and_check_model (line 388) | def create_and_check_model( method prepare_config_and_inputs_for_common (line 404) | def prepare_config_and_inputs_for_common(self): class TFT5EncoderOnlyModelTest (line 419) | class TFT5EncoderOnlyModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 424) | def setUp(self): method test_config (line 428) | def test_config(self): method test_model (line 431) | def test_model(self): method test_train_pipeline_custom_model (line 436) | def test_train_pipeline_custom_model(self): class TFT5GenerationIntegrationTests (line 443) | class TFT5GenerationIntegrationTests(unittest.TestCase): method test_greedy_xla_generate_simple (line 445) | def test_greedy_xla_generate_simple(self): method test_greedy_generate (line 473) | def test_greedy_generate(self): method test_sample_xla_generate_simple (line 496) | def test_sample_xla_generate_simple(self): method test_sample_generate (line 523) | def test_sample_generate(self): method test_beam_search_xla_generate_simple (line 554) | def test_beam_search_xla_generate_simple(self): method test_beam_search_generate (line 587) | def test_beam_search_generate(self): class TFT5ModelIntegrationTests (line 613) | class TFT5ModelIntegrationTests(unittest.TestCase): method model (line 615) | def model(self): method test_small_integration_test (line 619) | def test_small_integration_test(self): method test_small_v1_1_integration_test (line 645) | def test_small_v1_1_integration_test(self): method test_small_byt5_integration_test (line 671) | def test_small_byt5_integration_test(self): method test_summarization (line 695) | def test_summarization(self): method test_translation_en_to_de (line 941) | def test_translation_en_to_de(self): method test_translation_en_to_fr (line 970) | def test_translation_en_to_fr(self): method test_translation_en_to_ro (line 1007) | def test_translation_en_to_ro(self): FILE: mplsandbox_for_rl/transformers/tests/models/t5/test_tokenization_t5.py class T5TokenizationTest (line 40) | class T5TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 47) | def setUp(self): method test_convert_token_and_id (line 54) | def test_convert_token_and_id(self): method test_get_vocab (line 62) | def test_get_vocab(self): method test_vocab_size (line 70) | def test_vocab_size(self): method test_full_tokenizer (line 74) | def test_full_tokenizer(self): method t5_base_tokenizer (line 141) | def t5_base_tokenizer(self): method t5_base_tokenizer_fast (line 145) | def t5_base_tokenizer_fast(self): method get_tokenizer (line 148) | def get_tokenizer(self, **kwargs) -> T5Tokenizer: method get_rust_tokenizer (line 151) | def get_rust_tokenizer(self, **kwargs) -> T5TokenizerFast: method test_rust_and_python_full_tokenizers (line 154) | def test_rust_and_python_full_tokenizers(self): method test_eos_treatment (line 176) | def test_eos_treatment(self): method test_prepare_batch (line 182) | def test_prepare_batch(self): method test_empty_target_text (line 199) | def test_empty_target_text(self): method test_max_length (line 209) | def test_max_length(self): method test_outputs_not_longer_than_maxlen (line 220) | def test_outputs_not_longer_than_maxlen(self): method test_eos_in_input (line 232) | def test_eos_in_input(self): method test_token_type_ids (line 244) | def test_token_type_ids(self): method test_fast_and_slow_same_result (line 258) | def test_fast_and_slow_same_result(self): method test_special_tokens_initialization (line 273) | def test_special_tokens_initialization(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 300) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_tokenizer_integration (line 366) | def test_tokenizer_integration(self): method test_get_sentinel_tokens (line 375) | def test_get_sentinel_tokens(self): method test_get_sentinel_token_ids (line 382) | def test_get_sentinel_token_ids(self): method test_get_sentinel_tokens_for_fasttokenizer (line 386) | def test_get_sentinel_tokens_for_fasttokenizer(self): method test_get_sentinel_token_ids_for_fasttokenizer (line 393) | def test_get_sentinel_token_ids_for_fasttokenizer(self): method test_some_edge_cases (line 397) | def test_some_edge_cases(self): method test_fast_slow_edge_cases (line 422) | def test_fast_slow_edge_cases(self): method test_add_prefix_space (line 457) | def test_add_prefix_space(self): class CommonSpmIntegrationTests (line 490) | class CommonSpmIntegrationTests(unittest.TestCase): method setUpClass (line 496) | def setUpClass(cls): method test_add_dummy_prefix (line 505) | def test_add_dummy_prefix(self): method test_remove_extra_whitespaces (line 527) | def test_remove_extra_whitespaces(self): method test_character_after_special_token (line 555) | def test_character_after_special_token(self): method test_special_tokens_strip (line 568) | def test_special_tokens_strip(self): method test_integration_seqio (line 597) | def test_integration_seqio(self): FILE: mplsandbox_for_rl/transformers/tests/models/table_transformer/test_modeling_table_transformer.py class TableTransformerModelTester (line 44) | class TableTransformerModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 87) | def prepare_config_and_inputs(self): method get_config (line 108) | def get_config(self): method prepare_config_and_inputs_for_common (line 137) | def prepare_config_and_inputs_for_common(self): method create_and_check_table_transformer_model (line 142) | def create_and_check_table_transformer_model(self, config, pixel_value... method create_and_check_table_transformer_object_detection_head_model (line 154) | def create_and_check_table_transformer_object_detection_head_model(sel... method create_and_check_table_transformer_no_timm_backbone (line 171) | def create_and_check_table_transformer_no_timm_backbone(self, config, ... class TableTransformerModelTest (line 192) | class TableTransformerModelTest(ModelTesterMixin, GenerationTesterMixin,... method _prepare_for_class (line 214) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 240) | def setUp(self): method test_config (line 244) | def test_config(self): method test_table_transformer_model (line 247) | def test_table_transformer_model(self): method test_table_transformer_object_detection_head_model (line 251) | def test_table_transformer_object_detection_head_model(self): method test_table_transformer_no_timm_backbone (line 255) | def test_table_transformer_no_timm_backbone(self): method test_inputs_embeds (line 260) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 264) | def test_inputs_embeds_matches_input_ids(self): method test_model_get_set_embeddings (line 268) | def test_model_get_set_embeddings(self): method test_generate_without_input_ids (line 272) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 276) | def test_resize_tokens_embeddings(self): method test_model_outputs_equivalence (line 281) | def test_model_outputs_equivalence(self): method test_attention_outputs (line 284) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 384) | def test_retain_grad_hidden_states_attentions(self): method test_forward_auxiliary_loss (line 420) | def test_forward_auxiliary_loss(self): method test_forward_signature (line 436) | def test_forward_signature(self): method test_different_timm_backbone (line 457) | def test_different_timm_backbone(self): method test_hf_backbone (line 488) | def test_hf_backbone(self): method test_greyscale_images (line 520) | def test_greyscale_images(self): method test_initialization (line 541) | def test_initialization(self): function prepare_img (line 569) | def prepare_img(): class TableTransformerModelIntegrationTests (line 577) | class TableTransformerModelIntegrationTests(unittest.TestCase): method test_table_detection (line 578) | def test_table_detection(self): FILE: mplsandbox_for_rl/transformers/tests/models/tapas/test_modeling_tapas.py class TapasModelTester (line 68) | class TapasModelTester: method __init__ (line 71) | def __init__( method prepare_config_and_inputs (line 161) | def prepare_config_and_inputs(self): method get_config (line 205) | def get_config(self): method create_and_check_model (line 243) | def create_and_check_model( method create_and_check_for_masked_lm (line 266) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 286) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 374) | def create_and_check_for_sequence_classification( method prepare_config_and_inputs_for_common (line 395) | def prepare_config_and_inputs_for_common(self): class TapasModelTest (line 416) | class TapasModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method _prepare_for_class (line 442) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method is_pipeline_test_to_skip (line 494) | def is_pipeline_test_to_skip( method setUp (line 499) | def setUp(self): method test_config (line 503) | def test_config(self): method test_model (line 506) | def test_model(self): method test_for_masked_lm (line 510) | def test_for_masked_lm(self): method test_for_question_answering (line 514) | def test_for_question_answering(self): method test_for_sequence_classification (line 518) | def test_for_sequence_classification(self): method test_pt_tf_model_equivalence (line 524) | def test_pt_tf_model_equivalence(self): method test_tf_from_pt_safetensors (line 528) | def test_tf_from_pt_safetensors(self): function prepare_tapas_single_inputs_for_inference (line 532) | def prepare_tapas_single_inputs_for_inference(): function prepare_tapas_batch_inputs_for_inference (line 544) | def prepare_tapas_batch_inputs_for_inference(): function prepare_tapas_batch_inputs_for_training (line 557) | def prepare_tapas_batch_inputs_for_training(): class TapasModelIntegrationTest (line 576) | class TapasModelIntegrationTest(unittest.TestCase): method default_tokenizer (line 578) | def default_tokenizer(self): method test_inference_no_head (line 582) | def test_inference_no_head(self): method test_inference_masked_lm (line 614) | def test_inference_masked_lm(self): method test_inference_question_answering_head_conversational (line 623) | def test_inference_question_answering_head_conversational(self): method test_inference_question_answering_head_conversational_absolute_embeddings (line 670) | def test_inference_question_answering_head_conversational_absolute_emb... method test_inference_question_answering_head_weak_supervision (line 720) | def test_inference_question_answering_head_weak_supervision(self): method test_training_question_answering_head_weak_supervision (line 770) | def test_training_question_answering_head_weak_supervision(self): method test_inference_question_answering_head_strong_supervision (line 846) | def test_inference_question_answering_head_strong_supervision(self): method test_inference_classification_head (line 904) | def test_inference_classification_head(self): class TapasUtilitiesTest (line 931) | class TapasUtilitiesTest(unittest.TestCase): method _prepare_tables (line 932) | def _prepare_tables(self): method test_product_index (line 973) | def test_product_index(self): method test_flatten (line 1008) | def test_flatten(self): method test_range_index_map (line 1027) | def test_range_index_map(self): method test_reduce_sum (line 1042) | def test_reduce_sum(self): method test_reduce_mean (line 1057) | def test_reduce_mean(self): method test_reduce_max (line 1077) | def test_reduce_max(self): method test_reduce_sum_vectorized (line 1085) | def test_reduce_sum_vectorized(self): method test_gather (line 1097) | def test_gather(self): method test_gather_vectorized (line 1114) | def test_gather_vectorized(self): FILE: mplsandbox_for_rl/transformers/tests/models/tapas/test_modeling_tf_tapas.py class TFTapasModelTester (line 68) | class TFTapasModelTester: method __init__ (line 69) | def __init__( method prepare_config_and_inputs (line 159) | def prepare_config_and_inputs(self): method get_config (line 203) | def get_config(self): method create_and_check_model (line 241) | def create_and_check_model( method create_and_check_for_masked_lm (line 271) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 295) | def create_and_check_for_sequence_classification( method create_and_check_for_question_answering (line 319) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 403) | def prepare_config_and_inputs_for_common(self): class TFTapasModelTest (line 424) | class TFTapasModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest... method is_pipeline_test_to_skip (line 449) | def is_pipeline_test_to_skip( method _prepare_for_class (line 454) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 496) | def setUp(self): method test_config (line 500) | def test_config(self): method test_model (line 503) | def test_model(self): method test_for_masked_lm (line 507) | def test_for_masked_lm(self): method test_for_question_answering (line 511) | def test_for_question_answering(self): method test_for_sequence_classification (line 515) | def test_for_sequence_classification(self): method test_dataset_conversion (line 520) | def test_dataset_conversion(self): method test_keras_fit (line 524) | def test_keras_fit(self): method test_loss_computation (line 528) | def test_loss_computation(self): method test_pt_tf_model_equivalence (line 532) | def test_pt_tf_model_equivalence(self): function prepare_tapas_single_inputs_for_inference (line 536) | def prepare_tapas_single_inputs_for_inference(): function prepare_tapas_batch_inputs_for_inference (line 548) | def prepare_tapas_batch_inputs_for_inference(): function prepare_tapas_batch_inputs_for_training (line 561) | def prepare_tapas_batch_inputs_for_training(): class TFTapasModelIntegrationTest (line 580) | class TFTapasModelIntegrationTest(unittest.TestCase): method default_tokenizer (line 582) | def default_tokenizer(self): method test_inference_no_head (line 586) | def test_inference_no_head(self): method test_inference_masked_lm (line 614) | def test_inference_masked_lm(self): method test_inference_question_answering_head_conversational (line 623) | def test_inference_question_answering_head_conversational(self): method test_inference_question_answering_head_conversational_absolute_embeddings (line 667) | def test_inference_question_answering_head_conversational_absolute_emb... method test_inference_question_answering_head_weak_supervision (line 712) | def test_inference_question_answering_head_weak_supervision(self): method test_training_question_answering_head_weak_supervision (line 756) | def test_training_question_answering_head_weak_supervision(self): method test_inference_question_answering_head_strong_supervision (line 814) | def test_inference_question_answering_head_strong_supervision(self): method test_inference_classification_head (line 864) | def test_inference_classification_head(self): class TFTapasUtilsTest (line 885) | class TFTapasUtilsTest(unittest.TestCase): method _prepare_tables (line 886) | def _prepare_tables(self): method test_product_index (line 923) | def test_product_index(self): method test_flatten (line 958) | def test_flatten(self): method test_range_index_map (line 977) | def test_range_index_map(self): method test_reduce_sum (line 992) | def test_reduce_sum(self): method test_reduce_mean (line 1007) | def test_reduce_mean(self): method test_reduce_max (line 1027) | def test_reduce_max(self): method test_reduce_sum_vectorized (line 1035) | def test_reduce_sum_vectorized(self): method test_gather (line 1047) | def test_gather(self): method test_gather_vectorized (line 1064) | def test_gather_vectorized(self): FILE: mplsandbox_for_rl/transformers/tests/models/tapas/test_tokenization_tapas.py class TapasTokenizationTest (line 55) | class TapasTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method get_table (line 63) | def get_table( method get_table_and_query (line 79) | def get_table_and_query( method get_clean_sequence (line 90) | def get_clean_sequence( method setUp (line 121) | def setUp(self): method get_input_output_texts (line 145) | def get_input_output_texts(self, tokenizer): method test_tf_encode_plus_sent_to_model (line 152) | def test_tf_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 185) | def test_rust_and_python_full_tokenizers(self): method test_chat_template_batched (line 227) | def test_chat_template_batched(self): method test_chinese (line 230) | def test_chinese(self): method test_basic_tokenizer_lower (line 235) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 243) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 251) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 259) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 267) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 274) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 281) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 288) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_wordpiece_tokenizer (line 295) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 309) | def test_is_whitespace(self): method test_is_control (line 319) | def test_is_control(self): method test_is_punctuation (line 327) | def test_is_punctuation(self): method test_clean_text (line 336) | def test_clean_text(self): method test_sequence_builders (line 345) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 358) | def test_offsets_with_special_characters(self): method test_add_special_tokens (line 410) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 425) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 480) | def test_encode_decode_with_spaces(self): method test_encode_plus_with_padding (line 497) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 603) | def test_internal_consistency(self): method test_mask_output (line 622) | def test_mask_output(self): method test_maximum_encoding_length_pair_input (line 637) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 641) | def test_maximum_encoding_length_single_input(self): method test_number_of_added_tokens (line 644) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 659) | def test_padding_to_max_length(self): method test_call (line 695) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 724) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 783) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 786) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 843) | def test_padding_to_multiple_of(self): method test_prepare_for_model (line 870) | def test_prepare_for_model(self): method test_tokenizer_slow_store_full_signature (line 873) | def test_tokenizer_slow_store_full_signature(self): method test_special_tokens_mask_input_pairs (line 881) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 907) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 925) | def test_save_and_load_tokenizer(self): method test_right_and_left_truncation (line 954) | def test_right_and_left_truncation(self): method test_right_and_left_padding (line 957) | def test_right_and_left_padding(self): method test_token_type_ids (line 1020) | def test_token_type_ids(self): method test_torch_encode_plus_sent_to_model (line 1045) | def test_torch_encode_plus_sent_to_model(self): method test_pretokenized_inputs (line 1087) | def test_pretokenized_inputs(self): method test_tapas_truncation_integration_test (line 1091) | def test_tapas_truncation_integration_test(self): method test_min_max_question_length (line 1129) | def test_min_max_question_length(self): method test_batch_encode_plus_tensors (line 1160) | def test_batch_encode_plus_tensors(self): method test_tapas_integration_test (line 1208) | def test_tapas_integration_test(self): method test_full_tokenizer (line 1231) | def test_full_tokenizer(self): method test_np_encode_plus_sent_to_model (line 1274) | def test_np_encode_plus_sent_to_model(self): method test_chat_template (line 1278) | def test_chat_template(self): method test_chat_template_return_assistant_tokens_mask (line 1282) | def test_chat_template_return_assistant_tokens_mask(self): FILE: mplsandbox_for_rl/transformers/tests/models/time_series_transformer/test_modeling_time_series_transformer.py class TimeSeriesTransformerModelTester (line 49) | class TimeSeriesTransformerModelTester: method __init__ (line 50) | def __init__( method get_config (line 89) | def get_config(self): method prepare_time_series_transformer_inputs_dict (line 110) | def prepare_time_series_transformer_inputs_dict(self, config): method prepare_config_and_inputs (line 135) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 140) | def prepare_config_and_inputs_for_common(self): method check_encoder_decoder_model_standalone (line 144) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class TimeSeriesTransformerModelTest (line 178) | class TimeSeriesTransformerModelTest(ModelTesterMixin, PipelineTesterMix... method setUp (line 191) | def setUp(self): method test_config (line 200) | def test_config(self): method test_save_load_strict (line 203) | def test_save_load_strict(self): method test_encoder_decoder_model_standalone (line 213) | def test_encoder_decoder_model_standalone(self): method test_resize_tokens_embeddings (line 218) | def test_resize_tokens_embeddings(self): method test_model_main_input_name (line 222) | def test_model_main_input_name(self): method test_forward_signature (line 228) | def test_forward_signature(self): method test_attention_outputs (line 278) | def test_attention_outputs(self): method test_training_gradient_checkpointing (line 375) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 381) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 387) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_create_network_inputs (line 401) | def test_create_network_inputs(self, prediction_length, context_length... method test_retain_grad_hidden_states_attentions (line 475) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 479) | def test_model_get_set_embeddings(self): function prepare_batch (line 483) | def prepare_batch(filename="train-batch.pt"): class TimeSeriesTransformerModelIntegrationTests (line 491) | class TimeSeriesTransformerModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 492) | def test_inference_no_head(self): method test_inference_head (line 517) | def test_inference_head(self): method test_seq_to_seq_generation (line 539) | def test_seq_to_seq_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/timesformer/test_modeling_timesformer.py class TimesformerModelTester (line 48) | class TimesformerModelTester: method __init__ (line 49) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method get_config (line 108) | def get_config(self): method create_and_check_model (line 127) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_video_classification (line 134) | def create_and_check_for_video_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 145) | def prepare_config_and_inputs_for_common(self): class TimesformerModelTest (line 153) | class TimesformerModelTest(ModelTesterMixin, PipelineTesterMixin, unitte... method setUp (line 171) | def setUp(self): method _prepare_for_class (line 177) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 188) | def test_config(self): method test_inputs_embeds (line 192) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 195) | def test_model_get_set_embeddings(self): method test_model (line 204) | def test_model(self): method test_for_video_classification (line 208) | def test_for_video_classification(self): method test_model_from_pretrained (line 213) | def test_model_from_pretrained(self): method test_attention_outputs (line 218) | def test_attention_outputs(self): method test_hidden_states_output (line 280) | def test_hidden_states_output(self): function prepare_video (line 315) | def prepare_video(): class TimesformerModelIntegrationTest (line 325) | class TimesformerModelIntegrationTest(unittest.TestCase): method default_image_processor (line 327) | def default_image_processor(self): method test_inference_for_video_classification (line 336) | def test_inference_for_video_classification(self): FILE: mplsandbox_for_rl/transformers/tests/models/timm_backbone/test_modeling_timm_backbone.py class TimmBackboneModelTester (line 37) | class TimmBackboneModelTester: method __init__ (line 38) | def __init__( method prepare_config_and_inputs (line 62) | def prepare_config_and_inputs(self): method get_config (line 68) | def get_config(self): method create_and_check_model (line 79) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 90) | def prepare_config_and_inputs_for_common(self): class TimmBackboneModelTest (line 99) | class TimmBackboneModelTest(ModelTesterMixin, BackboneTesterMixin, Pipel... method setUp (line 107) | def setUp(self): method test_config (line 115) | def test_config(self): method test_timm_transformer_backbone_equivalence (line 118) | def test_timm_transformer_backbone_equivalence(self): method test_feed_forward_chunking (line 142) | def test_feed_forward_chunking(self): method test_hidden_states_output (line 146) | def test_hidden_states_output(self): method test_initialization (line 150) | def test_initialization(self): method test_inputs_embeds (line 154) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 158) | def test_model_get_set_embeddings(self): method test_from_pretrained_no_checkpoint (line 162) | def test_from_pretrained_no_checkpoint(self): method test_save_load (line 166) | def test_save_load(self): method test_save_load_low_cpu_mem_usage (line 170) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 174) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 178) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method test_tie_model_weights (line 182) | def test_tie_model_weights(self): method test_tied_model_weights_key_ignore (line 186) | def test_tied_model_weights_key_ignore(self): method test_load_save_without_tied_weights (line 190) | def test_load_save_without_tied_weights(self): method test_model_weights_reload_no_missing_tied_weights (line 194) | def test_model_weights_reload_no_missing_tied_weights(self): method test_channels (line 198) | def test_channels(self): method test_torchscript_output_attentions (line 202) | def test_torchscript_output_attentions(self): method test_can_use_safetensors (line 206) | def test_can_use_safetensors(self): method test_model_is_small (line 210) | def test_model_is_small(self): method test_forward_signature (line 213) | def test_forward_signature(self): method test_retain_grad_hidden_states_attentions (line 225) | def test_retain_grad_hidden_states_attentions(self): method test_create_from_modified_config (line 255) | def test_create_from_modified_config(self): FILE: mplsandbox_for_rl/transformers/tests/models/trocr/test_modeling_trocr.py class TrOCRStandaloneDecoderModelTester (line 35) | class TrOCRStandaloneDecoderModelTester: method __init__ (line 36) | def __init__( method prepare_config_and_inputs (line 87) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 114) | def create_and_check_decoder_model_past( method prepare_config_and_inputs_for_common (line 153) | def prepare_config_and_inputs_for_common(self): class TrOCRStandaloneDecoderModelTest (line 162) | class TrOCRStandaloneDecoderModelTest(ModelTesterMixin, GenerationTester... method setUp (line 169) | def setUp(self): method test_inputs_embeds (line 174) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 178) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 182) | def test_save_load_fast_init_to_base(self): method test_config (line 185) | def test_config(self): method test_decoder_model_past (line 188) | def test_decoder_model_past(self): method test_retain_grad_hidden_states_attentions (line 193) | def test_retain_grad_hidden_states_attentions(self): method test_left_padding_compatibility (line 197) | def test_left_padding_compatibility(self): FILE: mplsandbox_for_rl/transformers/tests/models/tvp/test_image_processing_tvp.py class TvpImageProcessingTester (line 38) | class TvpImageProcessingTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_image_processor_dict (line 81) | def prepare_image_processor_dict(self): method get_expected_values (line 94) | def get_expected_values(self, image_inputs, batched=False): method prepare_video_inputs (line 112) | def prepare_video_inputs(self, equal_resolution=False, numpify=False, ... class TvpImageProcessingTest (line 127) | class TvpImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 130) | def setUp(self): method image_processor_dict (line 135) | def image_processor_dict(self): method test_image_processor_properties (line 138) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 150) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pil (line 157) | def test_call_pil(self): method test_call_numpy (line 194) | def test_call_numpy(self): method test_call_numpy_4_channels (line 231) | def test_call_numpy_4_channels(self): method test_call_pytorch (line 273) | def test_call_pytorch(self): FILE: mplsandbox_for_rl/transformers/tests/models/tvp/test_modeling_tvp.py class TVPModelTester (line 45) | class TVPModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 103) | def prepare_config_and_inputs(self): method get_config (line 114) | def get_config(self): method create_and_check_model (line 151) | def create_and_check_model(self, config, input_ids, pixel_values, atte... method prepare_config_and_inputs_for_common (line 158) | def prepare_config_and_inputs_for_common(self): class TVPModelTest (line 166) | class TVPModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 182) | def setUp(self): method test_model (line 185) | def test_model(self): method test_inputs_embeds (line 190) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 194) | def test_model_get_set_embeddings(self): method test_initialization (line 198) | def test_initialization(self): method test_backbone_selection (line 215) | def test_backbone_selection(self): function prepare_img (line 249) | def prepare_img(): class TvpModelIntegrationTests (line 256) | class TvpModelIntegrationTests(unittest.TestCase): method default_image_processor (line 258) | def default_image_processor(self): method test_inference_no_head (line 261) | def test_inference_no_head(self): method test_inference_with_head (line 282) | def test_inference_with_head(self): method test_interpolate_inference_no_head (line 301) | def test_interpolate_inference_no_head(self): method test_interpolate_inference_with_head (line 320) | def test_interpolate_inference_with_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/udop/test_modeling_udop.py class UdopModelTester (line 48) | class UdopModelTester: method __init__ (line 49) | def __init__( method prepare_config_and_inputs (line 98) | def prepare_config_and_inputs(self): method get_config (line 136) | def get_config(self): method create_and_check_model (line 154) | def create_and_check_model( method create_and_check_with_lm_head (line 186) | def create_and_check_with_lm_head( method create_and_check_generate_with_past_key_values (line 208) | def create_and_check_generate_with_past_key_values( method create_and_check_model_fp16_forward (line 229) | def create_and_check_model_fp16_forward( method prepare_config_and_inputs_for_common (line 243) | def prepare_config_and_inputs_for_common(self): class UdopModelTest (line 267) | class UdopModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 289) | def setUp(self): method _prepare_for_class (line 293) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 303) | def test_config(self): method test_model (line 306) | def test_model(self): method test_with_lm_head (line 310) | def test_with_lm_head(self): method test_generate_with_past_key_values (line 314) | def test_generate_with_past_key_values(self): method test_model_fp16_forward (line 319) | def test_model_fp16_forward(self): method test_training_gradient_checkpointing (line 324) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 330) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 336) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_forward_signature (line 339) | def test_forward_signature(self): method test_save_load_low_cpu_mem_usage (line 371) | def test_save_load_low_cpu_mem_usage(self): method test_model_from_pretrained (line 375) | def test_model_from_pretrained(self): class UdopEncoderOnlyModelTester (line 381) | class UdopEncoderOnlyModelTester: method __init__ (line 382) | def __init__( method get_config (line 424) | def get_config(self): method prepare_config_and_inputs (line 442) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 470) | def prepare_config_and_inputs_for_common(self): method create_and_check_model (line 486) | def create_and_check_model( method create_and_check_model_fp16_forward (line 505) | def create_and_check_model_fp16_forward( class UdopEncoderOnlyModelTest (line 517) | class UdopEncoderOnlyModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 526) | def setUp(self): method test_config (line 530) | def test_config(self): method test_model (line 533) | def test_model(self): method test_save_load_low_cpu_mem_usage (line 540) | def test_save_load_low_cpu_mem_usage(self): class UdopModelIntegrationTests (line 549) | class UdopModelIntegrationTests(unittest.TestCase): method image (line 551) | def image(self): method processor (line 560) | def processor(self): method model (line 564) | def model(self): method test_conditional_generation (line 567) | def test_conditional_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/udop/test_processor_udop.py class UdopProcessorTest (line 54) | class UdopProcessorTest(unittest.TestCase): method setUp (line 59) | def setUp(self): method get_tokenizer (line 73) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 76) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method get_tokenizers (line 79) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_image_processor (line 82) | def get_image_processor(self, **kwargs): method tearDown (line 85) | def tearDown(self): method prepare_image_inputs (line 88) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 99) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 114) | def test_save_load_pretrained_additional_features(self): method test_model_input_names (line 151) | def test_model_input_names(self): method test_text_target (line 164) | def test_text_target(self): method test_overflowing_tokens (line 182) | def test_overflowing_tokens(self): class UdopProcessorIntegrationTests (line 220) | class UdopProcessorIntegrationTests(unittest.TestCase): method get_images (line 222) | def get_images(self): method get_tokenizers (line 234) | def get_tokenizers(self): method test_processor_case_1 (line 240) | def test_processor_case_1(self): method test_processor_case_2 (line 295) | def test_processor_case_2(self): method test_processor_case_3 (line 349) | def test_processor_case_3(self): method test_processor_case_4 (line 414) | def test_processor_case_4(self): method test_processor_case_5 (line 465) | def test_processor_case_5(self): FILE: mplsandbox_for_rl/transformers/tests/models/udop/test_tokenization_udop.py class UdopTokenizationTest (line 56) | class UdopTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method get_words_and_boxes (line 65) | def get_words_and_boxes(self): method get_words_and_boxes_batch (line 71) | def get_words_and_boxes_batch(self): method get_question_words_and_boxes (line 80) | def get_question_words_and_boxes(self): method get_question_words_and_boxes_batch (line 87) | def get_question_words_and_boxes_batch(self): method setUp (line 97) | def setUp(self): method get_input_output_texts (line 104) | def get_input_output_texts(self, tokenizer): method test_save_sentencepiece_tokenizer (line 111) | def test_save_sentencepiece_tokenizer(self) -> None: method test_sequence_builders (line 148) | def test_sequence_builders(self): method test_add_special_tokens (line 164) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 180) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 240) | def test_encode_decode_with_spaces(self): method test_encode_plus_with_padding (line 257) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 359) | def test_internal_consistency(self): method test_mask_output (line 380) | def test_mask_output(self): method test_number_of_added_tokens (line 394) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 422) | def test_padding_to_max_length(self): method test_padding (line 457) | def test_padding(self, max_length=50): method test_padding_warning_message_fast_tokenizer (line 688) | def test_padding_warning_message_fast_tokenizer(self): method test_call (line 731) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 754) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 821) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 824) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 876) | def test_padding_to_multiple_of(self): method test_tokenizer_slow_store_full_signature (line 911) | def test_tokenizer_slow_store_full_signature(self): method test_build_inputs_with_special_tokens (line 919) | def test_build_inputs_with_special_tokens(self): method test_special_tokens_mask_input_pairs (line 944) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 967) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 984) | def test_save_and_load_tokenizer(self): method test_right_and_left_truncation (line 1012) | def test_right_and_left_truncation(self): method test_right_and_left_padding (line 1015) | def test_right_and_left_padding(self): method test_token_type_ids (line 1078) | def test_token_type_ids(self): method test_offsets_mapping (line 1110) | def test_offsets_mapping(self): method test_chat_template (line 1157) | def test_chat_template(self): method test_chat_template_return_assistant_tokens_mask (line 1161) | def test_chat_template_return_assistant_tokens_mask(self): method test_chat_template_batched (line 1165) | def test_chat_template_batched(self): method test_torch_encode_plus_sent_to_model (line 1170) | def test_torch_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 1211) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_python_rust_equals (line 1232) | def test_tokenization_python_rust_equals(self): method test_embeded_special_tokens (line 1286) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 1317) | def test_compare_add_special_tokens(self): method test_udop_truncation_integration_test (line 1354) | def test_udop_truncation_integration_test(self): method test_batch_encode_plus_tensors (line 1374) | def test_batch_encode_plus_tensors(self): method test_sequence_ids (line 1421) | def test_sequence_ids(self): method test_special_tokens_initialization (line 1445) | def test_special_tokens_initialization(self): method test_training_new_tokenizer (line 1482) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 1519) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_prepare_for_model (line 1618) | def test_prepare_for_model(self): method test_padding_different_model_input_name (line 1632) | def test_padding_different_model_input_name(self): method test_batch_encode_dynamic_overflowing (line 1668) | def test_batch_encode_dynamic_overflowing(self): method test_alignement_methods (line 1730) | def test_alignement_methods(self): method test_maximum_encoding_length_pair_input (line 1734) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 1738) | def test_maximum_encoding_length_single_input(self): method test_pretokenized_inputs (line 1742) | def test_pretokenized_inputs(self): method test_compare_pretokenized_inputs (line 1746) | def test_compare_pretokenized_inputs(self): method test_compare_prepare_for_model (line 1750) | def test_compare_prepare_for_model(self): method test_only_label_first_subword (line 1754) | def test_only_label_first_subword(self): method test_udop_integration_test (line 1778) | def test_udop_integration_test(self): method test_np_encode_plus_sent_to_model (line 1871) | def test_np_encode_plus_sent_to_model(self): method test_sentencepiece_tokenize_and_convert_tokens_to_string (line 1875) | def test_sentencepiece_tokenize_and_convert_tokens_to_string(self): method test_sentencepiece_tokenize_and_decode (line 1879) | def test_sentencepiece_tokenize_and_decode(self): method test_text_target (line 1882) | def test_text_target(self): method test_special_tokens (line 1901) | def test_special_tokens(self): method test_split_special_tokens (line 1929) | def test_split_special_tokens(self): FILE: mplsandbox_for_rl/transformers/tests/models/umt5/test_modeling_umt5.py class UMT5ModelTester (line 57) | class UMT5ModelTester: method __init__ (line 58) | def __init__( method get_large_model_config (line 105) | def get_large_model_config(self): method prepare_inputs_dict (line 108) | def prepare_inputs_dict( method prepare_config_and_inputs (line 141) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 161) | def prepare_config_and_inputs_for_common(self): method get_pipeline_config (line 165) | def get_pipeline_config(self): method get_config (line 183) | def get_config(self): method create_and_check_model (line 201) | def create_and_check_model( method create_and_check_decoder_model_past (line 231) | def create_and_check_decoder_model_past( method create_and_check_model_fp16_forward (line 268) | def create_and_check_model_fp16_forward( method create_and_check_with_sequence_classification_head (line 277) | def create_and_check_with_sequence_classification_head( class UMT5ModelTest (line 291) | class UMT5ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method setUp (line 319) | def setUp(self): method is_pipeline_test_to_skip (line 324) | def is_pipeline_test_to_skip( method _create_and_check_torch_fx_tracing (line 332) | def _create_and_check_torch_fx_tracing(self, config, inputs_dict, outp... method test_inputs_embeds (line 453) | def test_inputs_embeds(self): method test_with_sequence_classification_head (line 482) | def test_with_sequence_classification_head(self): method test_export_to_onnx (line 487) | def test_export_to_onnx(self): method test_model_fp16_forward (line 501) | def test_model_fp16_forward(self): method test_generate_with_head_masking (line 505) | def test_generate_with_head_masking(self): method test_training_gradient_checkpointing (line 541) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 547) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 553) | def test_training_gradient_checkpointing_use_reentrant_false(self): class UMT5EncoderOnlyModelTester (line 558) | class UMT5EncoderOnlyModelTester: method __init__ (line 559) | def __init__( method get_large_model_config (line 600) | def get_large_model_config(self): method prepare_config_and_inputs (line 603) | def prepare_config_and_inputs(self): method create_and_check_model (line 632) | def create_and_check_model( method create_and_check_model_fp16_forward (line 650) | def create_and_check_model_fp16_forward( method create_and_check_with_token_classification_head (line 660) | def create_and_check_with_token_classification_head( method prepare_config_and_inputs_for_common (line 676) | def prepare_config_and_inputs_for_common(self): class UMT5EncoderOnlyModelTest (line 692) | class UMT5EncoderOnlyModelTest(ModelTesterMixin, PipelineTesterMixin, un... method setUp (line 706) | def setUp(self): method test_config (line 710) | def test_config(self): method test_model (line 713) | def test_model(self): method test_model_fp16_forward (line 718) | def test_model_fp16_forward(self): method test_with_token_classification_head (line 722) | def test_with_token_classification_head(self): class Umt5IntegrationTest (line 730) | class Umt5IntegrationTest(unittest.TestCase): method test_small_integration_test (line 735) | def test_small_integration_test(self): FILE: mplsandbox_for_rl/transformers/tests/models/unispeech/test_modeling_unispeech.py class UniSpeechModelTester (line 51) | class UniSpeechModelTester: method __init__ (line 52) | def __init__( method prepare_config_and_inputs (line 110) | def prepare_config_and_inputs(self): method get_config (line 118) | def get_config(self): method create_and_check_model (line 140) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 149) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 175) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 203) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 228) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 257) | def check_seq_classifier_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 280) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 294) | def prepare_config_and_inputs_for_common(self): class UniSpeechRobustModelTest (line 301) | class UniSpeechRobustModelTest(ModelTesterMixin, PipelineTesterMixin, un... method setUp (line 319) | def setUp(self): method test_config (line 325) | def test_config(self): method test_model (line 328) | def test_model(self): method test_batched_inference (line 332) | def test_batched_inference(self): method test_ctc_loss_inference (line 336) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 340) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 344) | def test_ctc_train(self): method test_seq_classifier_train (line 348) | def test_seq_classifier_train(self): method test_labels_out_of_vocab (line 352) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 358) | def test_inputs_embeds(self): method test_forward_signature (line 363) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 369) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 373) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 376) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 416) | def test_initialization(self): method _mock_init_weights (line 450) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 464) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 487) | def test_mask_time_prob_ctc(self): method test_mask_time_feature_prob_ctc_single_batch (line 510) | def test_mask_time_feature_prob_ctc_single_batch(self): method test_feed_forward_chunking (line 538) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 542) | def test_model_from_pretrained(self): class UniSpeechModelIntegrationTest (line 550) | class UniSpeechModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 551) | def _load_datasamples(self, num_samples): method _load_superb (line 560) | def _load_superb(self, task, num_samples): method test_inference_pretraining (line 565) | def test_inference_pretraining(self): FILE: mplsandbox_for_rl/transformers/tests/models/unispeech_sat/test_modeling_unispeech_sat.py class UniSpeechSatModelTester (line 53) | class UniSpeechSatModelTester: method __init__ (line 54) | def __init__( method prepare_config_and_inputs (line 124) | def prepare_config_and_inputs(self): method get_config (line 132) | def get_config(self): method create_and_check_model (line 160) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 169) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 195) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 223) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 248) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 277) | def check_seq_classifier_training(self, config, input_values, *args): method check_xvector_training (line 300) | def check_xvector_training(self, config, *args): method check_labels_out_of_vocab (line 324) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 338) | def prepare_config_and_inputs_for_common(self): class UniSpeechSatModelTest (line 345) | class UniSpeechSatModelTest(ModelTesterMixin, PipelineTesterMixin, unitt... method setUp (line 371) | def setUp(self): method test_config (line 375) | def test_config(self): method test_model (line 378) | def test_model(self): method test_ctc_loss_inference (line 382) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 386) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 390) | def test_ctc_train(self): method test_seq_classifier_train (line 394) | def test_seq_classifier_train(self): method test_xvector_train (line 398) | def test_xvector_train(self): method test_labels_out_of_vocab (line 402) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 407) | def test_inputs_embeds(self): method test_forward_signature (line 411) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 415) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 419) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 422) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 462) | def test_initialization(self): method _mock_init_weights (line 498) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 512) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 534) | def test_mask_time_prob_ctc(self): method test_feed_forward_chunking (line 558) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 562) | def test_model_from_pretrained(self): class UniSpeechSatRobustModelTest (line 568) | class UniSpeechSatRobustModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 578) | def setUp(self): method test_config (line 584) | def test_config(self): method test_model (line 587) | def test_model(self): method test_batched_inference (line 591) | def test_batched_inference(self): method test_ctc_loss_inference (line 595) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 599) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 603) | def test_ctc_train(self): method test_seq_classifier_train (line 607) | def test_seq_classifier_train(self): method test_labels_out_of_vocab (line 611) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 616) | def test_inputs_embeds(self): method test_forward_signature (line 620) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 624) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 628) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 631) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 671) | def test_initialization(self): method _mock_init_weights (line 707) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 721) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 744) | def test_mask_time_prob_ctc(self): method test_mask_time_feature_prob_ctc_single_batch (line 767) | def test_mask_time_feature_prob_ctc_single_batch(self): method test_feed_forward_chunking (line 795) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 799) | def test_model_from_pretrained(self): class UniSpeechSatModelIntegrationTest (line 807) | class UniSpeechSatModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 808) | def _load_datasamples(self, num_samples): method _load_superb (line 817) | def _load_superb(self, task, num_samples): method test_inference_encoder_base (line 822) | def test_inference_encoder_base(self): method test_inference_encoder_large (line 850) | def test_inference_encoder_large(self): method test_inference_diarization (line 876) | def test_inference_diarization(self): method test_inference_speaker_verification (line 905) | def test_inference_speaker_verification(self): FILE: mplsandbox_for_rl/transformers/tests/models/univnet/test_feature_extraction_univnet.py function floats_list (line 39) | def floats_list(shape, scale=1.0, rng=None, name=None): class UnivNetFeatureExtractionTester (line 53) | class UnivNetFeatureExtractionTester(unittest.TestCase): method __init__ (line 54) | def __init__( method prepare_feat_extract_dict (line 108) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 132) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class UnivNetFeatureExtractionTest (line 151) | class UnivNetFeatureExtractionTest(SequenceFeatureExtractionTestMixin, u... method setUp (line 154) | def setUp(self): method test_feat_extract_from_and_save_pretrained (line 158) | def test_feat_extract_from_and_save_pretrained(self): method test_feat_extract_to_json_file (line 174) | def test_feat_extract_to_json_file(self): method test_call (line 189) | def test_call(self): method test_batched_unbatched_consistency (line 240) | def test_batched_unbatched_consistency(self): method test_generate_noise (line 265) | def test_generate_noise(self): method test_pad_end (line 276) | def test_pad_end(self): method test_generate_noise_and_pad_end (line 286) | def test_generate_noise_and_pad_end(self): method test_batch_decode (line 298) | def test_batch_decode(self): method test_double_precision_pad (line 316) | def test_double_precision_pad(self): method _load_datasamples (line 329) | def _load_datasamples(self, num_samples): method test_integration (line 339) | def test_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/univnet/test_modeling_univnet.py class UnivNetModelTester (line 44) | class UnivNetModelTester: method __init__ (line 45) | def __init__( method prepare_noise_sequence (line 67) | def prepare_noise_sequence(self): method prepare_config_and_inputs (line 74) | def prepare_config_and_inputs(self): method get_config (line 81) | def get_config(self): method create_and_check_model (line 89) | def create_and_check_model(self, config, spectrogram, noise_sequence): method prepare_config_and_inputs_for_common (line 94) | def prepare_config_and_inputs_for_common(self): class UnivNetModelTest (line 101) | class UnivNetModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 122) | def setUp(self): method test_multi_gpu_data_parallel_forward (line 129) | def test_multi_gpu_data_parallel_forward(self): method test_config (line 132) | def test_config(self): method test_model (line 135) | def test_model(self): method test_forward_signature (line 139) | def test_forward_signature(self): method test_hidden_states_output (line 154) | def test_hidden_states_output(self): method test_inputs_embeds (line 158) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 162) | def test_model_get_set_embeddings(self): method test_model_outputs_equivalence (line 166) | def test_model_outputs_equivalence(self): method test_retain_grad_hidden_states_attentions (line 170) | def test_retain_grad_hidden_states_attentions(self): method test_batched_inputs_outputs (line 173) | def test_batched_inputs_outputs(self): method test_unbatched_inputs_outputs (line 195) | def test_unbatched_inputs_outputs(self): class UnivNetModelIntegrationTests (line 212) | class UnivNetModelIntegrationTests(unittest.TestCase): method tearDown (line 213) | def tearDown(self): method _load_datasamples (line 218) | def _load_datasamples(self, num_samples, sampling_rate=24000): method get_inputs (line 226) | def get_inputs(self, device, num_samples: int = 3, noise_length: int =... method test_model_inference_batched (line 262) | def test_model_inference_batched(self): method test_model_inference_unbatched (line 286) | def test_model_inference_unbatched(self): method test_integration (line 310) | def test_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/upernet/test_modeling_upernet.py class UperNetModelTester (line 49) | class UperNetModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 87) | def prepare_config_and_inputs(self): method get_backbone_config (line 98) | def get_backbone_config(self): method get_config (line 110) | def get_config(self): method create_and_check_for_semantic_segmentation (line 126) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 135) | def prepare_config_and_inputs_for_common(self): class UperNetModelTest (line 147) | class UperNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 162) | def setUp(self): method test_config (line 172) | def test_config(self): method test_for_semantic_segmentation (line 175) | def test_for_semantic_segmentation(self): method test_inputs_embeds (line 180) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 184) | def test_model_get_set_embeddings(self): method test_save_load_fast_init_from_base (line 188) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 192) | def test_save_load_fast_init_to_base(self): method test_multi_gpu_data_parallel_forward (line 197) | def test_multi_gpu_data_parallel_forward(self): method test_hidden_states_output (line 200) | def test_hidden_states_output(self): method test_initialization (line 232) | def test_initialization(self): method test_backbone_selection (line 248) | def test_backbone_selection(self): method test_tied_model_weights_key_ignore (line 275) | def test_tied_model_weights_key_ignore(self): method test_model_from_pretrained (line 279) | def test_model_from_pretrained(self): function prepare_img (line 286) | def prepare_img(): class UperNetModelIntegrationTest (line 297) | class UperNetModelIntegrationTest(unittest.TestCase): method test_inference_swin_backbone (line 298) | def test_inference_swin_backbone(self): method test_inference_convnext_backbone (line 316) | def test_inference_convnext_backbone(self): FILE: mplsandbox_for_rl/transformers/tests/models/video_llava/test_image_processing_video_llava.py class VideoLlavaImageProcessingTester (line 37) | class VideoLlavaImageProcessingTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_image_processor_dict (line 73) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 86) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 90) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... method prepare_video_inputs (line 101) | def prepare_video_inputs(self, equal_resolution=False, numpify=False, ... class VideoLlavaImageProcessingTest (line 130) | class VideoLlavaImageProcessingTest(ImageProcessingTestMixin, unittest.T... method setUp (line 134) | def setUp(self): method image_processor_dict (line 140) | def image_processor_dict(self): method test_image_processor_properties (line 143) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 155) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pil (line 164) | def test_call_pil(self): method test_call_numpy (line 182) | def test_call_numpy(self): method test_call_numpy_videos (line 200) | def test_call_numpy_videos(self): method test_call_pil_videos (line 218) | def test_call_pil_videos(self): method test_call_pytorch (line 236) | def test_call_pytorch(self): method test_call_pytorch_videos (line 255) | def test_call_pytorch_videos(self): method test_call_mixed (line 274) | def test_call_mixed(self, numpify, torchify): method test_call_numpy_4_channels (line 297) | def test_call_numpy_4_channels(self): FILE: mplsandbox_for_rl/transformers/tests/models/video_llava/test_modeling_video_llava.py class VideoLlavaVisionText2TextModelTester (line 45) | class VideoLlavaVisionText2TextModelTester: method __init__ (line 46) | def __init__( method get_config (line 121) | def get_config(self): method prepare_config_and_inputs (line 133) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 156) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_batched_test (line 175) | def prepare_config_and_inputs_for_batched_test(self): class VideoLlavaForConditionalGenerationModelTest (line 193) | class VideoLlavaForConditionalGenerationModelTest(ModelTesterMixin, Gene... method setUp (line 204) | def setUp(self): method test_training_gradient_checkpointing (line 211) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 217) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 223) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_sdpa_can_compile_dynamic (line 227) | def test_sdpa_can_compile_dynamic(self): method test_sdpa_can_dispatch_on_flash (line 231) | def test_sdpa_can_dispatch_on_flash(self): method test_mixed_input (line 234) | def test_mixed_input(self): method test_video_only_input (line 248) | def test_video_only_input(self): method test_image_only_input (line 261) | def test_image_only_input(self): method test_batching_equivalence (line 273) | def test_batching_equivalence(self): method test_inputs_embeds (line 326) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 349) | def test_inputs_embeds_matches_input_ids(self): class VideoLlavaForConditionalGenerationIntegrationTest (line 372) | class VideoLlavaForConditionalGenerationIntegrationTest(unittest.TestCase): method setUp (line 373) | def setUp(self): method tearDown (line 376) | def tearDown(self): method test_small_model_integration_test (line 382) | def test_small_model_integration_test(self): method test_small_model_integration_test_mixed_inputs (line 406) | def test_small_model_integration_test_mixed_inputs(self): method test_small_model_integration_test_llama (line 436) | def test_small_model_integration_test_llama(self): method test_small_model_integration_test_llama_batched (line 463) | def test_small_model_integration_test_llama_batched(self): method test_small_model_integration_test_llama_batched_regression (line 494) | def test_small_model_integration_test_llama_batched_regression(self): method test_video_llava_index_error_bug (line 530) | def test_video_llava_index_error_bug(self): method test_video_llava_merge_inputs_error_bug (line 553) | def test_video_llava_merge_inputs_error_bug(self): method test_expansion_in_processing (line 596) | def test_expansion_in_processing(self): FILE: mplsandbox_for_rl/transformers/tests/models/videomae/test_image_processing_videomae.py class VideoMAEImageProcessingTester (line 36) | class VideoMAEImageProcessingTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_image_processor_dict (line 71) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 81) | def expected_output_image_shape(self, images): method prepare_video_inputs (line 84) | def prepare_video_inputs(self, equal_resolution=False, numpify=False, ... class VideoMAEImageProcessingTest (line 99) | class VideoMAEImageProcessingTest(ImageProcessingTestMixin, unittest.Tes... method setUp (line 102) | def setUp(self): method image_processor_dict (line 107) | def image_processor_dict(self): method test_image_processor_properties (line 110) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 119) | def test_image_processor_from_dict_with_kwargs(self): method test_call_pil (line 128) | def test_call_pil(self): method test_call_numpy (line 149) | def test_call_numpy(self): method test_call_numpy_4_channels (line 170) | def test_call_numpy_4_channels(self): method test_call_pytorch (line 197) | def test_call_pytorch(self): FILE: mplsandbox_for_rl/transformers/tests/models/videomae/test_modeling_videomae.py class VideoMAEModelTester (line 49) | class VideoMAEModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 103) | def prepare_config_and_inputs(self): method get_config (line 116) | def get_config(self): method create_and_check_model (line 139) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_pretraining (line 146) | def create_and_check_for_pretraining(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 162) | def prepare_config_and_inputs_for_common(self): class VideoMAEModelTest (line 170) | class VideoMAEModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 190) | def setUp(self): method _prepare_for_class (line 194) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 216) | def test_config(self): method test_inputs_embeds (line 220) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 223) | def test_model_get_set_embeddings(self): method test_model (line 232) | def test_model(self): method test_for_pretraining (line 236) | def test_for_pretraining(self): method test_model_from_pretrained (line 241) | def test_model_from_pretrained(self): method test_attention_outputs (line 246) | def test_attention_outputs(self): method test_hidden_states_output (line 307) | def test_hidden_states_output(self): function prepare_video (line 343) | def prepare_video(): class VideoMAEModelIntegrationTest (line 353) | class VideoMAEModelIntegrationTest(unittest.TestCase): method default_image_processor (line 355) | def default_image_processor(self): method test_inference_for_video_classification (line 364) | def test_inference_for_video_classification(self): method test_inference_for_pretraining (line 386) | def test_inference_for_pretraining(self): FILE: mplsandbox_for_rl/transformers/tests/models/vilt/test_image_processing_vilt.py class ViltImageProcessingTester (line 33) | class ViltImageProcessingTester(unittest.TestCase): method __init__ (line 34) | def __init__( method prepare_image_processor_dict (line 64) | def prepare_image_processor_dict(self): method get_expected_values (line 74) | def get_expected_values(self, image_inputs, batched=False): method expected_output_image_shape (line 116) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 120) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class ViltImageProcessingTest (line 134) | class ViltImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 137) | def setUp(self): method image_processor_dict (line 142) | def image_processor_dict(self): method test_image_processor_properties (line 145) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 154) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/vilt/test_modeling_vilt.py class ViltModelTester (line 51) | class ViltModelTester: method __init__ (line 52) | def __init__( method prepare_config_and_inputs (line 113) | def prepare_config_and_inputs(self): method get_config (line 135) | def get_config(self): method create_and_check_model (line 157) | def create_and_check_model( method create_and_check_for_token_classification (line 176) | def create_and_check_for_token_classification( method prepare_config_and_inputs_for_common (line 193) | def prepare_config_and_inputs_for_common(self): method prepare_pixel_values (line 211) | def prepare_pixel_values(self): class ViltModelTest (line 216) | class ViltModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method _prepare_for_class (line 239) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 258) | def setUp(self): method test_config (line 262) | def test_config(self): method test_model (line 265) | def test_model(self): method test_for_token_classification (line 269) | def test_for_token_classification(self): method test_training (line 273) | def test_training(self): method test_training_gradient_checkpointing (line 297) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 324) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 330) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load (line 337) | def test_save_load(self): method test_determinism (line 344) | def test_determinism(self): method test_batching_equivalence (line 350) | def test_batching_equivalence(self): method test_model_outputs_equivalence (line 357) | def test_model_outputs_equivalence(self): method test_inputs_embeds_matches_input_ids (line 364) | def test_inputs_embeds_matches_input_ids(self): method test_attention_outputs (line 367) | def test_attention_outputs(self): method test_hidden_states_output (line 447) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 495) | def test_retain_grad_hidden_states_attentions(self): method test_model_from_pretrained (line 536) | def test_model_from_pretrained(self): class ViltForImagesAndTextClassificationModelTest (line 543) | class ViltForImagesAndTextClassificationModelTest(ViltModelTest, unittes... method setUp (line 546) | def setUp(self): method test_model (line 551) | def test_model(self): method test_for_token_classification (line 555) | def test_for_token_classification(self): function prepare_img (line 560) | def prepare_img(): class ViltModelIntegrationTest (line 567) | class ViltModelIntegrationTest(unittest.TestCase): method default_processor (line 569) | def default_processor(self): method test_inference_masked_lm (line 573) | def test_inference_masked_lm(self): method test_inference_visual_question_answering (line 597) | def test_inference_visual_question_answering(self): method test_inference_natural_language_visual_reasoning (line 633) | def test_inference_natural_language_visual_reasoning(self): FILE: mplsandbox_for_rl/transformers/tests/models/vipllava/test_modeling_vipllava.py class VipLlavaVisionText2TextModelTester (line 45) | class VipLlavaVisionText2TextModelTester: method __init__ (line 47) | def __init__( method get_config (line 115) | def get_config(self): method prepare_config_and_inputs (line 125) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 138) | def prepare_config_and_inputs_for_common(self): class VipLlavaForConditionalGenerationModelTest (line 155) | class VipLlavaForConditionalGenerationModelTest(ModelTesterMixin, unitte... method setUp (line 166) | def setUp(self): method test_inputs_embeds (line 171) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 193) | def test_inputs_embeds_matches_input_ids(self): method test_training_gradient_checkpointing (line 216) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 222) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 228) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_sdpa_can_compile_dynamic (line 232) | def test_sdpa_can_compile_dynamic(self): method test_sdpa_can_dispatch_on_flash (line 236) | def test_sdpa_can_dispatch_on_flash(self): class VipLlavaForConditionalGenerationIntegrationTest (line 241) | class VipLlavaForConditionalGenerationIntegrationTest(unittest.TestCase): method setUp (line 242) | def setUp(self): method tearDown (line 245) | def tearDown(self): method test_small_model_integration_test (line 251) | def test_small_model_integration_test(self): method test_vipllava_merge_inputs_error_bug (line 271) | def test_vipllava_merge_inputs_error_bug(self): method test_expansion_in_processing (line 309) | def test_expansion_in_processing(self): FILE: mplsandbox_for_rl/transformers/tests/models/vipllava/test_processor_vipllava.py class LlavaProcessorTest (line 25) | class LlavaProcessorTest(unittest.TestCase): method test_chat_template (line 26) | def test_chat_template(self): FILE: mplsandbox_for_rl/transformers/tests/models/vision_encoder_decoder/test_modeling_flax_vision_encoder_decoder.py class FlaxEncoderDecoderMixin (line 55) | class FlaxEncoderDecoderMixin: method get_encoder_decoder_model (line 56) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 59) | def prepare_config_and_inputs(self): method get_pretrained_model (line 62) | def get_pretrained_model(self): method check_encoder_decoder_model_from_pretrained_configs (line 65) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model_from_pretrained (line 94) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 121) | def check_save_and_load( method check_encoder_decoder_model_output_attentions (line 157) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 209) | def check_encoder_decoder_model_generate(self, pixel_values, config, d... method check_pt_flax_equivalence (line 238) | def check_pt_flax_equivalence(self, pt_model, fx_model, inputs_dict): method check_equivalence_pt_to_flax (line 279) | def check_equivalence_pt_to_flax(self, config, decoder_config, inputs_... method check_equivalence_flax_to_pt (line 290) | def check_equivalence_flax_to_pt(self, config, decoder_config, inputs_... method test_encoder_decoder_model_from_pretrained_configs (line 300) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 304) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 308) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 312) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_output_attentions (line 316) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_generate (line 320) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 324) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_flax_equivalence (line 329) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 362) | def test_real_model_save_load_from_pretrained(self): class FlaxViT2GPT2EncoderDecoderModelTest (line 396) | class FlaxViT2GPT2EncoderDecoderModelTest(FlaxEncoderDecoderMixin, unitt... method get_encoder_decoder_model (line 397) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 402) | def prepare_config_and_inputs(self): method get_pretrained_model (line 427) | def get_pretrained_model(self): class FlaxVisionEncoderDecoderModelTest (line 434) | class FlaxVisionEncoderDecoderModelTest(unittest.TestCase): method get_from_encoderdecoder_pretrained_model (line 435) | def get_from_encoderdecoder_pretrained_model(self): method _check_configuration_tie (line 440) | def _check_configuration_tie(self, model): method test_configuration_tie (line 447) | def test_configuration_tie(self): function prepare_img (line 453) | def prepare_img(): class FlaxViT2GPT2ModelIntegrationTest (line 460) | class FlaxViT2GPT2ModelIntegrationTest(unittest.TestCase): method test_inference_coco_en (line 462) | def test_inference_coco_en(self): FILE: mplsandbox_for_rl/transformers/tests/models/vision_encoder_decoder/test_modeling_tf_vision_encoder_decoder.py class TFVisionEncoderDecoderMixin (line 70) | class TFVisionEncoderDecoderMixin: method get_encoder_decoder_model (line 71) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 74) | def prepare_config_and_inputs(self): method get_pretrained_model (line 77) | def get_pretrained_model(self): method check_encoder_decoder_model_from_pretrained_configs (line 80) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 110) | def check_encoder_decoder_model( method check_encoder_decoder_model_from_pretrained (line 153) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 181) | def check_save_and_load( method check_encoder_decoder_model_labels (line 218) | def check_encoder_decoder_model_labels( method check_encoder_decoder_model_output_attentions (line 249) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 301) | def check_encoder_decoder_model_generate(self, pixel_values, config, d... method check_pt_tf_outputs (line 321) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method prepare_pt_inputs_from_tf_inputs (line 408) | def prepare_pt_inputs_from_tf_inputs(self, tf_inputs_dict): method check_pt_tf_models (line 427) | def check_pt_tf_models(self, tf_model, pt_model, tf_inputs_dict): method check_pt_tf_equivalence (line 454) | def check_pt_tf_equivalence(self, tf_model, pt_model, tf_inputs_dict): method check_pt_to_tf_equivalence (line 466) | def check_pt_to_tf_equivalence(self, config, decoder_config, tf_inputs... method check_tf_to_pt_equivalence (line 481) | def check_tf_to_pt_equivalence(self, config, decoder_config, tf_inputs... method test_encoder_decoder_model (line 500) | def test_encoder_decoder_model(self): method test_encoder_decoder_model_from_pretrained_configs (line 504) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 508) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 512) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 516) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_labels (line 520) | def test_encoder_decoder_model_labels(self): method test_encoder_decoder_model_output_attentions (line 524) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_generate (line 528) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 532) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_tf_model_equivalence (line 537) | def test_pt_tf_model_equivalence(self): method test_real_model_save_load_from_pretrained (line 600) | def test_real_model_save_load_from_pretrained(self): class TFViT2GPT2EncoderDecoderModelTest (line 631) | class TFViT2GPT2EncoderDecoderModelTest(TFVisionEncoderDecoderMixin, uni... method get_pretrained_model (line 632) | def get_pretrained_model(self): method get_encoder_decoder_model (line 637) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 642) | def prepare_config_and_inputs(self): class TFVisionEncoderDecoderModelTest (line 678) | class TFVisionEncoderDecoderModelTest(unittest.TestCase): method get_from_encoderdecoder_pretrained_model (line 679) | def get_from_encoderdecoder_pretrained_model(self): method get_decoder_config (line 684) | def get_decoder_config(self): method get_encoderdecoder_model (line 690) | def get_encoderdecoder_model(self): method get_encoder_decoder_models (line 693) | def get_encoder_decoder_models(self): method _check_configuration_tie (line 700) | def _check_configuration_tie(self, model): method test_configuration_tie (line 705) | def test_configuration_tie(self): function prepare_img (line 717) | def prepare_img(): class TFVisionEncoderDecoderModelSaveLoadTests (line 723) | class TFVisionEncoderDecoderModelSaveLoadTests(unittest.TestCase): method get_encoder_decoder_config (line 724) | def get_encoder_decoder_config(self): method get_encoder_decoder_config_small (line 729) | def get_encoder_decoder_config_small(self): method test_encoder_decoder_save_load_from_encoder_decoder (line 736) | def test_encoder_decoder_save_load_from_encoder_decoder(self): method test_encoder_decoder_save_load_from_encoder_decoder_from_pt (line 786) | def test_encoder_decoder_save_load_from_encoder_decoder_from_pt(self): method test_encoder_decoder_from_pretrained (line 836) | def test_encoder_decoder_from_pretrained(self): class TFViT2GPT2ModelIntegrationTest (line 901) | class TFViT2GPT2ModelIntegrationTest(unittest.TestCase): method test_inference_coco_en (line 903) | def test_inference_coco_en(self): FILE: mplsandbox_for_rl/transformers/tests/models/vision_encoder_decoder/test_modeling_vision_encoder_decoder.py class EncoderDecoderMixin (line 74) | class EncoderDecoderMixin: method get_encoder_decoder_model (line 75) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 78) | def prepare_config_and_inputs(self): method get_pretrained_model_and_inputs (line 81) | def get_pretrained_model_and_inputs(self): method check_encoder_decoder_model_from_pretrained_configs (line 84) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 106) | def check_encoder_decoder_model( method check_encoder_decoder_model_from_pretrained (line 135) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 161) | def check_save_and_load( method check_save_and_load_encoder_decoder_model (line 192) | def check_save_and_load_encoder_decoder_model( method check_encoder_decoder_model_output_attentions (line 226) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 281) | def check_encoder_decoder_model_generate(self, config, decoder_config,... method test_encoder_decoder_model (line 302) | def test_encoder_decoder_model(self): method test_encoder_decoder_model_from_pretrained_configs (line 306) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 310) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 314) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 318) | def test_save_and_load_from_pretrained(self): method test_save_and_load_from_encoder_decoder_pretrained (line 322) | def test_save_and_load_from_encoder_decoder_pretrained(self): method test_encoder_decoder_model_output_attentions (line 326) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_generate (line 330) | def test_encoder_decoder_model_generate(self): method test_training_gradient_checkpointing (line 334) | def test_training_gradient_checkpointing(self): method test_real_model_save_load_from_pretrained (line 357) | def test_real_model_save_load_from_pretrained(self): class DeiT2RobertaModelTest (line 379) | class DeiT2RobertaModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 380) | def get_pretrained_model_and_inputs(self): method check_encoder_decoder_model_output_attentions (line 404) | def check_encoder_decoder_model_output_attentions( method get_encoder_decoder_model (line 459) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 464) | def prepare_config_and_inputs(self): class ViT2BertModelTest (line 499) | class ViT2BertModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 500) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 524) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 529) | def prepare_config_and_inputs(self): class Swin2BartModelTest (line 566) | class Swin2BartModelTest(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 567) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 572) | def prepare_config_and_inputs(self): method check_encoder_decoder_model_output_attentions (line 592) | def check_encoder_decoder_model_output_attentions( method test_real_model_save_load_from_pretrained (line 646) | def test_real_model_save_load_from_pretrained(self): class ViT2TrOCR (line 651) | class ViT2TrOCR(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 652) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 657) | def prepare_config_and_inputs(self): method test_real_model_save_load_from_pretrained (line 681) | def test_real_model_save_load_from_pretrained(self): class LayoutLMv32TrOCR (line 686) | class LayoutLMv32TrOCR(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 687) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 692) | def prepare_config_and_inputs(self): method check_encoder_decoder_model_output_attentions (line 726) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 782) | def check_encoder_decoder_model_generate(self, config, decoder_config,... method test_real_model_save_load_from_pretrained (line 803) | def test_real_model_save_load_from_pretrained(self): class TrOCRModelIntegrationTest (line 809) | class TrOCRModelIntegrationTest(unittest.TestCase): method default_processor (line 811) | def default_processor(self): method test_inference_handwritten (line 815) | def test_inference_handwritten(self): method test_inference_printed (line 840) | def test_inference_printed(self): class ViT2GPT2ModelIntegrationTest (line 876) | class ViT2GPT2ModelIntegrationTest(unittest.TestCase): method test_inference_coco_en (line 878) | def test_inference_coco_en(self): class DonutModelIntegrationTest (line 941) | class DonutModelIntegrationTest(unittest.TestCase): method test_inference_docvqa (line 943) | def test_inference_docvqa(self): method test_inference_cordv2 (line 1007) | def test_inference_cordv2(self): method test_inference_rvlcdip (line 1069) | def test_inference_rvlcdip(self): class NougatModelIntegrationTest (line 1135) | class NougatModelIntegrationTest(unittest.TestCase): method default_processor (line 1137) | def default_processor(self): method default_model (line 1141) | def default_model(self): method default_image (line 1145) | def default_image(self): method test_forward_pass (line 1152) | def test_forward_pass(self): method test_generation (line 1172) | def test_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/vision_text_dual_encoder/test_modeling_flax_vision_text_dual_encoder.py function to_2tuple (line 66) | def to_2tuple(x): class VisionTextDualEncoderMixin (line 73) | class VisionTextDualEncoderMixin: method get_vision_text_model (line 74) | def get_vision_text_model(self, config, text_config): method prepare_config_and_inputs (line 77) | def prepare_config_and_inputs(self): method get_pretrained_model_and_inputs (line 80) | def get_pretrained_model_and_inputs(self): method assert_almost_equals (line 83) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method check_model_from_pretrained_configs (line 87) | def check_model_from_pretrained_configs( method check_vision_text_dual_encoder_from_pretrained (line 99) | def check_vision_text_dual_encoder_from_pretrained( method check_save_load (line 111) | def check_save_load(self, text_config, input_ids, attention_mask, visi... method check_vision_text_output_attention (line 128) | def check_vision_text_output_attention( method check_pt_flax_equivalence (line 157) | def check_pt_flax_equivalence(self, pt_model, fx_model, inputs_dict): method check_equivalence_pt_to_flax (line 198) | def check_equivalence_pt_to_flax(self, vision_config, text_config, inp... method check_equivalence_flax_to_pt (line 209) | def check_equivalence_flax_to_pt(self, vision_config, text_config, inp... method test_model_from_pretrained_configs (line 219) | def test_model_from_pretrained_configs(self): method test_vision_text_dual_encoder_from_pretrained (line 223) | def test_vision_text_dual_encoder_from_pretrained(self): method test_save_load (line 227) | def test_save_load(self): method test_vision_text_output_attention (line 231) | def test_vision_text_output_attention(self): method test_pt_flax_equivalence (line 236) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 247) | def test_real_model_save_load_from_pretrained(self): class FlaxViTBertModelTest (line 264) | class FlaxViTBertModelTest(VisionTextDualEncoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 265) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 287) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 292) | def prepare_config_and_inputs(self): class FlaxCLIPVisionBertModelTest (line 314) | class FlaxCLIPVisionBertModelTest(VisionTextDualEncoderMixin, unittest.T... method get_pretrained_model_and_inputs (line 315) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 337) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 342) | def prepare_config_and_inputs(self): class FlaxVisionTextDualEncoderIntegrationTest (line 365) | class FlaxVisionTextDualEncoderIntegrationTest(unittest.TestCase): method test_inference (line 367) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/vision_text_dual_encoder/test_modeling_tf_vision_text_dual_encoder.py function to_2tuple (line 56) | def to_2tuple(x): class TFVisionTextDualEncoderMixin (line 63) | class TFVisionTextDualEncoderMixin: method get_vision_text_model (line 64) | def get_vision_text_model(self, config, text_config): method prepare_config_and_inputs (line 67) | def prepare_config_and_inputs(self): method get_pretrained_model_and_inputs (line 70) | def get_pretrained_model_and_inputs(self): method check_model_from_pretrained_configs (line 73) | def check_model_from_pretrained_configs( method check_vision_text_dual_encoder_model (line 85) | def check_vision_text_dual_encoder_model( method check_vision_text_dual_encoder_from_pretrained (line 96) | def check_vision_text_dual_encoder_from_pretrained( method check_save_load (line 108) | def check_save_load(self, text_config, input_ids, attention_mask, visi... method check_vision_text_output_attention (line 124) | def check_vision_text_output_attention( method assert_almost_equals (line 152) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_vision_text_dual_encoder_model (line 156) | def test_vision_text_dual_encoder_model(self): method test_model_from_pretrained_configs (line 160) | def test_model_from_pretrained_configs(self): method test_vision_text_dual_encoder_from_pretrained (line 164) | def test_vision_text_dual_encoder_from_pretrained(self): method test_save_load (line 168) | def test_save_load(self): method test_vision_text_output_attention (line 172) | def test_vision_text_output_attention(self): method test_real_model_save_load_from_pretrained (line 177) | def test_real_model_save_load_from_pretrained(self): class TFViTBertModelTest (line 194) | class TFViTBertModelTest(TFVisionTextDualEncoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 195) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 214) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 219) | def prepare_config_and_inputs(self): class TFDeiTRobertaModelTest (line 251) | class TFDeiTRobertaModelTest(TFVisionTextDualEncoderMixin, unittest.Test... method get_pretrained_model_and_inputs (line 252) | def get_pretrained_model_and_inputs(self): method check_vision_text_output_attention (line 273) | def check_vision_text_output_attention( method get_vision_text_model (line 301) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 306) | def prepare_config_and_inputs(self): class TFCLIPVisionBertModelTest (line 338) | class TFCLIPVisionBertModelTest(TFVisionTextDualEncoderMixin, unittest.T... method get_pretrained_model_and_inputs (line 339) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 358) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 363) | def prepare_config_and_inputs(self): class TFVisionTextDualEncoderIntegrationTest (line 396) | class TFVisionTextDualEncoderIntegrationTest(unittest.TestCase): method test_inference (line 398) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/vision_text_dual_encoder/test_modeling_vision_text_dual_encoder.py function to_2tuple (line 63) | def to_2tuple(x): class VisionTextDualEncoderMixin (line 70) | class VisionTextDualEncoderMixin: method get_vision_text_model (line 71) | def get_vision_text_model(self, config, text_config): method prepare_config_and_inputs (line 74) | def prepare_config_and_inputs(self): method get_pretrained_model_and_inputs (line 77) | def get_pretrained_model_and_inputs(self): method check_model_from_pretrained_configs (line 80) | def check_model_from_pretrained_configs( method check_vision_text_dual_encoder_model (line 94) | def check_vision_text_dual_encoder_model( method check_vision_text_dual_encoder_from_pretrained (line 107) | def check_vision_text_dual_encoder_from_pretrained( method check_save_load (line 121) | def check_save_load(self, text_config, input_ids, attention_mask, visi... method check_vision_text_output_attention (line 141) | def check_vision_text_output_attention( method assert_almost_equals (line 171) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method check_pt_flax_equivalence (line 175) | def check_pt_flax_equivalence(self, pt_model, fx_model, input_ids, att... method check_equivalence_pt_to_flax (line 217) | def check_equivalence_pt_to_flax(self, vision_config, text_config, inp... method check_equivalence_flax_to_pt (line 228) | def check_equivalence_flax_to_pt(self, vision_config, text_config, inp... method test_vision_text_dual_encoder_model (line 238) | def test_vision_text_dual_encoder_model(self): method test_model_from_pretrained_configs (line 242) | def test_model_from_pretrained_configs(self): method test_vision_text_dual_encoder_from_pretrained (line 246) | def test_vision_text_dual_encoder_from_pretrained(self): method test_save_load (line 250) | def test_save_load(self): method test_vision_text_output_attention (line 254) | def test_vision_text_output_attention(self): method test_pt_flax_equivalence (line 259) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 270) | def test_real_model_save_load_from_pretrained(self): class ViTBertModelTest (line 290) | class ViTBertModelTest(VisionTextDualEncoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 291) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 310) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 315) | def prepare_config_and_inputs(self): class DeiTRobertaModelTest (line 347) | class DeiTRobertaModelTest(VisionTextDualEncoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 348) | def get_pretrained_model_and_inputs(self): method check_vision_text_output_attention (line 367) | def check_vision_text_output_attention( method get_vision_text_model (line 397) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 402) | def prepare_config_and_inputs(self): method test_pt_flax_equivalence (line 433) | def test_pt_flax_equivalence(self): class CLIPVisionBertModelTest (line 438) | class CLIPVisionBertModelTest(VisionTextDualEncoderMixin, unittest.TestC... method get_pretrained_model_and_inputs (line 439) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 458) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 463) | def prepare_config_and_inputs(self): class VisionTextDualEncoderIntegrationTest (line 496) | class VisionTextDualEncoderIntegrationTest(unittest.TestCase): method test_inference (line 498) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/vision_text_dual_encoder/test_processor_vision_text_dual_encoder.py class VisionTextDualEncoderProcessorTest (line 37) | class VisionTextDualEncoderProcessorTest(unittest.TestCase): method setUp (line 38) | def setUp(self): method get_tokenizer (line 57) | def get_tokenizer(self, **kwargs): method get_image_processor (line 60) | def get_image_processor(self, **kwargs): method tearDown (line 63) | def tearDown(self): method prepare_image_inputs (line 66) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 77) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 92) | def test_save_load_pretrained_additional_features(self): method test_image_processor (line 111) | def test_image_processor(self): method test_tokenizer (line 125) | def test_tokenizer(self): method test_processor (line 140) | def test_processor(self): method test_tokenizer_decode (line 157) | def test_tokenizer_decode(self): method test_model_input_names (line 170) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/visual_bert/test_modeling_visual_bert.py class VisualBertModelTester (line 41) | class VisualBertModelTester: method __init__ (line 42) | def __init__( method get_config (line 98) | def get_config(self): method prepare_config_and_inputs_for_common (line 116) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_pretraining (line 148) | def prepare_config_and_inputs_for_pretraining(self): method prepare_config_and_inputs_for_multiple_choice (line 165) | def prepare_config_and_inputs_for_multiple_choice(self): method prepare_config_and_inputs_for_vqa (line 209) | def prepare_config_and_inputs_for_vqa(self): method prepare_config_and_inputs_for_nlvr (line 220) | def prepare_config_and_inputs_for_nlvr(self): method prepare_config_and_inputs_for_flickr (line 231) | def prepare_config_and_inputs_for_flickr(self): method create_and_check_model (line 250) | def create_and_check_model(self, config, input_dict): method create_and_check_for_pretraining (line 260) | def create_and_check_for_pretraining(self, config, input_dict): method create_and_check_for_vqa (line 270) | def create_and_check_for_vqa(self, config, input_dict): method create_and_check_for_multiple_choice (line 277) | def create_and_check_for_multiple_choice(self, config, input_dict): method create_and_check_for_nlvr (line 284) | def create_and_check_for_nlvr(self, config, input_dict): method create_and_check_for_flickr (line 291) | def create_and_check_for_flickr(self, config, input_dict): class VisualBertModelTest (line 302) | class VisualBertModelTest(ModelTesterMixin, PipelineTesterMixin, unittes... method _prepare_for_class (line 319) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 393) | def setUp(self): method test_attention_outputs (line 397) | def test_attention_outputs(self): method test_hidden_states_output (line 478) | def test_hidden_states_output(self): method test_config (line 518) | def test_config(self): method test_model (line 521) | def test_model(self): method test_model_various_embeddings (line 525) | def test_model_various_embeddings(self): method test_model_for_pretraining (line 531) | def test_model_for_pretraining(self): method test_model_for_vqa (line 535) | def test_model_for_vqa(self): method test_model_for_nlvr (line 539) | def test_model_for_nlvr(self): method test_model_for_multiple_choice (line 543) | def test_model_for_multiple_choice(self): method test_model_for_flickr (line 547) | def test_model_for_flickr(self): method test_model_from_pretrained (line 552) | def test_model_from_pretrained(self): method test_training_gradient_checkpointing (line 560) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 566) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 572) | def test_training_gradient_checkpointing_use_reentrant_false(self): class VisualBertModelIntegrationTest (line 577) | class VisualBertModelIntegrationTest(unittest.TestCase): method test_inference_vqa_coco_pre (line 579) | def test_inference_vqa_coco_pre(self): method test_inference_vqa (line 618) | def test_inference_vqa(self): method test_inference_nlvr (line 650) | def test_inference_nlvr(self): method test_inference_vcr (line 680) | def test_inference_vcr(self): FILE: mplsandbox_for_rl/transformers/tests/models/vit/test_image_processing_vit.py class ViTImageProcessingTester (line 32) | class ViTImageProcessingTester(unittest.TestCase): method __init__ (line 33) | def __init__( method prepare_image_processor_dict (line 61) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 70) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 73) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class ViTImageProcessingTest (line 87) | class ViTImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase): method setUp (line 91) | def setUp(self): method image_processor_dict (line 96) | def image_processor_dict(self): method test_image_processor_properties (line 99) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 108) | def test_image_processor_from_dict_with_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/models/vit/test_modeling_flax_vit.py class FlaxViTModelTester (line 33) | class FlaxViTModelTester(unittest.TestCase): method __init__ (line 34) | def __init__( method prepare_config_and_inputs (line 76) | def prepare_config_and_inputs(self): method create_and_check_model (line 97) | def create_and_check_model(self, config, pixel_values): method create_and_check_for_image_classification (line 106) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 119) | def prepare_config_and_inputs_for_common(self): class FlaxViTModelTest (line 130) | class FlaxViTModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 133) | def setUp(self) -> None: method test_config (line 137) | def test_config(self): method test_model (line 140) | def test_model(self): method test_for_image_classification (line 144) | def test_for_image_classification(self): method test_forward_signature (line 149) | def test_forward_signature(self): method test_jit_compilation (line 162) | def test_jit_compilation(self): method test_model_from_pretrained (line 186) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/vit/test_modeling_tf_vit.py class TFViTModelTester (line 44) | class TFViTModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 90) | def prepare_config_and_inputs(self): method get_config (line 101) | def get_config(self): method create_and_check_model (line 118) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 130) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 149) | def prepare_config_and_inputs_for_common(self): class TFViTModelTest (line 157) | class TFViTModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T... method setUp (line 174) | def setUp(self): method test_config (line 178) | def test_config(self): method test_inputs_embeds (line 182) | def test_inputs_embeds(self): method test_graph_mode_with_inputs_embeds (line 186) | def test_graph_mode_with_inputs_embeds(self): method test_model_common_attributes (line 189) | def test_model_common_attributes(self): method test_forward_signature (line 198) | def test_forward_signature(self): method test_model (line 210) | def test_model(self): method test_for_image_classification (line 214) | def test_for_image_classification(self): method test_model_from_pretrained (line 219) | def test_model_from_pretrained(self): function prepare_img (line 225) | def prepare_img(): class TFViTModelIntegrationTest (line 232) | class TFViTModelIntegrationTest(unittest.TestCase): method default_image_processor (line 234) | def default_image_processor(self): method test_inference_image_classification_head (line 238) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/vit/test_modeling_vit.py class ViTModelTester (line 49) | class ViTModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 100) | def prepare_config_and_inputs(self): method get_config (line 111) | def get_config(self): method create_and_check_model (line 129) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 136) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 155) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 173) | def prepare_config_and_inputs_for_common(self): class ViTModelTest (line 185) | class ViTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC... method setUp (line 211) | def setUp(self): method test_multi_gpu_data_parallel_forward (line 219) | def test_multi_gpu_data_parallel_forward(self): method test_config (line 222) | def test_config(self): method test_inputs_embeds (line 226) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 229) | def test_model_get_set_embeddings(self): method test_model (line 238) | def test_model(self): method test_for_masked_image_modeling (line 242) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 246) | def test_for_image_classification(self): method test_model_from_pretrained (line 251) | def test_model_from_pretrained(self): function prepare_img (line 258) | def prepare_img(): class ViTModelIntegrationTest (line 265) | class ViTModelIntegrationTest(unittest.TestCase): method default_image_processor (line 267) | def default_image_processor(self): method test_inference_image_classification_head (line 271) | def test_inference_image_classification_head(self): method test_inference_interpolate_pos_encoding (line 291) | def test_inference_interpolate_pos_encoding(self): method test_inference_fp16 (line 321) | def test_inference_fp16(self): FILE: mplsandbox_for_rl/transformers/tests/models/vit_mae/test_modeling_tf_vit_mae.py class TFViTMAEModelTester (line 52) | class TFViTMAEModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 101) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method create_and_check_model (line 134) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_pretraining (line 139) | def create_and_check_for_pretraining(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 156) | def prepare_config_and_inputs_for_common(self): class TFViTMAEModelTest (line 164) | class TFViTMAEModelTest(TFModelTesterMixin, PipelineTesterMixin, unittes... method setUp (line 178) | def setUp(self): method test_config (line 182) | def test_config(self): method test_inputs_embeds (line 186) | def test_inputs_embeds(self): method test_model_common_attributes (line 189) | def test_model_common_attributes(self): method test_forward_signature (line 198) | def test_forward_signature(self): method test_model (line 210) | def test_model(self): method test_for_pretraining (line 214) | def test_for_pretraining(self): method test_keyword_and_dict_args (line 220) | def test_keyword_and_dict_args(self): method test_numpy_arrays_inputs (line 244) | def test_numpy_arrays_inputs(self): method check_pt_tf_models (line 275) | def check_pt_tf_models(self, tf_model, pt_model, tf_inputs_dict): method test_keras_save_load (line 291) | def test_keras_save_load(self): method test_save_load (line 337) | def test_save_load(self): method test_save_load_config (line 375) | def test_save_load_config(self): method test_determinism (line 405) | def test_determinism(self): method test_model_outputs_equivalence (line 409) | def test_model_outputs_equivalence(self): method test_model_from_pretrained (line 413) | def test_model_from_pretrained(self): function prepare_img (line 419) | def prepare_img(): class TFViTMAEModelIntegrationTest (line 426) | class TFViTMAEModelIntegrationTest(unittest.TestCase): method default_image_processor (line 428) | def default_image_processor(self): method test_inference_for_pretraining (line 432) | def test_inference_for_pretraining(self): method test_inference_interpolate_pos_encoding (line 462) | def test_inference_interpolate_pos_encoding(self): FILE: mplsandbox_for_rl/transformers/tests/models/vit_mae/test_modeling_vit_mae.py class ViTMAEModelTester (line 45) | class ViTMAEModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 97) | def prepare_config_and_inputs(self): method get_config (line 108) | def get_config(self): method create_and_check_model (line 130) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_pretraining (line 137) | def create_and_check_for_pretraining(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 156) | def prepare_config_and_inputs_for_common(self): class ViTMAEModelTest (line 164) | class ViTMAEModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 178) | def setUp(self): method test_config (line 182) | def test_config(self): method test_inputs_embeds (line 186) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 189) | def test_model_get_set_embeddings(self): method test_model (line 198) | def test_model(self): method test_for_pretraining (line 202) | def test_for_pretraining(self): method check_pt_tf_models (line 208) | def check_pt_tf_models(self, tf_model, pt_model, pt_inputs_dict): method test_save_load (line 222) | def test_save_load(self): method test_determinism (line 256) | def test_determinism(self): method test_save_load_fast_init_from_base (line 263) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 270) | def test_save_load_fast_init_to_base(self): method test_model_outputs_equivalence (line 274) | def test_model_outputs_equivalence(self): method test_batching_equivalence (line 278) | def test_batching_equivalence(self): method test_model_from_pretrained (line 282) | def test_model_from_pretrained(self): function prepare_img (line 289) | def prepare_img(): class ViTMAEModelIntegrationTest (line 296) | class ViTMAEModelIntegrationTest(unittest.TestCase): method default_image_processor (line 298) | def default_image_processor(self): method test_inference_for_pretraining (line 302) | def test_inference_for_pretraining(self): method test_inference_interpolate_pos_encoding (line 333) | def test_inference_interpolate_pos_encoding(self): FILE: mplsandbox_for_rl/transformers/tests/models/vit_msn/test_modeling_vit_msn.py class ViTMSNModelTester (line 41) | class ViTMSNModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 86) | def prepare_config_and_inputs(self): method get_config (line 97) | def get_config(self): method create_and_check_model (line 113) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 120) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 140) | def prepare_config_and_inputs_for_common(self): class ViTMSNModelTest (line 148) | class ViTMSNModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 166) | def setUp(self): method test_config (line 170) | def test_config(self): method test_inputs_embeds (line 174) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 177) | def test_model_get_set_embeddings(self): method test_model (line 186) | def test_model(self): method test_for_image_classification (line 190) | def test_for_image_classification(self): method test_model_from_pretrained (line 195) | def test_model_from_pretrained(self): function prepare_img (line 202) | def prepare_img(): class ViTMSNModelIntegrationTest (line 209) | class ViTMSNModelIntegrationTest(unittest.TestCase): method default_image_processor (line 211) | def default_image_processor(self): method test_inference_image_classification_head (line 215) | def test_inference_image_classification_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/vitdet/test_modeling_vitdet.py class VitDetModelTester (line 36) | class VitDetModelTester: method __init__ (line 37) | def __init__( method prepare_config_and_inputs (line 78) | def prepare_config_and_inputs(self): method get_config (line 89) | def get_config(self): method create_and_check_model (line 106) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_backbone (line 116) | def create_and_check_backbone(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 151) | def prepare_config_and_inputs_for_common(self): class VitDetModelTest (line 159) | class VitDetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te... method setUp (line 173) | def setUp(self): method test_initialization (line 178) | def test_initialization(self): method test_cpu_offload (line 183) | def test_cpu_offload(self): method test_disk_offload_bin (line 188) | def test_disk_offload_bin(self): method test_disk_offload_safetensors (line 192) | def test_disk_offload_safetensors(self): method test_model_parallelism (line 197) | def test_model_parallelism(self): method test_config (line 200) | def test_config(self): method test_inputs_embeds (line 204) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 207) | def test_model_get_set_embeddings(self): method test_model (line 216) | def test_model(self): method test_backbone (line 220) | def test_backbone(self): method test_hidden_states_output (line 224) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 260) | def test_retain_grad_hidden_states_attentions(self): method test_feed_forward_chunking (line 285) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 289) | def test_model_from_pretrained(self): class VitDetBackboneTest (line 294) | class VitDetBackboneTest(unittest.TestCase, BackboneTesterMixin): method setUp (line 300) | def setUp(self): FILE: mplsandbox_for_rl/transformers/tests/models/vitmatte/test_image_processing_vitmatte.py class VitMatteImageProcessingTester (line 38) | class VitMatteImageProcessingTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_image_processor_dict (line 70) | def prepare_image_processor_dict(self): method prepare_image_inputs (line 81) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class VitMatteImageProcessingTest (line 95) | class VitMatteImageProcessingTest(ImageProcessingTestMixin, unittest.Tes... method setUp (line 98) | def setUp(self): method image_processor_dict (line 103) | def image_processor_dict(self): method test_image_processor_properties (line 106) | def test_image_processor_properties(self): method test_call_numpy (line 116) | def test_call_numpy(self): method test_call_pytorch (line 133) | def test_call_pytorch(self): method test_call_pil (line 151) | def test_call_pil(self): method test_call_numpy_4_channels (line 168) | def test_call_numpy_4_channels(self): method test_padding (line 193) | def test_padding(self): method test_image_processor_preprocess_arguments (line 203) | def test_image_processor_preprocess_arguments(self): FILE: mplsandbox_for_rl/transformers/tests/models/vitmatte/test_modeling_vitmatte.py class VitMatteModelTester (line 47) | class VitMatteModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 86) | def prepare_config_and_inputs(self): method get_backbone_config (line 97) | def get_backbone_config(self): method get_config (line 110) | def get_config(self): method create_and_check_model (line 118) | def create_and_check_model(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 125) | def prepare_config_and_inputs_for_common(self): class VitMatteModelTest (line 133) | class VitMatteModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 147) | def setUp(self): method test_config (line 157) | def test_config(self): method test_inputs_embeds (line 161) | def test_inputs_embeds(self): method test_training (line 165) | def test_training(self): method test_training_gradient_checkpointing (line 169) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 175) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 181) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_get_set_embeddings (line 185) | def test_model_get_set_embeddings(self): method test_model (line 188) | def test_model(self): method test_model_from_pretrained (line 193) | def test_model_from_pretrained(self): method test_retain_grad_hidden_states_attentions (line 199) | def test_retain_grad_hidden_states_attentions(self): method test_hidden_states_output (line 202) | def test_hidden_states_output(self): method test_backbone_selection (line 238) | def test_backbone_selection(self): class VitMatteModelIntegrationTest (line 268) | class VitMatteModelIntegrationTest(unittest.TestCase): method test_inference (line 270) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/vits/test_modeling_vits.py function _config_zero_init (line 56) | def _config_zero_init(config): class VitsModelTester (line 68) | class VitsModelTester: method __init__ (line 69) | def __init__( method prepare_config_and_inputs (line 111) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 122) | def prepare_config_and_inputs_for_common(self): method get_config (line 126) | def get_config(self): method create_and_check_model_forward (line 146) | def create_and_check_model_forward(self, config, inputs_dict): class VitsModelTest (line 157) | class VitsModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 172) | def setUp(self): method test_config (line 176) | def test_config(self): method test_pipeline_feature_extraction (line 181) | def test_pipeline_feature_extraction(self): method test_pipeline_feature_extraction_fp16 (line 185) | def test_pipeline_feature_extraction_fp16(self): method test_model_forward (line 189) | def test_model_forward(self): method test_multi_gpu_data_parallel_forward (line 197) | def test_multi_gpu_data_parallel_forward(self): method test_determinism (line 220) | def test_determinism(self): method test_batching_equivalence (line 224) | def test_batching_equivalence(self): method test_initialization (line 231) | def test_initialization(self): method test_inputs_embeds (line 268) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 272) | def test_model_get_set_embeddings(self): method test_model_outputs_equivalence (line 276) | def test_model_outputs_equivalence(self): method test_save_load (line 353) | def test_save_load(self): method _mock_init_weights (line 396) | def _mock_init_weights(self, module): class VitsModelIntegrationTests (line 409) | class VitsModelIntegrationTests(unittest.TestCase): method test_forward (line 410) | def test_forward(self): FILE: mplsandbox_for_rl/transformers/tests/models/vits/test_tokenization_vits.py class VitsTokenizerTest (line 30) | class VitsTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_tokenizer (line 54) | def get_tokenizer(self, **kwargs): method get_clean_sequence (line 60) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_add_tokens_tokenizer (line 66) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 70) | def test_encode_decode_with_spaces(self): method test_pretokenized_inputs (line 74) | def test_pretokenized_inputs(self): method test_save_and_load_tokenizer (line 77) | def test_save_and_load_tokenizer(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 105) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_ron_normalization (line 108) | def test_ron_normalization(self): method test_normalization (line 119) | def test_normalization(self): method test_tokenizer_integration (line 142) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/vivit/test_image_processing_vivit.py class VivitImageProcessingTester (line 36) | class VivitImageProcessingTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_image_processor_dict (line 71) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 81) | def expected_output_image_shape(self, images): method prepare_video_inputs (line 84) | def prepare_video_inputs(self, equal_resolution=False, numpify=False, ... class VivitImageProcessingTest (line 99) | class VivitImageProcessingTest(ImageProcessingTestMixin, unittest.TestCa... method setUp (line 102) | def setUp(self): method image_processor_dict (line 107) | def image_processor_dict(self): method test_image_processor_properties (line 110) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 119) | def test_image_processor_from_dict_with_kwargs(self): method test_rescale (line 128) | def test_rescale(self): method test_call_pil (line 142) | def test_call_pil(self): method test_call_numpy (line 163) | def test_call_numpy(self): method test_call_numpy_4_channels (line 184) | def test_call_numpy_4_channels(self): method test_call_pytorch (line 211) | def test_call_pytorch(self): FILE: mplsandbox_for_rl/transformers/tests/models/vivit/test_modeling_vivit.py class VivitModelTester (line 45) | class VivitModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method get_config (line 109) | def get_config(self): method create_and_check_model (line 129) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_video_classification (line 136) | def create_and_check_for_video_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 147) | def prepare_config_and_inputs_for_common(self): class VivitModelTest (line 155) | class VivitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 173) | def setUp(self): method _prepare_for_class (line 177) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 188) | def test_config(self): method test_inputs_embeds (line 192) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 195) | def test_model_get_set_embeddings(self): method test_forward_signature (line 204) | def test_forward_signature(self): method test_model (line 216) | def test_model(self): method test_for_video_classification (line 220) | def test_for_video_classification(self): method test_model_from_pretrained (line 225) | def test_model_from_pretrained(self): method test_attention_outputs (line 230) | def test_attention_outputs(self): method test_hidden_states_output (line 285) | def test_hidden_states_output(self): function prepare_video (line 320) | def prepare_video(): class VivitModelIntegrationTest (line 330) | class VivitModelIntegrationTest(unittest.TestCase): method default_image_processor (line 332) | def default_image_processor(self): method test_inference_for_video_classification (line 336) | def test_inference_for_video_classification(self): method test_inference_interpolate_pos_encoding (line 357) | def test_inference_interpolate_pos_encoding(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2/test_feature_extraction_wav2vec2.py function floats_list (line 33) | def floats_list(shape, scale=1.0, rng=None, name=None): class Wav2Vec2FeatureExtractionTester (line 47) | class Wav2Vec2FeatureExtractionTester(unittest.TestCase): method __init__ (line 48) | def __init__( method prepare_feat_extract_dict (line 71) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 80) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class Wav2Vec2FeatureExtractionTest (line 99) | class Wav2Vec2FeatureExtractionTest(SequenceFeatureExtractionTestMixin, ... method setUp (line 102) | def setUp(self): method _check_zero_mean_unit_variance (line 105) | def _check_zero_mean_unit_variance(self, input_vector): method test_call (line 109) | def test_call(self): method test_zero_mean_unit_variance_normalization_np (line 135) | def test_zero_mean_unit_variance_normalization_np(self): method test_zero_mean_unit_variance_normalization (line 151) | def test_zero_mean_unit_variance_normalization(self): method test_zero_mean_unit_variance_normalization_trunc_np_max_length (line 167) | def test_zero_mean_unit_variance_normalization_trunc_np_max_length(self): method test_zero_mean_unit_variance_normalization_trunc_np_longest (line 179) | def test_zero_mean_unit_variance_normalization_trunc_np_longest(self): method test_double_precision_pad (line 208) | def test_double_precision_pad(self): method test_pretrained_checkpoints_are_set_correctly (line 223) | def test_pretrained_checkpoints_are_set_correctly(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2/test_modeling_flax_wav2vec2.py function _test_wav2vec2_with_lm_invalid_pool (line 70) | def _test_wav2vec2_with_lm_invalid_pool(in_queue, out_queue, timeout): class FlaxWav2Vec2ModelTester (line 109) | class FlaxWav2Vec2ModelTester: method __init__ (line 110) | def __init__( method prepare_config_and_inputs (line 168) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 196) | def prepare_config_and_inputs_for_common(self): class FlaxWav2Vec2ModelTest (line 204) | class FlaxWav2Vec2ModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 209) | def setUp(self): method test_train (line 212) | def test_train(self): method test_forward_signature (line 245) | def test_forward_signature(self): method test_jit_compilation (line 258) | def test_jit_compilation(self): method test_freeze_feature_encoder (line 281) | def test_freeze_feature_encoder(self): method test_model_from_pretrained (line 347) | def test_model_from_pretrained(self): method test_equivalence_pt_to_flax (line 355) | def test_equivalence_pt_to_flax(self): class FlaxWav2Vec2UtilsTest (line 360) | class FlaxWav2Vec2UtilsTest(unittest.TestCase): method test_compute_mask_indices (line 361) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 371) | def test_compute_mask_indices_overlap(self): method test_compute_mask_indices_attn_mask_overlap (line 383) | def test_compute_mask_indices_attn_mask_overlap(self): method test_compute_perplexity (line 401) | def test_compute_perplexity(self): method test_sample_negatives (line 414) | def test_sample_negatives(self): method test_sample_negatives_with_attn_mask (line 444) | def test_sample_negatives_with_attn_mask(self): class FlaxWav2Vec2ModelIntegrationTest (line 490) | class FlaxWav2Vec2ModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 491) | def _load_datasamples(self, num_samples): method test_inference_ctc_robust_batched (line 500) | def test_inference_ctc_robust_batched(self): method test_inference_pretrained (line 525) | def test_inference_pretrained(self): method test_wav2vec2_with_lm (line 587) | def test_wav2vec2_with_lm(self): method test_wav2vec2_with_lm_pool (line 606) | def test_wav2vec2_with_lm_pool(self): method test_wav2vec2_with_lm_invalid_pool (line 638) | def test_wav2vec2_with_lm_invalid_pool(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2/test_modeling_tf_wav2vec2.py function _test_wav2vec2_with_lm_invalid_pool (line 77) | def _test_wav2vec2_with_lm_invalid_pool(in_queue, out_queue, timeout): class TFWav2Vec2ModelTester (line 116) | class TFWav2Vec2ModelTester: method __init__ (line 117) | def __init__( method prepare_config_and_inputs (line 175) | def prepare_config_and_inputs(self): method create_and_check_model (line 203) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 210) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 235) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 259) | def check_seq_classifier_loss(self, loss, config, input_values, *args): method check_training (line 282) | def check_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 305) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 313) | def prepare_config_and_inputs_for_common(self): class TFWav2Vec2ModelTest (line 320) | class TFWav2Vec2ModelTest(TFModelTesterMixin, PipelineTesterMixin, unitt... method setUp (line 333) | def setUp(self): method test_config (line 337) | def test_config(self): method test_forward_signature (line 341) | def test_forward_signature(self): method test_keyword_and_dict_args (line 354) | def test_keyword_and_dict_args(self): method test_model (line 371) | def test_model(self): method test_hidden_states_output (line 375) | def test_hidden_states_output(self): method test_ctc_loss_inference (line 401) | def test_ctc_loss_inference(self): method test_labels_out_of_vocab (line 406) | def test_labels_out_of_vocab(self): method test_train (line 410) | def test_train(self): method test_inputs_embeds (line 415) | def test_inputs_embeds(self): method test_resize_tokens_embeddings (line 419) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 423) | def test_model_common_attributes(self): method test_model_from_pretrained (line 427) | def test_model_from_pretrained(self): method test_dataset_conversion (line 432) | def test_dataset_conversion(self): method test_keras_fit (line 437) | def test_keras_fit(self): method test_pt_tf_model_equivalence (line 442) | def test_pt_tf_model_equivalence(self, allow_missing_keys=False): class TFWav2Vec2RobustModelTest (line 499) | class TFWav2Vec2RobustModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 507) | def setUp(self): method test_forward_signature (line 518) | def test_forward_signature(self): method test_keyword_and_dict_args (line 531) | def test_keyword_and_dict_args(self): method test_config (line 548) | def test_config(self): method test_model (line 551) | def test_model(self): method test_hidden_states_output (line 555) | def test_hidden_states_output(self): method test_batched_inference (line 581) | def test_batched_inference(self): method test_ctc_loss_inference (line 585) | def test_ctc_loss_inference(self): method test_labels_out_of_vocab (line 591) | def test_labels_out_of_vocab(self): method test_train (line 595) | def test_train(self): method test_inputs_embeds (line 600) | def test_inputs_embeds(self): method test_resize_tokens_embeddings (line 604) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 608) | def test_model_common_attributes(self): method test_model_from_pretrained (line 612) | def test_model_from_pretrained(self): method test_dataset_conversion (line 617) | def test_dataset_conversion(self): method test_keras_fit (line 622) | def test_keras_fit(self): method test_pt_tf_model_equivalence (line 627) | def test_pt_tf_model_equivalence(self, allow_missing_keys=False): class TFWav2Vec2UtilsTest (line 684) | class TFWav2Vec2UtilsTest(unittest.TestCase): method test_compute_mask_indices (line 685) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 697) | def test_compute_mask_indices_overlap(self): class TFWav2Vec2ModelIntegrationTest (line 712) | class TFWav2Vec2ModelIntegrationTest(unittest.TestCase): method tearDown (line 713) | def tearDown(self): method _load_datasamples (line 718) | def _load_datasamples(self, num_samples): method _load_superb (line 727) | def _load_superb(self, task, num_samples): method test_inference_ctc_normal (line 732) | def test_inference_ctc_normal(self): method test_inference_ctc_normal_batched (line 747) | def test_inference_ctc_normal_batched(self): method test_inference_ctc_robust_batched (line 766) | def test_inference_ctc_robust_batched(self): method test_wav2vec2_with_lm (line 793) | def test_wav2vec2_with_lm(self): method test_wav2vec2_with_lm_pool (line 811) | def test_wav2vec2_with_lm_pool(self): method test_wav2vec2_with_lm_invalid_pool (line 842) | def test_wav2vec2_with_lm_invalid_pool(self): method test_inference_keyword_spotting (line 845) | def test_inference_keyword_spotting(self): method test_inference_intent_classification (line 862) | def test_inference_intent_classification(self): method test_inference_speaker_identification (line 897) | def test_inference_speaker_identification(self): method test_inference_emotion_recognition (line 913) | def test_inference_emotion_recognition(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2/test_modeling_wav2vec2.py function _test_wav2vec2_with_lm_invalid_pool (line 99) | def _test_wav2vec2_with_lm_invalid_pool(in_queue, out_queue, timeout): class Wav2Vec2ModelTester (line 145) | class Wav2Vec2ModelTester: method __init__ (line 146) | def __init__( method prepare_config_and_inputs (line 222) | def prepare_config_and_inputs(self): method get_config (line 230) | def get_config(self): method create_and_check_model (line 261) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_model_with_adapter (line 270) | def create_and_check_model_with_adapter(self, config, input_values, at... method create_and_check_model_with_adapter_for_ctc (line 280) | def create_and_check_model_with_adapter_for_ctc(self, config, input_va... method create_and_check_model_with_adapter_proj_dim (line 291) | def create_and_check_model_with_adapter_proj_dim(self, config, input_v... method create_and_check_model_with_attn_adapter (line 303) | def create_and_check_model_with_attn_adapter(self, config, input_value... method create_and_check_batch_inference (line 314) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 340) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 368) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 393) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 422) | def check_seq_classifier_training(self, config, input_values, *args): method check_xvector_training (line 445) | def check_xvector_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 468) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 482) | def prepare_config_and_inputs_for_common(self): class Wav2Vec2ModelTest (line 489) | class Wav2Vec2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 509) | def setUp(self): method test_config (line 513) | def test_config(self): method test_model (line 516) | def test_model(self): method test_model_with_adapter (line 520) | def test_model_with_adapter(self): method test_model_with_adapter_for_ctc (line 524) | def test_model_with_adapter_for_ctc(self): method test_model_with_adapter_proj_dim (line 528) | def test_model_with_adapter_proj_dim(self): method test_ctc_loss_inference (line 532) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 536) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 540) | def test_ctc_train(self): method test_seq_classifier_train (line 544) | def test_seq_classifier_train(self): method test_xvector_train (line 548) | def test_xvector_train(self): method test_labels_out_of_vocab (line 552) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 557) | def test_inputs_embeds(self): method test_forward_signature (line 561) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 565) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 569) | def test_model_get_set_embeddings(self): method test_equivalence_flax_to_pt (line 574) | def test_equivalence_flax_to_pt(self): method test_equivalence_pt_to_flax (line 579) | def test_equivalence_pt_to_flax(self): method test_retain_grad_hidden_states_attentions (line 582) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 622) | def test_initialization(self): method _mock_init_weights (line 657) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 671) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 694) | def test_mask_time_prob_ctc(self): method test_feed_forward_chunking (line 718) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 722) | def test_model_from_pretrained(self): method _create_and_check_torch_fx_tracing (line 727) | def _create_and_check_torch_fx_tracing(self, config, inputs_dict, outp... method test_flax_from_pt_safetensors (line 832) | def test_flax_from_pt_safetensors(self): class Wav2Vec2RobustModelTest (line 837) | class Wav2Vec2RobustModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 854) | def setUp(self): method test_config (line 860) | def test_config(self): method test_model (line 863) | def test_model(self): method test_model_with_adapter (line 867) | def test_model_with_adapter(self): method test_model_with_adapter_proj_dim (line 871) | def test_model_with_adapter_proj_dim(self): method test_model_with_attn_adapter (line 875) | def test_model_with_attn_adapter(self): method test_batched_inference (line 879) | def test_batched_inference(self): method test_ctc_loss_inference (line 883) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 887) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 891) | def test_ctc_train(self): method test_seq_classifier_train (line 895) | def test_seq_classifier_train(self): method test_xvector_train (line 899) | def test_xvector_train(self): method test_labels_out_of_vocab (line 903) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 908) | def test_inputs_embeds(self): method test_forward_signature (line 912) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 916) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 920) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 923) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 963) | def test_initialization(self): method _mock_init_weights (line 998) | def _mock_init_weights(self, module): method test_model_for_pretraining (line 1012) | def test_model_for_pretraining(self): method test_mask_feature_prob_ctc (line 1054) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 1077) | def test_mask_time_prob_ctc(self): method test_mask_time_feature_prob_ctc_single_batch (line 1100) | def test_mask_time_feature_prob_ctc_single_batch(self): method test_feed_forward_chunking (line 1128) | def test_feed_forward_chunking(self): method test_load_and_set_attn_adapter (line 1131) | def test_load_and_set_attn_adapter(self): method test_load_target_lang_with_mismatched_size (line 1166) | def test_load_target_lang_with_mismatched_size(self): method test_load_attn_adapter (line 1202) | def test_load_attn_adapter(self): method test_model_from_pretrained (line 1282) | def test_model_from_pretrained(self): class Wav2Vec2UtilsTest (line 1288) | class Wav2Vec2UtilsTest(unittest.TestCase): method test_compute_mask_indices (line 1289) | def test_compute_mask_indices(self): method test_compute_mask_indices_low_prob (line 1300) | def test_compute_mask_indices_low_prob(self): method test_compute_mask_indices_overlap (line 1330) | def test_compute_mask_indices_overlap(self): method test_compute_mask_indices_attn_mask_overlap (line 1343) | def test_compute_mask_indices_attn_mask_overlap(self): method test_compute_mask_indices_short_audio (line 1362) | def test_compute_mask_indices_short_audio(self): method test_compute_perplexity (line 1379) | def test_compute_perplexity(self): method test_sample_negatives (line 1392) | def test_sample_negatives(self): method test_sample_negatives_with_mask (line 1417) | def test_sample_negatives_with_mask(self): class Wav2Vec2ModelIntegrationTest (line 1459) | class Wav2Vec2ModelIntegrationTest(unittest.TestCase): method tearDown (line 1460) | def tearDown(self): method _load_datasamples (line 1466) | def _load_datasamples(self, num_samples): method _load_superb (line 1475) | def _load_superb(self, task, num_samples): method test_inference_ctc_normal (line 1480) | def test_inference_ctc_normal(self): method test_inference_ctc_normal_batched (line 1497) | def test_inference_ctc_normal_batched(self): method test_inference_ctc_robust_batched (line 1520) | def test_inference_ctc_robust_batched(self): method test_inference_integration (line 1547) | def test_inference_integration(self): method test_inference_pretrained (line 1595) | def test_inference_pretrained(self): method test_loss_pretraining (line 1659) | def test_loss_pretraining(self): method test_inference_keyword_spotting (line 1715) | def test_inference_keyword_spotting(self): method test_inference_intent_classification (line 1734) | def test_inference_intent_classification(self): method test_inference_speaker_identification (line 1764) | def test_inference_speaker_identification(self): method test_inference_emotion_recognition (line 1785) | def test_inference_emotion_recognition(self): method test_phoneme_recognition (line 1804) | def test_phoneme_recognition(self): method test_wav2vec2_with_lm (line 1841) | def test_wav2vec2_with_lm(self): method test_wav2vec2_with_lm_pool (line 1867) | def test_wav2vec2_with_lm_pool(self): method test_wav2vec2_with_lm_invalid_pool (line 1906) | def test_wav2vec2_with_lm_invalid_pool(self): method test_inference_diarization (line 1909) | def test_inference_diarization(self): method test_inference_speaker_verification (line 1936) | def test_inference_speaker_verification(self): method test_inference_mms_1b_all (line 1961) | def test_inference_mms_1b_all(self): method test_inference_ctc_fa2 (line 2007) | def test_inference_ctc_fa2(self): method test_inference_ctc_fa2_batched (line 2029) | def test_inference_ctc_fa2_batched(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2/test_processor_wav2vec2.py class Wav2Vec2ProcessorTest (line 28) | class Wav2Vec2ProcessorTest(unittest.TestCase): method setUp (line 29) | def setUp(self): method get_tokenizer (line 56) | def get_tokenizer(self, **kwargs_init): method get_feature_extractor (line 61) | def get_feature_extractor(self, **kwargs): method tearDown (line 64) | def tearDown(self): method test_save_load_pretrained_default (line 67) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 82) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 99) | def test_feature_extractor(self): method test_tokenizer (line 113) | def test_tokenizer(self): method test_tokenizer_decode (line 128) | def test_tokenizer_decode(self): method test_model_input_names (line 141) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2/test_tokenization_wav2vec2.py function floats_list (line 43) | def floats_list(shape, scale=1.0, rng=None, name=None): class Wav2Vec2TokenizerTest (line 57) | class Wav2Vec2TokenizerTest(unittest.TestCase): method setUp (line 60) | def setUp(self): method get_tokenizer (line 73) | def get_tokenizer(self, **kwargs): method test_tokenizer_decode (line 77) | def test_tokenizer_decode(self): method test_tokenizer_decode_special (line 90) | def test_tokenizer_decode_special(self): method test_tokenizer_decode_added_tokens (line 121) | def test_tokenizer_decode_added_tokens(self): method test_call (line 153) | def test_call(self): method test_padding (line 179) | def test_padding(self, max_length=50): method test_save_pretrained (line 238) | def test_save_pretrained(self): method test_get_vocab (line 258) | def test_get_vocab(self): method test_save_and_load_tokenizer (line 271) | def test_save_and_load_tokenizer(self): method test_tokenizer_slow_store_full_signature (line 318) | def test_tokenizer_slow_store_full_signature(self): method test_zero_mean_unit_variance_normalization (line 326) | def test_zero_mean_unit_variance_normalization(self): method test_return_attention_mask (line 340) | def test_return_attention_mask(self): method test_pretrained_checkpoints_are_set_correctly (line 358) | def test_pretrained_checkpoints_are_set_correctly(self): class Wav2Vec2CTCTokenizerTest (line 371) | class Wav2Vec2CTCTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 376) | def setUp(self): method get_tokenizer (line 389) | def get_tokenizer(self, **kwargs): method test_tokenizer_add_token_chars (line 393) | def test_tokenizer_add_token_chars(self): method test_tokenizer_add_token_words (line 409) | def test_tokenizer_add_token_words(self): method test_tokenizer_decode (line 425) | def test_tokenizer_decode(self): method test_tokenizer_decode_special (line 437) | def test_tokenizer_decode_special(self): method test_tokenizer_decode_added_tokens (line 456) | def test_tokenizer_decode_added_tokens(self): method test_special_characters_in_vocab (line 473) | def test_special_characters_in_vocab(self): method get_from_offsets (line 494) | def get_from_offsets(offsets, key): method test_offsets (line 498) | def test_offsets(self): method test_word_offsets_from_char_offsets (line 560) | def test_word_offsets_from_char_offsets(self): method test_offsets_batch (line 596) | def test_offsets_batch(self): method test_offsets_integration (line 644) | def test_offsets_integration(self): method test_add_tokens_tokenizer (line 711) | def test_add_tokens_tokenizer(self): method test_tf_encode_plus_sent_to_model (line 766) | def test_tf_encode_plus_sent_to_model(self): method test_torch_encode_plus_sent_to_model (line 770) | def test_torch_encode_plus_sent_to_model(self): method test_convert_tokens_to_string_format (line 773) | def test_convert_tokens_to_string_format(self): method test_nested_vocab (line 784) | def test_nested_vocab(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2_bert/test_modeling_wav2vec2_bert.py class Wav2Vec2BertModelTester (line 61) | class Wav2Vec2BertModelTester: method __init__ (line 63) | def __init__( method prepare_config_and_inputs (line 130) | def prepare_config_and_inputs(self, position_embeddings_type="relative"): method get_config (line 141) | def get_config(self, position_embeddings_type="relative"): method create_and_check_model (line 167) | def create_and_check_model(self, config, input_features, attention_mask): method create_and_check_model_with_adapter (line 176) | def create_and_check_model_with_adapter(self, config, input_features, ... method create_and_check_model_with_adapter_for_ctc (line 186) | def create_and_check_model_with_adapter_for_ctc(self, config, input_fe... method create_and_check_model_with_intermediate_ffn_before_adapter (line 198) | def create_and_check_model_with_intermediate_ffn_before_adapter(self, ... method create_and_check_model_with_adapter_proj_dim (line 221) | def create_and_check_model_with_adapter_proj_dim(self, config, input_f... method create_and_check_model_float16 (line 233) | def create_and_check_model_float16(self, config, input_features, atten... method create_and_check_batch_inference (line 250) | def create_and_check_batch_inference(self, config, input_features, *ar... method check_ctc_loss (line 276) | def check_ctc_loss(self, config, input_features, *args): method check_seq_classifier_loss (line 305) | def check_seq_classifier_loss(self, config, input_features, *args): method check_ctc_training (line 331) | def check_ctc_training(self, config, input_features, *args): method check_seq_classifier_training (line 358) | def check_seq_classifier_training(self, config, input_features, *args): method check_xvector_training (line 382) | def check_xvector_training(self, config, input_features, *args): method check_labels_out_of_vocab (line 405) | def check_labels_out_of_vocab(self, config, input_features, *args): method prepare_config_and_inputs_for_common (line 419) | def prepare_config_and_inputs_for_common(self): class Wav2Vec2BertModelTest (line 427) | class Wav2Vec2BertModelTest(ModelTesterMixin, PipelineTesterMixin, unitt... method setUp (line 455) | def setUp(self): method test_config (line 459) | def test_config(self): method test_model (line 462) | def test_model(self): method test_model_with_relative (line 466) | def test_model_with_relative(self): method test_model_with_relative_key (line 471) | def test_model_with_relative_key(self): method test_model_with_rotary (line 475) | def test_model_with_rotary(self): method test_model_with_no_rel_pos (line 479) | def test_model_with_no_rel_pos(self): method test_model_with_adapter (line 483) | def test_model_with_adapter(self): method test_model_with_adapter_for_ctc (line 487) | def test_model_with_adapter_for_ctc(self): method test_model_with_intermediate_ffn_before_adapter (line 492) | def test_model_with_intermediate_ffn_before_adapter(self): method test_model_with_adapter_proj_dim (line 496) | def test_model_with_adapter_proj_dim(self): method test_model_float16_with_relative (line 502) | def test_model_float16_with_relative(self): method test_model_float16_with_relative_key (line 509) | def test_model_float16_with_relative_key(self): method test_model_float16_with_rotary (line 515) | def test_model_float16_with_rotary(self): method test_ctc_loss_inference (line 519) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 523) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 527) | def test_ctc_train(self): method test_seq_classifier_train (line 531) | def test_seq_classifier_train(self): method test_xvector_train (line 535) | def test_xvector_train(self): method test_labels_out_of_vocab (line 539) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 545) | def test_inputs_embeds(self): method test_forward_signature (line 550) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 555) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 560) | def test_model_get_set_embeddings(self): method test_equivalence_flax_to_pt (line 566) | def test_equivalence_flax_to_pt(self): method test_equivalence_pt_to_flax (line 572) | def test_equivalence_pt_to_flax(self): method test_retain_grad_hidden_states_attentions (line 575) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 615) | def test_initialization(self): method _mock_init_weights (line 654) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 674) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 679) | def test_mask_time_prob_ctc(self): method test_feed_forward_chunking (line 683) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 687) | def test_model_from_pretrained(self): class Wav2Vec2BertUtilsTest (line 695) | class Wav2Vec2BertUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 696) | def test_compute_mask_indices(self): method test_compute_mask_indices_low_prob (line 707) | def test_compute_mask_indices_low_prob(self): method test_compute_mask_indices_overlap (line 737) | def test_compute_mask_indices_overlap(self): method test_compute_mask_indices_attn_mask_overlap (line 750) | def test_compute_mask_indices_attn_mask_overlap(self): method test_compute_mask_indices_short_audio (line 769) | def test_compute_mask_indices_short_audio(self): method test_compute_perplexity (line 788) | def test_compute_perplexity(self): method test_sample_negatives (line 791) | def test_sample_negatives(self): method test_sample_negatives_with_mask (line 816) | def test_sample_negatives_with_mask(self): class Wav2Vec2BertModelIntegrationTest (line 856) | class Wav2Vec2BertModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 857) | def _load_datasamples(self, num_samples): method test_inference_w2v2_bert (line 865) | def test_inference_w2v2_bert(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2_bert/test_processor_wav2vec2_bert.py class Wav2Vec2BertProcessorTest (line 31) | class Wav2Vec2BertProcessorTest(unittest.TestCase): method setUp (line 32) | def setUp(self): method get_tokenizer (line 59) | def get_tokenizer(self, **kwargs_init): method get_feature_extractor (line 64) | def get_feature_extractor(self, **kwargs): method tearDown (line 67) | def tearDown(self): method test_save_load_pretrained_default (line 70) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 85) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 104) | def test_feature_extractor(self): method test_tokenizer (line 118) | def test_tokenizer(self): method test_tokenizer_decode (line 133) | def test_tokenizer_decode(self): method test_model_input_names (line 146) | def test_model_input_names(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2_conformer/test_modeling_wav2vec2_conformer.py class Wav2Vec2ConformerModelTester (line 65) | class Wav2Vec2ConformerModelTester: method __init__ (line 66) | def __init__( method prepare_config_and_inputs (line 144) | def prepare_config_and_inputs(self, position_embeddings_type="relative"): method get_config (line 152) | def get_config(self, position_embeddings_type="relative"): method create_and_check_model (line 184) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_model_with_adapter (line 193) | def create_and_check_model_with_adapter(self, config, input_values, at... method create_and_check_model_with_adapter_for_ctc (line 203) | def create_and_check_model_with_adapter_for_ctc(self, config, input_va... method create_and_check_model_with_adapter_proj_dim (line 214) | def create_and_check_model_with_adapter_proj_dim(self, config, input_v... method create_and_check_model_float16 (line 226) | def create_and_check_model_float16(self, config, input_values, attenti... method create_and_check_batch_inference (line 243) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 269) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 297) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 322) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 351) | def check_seq_classifier_training(self, config, input_values, *args): method check_xvector_training (line 374) | def check_xvector_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 397) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 411) | def prepare_config_and_inputs_for_common(self): class Wav2Vec2ConformerModelTest (line 418) | class Wav2Vec2ConformerModelTest(ModelTesterMixin, PipelineTesterMixin, ... method setUp (line 444) | def setUp(self): method test_config (line 448) | def test_config(self): method test_model (line 451) | def test_model(self): method test_model_with_relative (line 455) | def test_model_with_relative(self): method test_model_with_rotary (line 459) | def test_model_with_rotary(self): method test_model_with_no_rel_pos (line 463) | def test_model_with_no_rel_pos(self): method test_model_with_adapter (line 467) | def test_model_with_adapter(self): method test_model_with_adapter_for_ctc (line 471) | def test_model_with_adapter_for_ctc(self): method test_model_with_adapter_proj_dim (line 475) | def test_model_with_adapter_proj_dim(self): method test_model_float16_with_relative (line 481) | def test_model_float16_with_relative(self): method test_model_float16_with_rotary (line 487) | def test_model_float16_with_rotary(self): method test_ctc_loss_inference (line 491) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 495) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 499) | def test_ctc_train(self): method test_seq_classifier_train (line 503) | def test_seq_classifier_train(self): method test_xvector_train (line 507) | def test_xvector_train(self): method test_labels_out_of_vocab (line 511) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 516) | def test_inputs_embeds(self): method test_forward_signature (line 520) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 524) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 528) | def test_model_get_set_embeddings(self): method test_equivalence_flax_to_pt (line 533) | def test_equivalence_flax_to_pt(self): method test_equivalence_pt_to_flax (line 538) | def test_equivalence_pt_to_flax(self): method test_retain_grad_hidden_states_attentions (line 541) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 581) | def test_initialization(self): method _mock_init_weights (line 620) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 638) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 661) | def test_mask_time_prob_ctc(self): method test_feed_forward_chunking (line 685) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 689) | def test_model_from_pretrained(self): class Wav2Vec2ConformerUtilsTest (line 695) | class Wav2Vec2ConformerUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 696) | def test_compute_mask_indices(self): method test_compute_mask_indices_low_prob (line 707) | def test_compute_mask_indices_low_prob(self): method test_compute_mask_indices_overlap (line 737) | def test_compute_mask_indices_overlap(self): method test_compute_mask_indices_attn_mask_overlap (line 750) | def test_compute_mask_indices_attn_mask_overlap(self): method test_compute_mask_indices_short_audio (line 769) | def test_compute_mask_indices_short_audio(self): method test_compute_perplexity (line 786) | def test_compute_perplexity(self): method test_sample_negatives (line 799) | def test_sample_negatives(self): method test_sample_negatives_with_mask (line 824) | def test_sample_negatives_with_mask(self): class Wav2Vec2ConformerModelIntegrationTest (line 864) | class Wav2Vec2ConformerModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 865) | def _load_datasamples(self, num_samples): method test_inference_ctc_normal_batched_rel_pos (line 873) | def test_inference_ctc_normal_batched_rel_pos(self): method test_inference_ctc_normal_batched_rope (line 898) | def test_inference_ctc_normal_batched_rope(self): method test_inference_pretrained (line 923) | def test_inference_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2_phoneme/test_tokenization_wav2vec2_phoneme.py class Wav2Vec2PhonemeCTCTokenizerTest (line 31) | class Wav2Vec2PhonemeCTCTokenizerTest(TokenizerTesterMixin, unittest.Tes... method setUp (line 36) | def setUp(self): method get_clean_sequence (line 63) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method get_tokenizer (line 87) | def get_tokenizer(self, **kwargs): method test_tokenizer_add_new_tokens (line 91) | def test_tokenizer_add_new_tokens(self): method test_phonemize (line 106) | def test_phonemize(self): method test_encode (line 113) | def test_encode(self): method test_encode_decode (line 120) | def test_encode_decode(self): method test_decode (line 129) | def test_decode(self): method test_phonemize_with_word_del (line 141) | def test_phonemize_with_word_del(self): method test_encode_with_del (line 151) | def test_encode_with_del(self): method test_decode_with_del (line 161) | def test_decode_with_del(self): method test_encode_decode_with_del (line 186) | def test_encode_decode_with_del(self): method test_encode_decode_with_del_filter (line 199) | def test_encode_decode_with_del_filter(self): method test_change_phonemizer_lang (line 212) | def test_change_phonemizer_lang(self): method test_case_insensitive (line 229) | def test_case_insensitive(self): method test_tokenizer_decode_added_tokens (line 239) | def test_tokenizer_decode_added_tokens(self): method get_from_offsets (line 255) | def get_from_offsets(offsets, key): method test_offsets (line 259) | def test_offsets(self): method test_offsets_batch (line 291) | def test_offsets_batch(self): method test_added_tokens_do_lower_case (line 329) | def test_added_tokens_do_lower_case(self): method test_encode_decode_with_spaces (line 333) | def test_encode_decode_with_spaces(self): method test_internal_consistency (line 339) | def test_internal_consistency(self): method test_add_tokens_tokenizer (line 343) | def test_add_tokens_tokenizer(self): method test_tf_encode_plus_sent_to_model (line 395) | def test_tf_encode_plus_sent_to_model(self): method test_torch_encode_plus_sent_to_model (line 399) | def test_torch_encode_plus_sent_to_model(self): method test_convert_tokens_to_string_format (line 402) | def test_convert_tokens_to_string_format(self): FILE: mplsandbox_for_rl/transformers/tests/models/wav2vec2_with_lm/test_processor_wav2vec2_with_lm.py class Wav2Vec2ProcessorWithLMTest (line 49) | class Wav2Vec2ProcessorWithLMTest(unittest.TestCase): method setUp (line 50) | def setUp(self): method get_tokenizer (line 79) | def get_tokenizer(self, **kwargs_init): method get_feature_extractor (line 84) | def get_feature_extractor(self, **kwargs): method get_decoder (line 87) | def get_decoder(self, **kwargs): method tearDown (line 90) | def tearDown(self): method test_save_load_pretrained_default (line 93) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 119) | def test_save_load_pretrained_additional_features(self): method test_load_decoder_tokenizer_mismatch_content (line 136) | def test_load_decoder_tokenizer_mismatch_content(self): method test_feature_extractor (line 145) | def test_feature_extractor(self): method test_another_feature_extractor (line 160) | def test_another_feature_extractor(self): method test_wrong_feature_extractor_raises_error (line 181) | def test_wrong_feature_extractor_raises_error(self): method test_tokenizer (line 189) | def test_tokenizer(self): method _get_dummy_logits (line 205) | def _get_dummy_logits(self, shape=(2, 10, 16), seed=77): method test_decoder (line 209) | def test_decoder(self): method test_decoder_batch (line 228) | def test_decoder_batch(self, pool_context): method test_decoder_with_params (line 262) | def test_decoder_with_params(self): method test_decoder_with_params_of_lm (line 307) | def test_decoder_with_params_of_lm(self): method test_decoder_download_ignores_files (line 354) | def test_decoder_download_ignores_files(self): method test_decoder_local_files (line 371) | def test_decoder_local_files(self): method test_processor_from_auto_processor (line 388) | def test_processor_from_auto_processor(self): method test_model_input_names (line 407) | def test_model_input_names(self): method get_from_offsets (line 421) | def get_from_offsets(offsets, key): method test_offsets_integration_fast (line 425) | def test_offsets_integration_fast(self): method test_offsets_integration_fast_batch (line 441) | def test_offsets_integration_fast_batch(self): method test_word_time_stamp_integration (line 463) | def test_word_time_stamp_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/wavlm/test_modeling_wavlm.py class WavLMModelTester (line 50) | class WavLMModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 117) | def prepare_config_and_inputs(self): method get_config (line 125) | def get_config(self): method create_and_check_model (line 151) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 160) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 186) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 214) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 239) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 268) | def check_seq_classifier_training(self, config, input_values, *args): method check_output_attentions (line 291) | def check_output_attentions(self, config, input_values, attention_mask): method check_labels_out_of_vocab (line 300) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 314) | def prepare_config_and_inputs_for_common(self): class WavLMModelTest (line 321) | class WavLMModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 339) | def setUp(self): method test_config (line 343) | def test_config(self): method test_model (line 346) | def test_model(self): method test_ctc_loss_inference (line 350) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 354) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 358) | def test_ctc_train(self): method test_seq_classifier_train (line 362) | def test_seq_classifier_train(self): method test_output_attentions (line 366) | def test_output_attentions(self): method test_labels_out_of_vocab (line 370) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 375) | def test_inputs_embeds(self): method test_forward_signature (line 380) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 384) | def test_resize_tokens_embeddings(self): method test_model_get_set_embeddings (line 387) | def test_model_get_set_embeddings(self): method test_retain_grad_hidden_states_attentions (line 392) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 428) | def test_initialization(self): method _mock_init_weights (line 465) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 480) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 484) | def test_model_from_pretrained(self): class WavLMModelIntegrationTest (line 492) | class WavLMModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 493) | def _load_datasamples(self, num_samples): method _load_superb (line 502) | def _load_superb(self, task, num_samples): method test_inference_base (line 507) | def test_inference_base(self): method test_inference_large (line 530) | def test_inference_large(self): method test_inference_diarization (line 554) | def test_inference_diarization(self): method test_inference_speaker_verification (line 581) | def test_inference_speaker_verification(self): FILE: mplsandbox_for_rl/transformers/tests/models/whisper/test_feature_extraction_whisper.py function floats_list (line 39) | def floats_list(shape, scale=1.0, rng=None, name=None): class WhisperFeatureExtractionTester (line 53) | class WhisperFeatureExtractionTester(unittest.TestCase): method __init__ (line 54) | def __init__( method prepare_feat_extract_dict (line 81) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 92) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class WhisperFeatureExtractionTest (line 109) | class WhisperFeatureExtractionTest(SequenceFeatureExtractionTestMixin, u... method setUp (line 112) | def setUp(self): method test_feat_extract_from_and_save_pretrained (line 115) | def test_feat_extract_from_and_save_pretrained(self): method test_feat_extract_to_json_file (line 130) | def test_feat_extract_to_json_file(self): method test_feat_extract_from_pretrained_kwargs (line 145) | def test_feat_extract_from_pretrained_kwargs(self): method test_call (line 159) | def test_call(self): method test_double_precision_pad (line 204) | def test_double_precision_pad(self): method _load_datasamples (line 217) | def _load_datasamples(self, num_samples): method test_torch_integration (line 226) | def test_torch_integration(self): method test_numpy_integration (line 246) | def test_numpy_integration(self): method test_zero_mean_unit_variance_normalization_trunc_np_longest (line 264) | def test_zero_mean_unit_variance_normalization_trunc_np_longest(self): method test_torch_integration_batch (line 275) | def test_torch_integration_batch(self): FILE: mplsandbox_for_rl/transformers/tests/models/whisper/test_modeling_flax_whisper.py class FlaxWhisperModelTester (line 53) | class FlaxWhisperModelTester: method __init__ (line 58) | def __init__( method prepare_config_and_inputs_for_common (line 123) | def prepare_config_and_inputs_for_common(self): function prepare_whisper_inputs_dict (line 156) | def prepare_whisper_inputs_dict( function partialclass (line 178) | def partialclass(cls, *args, **kwargs): function make_partial_class (line 185) | def make_partial_class(full_class, *args, **kwargs): class FlaxWhisperModelTest (line 194) | class FlaxWhisperModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 202) | def setUp(self): method test_config (line 212) | def test_config(self): method test_forward_signature (line 216) | def test_forward_signature(self): method test_jit_compilation (line 229) | def test_jit_compilation(self): method check_pt_flax_outputs (line 252) | def check_pt_flax_outputs(self, fx_outputs, pt_outputs, model_class, t... method test_save_load_bf16_to_base_pt (line 258) | def test_save_load_bf16_to_base_pt(self): method test_save_load_from_base_pt (line 288) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 318) | def test_save_load_to_base_pt(self): method test_save_load_from_base (line 346) | def test_save_load_from_base(self): method test_save_load_to_base (line 369) | def test_save_load_to_base(self): method test_encoder_sinusoidal_embed_positions (line 391) | def test_encoder_sinusoidal_embed_positions(self): class FlaxWhisperModelIntegrationTest (line 407) | class FlaxWhisperModelIntegrationTest(unittest.TestCase): method default_processor (line 409) | def default_processor(self): method _load_datasamples (line 412) | def _load_datasamples(self, num_samples): method test_tiny_logits_librispeech (line 419) | def test_tiny_logits_librispeech(self): method test_small_en_logits_librispeech (line 445) | def test_small_en_logits_librispeech(self): method test_large_logits_librispeech (line 474) | def test_large_logits_librispeech(self): method test_tiny_en_generation (line 506) | def test_tiny_en_generation(self): method test_tiny_generation (line 525) | def test_tiny_generation(self): method test_large_generation (line 543) | def test_large_generation(self): method test_large_generation_multilingual (line 560) | def test_large_generation_multilingual(self): method test_large_batched_generation (line 594) | def test_large_batched_generation(self): method test_tiny_en_batched_generation (line 627) | def test_tiny_en_batched_generation(self): method test_tiny_timestamp_generation (line 662) | def test_tiny_timestamp_generation(self): class FlaxWhisperEncoderModelTester (line 724) | class FlaxWhisperEncoderModelTester: method __init__ (line 725) | def __init__( method get_config (line 773) | def get_config(self): method prepare_whisper_encoder_inputs_dict (line 795) | def prepare_whisper_encoder_inputs_dict( method prepare_config_and_inputs (line 803) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 812) | def prepare_config_and_inputs_for_common(self): method get_subsampled_output_lengths (line 816) | def get_subsampled_output_lengths(self, input_lengths): method encoder_seq_length (line 827) | def encoder_seq_length(self): class WhisperEncoderModelTest (line 832) | class WhisperEncoderModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 841) | def setUp(self): method test_config (line 851) | def test_config(self): method test_jit_compilation (line 855) | def test_jit_compilation(self): method test_forward_signature (line 879) | def test_forward_signature(self): method test_inputs_embeds (line 891) | def test_inputs_embeds(self): method test_model_common_attributes (line 895) | def test_model_common_attributes(self): method test_resize_tokens_embeddings (line 899) | def test_resize_tokens_embeddings(self): method test_save_load_to_base (line 903) | def test_save_load_to_base(self): method test_save_load_from_base (line 907) | def test_save_load_from_base(self): method test_save_load_from_base_pt (line 912) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 917) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 922) | def test_save_load_bf16_to_base_pt(self): FILE: mplsandbox_for_rl/transformers/tests/models/whisper/test_modeling_tf_whisper.py function prepare_whisper_inputs_dict (line 52) | def prepare_whisper_inputs_dict( class TFWhisperModelTester (line 81) | class TFWhisperModelTester: method __init__ (line 82) | def __init__( method prepare_config_and_inputs (line 134) | def prepare_config_and_inputs(self): method get_config (line 148) | def get_config(self): method prepare_config_and_inputs_for_common (line 172) | def prepare_config_and_inputs_for_common(self): method get_subsampled_output_lengths (line 176) | def get_subsampled_output_lengths(self, input_lengths): method create_and_check_model_forward (line 186) | def create_and_check_model_forward(self, config, inputs_dict): method create_and_check_decoder_model_past_large_inputs (line 197) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 232) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class TFWhisperModelTest (line 263) | class TFWhisperModelTest(TFModelTesterMixin, PipelineTesterMixin, unitte... method test_xla_generate_slow (line 277) | def test_xla_generate_slow(self): method setUp (line 280) | def setUp(self): method test_config (line 285) | def test_config(self): method test_save_load_strict (line 288) | def test_save_load_strict(self): method test_model_forward (line 300) | def test_model_forward(self): method test_requires_grad_encoder_embed_positions (line 304) | def test_requires_grad_encoder_embed_positions(self): method test_encoder_sinusoidal_embed_positions (line 311) | def test_encoder_sinusoidal_embed_positions(self): method test_decoder_model_past_with_large_inputs (line 321) | def test_decoder_model_past_with_large_inputs(self): method _get_input_ids_and_config (line 325) | def _get_input_ids_and_config(self): method test_inputs_embeds (line 342) | def test_inputs_embeds(self): method test_training (line 346) | def test_training(self): method test_generate_with_head_masking (line 349) | def test_generate_with_head_masking(self): method test_generate_fp16 (line 353) | def test_generate_fp16(self): method test_forward_signature (line 361) | def test_forward_signature(self): method test_hidden_states_output (line 382) | def test_hidden_states_output(self): method check_pt_tf_outputs (line 431) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method test_attention_outputs (line 435) | def test_attention_outputs(self): method test_generate_without_input_ids (line 522) | def test_generate_without_input_ids(self): method _get_encoder_outputs (line 526) | def _get_encoder_outputs( method _check_outputs (line 545) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method test_lm_head_model_random_no_beam_search_generate (line 589) | def test_lm_head_model_random_no_beam_search_generate(self): method test_lm_head_model_random_beam_search_generate (line 624) | def test_lm_head_model_random_beam_search_generate(self): method test_generate_with_prompt_ids_and_task_and_language (line 663) | def test_generate_with_prompt_ids_and_task_and_language(self): method test_generate_with_prompt_ids_and_forced_decoder_ids (line 686) | def test_generate_with_prompt_ids_and_forced_decoder_ids(self): function _load_datasamples (line 706) | def _load_datasamples(num_samples): function _test_large_logits_librispeech (line 714) | def _test_large_logits_librispeech(in_queue, out_queue, timeout): function _test_large_generation (line 762) | def _test_large_generation(in_queue, out_queue, timeout): function _test_large_generation_multilingual (line 789) | def _test_large_generation_multilingual(in_queue, out_queue, timeout): function _test_large_batched_generation (line 834) | def _test_large_batched_generation(in_queue, out_queue, timeout): class TFWhisperModelIntegrationTests (line 881) | class TFWhisperModelIntegrationTests(unittest.TestCase): method default_processor (line 883) | def default_processor(self): method _load_datasamples (line 886) | def _load_datasamples(self, num_samples): method test_tiny_logits_librispeech (line 890) | def test_tiny_logits_librispeech(self): method test_small_en_logits_librispeech (line 933) | def test_small_en_logits_librispeech(self): method test_large_logits_librispeech (line 966) | def test_large_logits_librispeech(self): method test_tiny_en_generation (line 970) | def test_tiny_en_generation(self): method test_tiny_generation (line 989) | def test_tiny_generation(self): method test_tiny_xla_generation (line 1007) | def test_tiny_xla_generation(self): method test_large_generation (line 1031) | def test_large_generation(self): method test_large_generation_multilingual (line 1035) | def test_large_generation_multilingual(self): method test_large_batched_generation (line 1039) | def test_large_batched_generation(self): method test_tiny_en_batched_generation (line 1043) | def test_tiny_en_batched_generation(self): method test_tiny_en_batched_xla_generation (line 1079) | def test_tiny_en_batched_xla_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/whisper/test_modeling_whisper.py class DummyTimestampLogitProcessor (line 76) | class DummyTimestampLogitProcessor(LogitsProcessor): method __init__ (line 79) | def __init__( method set_begin_index (line 103) | def set_begin_index(self, begin_index: int): method __call__ (line 106) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... function prepare_whisper_inputs_dict (line 165) | def prepare_whisper_inputs_dict( class WhisperModelTester (line 195) | class WhisperModelTester: method __init__ (line 196) | def __init__( method prepare_config_and_inputs (line 248) | def prepare_config_and_inputs(self): method get_config (line 262) | def get_config(self): method prepare_config_and_inputs_for_common (line 286) | def prepare_config_and_inputs_for_common(self): method get_subsampled_output_lengths (line 290) | def get_subsampled_output_lengths(self, input_lengths): method create_and_check_model_forward (line 300) | def create_and_check_model_forward(self, config, inputs_dict, freeze_e... method create_and_check_decoder_model_past_large_inputs (line 314) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 347) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class WhisperModelTest (line 378) | class WhisperModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline... method is_pipeline_test_to_skip (line 402) | def is_pipeline_test_to_skip( method _get_logits_processor_kwargs (line 415) | def _get_logits_processor_kwargs(self, do_sample=False): method _get_beam_kwargs (line 421) | def _get_beam_kwargs(self, num_return_sequences=1): method _get_diverse_beam_kwargs (line 427) | def _get_diverse_beam_kwargs(self, num_return_sequences=1): method _get_constrained_beam_kwargs (line 433) | def _get_constrained_beam_kwargs(self, num_return_sequences=1): method setUp (line 439) | def setUp(self): method test_config (line 444) | def test_config(self): method test_save_load_strict (line 447) | def test_save_load_strict(self): method test_model_forward (line 457) | def test_model_forward(self): method test_model_forward_with_frozen_encoder (line 461) | def test_model_forward_with_frozen_encoder(self): method test_requires_grad_with_frozen_encoder (line 465) | def test_requires_grad_with_frozen_encoder(self): method test_requires_grad_encoder_embed_positions (line 481) | def test_requires_grad_encoder_embed_positions(self): method test_encoder_sinusoidal_embed_positions (line 488) | def test_encoder_sinusoidal_embed_positions(self): method test_decoder_model_past_with_large_inputs (line 495) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 499) | def test_encoder_decoder_model_standalone(self): method _get_input_ids_and_config (line 503) | def _get_input_ids_and_config(self, batch_size=3): method test_inputs_embeds (line 516) | def test_inputs_embeds(self): method test_training (line 537) | def test_training(self): method test_training_gradient_checkpointing (line 541) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 547) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 553) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_generate_with_head_masking (line 557) | def test_generate_with_head_masking(self): method test_generate_fp16 (line 561) | def test_generate_fp16(self): method test_generate_language (line 571) | def test_generate_language(self): method test_forward_signature (line 595) | def test_forward_signature(self): method test_hidden_states_output (line 617) | def test_hidden_states_output(self): method test_attention_outputs (line 670) | def test_attention_outputs(self): method test_resize_tokens_embeddings (line 765) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 813) | def test_resize_embeddings_untied(self): method test_generate_without_input_ids (line 863) | def test_generate_without_input_ids(self): method _get_encoder_outputs (line 867) | def _get_encoder_outputs( method _check_outputs (line 886) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method test_flash_attn_2_inference_equivalence (line 932) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 978) | def test_flash_attn_2_inference_equivalence_right_padding(self): method _create_and_check_torchscript (line 1030) | def _create_and_check_torchscript(self, config, inputs_dict): method check_pt_tf_outputs (line 1114) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method check_pt_flax_outputs (line 1118) | def check_pt_flax_outputs(self, fx_outputs, pt_outputs, model_class, t... method test_equivalence_pt_to_flax (line 1123) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 1195) | def test_equivalence_flax_to_pt(self): method test_mask_feature_prob (line 1273) | def test_mask_feature_prob(self): method test_mask_time_prob (line 1287) | def test_mask_time_prob(self): method test_generate_with_prompt_ids_and_task_and_language (line 1301) | def test_generate_with_prompt_ids_and_task_and_language(self): method test_generate_with_prompt_ids_and_forced_decoder_ids (line 1324) | def test_generate_with_prompt_ids_and_forced_decoder_ids(self): method test_generate_with_prompt_ids_max_length (line 1343) | def test_generate_with_prompt_ids_max_length(self): method test_generate_longform_with_prompt_ids (line 1366) | def test_generate_longform_with_prompt_ids(self): method _check_longform_generate_single_batch (line 1406) | def _check_longform_generate_single_batch(self, condition_on_prev_toke... method test_longform_generate_single_batch (line 1477) | def test_longform_generate_single_batch(self): method test_longform_generate_single_batch_cond_prev (line 1480) | def test_longform_generate_single_batch_cond_prev(self): method _check_longform_generate_multi_batch (line 1483) | def _check_longform_generate_multi_batch(self, condition_on_prev_tokens): method test_longform_generate_multi_batch (line 1565) | def test_longform_generate_multi_batch(self): method test_longform_generate_multi_batch_cond_prev (line 1568) | def test_longform_generate_multi_batch_cond_prev(self): method test_custom_4d_attention_mask (line 1572) | def test_custom_4d_attention_mask(self): method test_generate_output_type (line 1610) | def test_generate_output_type(self, return_dict_in_generate): method test_flash_attn_2_generate_reuse_cache (line 1633) | def test_flash_attn_2_generate_reuse_cache(self): class WhisperModelIntegrationTests (line 1685) | class WhisperModelIntegrationTests(unittest.TestCase): method setUp (line 1686) | def setUp(self): method tearDown (line 1689) | def tearDown(self): method default_processor (line 1693) | def default_processor(self): method _load_datasamples (line 1696) | def _load_datasamples(self, num_samples): method _patch_generation_mixin_generate (line 1703) | def _patch_generation_mixin_generate(self, check_args_fn=None): method test_tiny_logits_librispeech (line 1714) | def test_tiny_logits_librispeech(self): method test_small_en_logits_librispeech (line 1760) | def test_small_en_logits_librispeech(self): method test_large_logits_librispeech (line 1795) | def test_large_logits_librispeech(self): method test_tiny_en_generation (line 1839) | def test_tiny_en_generation(self): method test_tiny_generation (line 1861) | def test_tiny_generation(self): method test_large_generation (line 1882) | def test_large_generation(self): method test_large_generation_multilingual (line 1902) | def test_large_generation_multilingual(self): method test_large_batched_generation (line 1932) | def test_large_batched_generation(self): method test_large_batched_generation_multilingual (line 1969) | def test_large_batched_generation_multilingual(self): method test_tiny_en_batched_generation (line 2005) | def test_tiny_en_batched_generation(self): method test_tiny_timestamp_generation (line 2043) | def test_tiny_timestamp_generation(self): method test_large_timestamp_generation (line 2106) | def test_large_timestamp_generation(self): method test_tiny_token_timestamp_generation (line 2169) | def test_tiny_token_timestamp_generation(self): method test_large_token_timestamp_generation (line 2198) | def test_large_token_timestamp_generation(self): method test_tiny_token_timestamp_batch_generation (line 2228) | def test_tiny_token_timestamp_batch_generation(self): method test_tiny_token_timestamp_generation_longform (line 2257) | def test_tiny_token_timestamp_generation_longform(self): method test_tiny_specaugment_librispeech (line 2307) | def test_tiny_specaugment_librispeech(self): method test_generate_with_prompt_ids (line 2342) | def test_generate_with_prompt_ids(self): method test_language_detection (line 2364) | def test_language_detection(self): method test_default_multilingual_transcription_short_form (line 2391) | def test_default_multilingual_transcription_short_form(self): method test_default_multilingual_transcription_long_form (line 2424) | def test_default_multilingual_transcription_long_form(self): method test_generate_with_prompt_ids_and_forced_decoder_ids (line 2456) | def test_generate_with_prompt_ids_and_forced_decoder_ids(self): method test_generate_with_prompt_ids_and_no_non_prompt_forced_decoder_ids (line 2476) | def test_generate_with_prompt_ids_and_no_non_prompt_forced_decoder_ids... method test_speculative_decoding_distil (line 2496) | def test_speculative_decoding_distil(self): method test_speculative_decoding_non_distil (line 2545) | def test_speculative_decoding_non_distil(self): method test_whisper_longform_single_batch (line 2593) | def test_whisper_longform_single_batch(self): method test_whisper_longform_prompt_ids (line 2630) | def test_whisper_longform_prompt_ids(self): method test_whisper_longform_single_batch_prev_cond (line 2680) | def test_whisper_longform_single_batch_prev_cond(self): method test_whisper_shortform_single_batch_prev_cond (line 2713) | def test_whisper_shortform_single_batch_prev_cond(self): method test_whisper_longform_single_batch_beam (line 2762) | def test_whisper_longform_single_batch_beam(self): method test_whisper_longform_multi_batch (line 2801) | def test_whisper_longform_multi_batch(self): method test_whisper_longform_multi_batch_prev_cond (line 2855) | def test_whisper_longform_multi_batch_prev_cond(self): method test_whisper_longform_multi_batch_hard (line 2899) | def test_whisper_longform_multi_batch_hard(self): method test_whisper_longform_multi_batch_hard_prev_cond (line 2951) | def test_whisper_longform_multi_batch_hard_prev_cond(self): method test_whisper_shortform_multi_batch_hard_prev_cond (line 3013) | def test_whisper_shortform_multi_batch_hard_prev_cond(self): method test_whisper_longform_no_speech_detection (line 3064) | def test_whisper_longform_no_speech_detection(self): method test_whisper_empty_longform (line 3123) | def test_whisper_empty_longform(self): method test_whisper_empty_longform_multi_gpu (line 3161) | def test_whisper_empty_longform_multi_gpu(self): method test_tiny_static_generation (line 3197) | def test_tiny_static_generation(self): method test_tiny_static_generation_long_form (line 3225) | def test_tiny_static_generation_long_form(self): function prepare_whisper_encoder_inputs_dict (line 3285) | def prepare_whisper_encoder_inputs_dict(config, input_features, head_mas... class WhisperEncoderModelTester (line 3292) | class WhisperEncoderModelTester: method __init__ (line 3293) | def __init__( method get_config (line 3341) | def get_config(self): method prepare_config_and_inputs (line 3363) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 3373) | def prepare_config_and_inputs_for_common(self): method get_subsampled_output_lengths (line 3377) | def get_subsampled_output_lengths(self, input_lengths): method encoder_seq_length (line 3388) | def encoder_seq_length(self): method create_and_check_model_forward (line 3391) | def create_and_check_model_forward(self, config, inputs_dict, use_weig... class WhisperEncoderModelTest (line 3405) | class WhisperEncoderModelTest(ModelTesterMixin, GenerationTesterMixin, u... method setUp (line 3414) | def setUp(self): method test_config (line 3419) | def test_config(self): method test_forward_signature (line 3422) | def test_forward_signature(self): method test_forward_pass (line 3434) | def test_forward_pass(self): method test_forward_pass_weighted_layer_sum (line 3438) | def test_forward_pass_weighted_layer_sum(self): method test_cpu_offload (line 3443) | def test_cpu_offload(self): method test_disk_offload_bin (line 3447) | def test_disk_offload_bin(self): method test_disk_offload_safetensors (line 3451) | def test_disk_offload_safetensors(self): method test_model_parallelism (line 3455) | def test_model_parallelism(self): method test_inputs_embeds (line 3459) | def test_inputs_embeds(self): method test_encoder_outputs (line 3464) | def test_encoder_outputs(self): method test_model_get_set_embeddings (line 3496) | def test_model_get_set_embeddings(self): method test_resize_tokens_embeddings (line 3508) | def test_resize_tokens_embeddings(self): method test_equivalence_pt_to_flax (line 3512) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 3584) | def test_equivalence_flax_to_pt(self): class WhisperStandaloneDecoderModelTester (line 3663) | class WhisperStandaloneDecoderModelTester: method __init__ (line 3664) | def __init__( method prepare_config_and_inputs (line 3714) | def prepare_config_and_inputs(self): method encoder_seq_length (line 3740) | def encoder_seq_length(self): method seq_length (line 3744) | def seq_length(self): method get_config (line 3747) | def get_config(self): method prepare_config_and_inputs_for_common (line 3771) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_decoder (line 3778) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_decoder_model_past (line 3785) | def create_and_check_decoder_model_past(self, config, input_ids): method create_and_check_decoder_model_attention_mask_past (line 3815) | def create_and_check_decoder_model_attention_mask_past(self, config, i... class WhisperStandaloneDecoderModelTest (line 3858) | class WhisperStandaloneDecoderModelTest(ModelTesterMixin, GenerationTest... method setUp (line 3866) | def setUp(self): method test_config (line 3870) | def test_config(self): method test_decoder_model_past (line 3873) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 3879) | def test_decoder_model_attn_mask_past(self): method test_custom_4d_attention_mask (line 3888) | def test_custom_4d_attention_mask(self): method test_generate_without_input_ids (line 3892) | def test_generate_without_input_ids(self): method test_inputs_embeds_matches_input_ids_with_generate (line 3897) | def test_inputs_embeds_matches_input_ids_with_generate(self): method test_retain_grad_hidden_states_attentions (line 3902) | def test_retain_grad_hidden_states_attentions(self): method test_save_load_fast_init_from_base (line 3906) | def test_save_load_fast_init_from_base(self): method test_flash_attn_2_generate_reuse_cache (line 3912) | def test_flash_attn_2_generate_reuse_cache(self): method test_flash_attn_2_generate_padding_right (line 3918) | def test_flash_attn_2_generate_padding_right(self): method test_flash_attn_2_inference (line 3924) | def test_flash_attn_2_inference(self): method test_flash_attn_2_inference_padding_right (line 3930) | def test_flash_attn_2_inference_padding_right(self): FILE: mplsandbox_for_rl/transformers/tests/models/whisper/test_processor_whisper.py class WhisperProcessorTest (line 38) | class WhisperProcessorTest(unittest.TestCase): method setUp (line 39) | def setUp(self): method get_tokenizer (line 43) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 46) | def get_feature_extractor(self, **kwargs): method tearDown (line 49) | def tearDown(self): method test_save_load_pretrained_default (line 52) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 67) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 84) | def test_feature_extractor(self): method test_tokenizer (line 98) | def test_tokenizer(self): method test_tokenizer_decode (line 113) | def test_tokenizer_decode(self): method test_model_input_names (line 126) | def test_model_input_names(self): method test_get_decoder_prompt_ids (line 138) | def test_get_decoder_prompt_ids(self): method test_get_prompt_ids (line 152) | def test_get_prompt_ids(self): method test_empty_get_prompt_ids (line 160) | def test_empty_get_prompt_ids(self): method test_get_prompt_ids_with_special_tokens (line 168) | def test_get_prompt_ids_with_special_tokens(self): FILE: mplsandbox_for_rl/transformers/tests/models/whisper/test_tokenization_whisper.py class WhisperTokenizerTest (line 35) | class WhisperTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 43) | def setUp(self): method test_convert_token_and_id (line 50) | def test_convert_token_and_id(self): method test_get_vocab (line 58) | def test_get_vocab(self): method test_vocab_size (line 66) | def test_vocab_size(self): method test_full_tokenizer (line 69) | def test_full_tokenizer(self): method test_tokenizer_slow_store_full_signature (line 95) | def test_tokenizer_slow_store_full_signature(self): method test_tokenizer_fast_store_full_signature (line 99) | def test_tokenizer_fast_store_full_signature(self): method test_special_tokens_initialization (line 103) | def test_special_tokens_initialization(self): method test_tokenizer_integration (line 112) | def test_tokenizer_integration(self): method test_output_offsets (line 119) | def test_output_offsets(self): method test_find_longest_common_subsequence (line 149) | def test_find_longest_common_subsequence(self): method test_skip_special_tokens_skips_prompt_ids (line 195) | def test_skip_special_tokens_skips_prompt_ids(self): method test_skip_special_tokens_with_timestamps (line 214) | def test_skip_special_tokens_with_timestamps(self): method test_fast_tokenizer_get_prompt_ids (line 246) | def test_fast_tokenizer_get_prompt_ids(self): method test_tokenizer_decode_prompt (line 256) | def test_tokenizer_decode_prompt(self): method test_combine_tokens_into_words (line 289) | def test_combine_tokens_into_words(self): method test_basic_normalizer (line 307) | def test_basic_normalizer(self): method test_decode_asr_with_word_level_timestamps (line 341) | def test_decode_asr_with_word_level_timestamps(self): class SpeechToTextTokenizerMultilinguialTest (line 378) | class SpeechToTextTokenizerMultilinguialTest(unittest.TestCase): method setUpClass (line 382) | def setUpClass(cls): method test_tokenizer_equivalence (line 386) | def test_tokenizer_equivalence(self): method test_tokenizer_special (line 414) | def test_tokenizer_special(self): method test_vocab_size (line 443) | def test_vocab_size(self): method test_tokenizer_decode_ignores_language_codes (line 447) | def test_tokenizer_decode_ignores_language_codes(self): method test_batch_encoding (line 455) | def test_batch_encoding(self): method test_set_prefix_tokens (line 473) | def test_set_prefix_tokens(self): method test_batch_encoding_decoding (line 495) | def test_batch_encoding_decoding(self): method test_offset_decoding (line 502) | def test_offset_decoding(self): FILE: mplsandbox_for_rl/transformers/tests/models/x_clip/test_modeling_x_clip.py class XCLIPVisionModelTester (line 51) | class XCLIPVisionModelTester: method __init__ (line 52) | def __init__( method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method get_config (line 100) | def get_config(self): method create_and_check_model (line 116) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 131) | def prepare_config_and_inputs_for_common(self): class XCLIPVisionModelTest (line 139) | class XCLIPVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 151) | def setUp(self): method test_config (line 157) | def test_config(self): method test_inputs_embeds (line 161) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 164) | def test_model_get_set_embeddings(self): method test_forward_signature (line 173) | def test_forward_signature(self): method test_model (line 185) | def test_model(self): method test_training (line 190) | def test_training(self): method test_training_gradient_checkpointing (line 194) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 200) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 206) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_save_load_fast_init_from_base (line 210) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 214) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 218) | def test_model_from_pretrained(self): method test_gradient_checkpointing_backward_compatibility (line 223) | def test_gradient_checkpointing_backward_compatibility(self): method test_attention_outputs (line 236) | def test_attention_outputs(self): method test_multi_gpu_data_parallel_forward (line 291) | def test_multi_gpu_data_parallel_forward(self): class XCLIPTextModelTester (line 322) | class XCLIPTextModelTester: method __init__ (line 323) | def __init__( method prepare_config_and_inputs (line 359) | def prepare_config_and_inputs(self): method get_config (line 377) | def get_config(self): method create_and_check_model (line 390) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 400) | def prepare_config_and_inputs_for_common(self): class XCLIPTextModelTest (line 408) | class XCLIPTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 414) | def setUp(self): method test_config (line 418) | def test_config(self): method test_model (line 421) | def test_model(self): method test_training (line 426) | def test_training(self): method test_training_gradient_checkpointing (line 430) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 436) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 442) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_inputs_embeds (line 446) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 450) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 454) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 458) | def test_model_from_pretrained(self): class XCLIPModelTester (line 464) | class XCLIPModelTester: method __init__ (line 465) | def __init__( method prepare_config_and_inputs (line 487) | def prepare_config_and_inputs(self): method get_config (line 504) | def get_config(self): method create_and_check_model (line 511) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 524) | def prepare_config_and_inputs_for_common(self): class XCLIPModelTest (line 537) | class XCLIPModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method setUp (line 548) | def setUp(self): method test_model (line 551) | def test_model(self): method test_hidden_states_output (line 556) | def test_hidden_states_output(self): method test_inputs_embeds (line 560) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 564) | def test_retain_grad_hidden_states_attentions(self): method test_model_get_set_embeddings (line 568) | def test_model_get_set_embeddings(self): method test_feed_forward_chunking (line 572) | def test_feed_forward_chunking(self): method test_initialization (line 576) | def test_initialization(self): method _create_and_check_torchscript (line 601) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 672) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 688) | def test_model_from_pretrained(self): function prepare_video (line 695) | def prepare_video(): class XCLIPModelIntegrationTest (line 705) | class XCLIPModelIntegrationTest(unittest.TestCase): method test_inference (line 707) | def test_inference(self): FILE: mplsandbox_for_rl/transformers/tests/models/xglm/test_modeling_flax_xglm.py class FlaxXGLMModelTester (line 45) | class FlaxXGLMModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 87) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 113) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_decoder (line 119) | def prepare_config_and_inputs_for_decoder(self): method check_use_cache_forward (line 133) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 163) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxXGLMModelTest (line 198) | class FlaxXGLMModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixin,... method setUp (line 202) | def setUp(self): method test_use_cache_forward (line 205) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 210) | def test_use_cache_forward_with_attn_mask(self): method test_batch_generation (line 218) | def test_batch_generation(self): method test_equivalence_pt_to_flax (line 242) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 292) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 342) | def test_model_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/models/xglm/test_modeling_tf_xglm.py class TFXGLMModelTester (line 38) | class TFXGLMModelTester: method __init__ (line 43) | def __init__( method get_large_model_config (line 83) | def get_large_model_config(self): method prepare_config_and_inputs (line 86) | def prepare_config_and_inputs(self): method get_config (line 106) | def get_config(self): method prepare_config_and_inputs_for_common (line 125) | def prepare_config_and_inputs_for_common(self): class TFXGLMModelTest (line 144) | class TFXGLMModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 154) | def setUp(self): method test_config (line 158) | def test_config(self): method test_model_from_pretrained (line 162) | def test_model_from_pretrained(self): method test_resize_token_embeddings (line 168) | def test_resize_token_embeddings(self): class TFXGLMModelLanguageGenerationTest (line 173) | class TFXGLMModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xglm (line 175) | def test_lm_generate_xglm(self, verify_outputs=True): method test_xglm_sample (line 185) | def test_xglm_sample(self): method test_batch_generation (line 203) | def test_batch_generation(self): FILE: mplsandbox_for_rl/transformers/tests/models/xglm/test_modeling_xglm.py class XGLMModelTester (line 42) | class XGLMModelTester: method __init__ (line 43) | def __init__( method get_large_model_config (line 84) | def get_large_model_config(self): method prepare_config_and_inputs (line 87) | def prepare_config_and_inputs( method get_config (line 107) | def get_config( method prepare_config_and_inputs_for_decoder (line 128) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_xglm_model (line 148) | def create_and_check_xglm_model(self, config, input_ids, input_mask, h... method create_and_check_xglm_model_past (line 159) | def create_and_check_xglm_model_past(self, config, input_ids, input_ma... method create_and_check_xglm_model_attention_mask_past (line 189) | def create_and_check_xglm_model_attention_mask_past(self, config, inpu... method create_and_check_xglm_model_past_large_inputs (line 224) | def create_and_check_xglm_model_past_large_inputs(self, config, input_... method create_and_check_lm_head_model (line 256) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_forward_and_backwards (line 265) | def create_and_check_forward_and_backwards( method create_and_check_xglm_weight_initialization (line 278) | def create_and_check_xglm_weight_initialization(self, config, *args): method prepare_config_and_inputs_for_common (line 286) | def prepare_config_and_inputs_for_common(self): class XGLMModelTest (line 305) | class XGLMModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method setUp (line 315) | def setUp(self): method test_config (line 319) | def test_config(self): method test_xglm_model (line 322) | def test_xglm_model(self): method test_xglm_model_past (line 326) | def test_xglm_model_past(self): method test_xglm_model_att_mask_past (line 330) | def test_xglm_model_att_mask_past(self): method test_xglm_model_past_large_inputs (line 334) | def test_xglm_model_past_large_inputs(self): method test_xglm_lm_head_model (line 338) | def test_xglm_lm_head_model(self): method test_xglm_gradient_checkpointing (line 342) | def test_xglm_gradient_checkpointing(self): method test_xglm_weight_initialization (line 346) | def test_xglm_weight_initialization(self): method test_model_from_pretrained (line 351) | def test_model_from_pretrained(self): method test_model_parallelism (line 357) | def test_model_parallelism(self): class XGLMModelLanguageGenerationTest (line 362) | class XGLMModelLanguageGenerationTest(unittest.TestCase): method tearDown (line 363) | def tearDown(self): method _test_lm_generate_xglm_helper (line 369) | def _test_lm_generate_xglm_helper( method test_batch_generation (line 388) | def test_batch_generation(self): method test_lm_generate_xglm (line 431) | def test_lm_generate_xglm(self): method test_lm_generate_xglm_with_gradient_checkpointing (line 435) | def test_lm_generate_xglm_with_gradient_checkpointing(self): method test_xglm_sample (line 439) | def test_xglm_sample(self): method test_xglm_sample_max_time (line 459) | def test_xglm_sample_max_time(self): method test_batched_nan_fp16 (line 501) | def test_batched_nan_fp16(self): FILE: mplsandbox_for_rl/transformers/tests/models/xglm/test_tokenization_xglm.py class XGLMTokenizationTest (line 33) | class XGLMTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 40) | def setUp(self): method test_convert_token_and_id (line 47) | def test_convert_token_and_id(self): method test_get_vocab (line 55) | def test_get_vocab(self): method test_vocab_size (line 62) | def test_vocab_size(self): method test_full_tokenizer (line 65) | def test_full_tokenizer(self): method big_tokenizer (line 141) | def big_tokenizer(self): method test_picklable_without_disk (line 144) | def test_picklable_without_disk(self): method test_rust_and_python_full_tokenizers (line 151) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_base_easy_symbols (line 174) | def test_tokenization_base_easy_symbols(self): method test_tokenization_base_hard_symbols (line 181) | def test_tokenization_base_hard_symbols(self): method test_tokenizer_integration (line 191) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlm/test_modeling_tf_xlm.py class TFXLMModelTester (line 43) | class TFXLMModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 78) | def prepare_config_and_inputs(self): method create_and_check_xlm_model (line 133) | def create_and_check_xlm_model( method create_and_check_xlm_lm_head (line 153) | def create_and_check_xlm_lm_head( method create_and_check_xlm_qa (line 174) | def create_and_check_xlm_qa( method create_and_check_xlm_sequence_classif (line 195) | def create_and_check_xlm_sequence_classif( method create_and_check_xlm_for_token_classification (line 215) | def create_and_check_xlm_for_token_classification( method create_and_check_xlm_for_multiple_choice (line 233) | def create_and_check_xlm_for_multiple_choice( method prepare_config_and_inputs_for_common (line 258) | def prepare_config_and_inputs_for_common(self): class TFXLMModelTest (line 281) | class TFXLMModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T... method is_pipeline_test_to_skip (line 314) | def is_pipeline_test_to_skip( method setUp (line 329) | def setUp(self): method test_config (line 333) | def test_config(self): method test_xlm_model (line 336) | def test_xlm_model(self): method test_xlm_lm_head (line 340) | def test_xlm_lm_head(self): method test_xlm_qa (line 344) | def test_xlm_qa(self): method test_xlm_sequence_classif (line 348) | def test_xlm_sequence_classif(self): method test_for_token_classification (line 352) | def test_for_token_classification(self): method test_for_multiple_choice (line 356) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 361) | def test_model_from_pretrained(self): class TFXLMModelLanguageGenerationTest (line 368) | class TFXLMModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xlm_mlm_en_2048 (line 370) | def test_lm_generate_xlm_mlm_en_2048(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlm/test_modeling_xlm.py class XLMModelTester (line 42) | class XLMModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 103) | def prepare_config_and_inputs(self): method get_config (line 140) | def get_config(self): method create_and_check_xlm_model (line 162) | def create_and_check_xlm_model( method create_and_check_xlm_lm_head (line 182) | def create_and_check_xlm_lm_head( method create_and_check_xlm_simple_qa (line 202) | def create_and_check_xlm_simple_qa( method create_and_check_xlm_qa (line 225) | def create_and_check_xlm_qa( method create_and_check_xlm_sequence_classif (line 277) | def create_and_check_xlm_sequence_classif( method create_and_check_xlm_token_classif (line 298) | def create_and_check_xlm_token_classif( method create_and_check_xlm_for_multiple_choice (line 318) | def create_and_check_xlm_for_multiple_choice( method prepare_config_and_inputs_for_common (line 345) | def prepare_config_and_inputs_for_common(self): class XLMModelTest (line 363) | class XLMModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTest... method is_pipeline_test_to_skip (line 395) | def is_pipeline_test_to_skip( method _prepare_for_class (line 411) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 425) | def setUp(self): method test_config (line 429) | def test_config(self): method test_xlm_model (line 432) | def test_xlm_model(self): method test_xlm_model_with_sinusoidal_encodings (line 437) | def test_xlm_model_with_sinusoidal_encodings(self): method test_xlm_lm_head (line 444) | def test_xlm_lm_head(self): method test_xlm_simple_qa (line 448) | def test_xlm_simple_qa(self): method test_xlm_qa (line 452) | def test_xlm_qa(self): method test_xlm_sequence_classif (line 456) | def test_xlm_sequence_classif(self): method test_xlm_token_classif (line 460) | def test_xlm_token_classif(self): method test_xlm_for_multiple_choice (line 464) | def test_xlm_for_multiple_choice(self): method _check_attentions_for_generate (line 468) | def _check_attentions_for_generate( method _check_hidden_states_for_generate (line 493) | def _check_hidden_states_for_generate( method test_model_from_pretrained (line 515) | def test_model_from_pretrained(self): class XLMModelLanguageGenerationTest (line 522) | class XLMModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xlm_mlm_en_2048 (line 524) | def test_lm_generate_xlm_mlm_en_2048(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlm/test_tokenization_xlm.py class XLMTokenizationTest (line 27) | class XLMTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 32) | def setUp(self): method get_input_output_texts (line 69) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 74) | def test_full_tokenizer(self): method test_sequence_builders (line 88) | def test_sequence_builders(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlm_roberta/test_modeling_flax_xlm_roberta.py class FlaxXLMRobertaModelIntegrationTest (line 32) | class FlaxXLMRobertaModelIntegrationTest(unittest.TestCase): method test_flax_xlm_roberta_base (line 34) | def test_flax_xlm_roberta_base(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlm_roberta/test_modeling_tf_xlm_roberta.py class TFFlaubertModelIntegrationTest (line 34) | class TFFlaubertModelIntegrationTest(unittest.TestCase): method test_output_embeds_base_model (line 36) | def test_output_embeds_base_model(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlm_roberta/test_modeling_xlm_roberta.py class XLMRobertaModelIntegrationTest (line 32) | class XLMRobertaModelIntegrationTest(unittest.TestCase): method test_xlm_roberta_base (line 34) | def test_xlm_roberta_base(self): method test_xlm_roberta_large (line 53) | def test_xlm_roberta_large(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlm_roberta/test_tokenization_xlm_roberta.py class XLMRobertaTokenizationTest (line 33) | class XLMRobertaTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 40) | def setUp(self): method test_convert_token_and_id (line 47) | def test_convert_token_and_id(self): method test_get_vocab (line 55) | def test_get_vocab(self): method test_vocab_size (line 63) | def test_vocab_size(self): method test_full_tokenizer (line 66) | def test_full_tokenizer(self): method test_save_pretrained (line 143) | def test_save_pretrained(self): method big_tokenizer (line 215) | def big_tokenizer(self): method test_picklable_without_disk (line 218) | def test_picklable_without_disk(self): method test_rust_and_python_full_tokenizers (line 225) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_base_easy_symbols (line 248) | def test_tokenization_base_easy_symbols(self): method test_tokenization_base_hard_symbols (line 258) | def test_tokenization_base_hard_symbols(self): method test_tokenizer_integration (line 337) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlm_roberta_xl/test_modeling_xlm_roberta_xl.py class XLMRobertaXLModelTester (line 46) | class XLMRobertaXLModelTester: method __init__ (line 47) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method get_config (line 118) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 133) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 160) | def create_and_check_model( method create_and_check_model_as_decoder (line 173) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 206) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 224) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 292) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 301) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 311) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 329) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 345) | def prepare_config_and_inputs_for_common(self): class XLMRobertaXLModelTest (line 361) | class XLMRobertaXLModelTest(ModelTesterMixin, GenerationTesterMixin, Pip... method is_pipeline_test_to_skip (line 393) | def is_pipeline_test_to_skip( method setUp (line 401) | def setUp(self): method test_config (line 405) | def test_config(self): method test_model (line 408) | def test_model(self): method test_model_various_embeddings (line 412) | def test_model_various_embeddings(self): method test_model_as_decoder (line 418) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 422) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 450) | def test_for_causal_lm(self): method test_decoder_model_past_with_large_inputs (line 454) | def test_decoder_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs_relative_pos_emb (line 458) | def test_decoder_model_past_with_large_inputs_relative_pos_emb(self): method test_for_masked_lm (line 463) | def test_for_masked_lm(self): method test_for_token_classification (line 467) | def test_for_token_classification(self): method test_for_multiple_choice (line 471) | def test_for_multiple_choice(self): method test_for_question_answering (line 475) | def test_for_question_answering(self): method test_create_position_ids_respects_padding_index (line 479) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 497) | def test_create_position_ids_from_inputs_embeds(self): class XLMRobertaModelXLIntegrationTest (line 520) | class XLMRobertaModelXLIntegrationTest(unittest.TestCase): method test_xlm_roberta_xl (line 522) | def test_xlm_roberta_xl(self): method test_xlm_roberta_xxl (line 541) | def test_xlm_roberta_xxl(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlnet/test_modeling_tf_xlnet.py class TFXLNetModelTester (line 44) | class TFXLNetModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 76) | def prepare_config_and_inputs(self): method set_seed (line 133) | def set_seed(self): method create_and_check_xlnet_base_model (line 137) | def create_and_check_xlnet_base_model( method create_and_check_xlnet_lm_head (line 170) | def create_and_check_xlnet_lm_head( method create_and_check_xlnet_qa (line 206) | def create_and_check_xlnet_qa( method create_and_check_xlnet_sequence_classif (line 232) | def create_and_check_xlnet_sequence_classif( method create_and_check_xlnet_for_token_classification (line 256) | def create_and_check_xlnet_for_token_classification( method create_and_check_xlnet_for_multiple_choice (line 284) | def create_and_check_xlnet_for_multiple_choice( method prepare_config_and_inputs_for_common (line 316) | def prepare_config_and_inputs_for_common(self): class TFXLNetModelTest (line 336) | class TFXLNetModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest... method test_xla_generate_contrastive (line 370) | def test_xla_generate_contrastive(self): method is_pipeline_test_to_skip (line 374) | def is_pipeline_test_to_skip( method setUp (line 380) | def setUp(self): method test_config (line 384) | def test_config(self): method test_xlnet_base_model (line 387) | def test_xlnet_base_model(self): method test_xlnet_lm_head (line 392) | def test_xlnet_lm_head(self): method test_xlnet_sequence_classif (line 397) | def test_xlnet_sequence_classif(self): method test_xlnet_token_classification (line 402) | def test_xlnet_token_classification(self): method test_xlnet_qa (line 406) | def test_xlnet_qa(self): method test_xlnet_for_multiple_choice (line 411) | def test_xlnet_for_multiple_choice(self): method test_model_from_pretrained (line 416) | def test_model_from_pretrained(self): method test_compile_tf_model (line 422) | def test_compile_tf_model(self): method test_loss_computation (line 426) | def test_loss_computation(self): class TFXLNetModelLanguageGenerationTest (line 490) | class TFXLNetModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xlnet_base_cased (line 492) | def test_lm_generate_xlnet_base_cased(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlnet/test_modeling_xlnet.py class XLNetModelTester (line 42) | class XLNetModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 98) | def prepare_config_and_inputs(self): method get_config (line 149) | def get_config(self): method set_seed (line 169) | def set_seed(self): method create_and_check_xlnet_base_model (line 173) | def create_and_check_xlnet_base_model( method create_and_check_use_mems_train (line 210) | def create_and_check_use_mems_train( method create_and_check_xlnet_model_use_mems (line 239) | def create_and_check_xlnet_model_use_mems( method create_and_check_xlnet_base_model_with_att_output (line 305) | def create_and_check_xlnet_base_model_with_att_output( method create_and_check_xlnet_lm_head (line 331) | def create_and_check_xlnet_lm_head( method create_and_check_xlnet_qa (line 370) | def create_and_check_xlnet_qa( method create_and_check_xlnet_token_classif (line 433) | def create_and_check_xlnet_token_classif( method create_and_check_xlnet_sequence_classif (line 462) | def create_and_check_xlnet_sequence_classif( method prepare_config_and_inputs_for_common (line 491) | def prepare_config_and_inputs_for_common(self): class XLNetModelTest (line 512) | class XLNetModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe... method is_pipeline_test_to_skip (line 545) | def is_pipeline_test_to_skip( method _prepare_for_class (line 554) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 568) | def setUp(self): method test_config (line 572) | def test_config(self): method test_xlnet_base_model (line 575) | def test_xlnet_base_model(self): method test_xlnet_base_model_use_mems (line 580) | def test_xlnet_base_model_use_mems(self): method test_seq_classification_use_mems_train (line 586) | def test_seq_classification_use_mems_train(self): method test_xlnet_base_model_with_att_output (line 590) | def test_xlnet_base_model_with_att_output(self): method test_xlnet_lm_head (line 595) | def test_xlnet_lm_head(self): method test_xlnet_sequence_classif (line 600) | def test_xlnet_sequence_classif(self): method test_xlnet_token_classif (line 605) | def test_xlnet_token_classif(self): method test_xlnet_qa (line 610) | def test_xlnet_qa(self): method test_retain_grad_hidden_states_attentions (line 616) | def test_retain_grad_hidden_states_attentions(self): method _mock_init_weights (line 620) | def _mock_init_weights(self, module): method _check_hidden_states_for_generate (line 631) | def _check_hidden_states_for_generate( method _check_attentions_for_generate (line 655) | def _check_attentions_for_generate( method test_model_from_pretrained (line 690) | def test_model_from_pretrained(self): class XLNetModelLanguageGenerationTest (line 697) | class XLNetModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xlnet_base_cased (line 699) | def test_lm_generate_xlnet_base_cased(self): FILE: mplsandbox_for_rl/transformers/tests/models/xlnet/test_tokenization_xlnet.py class XLNetTokenizationTest (line 29) | class XLNetTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method test_convert_token_and_id (line 43) | def test_convert_token_and_id(self): method test_get_vocab (line 51) | def test_get_vocab(self): method test_vocab_size (line 59) | def test_vocab_size(self): method test_full_tokenizer (line 62) | def test_full_tokenizer(self): method test_tokenizer_lower (line 128) | def test_tokenizer_lower(self): method test_tokenizer_no_lower (line 159) | def test_tokenizer_no_lower(self): method test_sequence_builders (line 189) | def test_sequence_builders(self): method test_tokenizer_integration (line 202) | def test_tokenizer_integration(self): FILE: mplsandbox_for_rl/transformers/tests/models/xmod/test_modeling_xmod.py class XmodModelTester (line 42) | class XmodModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 91) | def prepare_config_and_inputs(self): method get_config (line 114) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 130) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 157) | def create_and_check_model( method create_and_check_model_as_decoder (line 170) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 203) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 221) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 289) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 298) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 308) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 326) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 342) | def prepare_config_and_inputs_for_common(self): class XmodModelTest (line 358) | class XmodModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes... method is_pipeline_test_to_skip (line 388) | def is_pipeline_test_to_skip( method setUp (line 396) | def setUp(self): method test_config (line 400) | def test_config(self): method test_model (line 403) | def test_model(self): method test_model_various_embeddings (line 407) | def test_model_various_embeddings(self): method test_model_as_decoder (line 413) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 417) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 445) | def test_for_causal_lm(self): method test_decoder_model_past_with_large_inputs (line 449) | def test_decoder_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs_relative_pos_emb (line 453) | def test_decoder_model_past_with_large_inputs_relative_pos_emb(self): method test_for_masked_lm (line 458) | def test_for_masked_lm(self): method test_for_token_classification (line 462) | def test_for_token_classification(self): method test_for_multiple_choice (line 466) | def test_for_multiple_choice(self): method test_for_question_answering (line 470) | def test_for_question_answering(self): method test_create_position_ids_respects_padding_index (line 474) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 492) | def test_create_position_ids_from_inputs_embeds(self): method test_set_default_language (line 513) | def test_set_default_language(self): method test_freeze_embeddings_and_language_adapters (line 521) | def test_freeze_embeddings_and_language_adapters(self): class XmodModelIntegrationTest (line 533) | class XmodModelIntegrationTest(unittest.TestCase): method test_xmod_base (line 535) | def test_xmod_base(self): method test_xmod_large_prenorm (line 568) | def test_xmod_large_prenorm(self): method test_multilingual_batch (line 604) | def test_multilingual_batch(self): method test_end_to_end_mask_fill (line 630) | def test_end_to_end_mask_fill(self): FILE: mplsandbox_for_rl/transformers/tests/models/yolos/test_image_processing_yolos.py class YolosImageProcessingTester (line 39) | class YolosImageProcessingTester(unittest.TestCase): method __init__ (line 40) | def __init__( method prepare_image_processor_dict (line 72) | def prepare_image_processor_dict(self): method get_expected_values (line 84) | def get_expected_values(self, image_inputs, batched=False): method expected_output_image_shape (line 127) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 131) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class YolosImageProcessingTest (line 145) | class YolosImageProcessingTest(AnnotationFormatTestMixin, ImageProcessin... method setUp (line 148) | def setUp(self): method image_processor_dict (line 153) | def image_processor_dict(self): method test_image_processor_properties (line 156) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 164) | def test_image_processor_from_dict_with_kwargs(self): method test_equivalence_padding (line 175) | def test_equivalence_padding(self): method test_resize_max_size_respected (line 202) | def test_resize_max_size_respected(self, image_size, longest_edge, sho... method test_call_pytorch_with_coco_detection_annotations (line 220) | def test_call_pytorch_with_coco_detection_annotations(self): method test_call_pytorch_with_coco_panoptic_annotations (line 264) | def test_call_pytorch_with_coco_panoptic_annotations(self): method test_batched_coco_detection_annotations (line 314) | def test_batched_coco_detection_annotations(self): method test_batched_coco_panoptic_annotations (line 432) | def test_batched_coco_panoptic_annotations(self): method test_max_width_max_height_resizing_and_pad_strategy (line 555) | def test_max_width_max_height_resizing_and_pad_strategy(self): FILE: mplsandbox_for_rl/transformers/tests/models/yolos/test_modeling_yolos.py class YolosModelTester (line 41) | class YolosModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method get_config (line 111) | def get_config(self): method create_and_check_model (line 130) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_object_detection (line 139) | def create_and_check_for_object_detection(self, config, pixel_values, ... method prepare_config_and_inputs_for_common (line 156) | def prepare_config_and_inputs_for_common(self): class YolosModelTest (line 164) | class YolosModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes... method _prepare_for_class (line 183) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 202) | def setUp(self): method test_config (line 206) | def test_config(self): method test_inputs_embeds (line 210) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 213) | def test_model_get_set_embeddings(self): method test_model (line 222) | def test_model(self): method test_attention_outputs (line 226) | def test_attention_outputs(self): method test_hidden_states_output (line 281) | def test_hidden_states_output(self): method test_for_object_detection (line 317) | def test_for_object_detection(self): method test_model_from_pretrained (line 322) | def test_model_from_pretrained(self): function prepare_img (line 329) | def prepare_img(): class YolosModelIntegrationTest (line 336) | class YolosModelIntegrationTest(unittest.TestCase): method default_image_processor (line 338) | def default_image_processor(self): method test_inference_object_detection_head (line 342) | def test_inference_object_detection_head(self): FILE: mplsandbox_for_rl/transformers/tests/models/yoso/test_modeling_yoso.py class YosoModelTester (line 40) | class YosoModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method get_pipeline_config (line 128) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 133) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 160) | def create_and_check_model( method create_and_check_model_as_decoder (line 171) | def create_and_check_model_as_decoder( method create_and_check_for_masked_lm (line 203) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 212) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 228) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 238) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 248) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 266) | def prepare_config_and_inputs_for_common(self): class YosoModelTest (line 282) | class YosoModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test... method setUp (line 313) | def setUp(self): method test_config (line 317) | def test_config(self): method test_model (line 320) | def test_model(self): method test_model_various_embeddings (line 324) | def test_model_various_embeddings(self): method test_for_masked_lm (line 330) | def test_for_masked_lm(self): method test_for_multiple_choice (line 334) | def test_for_multiple_choice(self): method test_for_question_answering (line 338) | def test_for_question_answering(self): method test_for_sequence_classification (line 342) | def test_for_sequence_classification(self): method test_for_token_classification (line 346) | def test_for_token_classification(self): method test_model_from_pretrained (line 351) | def test_model_from_pretrained(self): method test_attention_outputs (line 357) | def test_attention_outputs(self): class YosoModelIntegrationTest (line 362) | class YosoModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 364) | def test_inference_no_head(self): method test_inference_masked_lm (line 381) | def test_inference_masked_lm(self): method test_inference_masked_lm_long_input (line 400) | def test_inference_masked_lm_long_input(self): FILE: mplsandbox_for_rl/transformers/tests/models/zoedepth/test_image_processing_zoedepth.py class ZoeDepthImageProcessingTester (line 31) | class ZoeDepthImageProcessingTester(unittest.TestCase): method __init__ (line 32) | def __init__( method prepare_image_processor_dict (line 66) | def prepare_image_processor_dict(self): method expected_output_image_shape (line 78) | def expected_output_image_shape(self, images): method prepare_image_inputs (line 81) | def prepare_image_inputs(self, equal_resolution=False, numpify=False, ... class ZoeDepthImageProcessingTest (line 95) | class ZoeDepthImageProcessingTest(ImageProcessingTestMixin, unittest.Tes... method setUp (line 98) | def setUp(self): method image_processor_dict (line 104) | def image_processor_dict(self): method test_image_processor_properties (line 107) | def test_image_processor_properties(self): method test_image_processor_from_dict_with_kwargs (line 119) | def test_image_processor_from_dict_with_kwargs(self): method test_ensure_multiple_of (line 126) | def test_ensure_multiple_of(self): method test_keep_aspect_ratio (line 156) | def test_keep_aspect_ratio(self): FILE: mplsandbox_for_rl/transformers/tests/models/zoedepth/test_modeling_zoedepth.py class ZoeDepthModelTester (line 40) | class ZoeDepthModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 85) | def prepare_config_and_inputs(self): method get_config (line 96) | def get_config(self): method get_backbone_config (line 106) | def get_backbone_config(self): method create_and_check_for_depth_estimation (line 120) | def create_and_check_for_depth_estimation(self, config, pixel_values, ... method prepare_config_and_inputs_for_common (line 128) | def prepare_config_and_inputs_for_common(self): class ZoeDepthModelTest (line 136) | class ZoeDepthModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.... method setUp (line 149) | def setUp(self): method test_config (line 155) | def test_config(self): method test_inputs_embeds (line 159) | def test_inputs_embeds(self): method test_model_get_set_embeddings (line 163) | def test_model_get_set_embeddings(self): method test_for_depth_estimation (line 166) | def test_for_depth_estimation(self): method test_model_common_attributes (line 171) | def test_model_common_attributes(self): method test_save_load_fast_init_from_base (line 175) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 179) | def test_save_load_fast_init_to_base(self): method test_training (line 183) | def test_training(self): method test_training_gradient_checkpointing (line 187) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 191) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 195) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_model_from_pretrained (line 199) | def test_model_from_pretrained(self): function prepare_img (line 206) | def prepare_img(): class ZoeDepthModelIntegrationTest (line 214) | class ZoeDepthModelIntegrationTest(unittest.TestCase): method test_inference_depth_estimation (line 215) | def test_inference_depth_estimation(self): method test_inference_depth_estimation_multiple_heads (line 237) | def test_inference_depth_estimation_multiple_heads(self): FILE: mplsandbox_for_rl/transformers/tests/optimization/test_optimization.py function unwrap_schedule (line 44) | def unwrap_schedule(scheduler, num_steps=10): function unwrap_and_save_reload_schedule (line 52) | def unwrap_and_save_reload_schedule(scheduler, num_steps=10): class OptimizationTest (line 68) | class OptimizationTest(unittest.TestCase): method assertListAlmostEqual (line 69) | def assertListAlmostEqual(self, list1, list2, tol): method test_adam_w (line 74) | def test_adam_w(self): method test_adafactor (line 88) | def test_adafactor(self): class ScheduleInitTest (line 115) | class ScheduleInitTest(unittest.TestCase): method assertListAlmostEqual (line 120) | def assertListAlmostEqual(self, list1, list2, tol, msg=None): method test_schedulers (line 125) | def test_schedulers(self): method test_get_scheduler (line 180) | def test_get_scheduler(self): class LambdaScheduleWrapper (line 202) | class LambdaScheduleWrapper: method __init__ (line 205) | def __init__(self, fn): method __call__ (line 208) | def __call__(self, *args, **kwargs): method wrap_scheduler (line 212) | def wrap_scheduler(cls, scheduler): FILE: mplsandbox_for_rl/transformers/tests/optimization/test_optimization_tf.py class OptimizationFTest (line 30) | class OptimizationFTest(unittest.TestCase): method assertListAlmostEqual (line 31) | def assertListAlmostEqual(self, list1, list2, tol): method testGradientAccumulator (line 36) | def testGradientAccumulator(self): method testGradientAccumulatorDistributionStrategy (line 50) | def testGradientAccumulatorDistributionStrategy(self): FILE: mplsandbox_for_rl/transformers/tests/peft_integration/test_peft_integration.py class PeftTesterMixin (line 39) | class PeftTesterMixin: class PeftIntegrationTester (line 47) | class PeftIntegrationTester(unittest.TestCase, PeftTesterMixin): method _check_lora_correctly_converted (line 52) | def _check_lora_correctly_converted(self, model): method test_peft_from_pretrained (line 67) | def test_peft_from_pretrained(self): method test_peft_state_dict (line 82) | def test_peft_state_dict(self): method test_peft_save_pretrained (line 96) | def test_peft_save_pretrained(self): method test_peft_enable_disable_adapters (line 125) | def test_peft_enable_disable_adapters(self): method test_peft_add_adapter (line 154) | def test_peft_add_adapter(self): method test_peft_add_adapter_from_pretrained (line 172) | def test_peft_add_adapter_from_pretrained(self): method test_peft_add_adapter_modules_to_save (line 192) | def test_peft_add_adapter_modules_to_save(self): method test_peft_add_adapter_training_gradient_checkpointing (line 230) | def test_peft_add_adapter_training_gradient_checkpointing(self): method test_peft_add_multi_adapter (line 276) | def test_peft_add_multi_adapter(self): method test_peft_from_pretrained_kwargs (line 346) | def test_peft_from_pretrained_kwargs(self): method test_peft_save_quantized (line 364) | def test_peft_save_quantized(self): method test_peft_save_quantized_regression (line 403) | def test_peft_save_quantized_regression(self): method test_peft_pipeline (line 441) | def test_peft_pipeline(self): method test_peft_add_adapter_with_state_dict (line 451) | def test_peft_add_adapter_with_state_dict(self): method test_peft_from_pretrained_hub_kwargs (line 481) | def test_peft_from_pretrained_hub_kwargs(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_audio_classification.py class AudioClassificationPipelineTests (line 34) | class AudioClassificationPipelineTests(unittest.TestCase): method get_test_pipeline (line 38) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 48) | def run_pipeline_test(self, audio_classifier, examples): method run_torchaudio (line 70) | def run_torchaudio(self, audio_classifier): method test_small_model_pt (line 86) | def test_small_model_pt(self): method test_large_model_pt (line 114) | def test_large_model_pt(self): method test_small_model_tf (line 136) | def test_small_model_tf(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_automatic_speech_recognition.py class AutomaticSpeechRecognitionPipelineTests (line 63) | class AutomaticSpeechRecognitionPipelineTests(unittest.TestCase): method get_test_pipeline (line 69) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 84) | def run_pipeline_test(self, speech_recognizer, examples): method test_pt_defaults (line 147) | def test_pt_defaults(self): method test_small_model_pt (line 151) | def test_small_model_pt(self): method test_whisper_fp16 (line 172) | def test_whisper_fp16(self): method test_small_model_pt_seq2seq (line 182) | def test_small_model_pt_seq2seq(self): method test_small_model_pt_seq2seq_gen_kwargs (line 193) | def test_small_model_pt_seq2seq_gen_kwargs(self): method test_large_model_pt_with_lm (line 206) | def test_large_model_pt_with_lm(self): method test_small_model_tf (line 271) | def test_small_model_tf(self): method test_torch_small_no_tokenizer_files (line 275) | def test_torch_small_no_tokenizer_files(self): method test_torch_large (line 286) | def test_torch_large(self): method test_torch_large_with_input_features (line 304) | def test_torch_large_with_input_features(self): method test_return_timestamps_in_preprocess (line 321) | def test_return_timestamps_in_preprocess(self): method test_return_timestamps_and_language_in_preprocess (line 365) | def test_return_timestamps_and_language_in_preprocess(self): method test_return_timestamps_in_preprocess_longform (line 422) | def test_return_timestamps_in_preprocess_longform(self): method test_return_timestamps_in_init (line 485) | def test_return_timestamps_in_init(self): method test_torch_whisper (line 538) | def test_torch_whisper(self): method test_torch_whisper_batched (line 554) | def test_torch_whisper_batched(self): method test_find_longest_common_subsequence (line 570) | def test_find_longest_common_subsequence(self): method test_whisper_timestamp_prediction (line 735) | def test_whisper_timestamp_prediction(self): method test_whisper_large_timestamp_prediction (line 833) | def test_whisper_large_timestamp_prediction(self): method test_whisper_word_timestamps_batched (line 921) | def test_whisper_word_timestamps_batched(self): method test_whisper_large_word_timestamps_batched (line 965) | def test_whisper_large_word_timestamps_batched(self): method test_torch_speech_encoder_decoder (line 1008) | def test_torch_speech_encoder_decoder(self): method test_simple_wav2vec2 (line 1023) | def test_simple_wav2vec2(self): method test_simple_s2t (line 1048) | def test_simple_s2t(self): method test_simple_whisper_asr (line 1074) | def test_simple_whisper_asr(self): method test_simple_whisper_translation (line 1143) | def test_simple_whisper_translation(self): method test_whisper_language (line 1178) | def test_whisper_language(self): method test_speculative_decoding_whisper_non_distil (line 1215) | def test_speculative_decoding_whisper_non_distil(self): method test_speculative_decoding_whisper_distil (line 1261) | def test_speculative_decoding_whisper_distil(self): method test_xls_r_to_en (line 1309) | def test_xls_r_to_en(self): method test_xls_r_from_en (line 1325) | def test_xls_r_from_en(self): method test_speech_to_text_leveraged (line 1341) | def test_speech_to_text_leveraged(self): method test_wav2vec2_conformer_float16 (line 1358) | def test_wav2vec2_conformer_float16(self): method test_chunking_fast (line 1377) | def test_chunking_fast(self): method test_return_timestamps_ctc_fast (line 1394) | def test_return_timestamps_ctc_fast(self): method test_chunking_fast_with_lm (line 1438) | def test_chunking_fast_with_lm(self): method test_with_lm_fast (line 1466) | def test_with_lm_fast(self): method test_with_local_lm_fast (line 1492) | def test_with_local_lm_fast(self): method test_whisper_prompted (line 1513) | def test_whisper_prompted(self): method test_whisper_longform (line 1548) | def test_whisper_longform(self): method test_seamless_v2 (line 1576) | def test_seamless_v2(self): method test_chunking_and_timestamps (line 1593) | def test_chunking_and_timestamps(self): method test_chunking_with_lm (line 1712) | def test_chunking_with_lm(self): method test_chunk_iterator (line 1729) | def test_chunk_iterator(self): method test_chunk_iterator_stride (line 1765) | def test_chunk_iterator_stride(self): method test_stride (line 1814) | def test_stride(self): method test_slow_unfinished_sequence (line 1837) | def test_slow_unfinished_sequence(self): function require_ffmpeg (line 1864) | def require_ffmpeg(test_case): function bytes_iter (line 1880) | def bytes_iter(chunk_size, chunks): class AudioUtilsTest (line 1886) | class AudioUtilsTest(unittest.TestCase): method test_chunk_bytes_iter_too_big (line 1887) | def test_chunk_bytes_iter_too_big(self): method test_chunk_bytes_iter (line 1893) | def test_chunk_bytes_iter(self): method test_chunk_bytes_iter_stride (line 1900) | def test_chunk_bytes_iter_stride(self): method test_chunk_bytes_iter_stride_stream (line 1911) | def test_chunk_bytes_iter_stride_stream(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_common.py class ANY (line 75) | class ANY: method __init__ (line 76) | def __init__(self, *_types): method __eq__ (line 79) | def __eq__(self, other): method __repr__ (line 82) | def __repr__(self): class CommonPipelineTest (line 87) | class CommonPipelineTest(unittest.TestCase): method test_pipeline_iteration (line 89) | def test_pipeline_iteration(self): method test_check_task_auto_inference (line 113) | def test_check_task_auto_inference(self): method test_pipeline_batch_size_global (line 119) | def test_pipeline_batch_size_global(self): method test_pipeline_pathlike (line 129) | def test_pipeline_pathlike(self): method test_pipeline_override (line 138) | def test_pipeline_override(self): method test_check_task (line 146) | def test_check_task(self): method test_iterator_data (line 155) | def test_iterator_data(self): method test_iterator_data_tf (line 177) | def test_iterator_data_tf(self): method test_unbatch_attentions_hidden_states (line 191) | def test_unbatch_attentions_hidden_states(self): method test_torch_dtype_property (line 204) | def test_torch_dtype_property(self): class PipelineScikitCompatTest (line 228) | class PipelineScikitCompatTest(unittest.TestCase): method test_pipeline_predict_pt (line 230) | def test_pipeline_predict_pt(self): method test_pipeline_predict_tf (line 242) | def test_pipeline_predict_tf(self): method test_pipeline_transform_pt (line 254) | def test_pipeline_transform_pt(self): method test_pipeline_transform_tf (line 266) | def test_pipeline_transform_tf(self): class PipelinePadTest (line 279) | class PipelinePadTest(unittest.TestCase): method test_pipeline_padding (line 281) | def test_pipeline_padding(self): method test_pipeline_image_padding (line 317) | def test_pipeline_image_padding(self): method test_pipeline_offset_mapping (line 340) | def test_pipeline_offset_mapping(self): class PipelineUtilsTest (line 361) | class PipelineUtilsTest(unittest.TestCase): method test_pipeline_dataset (line 363) | def test_pipeline_dataset(self): method test_pipeline_iterator (line 377) | def test_pipeline_iterator(self): method test_pipeline_iterator_no_len (line 392) | def test_pipeline_iterator_no_len(self): method test_pipeline_batch_unbatch_iterator (line 410) | def test_pipeline_batch_unbatch_iterator(self): method test_pipeline_batch_unbatch_iterator_tensors (line 424) | def test_pipeline_batch_unbatch_iterator_tensors(self): method test_pipeline_chunk_iterator (line 442) | def test_pipeline_chunk_iterator(self): method test_pipeline_pack_iterator (line 458) | def test_pipeline_pack_iterator(self): method test_pipeline_pack_unbatch_iterator (line 491) | def test_pipeline_pack_unbatch_iterator(self): method test_pipeline_negative_device (line 515) | def test_pipeline_negative_device(self): method test_pipeline_no_device (line 524) | def test_pipeline_no_device(self): method test_pipeline_device_not_equal_model_device (line 553) | def test_pipeline_device_not_equal_model_device(self): method test_load_default_pipelines_pt (line 571) | def test_load_default_pipelines_pt(self): method test_load_default_pipelines_tf (line 590) | def test_load_default_pipelines_tf(self): method test_load_default_pipelines_pt_table_qa (line 607) | def test_load_default_pipelines_pt_table_qa(self): method test_pipeline_accelerator (line 620) | def test_pipeline_accelerator(self): method test_pipeline_accelerator_indexed (line 627) | def test_pipeline_accelerator_indexed(self): method test_load_default_pipelines_tf_table_qa (line 634) | def test_load_default_pipelines_tf_table_qa(self): method check_default_pipeline (line 643) | def check_default_pipeline(self, task, framework, set_seed_fn, check_m... method check_models_equal_pt (line 701) | def check_models_equal_pt(self, model1, model2): method check_models_equal_tf (line 709) | def check_models_equal_tf(self, model1, model2): class CustomPipeline (line 718) | class CustomPipeline(Pipeline): method _sanitize_parameters (line 719) | def _sanitize_parameters(self, **kwargs): method preprocess (line 725) | def preprocess(self, text, maybe_arg=2): method _forward (line 729) | def _forward(self, model_inputs): method postprocess (line 733) | def postprocess(self, model_outputs): class CustomPipelineTest (line 738) | class CustomPipelineTest(unittest.TestCase): method test_warning_logs (line 739) | def test_warning_logs(self): method test_register_pipeline (line 756) | def test_register_pipeline(self): method test_dynamic_pipeline (line 778) | def test_dynamic_pipeline(self): method test_cached_pipeline_has_minimum_calls_to_head (line 830) | def test_cached_pipeline_has_minimum_calls_to_head(self): method test_chunk_pipeline_batching_single_file (line 840) | def test_chunk_pipeline_batching_single_file(self): class DynamicPipelineTester (line 865) | class DynamicPipelineTester(unittest.TestCase): method setUpClass (line 869) | def setUpClass(cls): method tearDownClass (line 874) | def tearDownClass(cls): method test_push_to_hub_dynamic_pipeline (line 880) | def test_push_to_hub_dynamic_pipeline(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_depth_estimation.py class Image (line 41) | class Image: method open (line 43) | def open(*args, **kwargs): function hashimage (line 47) | def hashimage(image: Image) -> str: class DepthEstimationPipelineTests (line 56) | class DepthEstimationPipelineTests(unittest.TestCase): method get_test_pipeline (line 59) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 66) | def run_pipeline_test(self, depth_estimator, examples): method test_small_model_tf (line 99) | def test_small_model_tf(self): method test_large_model_pt (line 104) | def test_large_model_pt(self): method test_small_model_pt (line 116) | def test_small_model_pt(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_document_question_answering.py class Image (line 40) | class Image: method open (line 42) | def open(*args, **kwargs): function load_image (line 45) | def load_image(_): class DocumentQuestionAnsweringPipelineTests (line 59) | class DocumentQuestionAnsweringPipelineTests(unittest.TestCase): method get_test_pipeline (line 64) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 93) | def run_pipeline_test(self, dqa_pipeline, examples): method test_small_model_pt (line 109) | def test_small_model_pt(self): method test_large_model_pt (line 156) | def test_large_model_pt(self): method test_large_model_pt_chunk (line 201) | def test_large_model_pt_chunk(self): method test_large_model_pt_layoutlm (line 247) | def test_large_model_pt_layoutlm(self): method test_large_model_pt_layoutlm_chunk (line 308) | def test_large_model_pt_layoutlm_chunk(self): method test_large_model_pt_donut (line 359) | def test_large_model_pt_donut(self): method test_small_model_tf (line 374) | def test_small_model_tf(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_feature_extraction.py class FeatureExtractionPipelineTests (line 41) | class FeatureExtractionPipelineTests(unittest.TestCase): method test_small_model_pt (line 46) | def test_small_model_pt(self): method test_small_model_tf (line 56) | def test_small_model_tf(self): method test_tokenization_small_model_pt (line 66) | def test_tokenization_small_model_pt(self): method test_tokenization_small_model_tf (line 106) | def test_tokenization_small_model_tf(self): method test_return_tensors_pt (line 146) | def test_return_tensors_pt(self): method test_return_tensors_tf (line 154) | def test_return_tensors_tf(self): method get_shape (line 161) | def get_shape(self, input_, shape=None): method get_test_pipeline (line 177) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 201) | def run_pipeline_test(self, feature_extractor, examples): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_fill_mask.py class FillMaskPipelineTests (line 36) | class FillMaskPipelineTests(unittest.TestCase): method tearDown (line 40) | def tearDown(self): method test_small_model_tf (line 48) | def test_small_model_tf(self): method test_small_model_pt (line 89) | def test_small_model_pt(self): method test_fp16_casting (line 152) | def test_fp16_casting(self): method test_large_model_pt (line 171) | def test_large_model_pt(self): method test_large_model_tf (line 177) | def test_large_model_tf(self): method run_large_test (line 181) | def run_large_test(self, unmasker): method test_model_no_pad_pt (line 241) | def test_model_no_pad_pt(self): method test_model_no_pad_tf (line 248) | def test_model_no_pad_tf(self): method get_test_pipeline (line 254) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 264) | def run_pipeline_test(self, fill_masker, examples): method run_test_targets (line 327) | def run_test_targets(self, model, tokenizer): method run_test_top_k (line 381) | def run_test_top_k(self, model, tokenizer): method run_test_top_k_targets (line 403) | def run_test_top_k_targets(self, model, tokenizer): method fill_mask_with_duplicate_targets_and_top_k (line 420) | def fill_mask_with_duplicate_targets_and_top_k(self, model, tokenizer): method fill_mask_with_multiple_masks (line 432) | def fill_mask_with_multiple_masks(self, model, tokenizer): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_image_classification.py class Image (line 45) | class Image: method open (line 47) | def open(*args, **kwargs): class ImageClassificationPipelineTests (line 54) | class ImageClassificationPipelineTests(unittest.TestCase): method get_test_pipeline (line 58) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 68) | def run_pipeline_test(self, image_classifier, examples): method test_small_model_pt (line 125) | def test_small_model_pt(self): method test_small_model_tf (line 151) | def test_small_model_tf(self): method test_custom_tokenizer (line 176) | def test_custom_tokenizer(self): method test_torch_float16_pipeline (line 187) | def test_torch_float16_pipeline(self): method test_torch_bfloat16_pipeline (line 199) | def test_torch_bfloat16_pipeline(self): method test_perceiver (line 212) | def test_perceiver(self): method test_multilabel_classification (line 257) | def test_multilabel_classification(self): method test_function_to_apply (line 286) | def test_function_to_apply(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_image_feature_extraction.py function prepare_img (line 44) | def prepare_img(): class ImageFeatureExtractionPipelineTests (line 50) | class ImageFeatureExtractionPipelineTests(unittest.TestCase): method test_small_model_pt (line 55) | def test_small_model_pt(self): method test_small_model_w_pooler_pt (line 66) | def test_small_model_w_pooler_pt(self): method test_small_model_tf (line 77) | def test_small_model_tf(self): method test_small_model_w_pooler_tf (line 88) | def test_small_model_w_pooler_tf(self): method test_image_processing_small_model_pt (line 99) | def test_image_processing_small_model_pt(self): method test_image_processing_small_model_tf (line 121) | def test_image_processing_small_model_tf(self): method test_return_tensors_pt (line 143) | def test_return_tensors_pt(self): method test_return_tensors_tf (line 152) | def test_return_tensors_tf(self): method get_test_pipeline (line 160) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 184) | def run_pipeline_test(self, feature_extractor, examples): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_image_segmentation.py class Image (line 55) | class Image: method open (line 57) | def open(*args, **kwargs): function hashimage (line 61) | def hashimage(image: Image) -> str: function mask_to_test_readable (line 66) | def mask_to_test_readable(mask: Image) -> Dict: function mask_to_test_readable_only_shape (line 73) | def mask_to_test_readable_only_shape(mask: Image) -> Dict: class ImageSegmentationPipelineTests (line 83) | class ImageSegmentationPipelineTests(unittest.TestCase): method get_test_pipeline (line 90) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 97) | def run_pipeline_test(self, image_segmenter, examples): method test_small_model_tf (line 173) | def test_small_model_tf(self): method test_small_model_pt_no_panoptic (line 177) | def test_small_model_pt_no_panoptic(self): method test_small_model_pt (line 200) | def test_small_model_pt(self): method test_small_model_pt_semantic (line 335) | def test_small_model_pt_semantic(self): method test_integration_torch_image_segmentation (line 361) | def test_integration_torch_image_segmentation(self): method test_threshold (line 498) | def test_threshold(self): method test_maskformer (line 561) | def test_maskformer(self): method test_oneformer (line 621) | def test_oneformer(self): method test_save_load (line 721) | def test_save_load(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_image_to_image.py class Image (line 38) | class Image: method open (line 40) | def open(*args, **kwargs): class ImageToImagePipelineTests (line 47) | class ImageToImagePipelineTests(unittest.TestCase): method test_pipeline (line 57) | def test_pipeline(self, torch_dtype="float32"): method test_pipeline_fp16 (line 72) | def test_pipeline_fp16(self): method test_pipeline_model_processor (line 78) | def test_pipeline_model_processor(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_image_to_text.py class Image (line 36) | class Image: method open (line 38) | def open(*args, **kwargs): class ImageToTextPipelineTests (line 44) | class ImageToTextPipelineTests(unittest.TestCase): method get_test_pipeline (line 48) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 58) | def run_pipeline_test(self, pipe, examples): method test_small_model_tf (line 69) | def test_small_model_tf(self): method test_small_model_pt (line 107) | def test_small_model_pt(self): method test_small_model_pt_conditional (line 139) | def test_small_model_pt_conditional(self): method test_consistent_batching_behaviour (line 148) | def test_consistent_batching_behaviour(self): method test_large_model_pt (line 178) | def test_large_model_pt(self): method test_generation_pt_blip (line 196) | def test_generation_pt_blip(self): method test_generation_pt_git (line 206) | def test_generation_pt_git(self): method test_conditional_generation_pt_blip (line 216) | def test_conditional_generation_pt_blip(self): method test_conditional_generation_pt_git (line 231) | def test_conditional_generation_pt_git(self): method test_conditional_generation_pt_pix2struct (line 246) | def test_conditional_generation_pt_pix2struct(self): method test_large_model_tf (line 261) | def test_large_model_tf(self): method test_conditional_generation_llava (line 279) | def test_conditional_generation_llava(self): method test_nougat (line 302) | def test_nougat(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_mask_generation.py class Image (line 42) | class Image: method open (line 44) | def open(*args, **kwargs): function hashimage (line 48) | def hashimage(image: Image) -> str: function mask_to_test_readable (line 53) | def mask_to_test_readable(mask: Image) -> Dict: class MaskGenerationPipelineTests (line 62) | class MaskGenerationPipelineTests(unittest.TestCase): method get_test_pipeline (line 70) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 78) | def run_pipeline_test(self, mask_generator, examples): method test_small_model_tf (line 83) | def test_small_model_tf(self): method test_small_model_pt (line 88) | def test_small_model_pt(self): method test_threshold (line 138) | def test_threshold(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_object_detection.py class Image (line 43) | class Image: method open (line 45) | def open(*args, **kwargs): class ObjectDetectionPipelineTests (line 53) | class ObjectDetectionPipelineTests(unittest.TestCase): method get_test_pipeline (line 56) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 60) | def run_pipeline_test(self, object_detector, examples): method test_small_model_tf (line 107) | def test_small_model_tf(self): method test_small_model_pt (line 111) | def test_small_model_pt(self): method test_large_model_pt (line 152) | def test_large_model_pt(self): method test_integration_torch_object_detection (line 199) | def test_integration_torch_object_detection(self): method test_threshold (line 244) | def test_threshold(self): method test_layoutlm (line 262) | def test_layoutlm(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_question_answering.py class QAPipelineTests (line 42) | class QAPipelineTests(unittest.TestCase): method get_test_pipeline (line 53) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 66) | def run_pipeline_test(self, question_answerer, _): method test_small_model_pt (line 137) | def test_small_model_pt(self): method test_small_model_pt_iterator (line 149) | def test_small_model_pt_iterator(self): method test_small_model_pt_softmax_trick (line 161) | def test_small_model_pt_softmax_trick(self): method test_small_model_japanese (line 196) | def test_small_model_japanese(self): method test_small_model_long_context_cls_slow (line 216) | def test_small_model_long_context_cls_slow(self): method test_small_model_tf (line 230) | def test_small_model_tf(self): method test_large_model_pt (line 242) | def test_large_model_pt(self): method test_large_model_issue (line 254) | def test_large_model_issue(self): method test_large_model_course (line 307) | def test_large_model_course(self): method test_large_model_tf (line 356) | def test_large_model_tf(self): class QuestionAnsweringArgumentHandlerTests (line 366) | class QuestionAnsweringArgumentHandlerTests(unittest.TestCase): method test_argument_handler (line 367) | def test_argument_handler(self): method test_argument_handler_error_handling (line 423) | def test_argument_handler_error_handling(self): method test_argument_handler_old_format (line 481) | def test_argument_handler_old_format(self): method test_argument_handler_error_handling_odd (line 492) | def test_argument_handler_error_handling_odd(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_summarization.py class SummarizationPipelineTests (line 31) | class SummarizationPipelineTests(unittest.TestCase): method get_test_pipeline (line 35) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 39) | def run_pipeline_test(self, summarizer, _): method test_small_model_pt (line 78) | def test_small_model_pt(self): method test_small_model_tf (line 91) | def test_small_model_tf(self): method test_integration_torch_summarization (line 105) | def test_integration_torch_summarization(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_table_question_answering.py class TQAPipelineTests (line 43) | class TQAPipelineTests(unittest.TestCase): method test_small_model_tf (line 52) | def test_small_model_tf(self): method test_small_model_pt (line 155) | def test_small_model_pt(self, torch_dtype="float32"): method test_small_model_pt_fp16 (line 258) | def test_small_model_pt_fp16(self): method test_slow_tokenizer_sqa_pt (line 263) | def test_slow_tokenizer_sqa_pt(self, torch_dtype="float32"): method test_slow_tokenizer_sqa_pt_fp16 (line 383) | def test_slow_tokenizer_sqa_pt_fp16(self): method test_slow_tokenizer_sqa_tf (line 390) | def test_slow_tokenizer_sqa_tf(self): method test_integration_wtq_pt (line 511) | def test_integration_wtq_pt(self, torch_dtype="float32"): method test_integration_wtq_pt_fp16 (line 557) | def test_integration_wtq_pt_fp16(self): method test_integration_wtq_tf (line 563) | def test_integration_wtq_tf(self): method test_integration_sqa_pt (line 612) | def test_integration_sqa_pt(self, torch_dtype="float32"): method test_integration_sqa_pt_fp16 (line 638) | def test_integration_sqa_pt_fp16(self): method test_integration_sqa_tf (line 644) | def test_integration_sqa_tf(self): method test_large_model_pt_tapex (line 671) | def test_large_model_pt_tapex(self, torch_dtype="float32"): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_text2text_generation.py class Text2TextGenerationPipelineTests (line 34) | class Text2TextGenerationPipelineTests(unittest.TestCase): method get_test_pipeline (line 38) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 42) | def run_pipeline_test(self, generator, _): method test_small_model_pt (line 72) | def test_small_model_pt(self): method test_small_model_tf (line 123) | def test_small_model_tf(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_text_classification.py class TextClassificationPipelineTests (line 47) | class TextClassificationPipelineTests(unittest.TestCase): method test_small_model_pt (line 59) | def test_small_model_pt(self): method test_accepts_torch_device (line 112) | def test_accepts_torch_device(self): method test_accepts_torch_fp16 (line 124) | def test_accepts_torch_fp16(self): method test_accepts_torch_bf16 (line 137) | def test_accepts_torch_bf16(self): method test_small_model_tf (line 150) | def test_small_model_tf(self): method test_pt_bert (line 160) | def test_pt_bert(self): method test_tf_bert (line 172) | def test_tf_bert(self): method get_test_pipeline (line 182) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 186) | def run_pipeline_test(self, text_classifier, _): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_text_generation.py class TextGenerationPipelineTests (line 41) | class TextGenerationPipelineTests(unittest.TestCase): method test_small_model_pt (line 46) | def test_small_model_pt(self): method test_small_chat_model_pt (line 149) | def test_small_chat_model_pt(self): method test_small_chat_model_with_dataset_pt (line 195) | def test_small_chat_model_with_dataset_pt(self): method test_small_model_tf (line 237) | def test_small_model_tf(self): method test_small_chat_model_tf (line 278) | def test_small_chat_model_tf(self): method get_test_pipeline (line 323) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method test_stop_sequence_stopping_criteria (line 327) | def test_stop_sequence_stopping_criteria(self): method run_pipeline_test (line 339) | def run_pipeline_test(self, text_generator, _): method test_small_model_pt_bloom_accelerate (line 437) | def test_small_model_pt_bloom_accelerate(self): method test_small_model_fp16 (line 493) | def test_small_model_fp16(self): method test_pipeline_accelerate_top_p (line 506) | def test_pipeline_accelerate_top_p(self): method test_pipeline_length_setting_warning (line 514) | def test_pipeline_length_setting_warning(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_text_to_audio.py class TextToAudioPipelineTests (line 40) | class TextToAudioPipelineTests(unittest.TestCase): method test_small_musicgen_pt (line 46) | def test_small_musicgen_pt(self): method test_medium_seamless_m4t_pt (line 71) | def test_medium_seamless_m4t_pt(self): method test_small_bark_pt (line 92) | def test_small_bark_pt(self): method test_conversion_additional_tensor (line 142) | def test_conversion_additional_tensor(self): method test_vits_model_pt (line 181) | def test_vits_model_pt(self): method test_forward_model_kwargs (line 201) | def test_forward_model_kwargs(self): method test_generative_model_kwargs (line 226) | def test_generative_model_kwargs(self): method get_test_pipeline (line 253) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 257) | def run_pipeline_test(self, speech_generator, _): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_token_classification.py class TokenClassificationPipelineTests (line 48) | class TokenClassificationPipelineTests(unittest.TestCase): method get_test_pipeline (line 59) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 63) | def run_pipeline_test(self, token_classifier, _): method run_aggregation_strategy (line 122) | def run_aggregation_strategy(self, model, tokenizer): method test_chunking (line 212) | def test_chunking(self): method test_chunking_fast (line 292) | def test_chunking_fast(self): method test_spanish_bert (line 333) | def test_spanish_bert(self): method test_accelerator (line 397) | def test_accelerator(self): method test_dbmdz_english (line 410) | def test_dbmdz_english(self): method test_aggregation_strategy_byte_level_tokenizer (line 469) | def test_aggregation_strategy_byte_level_tokenizer(self): method test_aggregation_strategy_no_b_i_prefix (line 481) | def test_aggregation_strategy_no_b_i_prefix(self): method test_aggregation_strategy (line 530) | def test_aggregation_strategy(self): method test_aggregation_strategy_example2 (line 603) | def test_aggregation_strategy_example2(self): method test_aggregation_strategy_offsets_with_leading_space (line 666) | def test_aggregation_strategy_offsets_with_leading_space(self): method test_gather_pre_entities (line 679) | def test_gather_pre_entities(self): method test_word_heuristic_leading_space (line 724) | def test_word_heuristic_leading_space(self): method test_tf_only (line 759) | def test_tf_only(self): method test_small_model_tf (line 766) | def test_small_model_tf(self): method test_no_offset_tokenizer (line 779) | def test_no_offset_tokenizer(self): method test_small_model_pt (line 793) | def test_small_model_pt(self): method test_pt_ignore_subwords_slow_tokenizer_raises (line 845) | def test_pt_ignore_subwords_slow_tokenizer_raises(self): method test_simple (line 860) | def test_simple(self): class TokenClassificationArgumentHandlerTestCase (line 899) | class TokenClassificationArgumentHandlerTestCase(unittest.TestCase): method setUp (line 900) | def setUp(self): method test_simple (line 903) | def test_simple(self): method test_errors (line 924) | def test_errors(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_translation.py class TranslationPipelineTests (line 34) | class TranslationPipelineTests(unittest.TestCase): method get_test_pipeline (line 38) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 48) | def run_pipeline_test(self, translator, _): method test_small_model_pt (line 59) | def test_small_model_pt(self): method test_small_model_tf (line 75) | def test_small_model_tf(self): method test_en_to_de_pt (line 91) | def test_en_to_de_pt(self): method test_en_to_de_tf (line 107) | def test_en_to_de_tf(self): class TranslationNewFormatPipelineTests (line 123) | class TranslationNewFormatPipelineTests(unittest.TestCase): method test_default_translations (line 126) | def test_default_translations(self): method test_multilingual_translation (line 138) | def test_multilingual_translation(self): method test_translation_on_odd_language (line 159) | def test_translation_on_odd_language(self): method test_translation_default_language_selection (line 166) | def test_translation_default_language_selection(self): method test_translation_with_no_language_no_model_fails (line 175) | def test_translation_with_no_language_no_model_fails(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_video_classification.py class VideoClassificationPipelineTests (line 38) | class VideoClassificationPipelineTests(unittest.TestCase): method get_test_pipeline (line 41) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 54) | def run_pipeline_test(self, video_classifier, examples): method test_small_model_pt (line 67) | def test_small_model_pt(self): method test_small_model_tf (line 100) | def test_small_model_tf(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_visual_question_answering.py class Image (line 46) | class Image: method open (line 48) | def open(*args, **kwargs): class VisualQuestionAnsweringPipelineTests (line 55) | class VisualQuestionAnsweringPipelineTests(unittest.TestCase): method get_test_pipeline (line 58) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 74) | def run_pipeline_test(self, vqa_pipeline, examples): method test_small_model_pt (line 85) | def test_small_model_pt(self): method test_small_model_pt_blip2 (line 102) | def test_small_model_pt_blip2(self): method test_large_model_pt (line 133) | def test_large_model_pt(self): method test_large_model_pt_blip2 (line 159) | def test_large_model_pt_blip2(self): method test_small_model_pt_image_list (line 182) | def test_small_model_pt_image_list(self): method test_small_model_pt_question_list (line 195) | def test_small_model_pt_question_list(self): method test_small_model_pt_both_list (line 206) | def test_small_model_pt_both_list(self): method test_small_model_pt_dataset (line 226) | def test_small_model_pt_dataset(self): method test_small_model_tf (line 242) | def test_small_model_tf(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_zero_shot.py class ZeroShotClassificationPipelineTests (line 34) | class ZeroShotClassificationPipelineTests(unittest.TestCase): method get_test_pipeline (line 45) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 51) | def run_pipeline_test(self, classifier, _): method run_entailment_id (line 125) | def run_entailment_id(self, zero_shot_classifier: Pipeline): method test_truncation (line 146) | def test_truncation(self): method test_small_model_pt (line 160) | def test_small_model_pt(self): method test_small_model_tf (line 180) | def test_small_model_tf(self): method test_large_model_pt (line 201) | def test_large_model_pt(self): method test_large_model_tf (line 258) | def test_large_model_tf(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_zero_shot_audio_classification.py class ZeroShotAudioClassificationPipelineTests (line 25) | class ZeroShotAudioClassificationPipelineTests(unittest.TestCase): method test_small_model_pt (line 31) | def test_small_model_pt(self, torch_dtype="float32"): method test_small_model_pt_fp16 (line 46) | def test_small_model_pt_fp16(self): method test_small_model_tf (line 50) | def test_small_model_tf(self): method test_large_model_pt (line 55) | def test_large_model_pt(self): method test_large_model_tf (line 99) | def test_large_model_tf(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_zero_shot_image_classification.py class Image (line 35) | class Image: method open (line 37) | def open(*args, **kwargs): class ZeroShotImageClassificationPipelineTests (line 43) | class ZeroShotImageClassificationPipelineTests(unittest.TestCase): method test_small_model_pt (line 74) | def test_small_model_pt(self, torch_dtype="float32"): method test_small_model_pt_fp16 (line 131) | def test_small_model_pt_fp16(self): method test_small_model_tf (line 135) | def test_small_model_tf(self): method test_large_model_pt (line 187) | def test_large_model_pt(self): method test_large_model_tf (line 220) | def test_large_model_tf(self): method test_siglip_model_pt (line 251) | def test_siglip_model_pt(self): FILE: mplsandbox_for_rl/transformers/tests/pipelines/test_pipelines_zero_shot_object_detection.py class Image (line 34) | class Image: method open (line 36) | def open(*args, **kwargs): class ZeroShotObjectDetectionPipelineTests (line 43) | class ZeroShotObjectDetectionPipelineTests(unittest.TestCase): method get_test_pipeline (line 46) | def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="... method run_pipeline_test (line 61) | def run_pipeline_test(self, object_detector, examples): method test_small_model_tf (line 80) | def test_small_model_tf(self): method test_small_model_pt (line 84) | def test_small_model_pt(self): method test_large_model_pt (line 139) | def test_large_model_pt(self): method test_large_model_tf (line 191) | def test_large_model_tf(self): method test_threshold (line 196) | def test_threshold(self): method test_top_k (line 216) | def test_top_k(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/aqlm_integration/test_aqlm.py class AqlmConfigTest (line 43) | class AqlmConfigTest(unittest.TestCase): method test_to_dict (line 44) | def test_to_dict(self): method test_from_dict (line 54) | def test_from_dict(self): class AqlmTest (line 76) | class AqlmTest(unittest.TestCase): method setUpClass (line 88) | def setUpClass(cls): method tearDown (line 98) | def tearDown(self): method test_quantized_model_conversion (line 103) | def test_quantized_model_conversion(self): method test_quantized_model (line 145) | def test_quantized_model(self): method test_raise_if_non_quantized (line 154) | def test_raise_if_non_quantized(self): method test_save_pretrained (line 161) | def test_save_pretrained(self): method test_quantized_model_multi_gpu (line 175) | def test_quantized_model_multi_gpu(self): method test_quantized_model_compile (line 193) | def test_quantized_model_compile(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/autoawq/test_awq.py class AwqConfigTest (line 40) | class AwqConfigTest(unittest.TestCase): method test_wrong_backend (line 41) | def test_wrong_backend(self): method test_to_dict (line 69) | def test_to_dict(self): method test_from_dict (line 79) | def test_from_dict(self): class AwqTest (line 95) | class AwqTest(unittest.TestCase): method setUpClass (line 113) | def setUpClass(cls): method tearDown (line 120) | def tearDown(self): method test_quantized_model_conversion (line 125) | def test_quantized_model_conversion(self): method test_quantized_model (line 167) | def test_quantized_model(self): method test_raise_if_non_quantized (line 176) | def test_raise_if_non_quantized(self): method test_quantized_model_bf16 (line 183) | def test_quantized_model_bf16(self): method test_quantized_model_exllama (line 196) | def test_quantized_model_exllama(self): method test_quantized_model_no_device_map (line 210) | def test_quantized_model_no_device_map(self): method test_save_pretrained (line 221) | def test_save_pretrained(self): method test_quantized_model_multi_gpu (line 235) | def test_quantized_model_multi_gpu(self): method test_quantized_model_no_k_proj_quantized (line 249) | def test_quantized_model_no_k_proj_quantized(self): class AwqFusedTest (line 272) | class AwqFusedTest(unittest.TestCase): method tearDown (line 295) | def tearDown(self): method _check_fused_modules (line 300) | def _check_fused_modules(self, model): method test_raise_save_pretrained (line 311) | def test_raise_save_pretrained(self): method test_fused_modules_to_not_convert (line 329) | def test_fused_modules_to_not_convert(self): method test_generation_fused (line 347) | def test_generation_fused(self): method test_generation_fused_batched (line 370) | def test_generation_fused_batched(self): method test_generation_llava_fused (line 394) | def test_generation_llava_fused(self): method test_generation_custom_model (line 418) | def test_generation_custom_model(self): method test_generation_mixtral_fused (line 455) | def test_generation_mixtral_fused(self): class AwqScaleTest (line 480) | class AwqScaleTest(unittest.TestCase): method test_load_quantized_model (line 483) | def test_load_quantized_model(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/bnb/test_4bit.py function get_some_linear_layer (line 45) | def get_some_linear_layer(model): class LoRALayer (line 62) | class LoRALayer(nn.Module): method __init__ (line 65) | def __init__(self, module: nn.Module, rank: int): method forward (line 77) | def forward(self, input, *args, **kwargs): class Base4bitTest (line 90) | class Base4bitTest(unittest.TestCase): method setUp (line 109) | def setUp(self): class Bnb4BitTest (line 114) | class Bnb4BitTest(Base4bitTest): method setUp (line 115) | def setUp(self): method tearDown (line 124) | def tearDown(self): method test_quantization_num_parameters (line 135) | def test_quantization_num_parameters(self): method test_quantization_config_json_serialization (line 146) | def test_quantization_config_json_serialization(self): method test_memory_footprint (line 159) | def test_memory_footprint(self): method test_original_dtype (line 173) | def test_original_dtype(self): method test_linear_are_4bit (line 181) | def test_linear_are_4bit(self): method test_rwkv_4bit (line 197) | def test_rwkv_4bit(self): method test_generate_quality (line 213) | def test_generate_quality(self): method test_generate_quality_config (line 224) | def test_generate_quality_config(self): method test_generate_quality_dequantize (line 242) | def test_generate_quality_dequantize(self): method test_device_and_dtype_assignment (line 259) | def test_device_and_dtype_assignment(self): method test_fp32_4bit_conversion (line 299) | def test_fp32_4bit_conversion(self): method test_bnb_4bit_wrong_config (line 306) | def test_bnb_4bit_wrong_config(self): class Bnb4BitT5Test (line 319) | class Bnb4BitT5Test(unittest.TestCase): method setUpClass (line 321) | def setUpClass(cls): method tearDown (line 327) | def tearDown(self): method test_inference_without_keep_in_fp32 (line 335) | def test_inference_without_keep_in_fp32(self): method test_inference_with_keep_in_fp32 (line 359) | def test_inference_with_keep_in_fp32(self): class Classes4BitModelTest (line 384) | class Classes4BitModelTest(Base4bitTest): method setUp (line 385) | def setUp(self): method tearDown (line 405) | def tearDown(self): method test_correct_head_class (line 418) | def test_correct_head_class(self): class Pipeline4BitTest (line 433) | class Pipeline4BitTest(Base4bitTest): method setUp (line 434) | def setUp(self): method tearDown (line 437) | def tearDown(self): method test_pipeline (line 447) | def test_pipeline(self): class Bnb4bitTestMultiGpu (line 467) | class Bnb4bitTestMultiGpu(Base4bitTest): method setUp (line 468) | def setUp(self): method test_multi_gpu_loading (line 471) | def test_multi_gpu_loading(self): class Bnb4BitTestTraining (line 492) | class Bnb4BitTestTraining(Base4bitTest): method setUp (line 493) | def setUp(self): method test_training (line 497) | def test_training(self): class Bnb4BitGPT2Test (line 535) | class Bnb4BitGPT2Test(Bnb4BitTest): class BaseSerializationTest (line 545) | class BaseSerializationTest(unittest.TestCase): method tearDown (line 549) | def tearDown(self): method test_serialization (line 553) | def test_serialization(self, quant_type="nf4", double_quant=True, safe... class ExtendedSerializationTest (line 632) | class ExtendedSerializationTest(BaseSerializationTest): method test_nf4_single_unsafe (line 637) | def test_nf4_single_unsafe(self): method test_nf4_single_safe (line 640) | def test_nf4_single_safe(self): method test_nf4_double_unsafe (line 643) | def test_nf4_double_unsafe(self): method test_fp4_single_unsafe (line 648) | def test_fp4_single_unsafe(self): method test_fp4_single_safe (line 651) | def test_fp4_single_safe(self): method test_fp4_double_unsafe (line 654) | def test_fp4_double_unsafe(self): method test_fp4_double_safe (line 657) | def test_fp4_double_safe(self): class BloomSerializationTest (line 661) | class BloomSerializationTest(BaseSerializationTest): class GPTSerializationTest (line 669) | class GPTSerializationTest(BaseSerializationTest): class Bnb4BitTestBasicConfigTest (line 681) | class Bnb4BitTestBasicConfigTest(unittest.TestCase): method test_load_in_4_and_8_bit_fails (line 682) | def test_load_in_4_and_8_bit_fails(self): method test_set_load_in_8_bit (line 686) | def test_set_load_in_8_bit(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/bnb/test_mixed_int8.py function get_some_linear_layer (line 44) | def get_some_linear_layer(model): class LoRALayer (line 61) | class LoRALayer(nn.Module): method __init__ (line 64) | def __init__(self, module: nn.Module, rank: int): method forward (line 76) | def forward(self, input, *args, **kwargs): class BaseMixedInt8Test (line 85) | class BaseMixedInt8Test(unittest.TestCase): method setUp (line 106) | def setUp(self): class MixedInt8Test (line 111) | class MixedInt8Test(BaseMixedInt8Test): method setUp (line 112) | def setUp(self): method tearDown (line 121) | def tearDown(self): method test_get_keys_to_not_convert_trust_remote_code (line 132) | def test_get_keys_to_not_convert_trust_remote_code(self): method test_get_keys_to_not_convert (line 150) | def test_get_keys_to_not_convert(self): method test_quantization_config_json_serialization (line 190) | def test_quantization_config_json_serialization(self): method test_original_dtype (line 203) | def test_original_dtype(self): method test_memory_footprint (line 211) | def test_memory_footprint(self): method test_linear_are_8bit (line 224) | def test_linear_are_8bit(self): method test_llm_skip (line 239) | def test_llm_skip(self): method test_generate_quality (line 259) | def test_generate_quality(self): method test_generate_quality_config (line 270) | def test_generate_quality_config(self): method test_generate_quality_dequantize (line 288) | def test_generate_quality_dequantize(self): method test_raise_if_config_and_load_in_8bit (line 305) | def test_raise_if_config_and_load_in_8bit(self): method test_device_and_dtype_assignment (line 320) | def test_device_and_dtype_assignment(self): method test_fp32_int8_conversion (line 360) | def test_fp32_int8_conversion(self): method test_int8_serialization (line 367) | def test_int8_serialization(self): method test_int8_serialization_regression (line 392) | def test_int8_serialization_regression(self): method test_int8_serialization_sharded (line 417) | def test_int8_serialization_sharded(self): method test_int8_from_pretrained (line 442) | def test_int8_from_pretrained(self): class MixedInt8T5Test (line 468) | class MixedInt8T5Test(unittest.TestCase): method setUpClass (line 470) | def setUpClass(cls): method tearDown (line 476) | def tearDown(self): method test_inference_without_keep_in_fp32 (line 484) | def test_inference_without_keep_in_fp32(self): method test_inference_with_keep_in_fp32 (line 508) | def test_inference_with_keep_in_fp32(self): method test_inference_with_keep_in_fp32_serialized (line 534) | def test_inference_with_keep_in_fp32_serialized(self): class MixedInt8ModelClassesTest (line 567) | class MixedInt8ModelClassesTest(BaseMixedInt8Test): method setUp (line 568) | def setUp(self): method tearDown (line 588) | def tearDown(self): method test_correct_head_class (line 601) | def test_correct_head_class(self): class MixedInt8TestPipeline (line 617) | class MixedInt8TestPipeline(BaseMixedInt8Test): method setUp (line 618) | def setUp(self): method tearDown (line 621) | def tearDown(self): method test_pipeline (line 631) | def test_pipeline(self): class MixedInt8TestMultiGpu (line 651) | class MixedInt8TestMultiGpu(BaseMixedInt8Test): method setUp (line 652) | def setUp(self): method test_multi_gpu_loading (line 655) | def test_multi_gpu_loading(self): class MixedInt8TestCpuGpu (line 677) | class MixedInt8TestCpuGpu(BaseMixedInt8Test): method setUp (line 678) | def setUp(self): method check_inference_correctness (line 681) | def check_inference_correctness(self, model): method test_cpu_gpu_loading_random_device_map (line 692) | def test_cpu_gpu_loading_random_device_map(self): method test_cpu_gpu_loading_custom_device_map (line 740) | def test_cpu_gpu_loading_custom_device_map(self): method test_cpu_gpu_disk_loading_custom_device_map (line 767) | def test_cpu_gpu_disk_loading_custom_device_map(self): method test_cpu_gpu_disk_loading_custom_device_map_kwargs (line 794) | def test_cpu_gpu_disk_loading_custom_device_map_kwargs(self): class MixedInt8TestTraining (line 822) | class MixedInt8TestTraining(BaseMixedInt8Test): method setUp (line 823) | def setUp(self): method test_training (line 827) | def test_training(self): class MixedInt8GPT2Test (line 865) | class MixedInt8GPT2Test(MixedInt8Test): method test_int8_from_pretrained (line 874) | def test_int8_from_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/eetq_integration/test_eetq.py class EetqConfigTest (line 40) | class EetqConfigTest(unittest.TestCase): method test_to_dict (line 41) | def test_to_dict(self): method test_from_dict (line 51) | def test_from_dict(self): class EetqTest (line 67) | class EetqTest(unittest.TestCase): method setUpClass (line 79) | def setUpClass(cls): method tearDown (line 89) | def tearDown(self): method test_quantized_model_conversion (line 94) | def test_quantized_model_conversion(self): method test_quantized_model (line 134) | def test_quantized_model(self): method test_save_pretrained (line 143) | def test_save_pretrained(self): method test_quantized_model_multi_gpu (line 158) | def test_quantized_model_multi_gpu(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/fbgemm_fp8/test_fbgemm_fp8.py class FbgemmFp8ConfigTest (line 41) | class FbgemmFp8ConfigTest(unittest.TestCase): method test_to_dict (line 42) | def test_to_dict(self): method test_from_dict (line 52) | def test_from_dict(self): class FbgemmFp8Test (line 68) | class FbgemmFp8Test(unittest.TestCase): method setUpClass (line 118) | def setUpClass(cls): method tearDown (line 128) | def tearDown(self): method test_quantized_model_conversion (line 133) | def test_quantized_model_conversion(self): method test_quantized_model (line 171) | def test_quantized_model(self): method test_save_pretrained (line 180) | def test_save_pretrained(self): method test_change_loading_attributes (line 194) | def test_change_loading_attributes(self): method test_quantized_model_multi_gpu (line 215) | def test_quantized_model_multi_gpu(self): method test_quantized_model_offload (line 230) | def test_quantized_model_offload(self): method test_save_pretrained_offload (line 243) | def test_save_pretrained_offload(self): method test_save_pretrained_multi_gpu (line 257) | def test_save_pretrained_multi_gpu(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/ggml/test_ggml.py class GgufIntegrationTests (line 30) | class GgufIntegrationTests(unittest.TestCase): method test_q2_k (line 53) | def test_q2_k(self): method test_q2_k_serialization (line 63) | def test_q2_k_serialization(self): method test_q3_k (line 80) | def test_q3_k(self): method test_q5_k (line 90) | def test_q5_k(self): method test_q4_0 (line 100) | def test_q4_0(self): method test_q4_k_m (line 110) | def test_q4_k_m(self): method test_q6_k (line 120) | def test_q6_k(self): method test_q6_k_fp16 (line 130) | def test_q6_k_fp16(self): method test_q8_0 (line 144) | def test_q8_0(self): method test_f16 (line 154) | def test_f16(self): method test_mistral_q4_0 (line 166) | def test_mistral_q4_0(self): method test_qwen2_q4_0 (line 178) | def test_qwen2_q4_0(self): method test_llama3_q4_0_tokenizer (line 190) | def test_llama3_q4_0_tokenizer(self): method test_llama3_q4_0 (line 199) | def test_llama3_q4_0(self): method test_tokenization_xnli (line 211) | def test_tokenization_xnli(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/gptq/test_gptq.py class GPTQConfigTest (line 37) | class GPTQConfigTest(unittest.TestCase): method test_bits (line 38) | def test_bits(self): method test_dataset (line 45) | def test_dataset(self): method test_damp_percent (line 50) | def test_damp_percent(self): method test_to_dict (line 57) | def test_to_dict(self): method test_from_dict (line 61) | def test_from_dict(self): method test_optimum_config (line 67) | def test_optimum_config(self): class GPTQTest (line 81) | class GPTQTest(unittest.TestCase): method setUpClass (line 110) | def setUpClass(cls): method test_memory_footprint (line 137) | def test_memory_footprint(self): method test_device_and_dtype_assignment (line 147) | def test_device_and_dtype_assignment(self): method test_original_dtype (line 160) | def test_original_dtype(self): method test_quantized_layers_class (line 168) | def test_quantized_layers_class(self): method check_inference_correctness (line 185) | def check_inference_correctness(self, model): method check_quantized_layers_type (line 200) | def check_quantized_layers_type(self, model, value): method test_generate_quality (line 203) | def test_generate_quality(self): method test_serialization (line 212) | def test_serialization(self): method test_serialization_big_model_inference (line 230) | def test_serialization_big_model_inference(self): method test_change_loading_attributes (line 239) | def test_change_loading_attributes(self): class GPTQTestDeviceMap (line 258) | class GPTQTestDeviceMap(GPTQTest): class GPTQTestDeviceMapExllama (line 264) | class GPTQTestDeviceMapExllama(GPTQTest): class GPTQTestActOrderExllama (line 274) | class GPTQTestActOrderExllama(unittest.TestCase): method setUpClass (line 288) | def setUpClass(cls): method check_inference_correctness (line 301) | def check_inference_correctness(self, model): method test_quantized_layers_type (line 317) | def test_quantized_layers_type(self): method test_generate_quality (line 320) | def test_generate_quality(self): method test_max_input_length (line 326) | def test_max_input_length(self): class GPTQTestExllamaV2 (line 349) | class GPTQTestExllamaV2(unittest.TestCase): method setUpClass (line 363) | def setUpClass(cls): method test_quantized_layers_type (line 376) | def test_quantized_layers_type(self): method check_inference_correctness (line 379) | def check_inference_correctness(self, model): method test_generate_quality (line 395) | def test_generate_quality(self): class GPTQTestDeviceMapCPUOffload (line 406) | class GPTQTestDeviceMapCPUOffload(GPTQTest): FILE: mplsandbox_for_rl/transformers/tests/quantization/hqq/test_hqq.py class HQQLLMRunner (line 37) | class HQQLLMRunner: method __init__ (line 38) | def __init__(self, model_id, quant_config, compute_dtype, device, cach... function cleanup (line 52) | def cleanup(): function check_hqqlayer (line 57) | def check_hqqlayer(test_module, hqq_layer, batch_size=1, context_size=10... function check_forward (line 76) | def check_forward(test_module, model, batch_size=1, context_size=1024): class HqqConfigTest (line 89) | class HqqConfigTest(unittest.TestCase): method test_to_dict (line 90) | def test_to_dict(self): class HQQTest (line 104) | class HQQTest(unittest.TestCase): method tearDown (line 105) | def tearDown(self): method test_fp16_quantized_model (line 108) | def test_fp16_quantized_model(self): method test_f16_quantized_model_with_offloading (line 121) | def test_f16_quantized_model_with_offloading(self): class HQQTestMultiGPU (line 151) | class HQQTestMultiGPU(unittest.TestCase): method tearDown (line 152) | def tearDown(self): method test_fp16_quantized_model_multipgpu (line 155) | def test_fp16_quantized_model_multipgpu(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/quanto_integration/test_quanto.py class QuantoConfigTest (line 45) | class QuantoConfigTest(unittest.TestCase): method test_attributes (line 46) | def test_attributes(self): class QuantoTestIntegration (line 52) | class QuantoTestIntegration(unittest.TestCase): method setUp (line 55) | def setUp(self): method test_weight_only_quantization_conversion (line 67) | def test_weight_only_quantization_conversion(self): method test_weight_and_activation_quantization_conversion (line 83) | def test_weight_and_activation_quantization_conversion(self): method test_conversion_with_modules_to_not_convert (line 103) | def test_conversion_with_modules_to_not_convert(self): class QuantoQuantizationTest (line 129) | class QuantoQuantizationTest(unittest.TestCase): method setUp (line 143) | def setUp(self): method check_inference_correctness (line 165) | def check_inference_correctness(self, model, device): method test_generate_quality_cpu (line 177) | def test_generate_quality_cpu(self): method test_generate_quality_cuda (line 183) | def test_generate_quality_cuda(self): method test_quantized_model_layers (line 189) | def test_quantized_model_layers(self): method test_serialization_bin (line 220) | def test_serialization_bin(self): method test_serialization_safetensors (line 234) | def test_serialization_safetensors(self): method check_same_model (line 247) | def check_same_model(self, model1, model2): method test_compare_with_quanto (line 258) | def test_compare_with_quanto(self): method test_load_from_quanto_saved (line 274) | def test_load_from_quanto_saved(self): class QuantoQuantizationOffloadTest (line 303) | class QuantoQuantizationOffloadTest(QuantoQuantizationTest): method test_generate_quality_cpu (line 336) | def test_generate_quality_cpu(self): method test_serialization_bin (line 340) | def test_serialization_bin(self): method test_serialization_safetensors (line 344) | def test_serialization_safetensors(self): method test_compare_with_quanto (line 348) | def test_compare_with_quanto(self): method test_load_from_quanto_saved (line 352) | def test_load_from_quanto_saved(self): method test_check_offload_quantized (line 355) | def test_check_offload_quantized(self): class QuantoQuantizationSerializationTest (line 377) | class QuantoQuantizationSerializationTest(QuantoQuantizationTest): method setUp (line 382) | def setUp(self): class QuantoQuantizationSerializationCudaTest (line 410) | class QuantoQuantizationSerializationCudaTest(QuantoQuantizationTest): class QuantoQuantizationQBitsTensorTest (line 418) | class QuantoQuantizationQBitsTensorTest(QuantoQuantizationTest): class QuantoQuantizationQBitsTensorOffloadTest (line 423) | class QuantoQuantizationQBitsTensorOffloadTest(QuantoQuantizationOffload... class QuantoQuantizationQBitsTensorSerializationTest (line 429) | class QuantoQuantizationQBitsTensorSerializationTest(QuantoQuantizationS... class QuantoQuantizationActivationTest (line 435) | class QuantoQuantizationActivationTest(unittest.TestCase): method test_quantize_activation (line 436) | def test_quantize_activation(self): class QuantoKVCacheQuantizationTest (line 448) | class QuantoKVCacheQuantizationTest(unittest.TestCase): method test_quantized_cache (line 451) | def test_quantized_cache(self): FILE: mplsandbox_for_rl/transformers/tests/quantization/torchao_integration/test_torchao.py function check_torchao_quantized (line 37) | def check_torchao_quantized(test_module, qlayer, batch_size=1, context_s... function check_forward (line 45) | def check_forward(test_module, model, batch_size=1, context_size=1024): class TorchAoConfigTest (line 55) | class TorchAoConfigTest(unittest.TestCase): method test_to_dict (line 56) | def test_to_dict(self): method test_post_init_check (line 66) | def test_post_init_check(self): class TorchAoTest (line 80) | class TorchAoTest(unittest.TestCase): method tearDown (line 88) | def tearDown(self): method test_int4wo_quant (line 93) | def test_int4wo_quant(self): method test_int4wo_quant_bfloat16_conversion (line 115) | def test_int4wo_quant_bfloat16_conversion(self): method test_int4wo_quant_multi_gpu (line 138) | def test_int4wo_quant_multi_gpu(self): method test_int4wo_offload (line 160) | def test_int4wo_offload(self): FILE: mplsandbox_for_rl/transformers/tests/repo_utils/test_check_copies.py function replace_in_file (line 241) | def replace_in_file(filename, old, new): function create_tmp_repo (line 251) | def create_tmp_repo(tmp_dir): function patch_transformer_repo_path (line 279) | def patch_transformer_repo_path(new_folder): class CopyCheckTester (line 298) | class CopyCheckTester(unittest.TestCase): method test_find_code_in_transformers (line 299) | def test_find_code_in_transformers(self): method test_is_copy_consistent (line 310) | def test_is_copy_consistent(self): method test_is_copy_consistent_with_ignored_match (line 334) | def test_is_copy_consistent_with_ignored_match(self): method test_is_copy_consistent_with_ignored_no_match (line 344) | def test_is_copy_consistent_with_ignored_no_match(self): method test_convert_to_localized_md (line 370) | def test_convert_to_localized_md(self): FILE: mplsandbox_for_rl/transformers/tests/repo_utils/test_check_docstrings.py class CheckDostringsTested (line 27) | class CheckDostringsTested(unittest.TestCase): method test_replace_default_in_arg_description (line 28) | def test_replace_default_in_arg_description(self): method test_get_default_description (line 88) | def test_get_default_description(self): FILE: mplsandbox_for_rl/transformers/tests/repo_utils/test_check_dummies.py class CheckDummiesTester (line 49) | class CheckDummiesTester(unittest.TestCase): method test_find_backend (line 50) | def test_find_backend(self): method test_read_init (line 73) | def test_read_init(self): method test_create_dummy_object (line 88) | def test_create_dummy_object(self): method test_create_dummy_files (line 107) | def test_create_dummy_files(self): FILE: mplsandbox_for_rl/transformers/tests/repo_utils/test_get_test_info.py class GetTestInfoTester (line 36) | class GetTestInfoTester(unittest.TestCase): method test_get_test_to_tester_mapping (line 37) | def test_get_test_to_tester_mapping(self): method test_get_model_to_test_mapping (line 55) | def test_get_model_to_test_mapping(self): method test_get_model_to_tester_mapping (line 83) | def test_get_model_to_tester_mapping(self): FILE: mplsandbox_for_rl/transformers/tests/repo_utils/test_tests_fetcher.py function create_tmp_repo (line 86) | def create_tmp_repo(tmp_dir, models=None): function patch_transformer_repo_path (line 174) | def patch_transformer_repo_path(new_folder): function commit_changes (line 192) | def commit_changes(filenames, contents, repo, commit_message="Commit"): class TestFetcherTester (line 210) | class TestFetcherTester(unittest.TestCase): method test_checkout_commit (line 211) | def test_checkout_commit(self): method test_clean_code (line 228) | def test_clean_code(self): method test_get_all_tests (line 237) | def test_get_all_tests(self): method test_get_all_tests_on_full_repo (line 244) | def test_get_all_tests_on_full_repo(self): method test_diff_is_docstring_only (line 255) | def test_diff_is_docstring_only(self): method test_get_diff (line 268) | def test_get_diff(self): method test_extract_imports_relative (line 293) | def test_extract_imports_relative(self): method test_extract_imports_absolute (line 334) | def test_extract_imports_absolute(self): method test_get_module_dependencies (line 374) | def test_get_module_dependencies(self): method test_create_reverse_dependency_tree (line 438) | def test_create_reverse_dependency_tree(self): method test_get_tree_starting_at (line 467) | def test_get_tree_starting_at(self): method test_print_tree_deps_of (line 497) | def test_print_tree_deps_of(self): method test_init_test_examples_dependencies (line 523) | def test_init_test_examples_dependencies(self): method test_create_reverse_dependency_map (line 557) | def test_create_reverse_dependency_map(self): method test_create_module_to_test_map (line 633) | def test_create_module_to_test_map(self): method test_infer_tests_to_run (line 667) | def test_infer_tests_to_run(self): method test_infer_tests_to_run_with_test_modifs (line 750) | def test_infer_tests_to_run_with_test_modifs(self): method test_infer_tests_to_run_with_examples_modifs (line 769) | def test_infer_tests_to_run_with_examples_modifs(self): method test_parse_commit_message (line 804) | def test_parse_commit_message(self): FILE: mplsandbox_for_rl/transformers/tests/sagemaker/__init__.py function is_sagemaker_available (line 4) | def is_sagemaker_available(): FILE: mplsandbox_for_rl/transformers/tests/sagemaker/conftest.py class SageMakerTestEnvironment (line 14) | class SageMakerTestEnvironment: method metric_definitions (line 32) | def metric_definitions(self) -> str: method base_job_name (line 47) | def base_job_name(self) -> str: method test_path (line 51) | def test_path(self) -> str: method image_uri (line 55) | def image_uri(self) -> str: function sm_env (line 63) | def sm_env(request): FILE: mplsandbox_for_rl/transformers/tests/sagemaker/scripts/pytorch/run_ddp.py function parse_args (line 11) | def parse_args(): function main (line 21) | def main(): FILE: mplsandbox_for_rl/transformers/tests/sagemaker/scripts/pytorch/run_glue_model_parallelism.py class DataTrainingArguments (line 68) | class DataTrainingArguments: method __post_init__ (line 137) | def __post_init__(self): class ModelArguments (line 154) | class ModelArguments: function main (line 191) | def main(): function _mp_fn (line 535) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/tests/sagemaker/scripts/tensorflow/run_tf_dist.py function fit (line 24) | def fit(model, loss, opt, train_dataset, epochs, train_batch_size, max_s... function get_datasets (line 51) | def get_datasets(tokenizer, train_batch_size, eval_batch_size): FILE: mplsandbox_for_rl/transformers/tests/sagemaker/test_multi_node_data_parallel.py class MultiNodeTest (line 48) | class MultiNodeTest(unittest.TestCase): method setUp (line 49) | def setUp(self): method create_estimator (line 58) | def create_estimator(self, instance_count): method save_results_as_csv (line 79) | def save_results_as_csv(self, job_name): method test_script (line 84) | def test_script(self, instance_count): FILE: mplsandbox_for_rl/transformers/tests/sagemaker/test_multi_node_model_parallel.py class MultiNodeTest (line 41) | class MultiNodeTest(unittest.TestCase): method setUp (line 42) | def setUp(self): method create_estimator (line 51) | def create_estimator(self, instance_count): method save_results_as_csv (line 92) | def save_results_as_csv(self, job_name): method test_scripz (line 97) | def test_scripz(self, instance_count): FILE: mplsandbox_for_rl/transformers/tests/sagemaker/test_single_node_gpu.py class SingleNodeTest (line 41) | class SingleNodeTest(unittest.TestCase): method setUp (line 42) | def setUp(self): method create_estimator (line 51) | def create_estimator(self, instance_count=1): method save_results_as_csv (line 67) | def save_results_as_csv(self, job_name): method test_glue (line 70) | def test_glue(self): FILE: mplsandbox_for_rl/transformers/tests/test_backbone_common.py class BackboneTesterMixin (line 25) | class BackboneTesterMixin: method test_config (line 29) | def test_config(self): method test_forward_signature (line 65) | def test_forward_signature(self): method test_config_save_pretrained (line 76) | def test_config_save_pretrained(self): method test_channels (line 86) | def test_channels(self): method test_create_from_modified_config (line 109) | def test_create_from_modified_config(self): method test_backbone_common_attributes (line 152) | def test_backbone_common_attributes(self): method test_backbone_outputs (line 174) | def test_backbone_outputs(self): method test_backbone_stage_selection (line 205) | def test_backbone_stage_selection(self): FILE: mplsandbox_for_rl/transformers/tests/test_configuration_common.py class ConfigTester (line 26) | class ConfigTester: method __init__ (line 27) | def __init__(self, parent, config_class=None, has_text_modality=True, ... method create_and_test_config_common_properties (line 34) | def create_and_test_config_common_properties(self): method create_and_test_config_to_json_string (line 74) | def create_and_test_config_to_json_string(self): method create_and_test_config_to_json_file (line 80) | def create_and_test_config_to_json_file(self): method create_and_test_config_from_and_save_pretrained (line 90) | def create_and_test_config_from_and_save_pretrained(self): method create_and_test_config_from_and_save_pretrained_subfolder (line 102) | def create_and_test_config_from_and_save_pretrained_subfolder(self): method create_and_test_config_with_num_labels (line 113) | def create_and_test_config_with_num_labels(self): method check_config_can_be_init_without_params (line 122) | def check_config_can_be_init_without_params(self): method check_config_arguments_init (line 130) | def check_config_arguments_init(self): method run_common_tests (line 150) | def run_common_tests(self): FILE: mplsandbox_for_rl/transformers/tests/test_feature_extraction_common.py class FeatureExtractionSavingTestMixin (line 24) | class FeatureExtractionSavingTestMixin: method test_feat_extract_to_json_string (line 27) | def test_feat_extract_to_json_string(self): method test_feat_extract_to_json_file (line 33) | def test_feat_extract_to_json_file(self): method test_feat_extract_from_and_save_pretrained (line 43) | def test_feat_extract_from_and_save_pretrained(self): method test_init_without_params (line 53) | def test_init_without_params(self): FILE: mplsandbox_for_rl/transformers/tests/test_image_processing_common.py function prepare_image_inputs (line 40) | def prepare_image_inputs( function prepare_video (line 84) | def prepare_video(num_frames, num_channels, width=10, height=10, numpify... function prepare_video_inputs (line 101) | def prepare_video_inputs( class ImageProcessingTestMixin (line 138) | class ImageProcessingTestMixin: method setUp (line 146) | def setUp(self): method test_slow_fast_equivalence (line 159) | def test_slow_fast_equivalence(self): method test_fast_is_faster_than_slow (line 180) | def test_fast_is_faster_than_slow(self): method test_image_processor_to_json_string (line 201) | def test_image_processor_to_json_string(self): method test_image_processor_to_json_file (line 208) | def test_image_processor_to_json_file(self): method test_image_processor_from_and_save_pretrained (line 219) | def test_image_processor_from_and_save_pretrained(self): method test_image_processor_save_load_with_autoimageprocessor (line 230) | def test_image_processor_save_load_with_autoimageprocessor(self): method test_save_load_fast_slow (line 242) | def test_save_load_fast_slow(self): method test_save_load_fast_slow_auto (line 265) | def test_save_load_fast_slow_auto(self): method test_init_without_params (line 288) | def test_init_without_params(self): method test_cast_dtype_device (line 295) | def test_cast_dtype_device(self): method test_call_pil (line 329) | def test_call_pil(self): method test_call_numpy (line 350) | def test_call_numpy(self): method test_call_pytorch (line 371) | def test_call_pytorch(self): method test_call_numpy_4_channels (line 394) | def test_call_numpy_4_channels(self): method test_image_processor_preprocess_arguments (line 428) | def test_image_processor_preprocess_arguments(self): class AnnotationFormatTestMixin (line 466) | class AnnotationFormatTestMixin: method test_processor_can_use_legacy_annotation_format (line 471) | def test_processor_can_use_legacy_annotation_format(self): FILE: mplsandbox_for_rl/transformers/tests/test_image_transforms.py function get_random_image (line 54) | def get_random_image(height, width, num_channels=3, channels_first=True): class ImageTransformsTester (line 61) | class ImageTransformsTester(unittest.TestCase): method test_to_pil_image (line 73) | def test_to_pil_image(self, name, image_shape, dtype): method test_to_pil_image_from_float (line 91) | def test_to_pil_image_from_float(self, name, image_shape, dtype): method test_to_pil_image_from_mask (line 106) | def test_to_pil_image_from_mask(self): method test_to_pil_image_from_tensorflow (line 127) | def test_to_pil_image_from_tensorflow(self): method test_to_pil_image_from_torch (line 141) | def test_to_pil_image_from_torch(self): method test_to_pil_image_from_jax (line 155) | def test_to_pil_image_from_jax(self): method test_to_channel_dimension_format (line 169) | def test_to_channel_dimension_format(self): method test_get_resize_output_image_size (line 193) | def test_get_resize_output_image_size(self): method test_resize (line 247) | def test_resize(self): method test_normalize (line 280) | def test_normalize(self): method test_center_crop (line 349) | def test_center_crop(self): method test_center_to_corners_format (line 381) | def test_center_to_corners_format(self): method test_corners_to_center_format (line 389) | def test_corners_to_center_format(self): method test_rgb_to_id (line 397) | def test_rgb_to_id(self): method test_id_to_rgb (line 420) | def test_id_to_rgb(self): method test_pad (line 442) | def test_pad(self): method test_convert_to_rgb (line 583) | def test_convert_to_rgb(self): method test_flip_channel_order (line 611) | def test_flip_channel_order(self): FILE: mplsandbox_for_rl/transformers/tests/test_modeling_common.py function _config_zero_init (line 137) | def _config_zero_init(config): function _mock_init_weights (line 148) | def _mock_init_weights(self, module): function _mock_all_init_weights (line 155) | def _mock_all_init_weights(self): class ModelTesterMixin (line 174) | class ModelTesterMixin: method _prepare_for_class (line 191) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_save_load (line 258) | def test_save_load(self): method test_from_pretrained_no_checkpoint (line 300) | def test_from_pretrained_no_checkpoint(self): method test_keep_in_fp32_modules (line 312) | def test_keep_in_fp32_modules(self): method test_save_load_keys_to_ignore_on_save (line 330) | def test_save_load_keys_to_ignore_on_save(self): method test_gradient_checkpointing_backward_compatibility (line 362) | def test_gradient_checkpointing_backward_compatibility(self): method test_gradient_checkpointing_enable_disable (line 373) | def test_gradient_checkpointing_enable_disable(self): method test_save_load_fast_init_from_base (line 407) | def test_save_load_fast_init_from_base(self): method test_save_load_low_cpu_mem_usage (line 463) | def test_save_load_low_cpu_mem_usage(self): method test_save_load_low_cpu_mem_usage_checkpoints (line 475) | def test_save_load_low_cpu_mem_usage_checkpoints(self): method test_save_load_low_cpu_mem_usage_no_safetensors (line 488) | def test_save_load_low_cpu_mem_usage_no_safetensors(self): method _check_save_load_low_cpu_mem_usage (line 497) | def _check_save_load_low_cpu_mem_usage(self, model_class, saved_model_... method test_save_load_fast_init_to_base (line 541) | def test_save_load_fast_init_to_base(self): method test_torch_save_load (line 597) | def test_torch_save_load(self): method test_initialization (line 646) | def test_initialization(self): method test_determinism (line 660) | def test_determinism(self): method test_batching_equivalence (line 687) | def test_batching_equivalence(self): method check_training_gradient_checkpointing (line 780) | def check_training_gradient_checkpointing(self, gradient_checkpointing... method test_training (line 819) | def test_training(self): method test_training_gradient_checkpointing (line 840) | def test_training_gradient_checkpointing(self): method test_training_gradient_checkpointing_use_reentrant (line 844) | def test_training_gradient_checkpointing_use_reentrant(self): method test_training_gradient_checkpointing_use_reentrant_false (line 849) | def test_training_gradient_checkpointing_use_reentrant_false(self): method test_attention_outputs (line 854) | def test_attention_outputs(self): method test_torchscript_simple (line 976) | def test_torchscript_simple(self): method test_torchscript_output_attentions (line 981) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 987) | def test_torchscript_output_hidden_state(self): method clear_torch_jit_class_registry (line 993) | def clear_torch_jit_class_registry(self): method _create_and_check_torchscript (line 1000) | def _create_and_check_torchscript(self, config, inputs_dict): method test_torch_fx (line 1132) | def test_torch_fx(self): method test_torch_fx_output_loss (line 1136) | def test_torch_fx_output_loss(self): method _create_and_check_torch_fx_tracing (line 1140) | def _create_and_check_torch_fx_tracing(self, config, inputs_dict, outp... method test_headmasking (line 1306) | def test_headmasking(self): method test_head_pruning (line 1376) | def test_head_pruning(self): method test_head_pruning_save_load_from_pretrained (line 1409) | def test_head_pruning_save_load_from_pretrained(self): method test_head_pruning_save_load_from_config_init (line 1446) | def test_head_pruning_save_load_from_config_init(self): method test_head_pruning_integration (line 1481) | def test_head_pruning_integration(self): method test_hidden_states_output (line 1535) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 1588) | def test_retain_grad_hidden_states_attentions(self): method test_feed_forward_chunking (line 1647) | def test_feed_forward_chunking(self): method test_resize_position_vector_embeddings (line 1670) | def test_resize_position_vector_embeddings(self): method test_resize_tokens_embeddings (line 1749) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 1854) | def test_resize_embeddings_untied(self): method test_model_get_set_embeddings (line 1915) | def test_model_get_set_embeddings(self): method test_model_main_input_name (line 1929) | def test_model_main_input_name(self): method test_correct_missing_keys (line 1936) | def test_correct_missing_keys(self): method test_tie_model_weights (line 1964) | def test_tie_model_weights(self): method test_can_use_safetensors (line 1997) | def test_can_use_safetensors(self): method test_load_save_without_tied_weights (line 2033) | def test_load_save_without_tied_weights(self): method test_tied_weights_keys (line 2052) | def test_tied_weights_keys(self): method test_model_weights_reload_no_missing_tied_weights (line 2083) | def test_model_weights_reload_no_missing_tied_weights(self): method test_model_outputs_equivalence (line 2144) | def test_model_outputs_equivalence(self): method _make_attention_mask_non_null (line 2220) | def _make_attention_mask_non_null(self, inputs_dict): method _postprocessing_to_ignore_test_cases (line 2248) | def _postprocessing_to_ignore_test_cases(self, tf_outputs, pt_outputs,... method check_pt_tf_outputs (line 2278) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method prepare_tf_inputs_from_pt_inputs (line 2369) | def prepare_tf_inputs_from_pt_inputs(self, pt_inputs_dict): method check_pt_tf_models (line 2389) | def check_pt_tf_models(self, tf_model, pt_model, pt_inputs_dict): method test_pt_tf_model_equivalence (line 2417) | def test_pt_tf_model_equivalence(self, allow_missing_keys=False): method assert_almost_equals (line 2501) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method check_pt_flax_outputs (line 2505) | def check_pt_flax_outputs(self, fx_outputs, pt_outputs, model_class, t... method test_equivalence_pt_to_flax (line 2599) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 2670) | def test_equivalence_flax_to_pt(self): method test_inputs_embeds (line 2749) | def test_inputs_embeds(self): method test_inputs_embeds_matches_input_ids (line 2778) | def test_inputs_embeds_matches_input_ids(self): method test_inputs_embeds_matches_input_ids_with_generate (line 2823) | def test_inputs_embeds_matches_input_ids_with_generate(self): method test_multi_gpu_data_parallel_forward (line 2875) | def test_multi_gpu_data_parallel_forward(self): method test_model_parallelization (line 2900) | def test_model_parallelization(self): method test_model_parallel_equal_results (line 2962) | def test_model_parallel_equal_results(self): method check_device_map_is_respected (line 2995) | def check_device_map_is_respected(self, model, device_map): method test_disk_offload_bin (line 3015) | def test_disk_offload_bin(self): method test_disk_offload_safetensors (line 3056) | def test_disk_offload_safetensors(self): method test_cpu_offload (line 3091) | def test_cpu_offload(self): method test_model_parallelism (line 3130) | def test_model_parallelism(self): method test_problem_types (line 3165) | def test_problem_types(self): method test_load_with_mismatched_shapes (line 3211) | def test_load_with_mismatched_shapes(self): method test_mismatched_shapes_have_properly_initialized_weights (line 3255) | def test_mismatched_shapes_have_properly_initialized_weights(self): method test_matched_shapes_have_loaded_weights_when_some_mismatched_shapes_exist (line 3368) | def test_matched_shapes_have_loaded_weights_when_some_mismatched_shape... method test_model_is_small (line 3436) | def test_model_is_small(self): method test_flash_attn_2_conversion (line 3451) | def test_flash_attn_2_conversion(self): method test_flash_attn_2_inference_equivalence (line 3480) | def test_flash_attn_2_inference_equivalence(self): method test_flash_attn_2_inference_equivalence_right_padding (line 3577) | def test_flash_attn_2_inference_equivalence_right_padding(self): method test_flash_attn_2_generate_left_padding (line 3670) | def test_flash_attn_2_generate_left_padding(self): method test_flash_attn_2_generate_padding_right (line 3718) | def test_flash_attn_2_generate_padding_right(self): method test_eager_matches_sdpa_inference (line 3764) | def test_eager_matches_sdpa_inference(self, torch_dtype: str): method test_sdpa_can_dispatch_on_flash (line 4065) | def test_sdpa_can_dispatch_on_flash(self): method test_sdpa_can_compile_dynamic (line 4111) | def test_sdpa_can_compile_dynamic(self): method test_eager_matches_sdpa_generate (line 4154) | def test_eager_matches_sdpa_generate(self): method test_sdpa_matches_eager_sliding_window (line 4227) | def test_sdpa_matches_eager_sliding_window(self): method test_flash_attn_2_generate_use_cache (line 4284) | def test_flash_attn_2_generate_use_cache(self): method test_flash_attn_2_generate_reuse_cache (line 4343) | def test_flash_attn_2_generate_reuse_cache(self): method test_flash_attn_2_fp32_ln (line 4400) | def test_flash_attn_2_fp32_ln(self): method test_flash_attention_2_padding_matches_padding_free_with_position_ids (line 4456) | def test_flash_attention_2_padding_matches_padding_free_with_position_... method test_tf_from_pt_safetensors (line 4526) | def test_tf_from_pt_safetensors(self): method test_flax_from_pt_safetensors (line 4550) | def test_flax_from_pt_safetensors(self): method test_flash_attn_2_from_config (line 4576) | def test_flash_attn_2_from_config(self): method _get_custom_4d_mask_test_data (line 4620) | def _get_custom_4d_mask_test_data(self): method test_custom_4d_attention_mask (line 4655) | def test_custom_4d_attention_mask(self): method test_static_cache_matches_dynamic (line 4698) | def test_static_cache_matches_dynamic(self): method test_torch_compile (line 4740) | def test_torch_compile(self): method test_compile_cuda_graph_time (line 4770) | def test_compile_cuda_graph_time(self): function ids_tensor (line 4831) | def ids_tensor(shape, vocab_size, rng=None, name=None): function random_attention_mask (line 4847) | def random_attention_mask(shape, rng=None, name=None): function floats_tensor (line 4855) | def floats_tensor(shape, scale=1.0, rng=None, name=None): FILE: mplsandbox_for_rl/transformers/tests/test_modeling_flax_common.py function ids_tensor (line 61) | def ids_tensor(shape, vocab_size, rng=None): function floats_tensor (line 79) | def floats_tensor(shape, scale=1.0, rng=None, name=None): function random_attention_mask (line 95) | def random_attention_mask(shape, rng=None): function get_params (line 102) | def get_params(params, from_head_prefix=None): class FlaxModelTesterMixin (line 127) | class FlaxModelTesterMixin: method _prepare_for_class (line 135) | def _prepare_for_class(self, inputs_dict, model_class): method assert_almost_equals (line 149) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_model_outputs_equivalence (line 153) | def test_model_outputs_equivalence(self): method check_pt_flax_outputs (line 183) | def check_pt_flax_outputs(self, fx_outputs, pt_outputs, model_class, t... method test_equivalence_pt_to_flax (line 277) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 331) | def test_equivalence_flax_to_pt(self): method test_from_pretrained_save_pretrained (line 391) | def test_from_pretrained_save_pretrained(self): method test_save_load_from_base (line 427) | def test_save_load_from_base(self): method test_save_load_to_base (line 449) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 472) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 501) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 529) | def test_save_load_bf16_to_base_pt(self): method test_jit_compilation (line 557) | def test_jit_compilation(self): method test_forward_signature (line 580) | def test_forward_signature(self): method test_naming_convention (line 601) | def test_naming_convention(self): method test_hidden_states_output (line 612) | def test_hidden_states_output(self): method test_attention_outputs (line 658) | def test_attention_outputs(self): method test_load_with_mismatched_shapes (line 746) | def test_load_with_mismatched_shapes(self): method test_default_params_dtype (line 787) | def test_default_params_dtype(self): method test_to_bf16 (line 799) | def test_to_bf16(self): method test_to_fp16 (line 827) | def test_to_fp16(self): method test_to_fp32 (line 855) | def test_to_fp32(self): method test_save_load_in_fp16 (line 888) | def test_save_load_in_fp16(self): method test_save_load_in_bf16 (line 905) | def test_save_load_in_bf16(self): method test_model_main_input_name (line 922) | def test_model_main_input_name(self): method test_headmasking (line 929) | def test_headmasking(self): method test_no_automatic_init (line 976) | def test_no_automatic_init(self): method test_from_pretrained_with_no_automatic_init (line 1011) | def test_from_pretrained_with_no_automatic_init(self): method test_checkpoint_sharding_from_hub (line 1063) | def test_checkpoint_sharding_from_hub(self): method test_checkpoint_sharding_local (line 1070) | def test_checkpoint_sharding_local(self): method test_from_sharded_pt (line 1117) | def test_from_sharded_pt(self): method test_gradient_checkpointing (line 1124) | def test_gradient_checkpointing(self): FILE: mplsandbox_for_rl/transformers/tests/test_modeling_tf_common.py function _config_zero_init (line 105) | def _config_zero_init(config): class TFModelTesterMixin (line 114) | class TFModelTesterMixin: method _prepare_for_class (line 124) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_initialization (line 178) | def test_initialization(self): method test_save_load (line 181) | def test_save_load(self): method test_save_load_config (line 202) | def test_save_load_config(self): method test_saved_model_creation (line 221) | def test_saved_model_creation(self): method test_prepare_serving_output (line 241) | def test_prepare_serving_output(self): method test_forward_signature (line 261) | def test_forward_signature(self): method test_onnx_compliancy (line 292) | def test_onnx_compliancy(self): method test_onnx_runtime_optimize (line 339) | def test_onnx_runtime_optimize(self): method test_keras_save_load (line 356) | def test_keras_save_load(self): method assert_outputs_same (line 410) | def assert_outputs_same(self, after_outputs, outputs): method _make_attention_mask_non_null (line 427) | def _make_attention_mask_non_null(self, inputs_dict): method _postprocessing_to_ignore_test_cases (line 458) | def _postprocessing_to_ignore_test_cases(self, tf_outputs, pt_outputs,... method check_pt_tf_outputs (line 487) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method prepare_pt_inputs_from_tf_inputs (line 578) | def prepare_pt_inputs_from_tf_inputs(self, tf_inputs_dict): method check_pt_tf_models (line 597) | def check_pt_tf_models(self, tf_model, pt_model, tf_inputs_dict): method test_pt_tf_model_equivalence (line 625) | def test_pt_tf_model_equivalence(self, allow_missing_keys=False): method test_compile_tf_model (line 694) | def test_compile_tf_model(self): method test_keyword_and_dict_args (line 718) | def test_keyword_and_dict_args(self): method test_attention_outputs (line 734) | def test_attention_outputs(self): method test_headmasking (line 798) | def test_headmasking(self): method test_hidden_states_output (line 871) | def test_hidden_states_output(self): method test_model_common_attributes (line 913) | def test_model_common_attributes(self): method test_determinism (line 946) | def test_determinism(self): method test_model_outputs_equivalence (line 962) | def test_model_outputs_equivalence(self): method test_inputs_embeds (line 1023) | def test_inputs_embeds(self): method test_numpy_arrays_inputs (line 1050) | def test_numpy_arrays_inputs(self): method test_valid_input_signature_and_dummies (line 1073) | def test_valid_input_signature_and_dummies(self): method test_resize_token_embeddings (line 1083) | def test_resize_token_embeddings(self): method test_save_load_after_resize_token_embeddings (line 1146) | def test_save_load_after_resize_token_embeddings(self): method test_embeddings_out_of_bounds_raise_exception (line 1193) | def test_embeddings_out_of_bounds_raise_exception(self): method test_lm_head_model_random_no_beam_search_generate (line 1211) | def test_lm_head_model_random_no_beam_search_generate(self): method test_lm_head_model_no_beam_search_generate_dict_outputs (line 1247) | def test_lm_head_model_no_beam_search_generate_dict_outputs(self): method test_lm_head_model_random_beam_search_generate (line 1280) | def test_lm_head_model_random_beam_search_generate(self): method test_lm_head_model_beam_search_generate_dict_outputs (line 1320) | def test_lm_head_model_beam_search_generate_dict_outputs(self): method test_loss_computation (line 1355) | def test_loss_computation(self): method check_keras_fit_results (line 1430) | def check_keras_fit_results(self, val_loss1, val_loss2, atol=1e-2, rto... method test_keras_fit (line 1434) | def test_keras_fit(self): method test_int_support (line 1535) | def test_int_support(self): method test_generate_with_headmasking (line 1574) | def test_generate_with_headmasking(self): method test_load_with_mismatched_shapes (line 1608) | def test_load_with_mismatched_shapes(self): method test_model_main_input_name (line 1654) | def test_model_main_input_name(self): method test_dataset_conversion (line 1661) | def test_dataset_conversion(self): method _test_xla_generate (line 1717) | def _test_xla_generate(self, **generate_kwargs): method test_xla_generate_fast (line 1775) | def test_xla_generate_fast(self): method test_xla_generate_contrastive (line 1785) | def test_xla_generate_contrastive(self): method test_xla_generate_slow (line 1796) | def test_xla_generate_slow(self): method _generate_random_bad_tokens (line 1806) | def _generate_random_bad_tokens(self, num_bad_tokens, model): method _check_generated_ids (line 1824) | def _check_generated_ids(self, output_ids): method _check_match_tokens (line 1829) | def _check_match_tokens(self, generated_ids, bad_words_ids): function ids_tensor (line 1842) | def ids_tensor(shape, vocab_size, rng=None, name=None, dtype=None): function random_attention_mask (line 1860) | def random_attention_mask(shape, rng=None, name=None, dtype=None): function floats_tensor (line 1867) | def floats_tensor(shape, scale=1.0, rng=None, name=None, dtype=None): FILE: mplsandbox_for_rl/transformers/tests/test_pipeline_mixin.py class PipelineTesterMixin (line 124) | class PipelineTesterMixin: method run_task_tests (line 129) | def run_task_tests(self, task, torch_dtype="float32"): method run_model_pipeline_tests (line 179) | def run_model_pipeline_tests( method run_pipeline_test (line 223) | def run_pipeline_test( method test_pipeline_audio_classification (line 340) | def test_pipeline_audio_classification(self): method test_pipeline_audio_classification_fp16 (line 345) | def test_pipeline_audio_classification_fp16(self): method test_pipeline_automatic_speech_recognition (line 349) | def test_pipeline_automatic_speech_recognition(self): method test_pipeline_automatic_speech_recognition_fp16 (line 354) | def test_pipeline_automatic_speech_recognition_fp16(self): method test_pipeline_depth_estimation (line 361) | def test_pipeline_depth_estimation(self): method test_pipeline_depth_estimation_fp16 (line 368) | def test_pipeline_depth_estimation_fp16(self): method test_pipeline_document_question_answering (line 375) | def test_pipeline_document_question_answering(self): method test_pipeline_document_question_answering_fp16 (line 382) | def test_pipeline_document_question_answering_fp16(self): method test_pipeline_feature_extraction (line 386) | def test_pipeline_feature_extraction(self): method test_pipeline_feature_extraction_fp16 (line 391) | def test_pipeline_feature_extraction_fp16(self): method test_pipeline_fill_mask (line 395) | def test_pipeline_fill_mask(self): method test_pipeline_fill_mask_fp16 (line 400) | def test_pipeline_fill_mask_fp16(self): method test_pipeline_image_classification (line 406) | def test_pipeline_image_classification(self): method test_pipeline_image_classification_fp16 (line 412) | def test_pipeline_image_classification_fp16(self): method test_pipeline_image_segmentation (line 419) | def test_pipeline_image_segmentation(self): method test_pipeline_image_segmentation_fp16 (line 426) | def test_pipeline_image_segmentation_fp16(self): method test_pipeline_image_to_text (line 431) | def test_pipeline_image_to_text(self): method test_pipeline_image_to_text_fp16 (line 437) | def test_pipeline_image_to_text_fp16(self): method test_pipeline_image_feature_extraction (line 444) | def test_pipeline_image_feature_extraction(self): method test_pipeline_image_feature_extraction_fp16 (line 451) | def test_pipeline_image_feature_extraction_fp16(self): method test_pipeline_mask_generation (line 458) | def test_pipeline_mask_generation(self): method test_pipeline_mask_generation_fp16 (line 465) | def test_pipeline_mask_generation_fp16(self): method test_pipeline_object_detection (line 472) | def test_pipeline_object_detection(self): method test_pipeline_object_detection_fp16 (line 479) | def test_pipeline_object_detection_fp16(self): method test_pipeline_question_answering (line 483) | def test_pipeline_question_answering(self): method test_pipeline_question_answering_fp16 (line 488) | def test_pipeline_question_answering_fp16(self): method test_pipeline_summarization (line 492) | def test_pipeline_summarization(self): method test_pipeline_summarization_fp16 (line 497) | def test_pipeline_summarization_fp16(self): method test_pipeline_table_question_answering (line 501) | def test_pipeline_table_question_answering(self): method test_pipeline_table_question_answering_fp16 (line 506) | def test_pipeline_table_question_answering_fp16(self): method test_pipeline_text2text_generation (line 510) | def test_pipeline_text2text_generation(self): method test_pipeline_text2text_generation_fp16 (line 515) | def test_pipeline_text2text_generation_fp16(self): method test_pipeline_text_classification (line 519) | def test_pipeline_text_classification(self): method test_pipeline_text_classification_fp16 (line 524) | def test_pipeline_text_classification_fp16(self): method test_pipeline_text_generation (line 529) | def test_pipeline_text_generation(self): method test_pipeline_text_generation_fp16 (line 534) | def test_pipeline_text_generation_fp16(self): method test_pipeline_text_to_audio (line 539) | def test_pipeline_text_to_audio(self): method test_pipeline_text_to_audio_fp16 (line 544) | def test_pipeline_text_to_audio_fp16(self): method test_pipeline_token_classification (line 548) | def test_pipeline_token_classification(self): method test_pipeline_token_classification_fp16 (line 553) | def test_pipeline_token_classification_fp16(self): method test_pipeline_translation (line 557) | def test_pipeline_translation(self): method test_pipeline_translation_fp16 (line 562) | def test_pipeline_translation_fp16(self): method test_pipeline_video_classification (line 569) | def test_pipeline_video_classification(self): method test_pipeline_video_classification_fp16 (line 576) | def test_pipeline_video_classification_fp16(self): method test_pipeline_visual_question_answering (line 582) | def test_pipeline_visual_question_answering(self): method test_pipeline_visual_question_answering_fp16 (line 588) | def test_pipeline_visual_question_answering_fp16(self): method test_pipeline_zero_shot (line 592) | def test_pipeline_zero_shot(self): method test_pipeline_zero_shot_fp16 (line 597) | def test_pipeline_zero_shot_fp16(self): method test_pipeline_zero_shot_audio_classification (line 602) | def test_pipeline_zero_shot_audio_classification(self): method test_pipeline_zero_shot_audio_classification_fp16 (line 607) | def test_pipeline_zero_shot_audio_classification_fp16(self): method test_pipeline_zero_shot_image_classification (line 612) | def test_pipeline_zero_shot_image_classification(self): method test_pipeline_zero_shot_image_classification_fp16 (line 618) | def test_pipeline_zero_shot_image_classification_fp16(self): method test_pipeline_zero_shot_object_detection (line 624) | def test_pipeline_zero_shot_object_detection(self): method test_pipeline_zero_shot_object_detection_fp16 (line 630) | def test_pipeline_zero_shot_object_detection_fp16(self): method is_pipeline_test_to_skip (line 634) | def is_pipeline_test_to_skip( method is_pipeline_test_to_skip_more (line 652) | def is_pipeline_test_to_skip_more(self, pipeline_test_casse_name, conf... function validate_test_components (line 667) | def validate_test_components(test_case, task, model, tokenizer, processor): FILE: mplsandbox_for_rl/transformers/tests/test_processing_common.py class ProcessorTesterMixin (line 50) | class ProcessorTesterMixin: method prepare_processor_dict (line 53) | def prepare_processor_dict(self): method get_component (line 56) | def get_component(self, attribute, **kwargs): method prepare_components (line 69) | def prepare_components(self): method get_processor (line 77) | def get_processor(self): method prepare_image_inputs (line 83) | def prepare_image_inputs(self): method test_processor_to_json_string (line 91) | def test_processor_to_json_string(self): method test_processor_from_and_save_pretrained (line 98) | def test_processor_from_and_save_pretrained(self): method skip_processor_without_typed_kwargs (line 112) | def skip_processor_without_typed_kwargs(self, processor): method test_tokenizer_defaults_preserved_by_kwargs (line 127) | def test_tokenizer_defaults_preserved_by_kwargs(self): method test_image_processor_defaults_preserved_by_image_kwargs (line 143) | def test_image_processor_defaults_preserved_by_image_kwargs(self): method test_kwargs_overrides_default_tokenizer_kwargs (line 160) | def test_kwargs_overrides_default_tokenizer_kwargs(self): method test_kwargs_overrides_default_image_processor_kwargs (line 178) | def test_kwargs_overrides_default_image_processor_kwargs(self): method test_unstructured_kwargs (line 195) | def test_unstructured_kwargs(self): method test_unstructured_kwargs_batched (line 220) | def test_unstructured_kwargs_batched(self): method test_doubly_passed_kwargs (line 246) | def test_doubly_passed_kwargs(self): method test_structured_kwargs_nested (line 267) | def test_structured_kwargs_nested(self): method test_structured_kwargs_nested_from_dict (line 295) | def test_structured_kwargs_nested_from_dict(self): class MyProcessor (line 320) | class MyProcessor(ProcessorMixin): method __init__ (line 325) | def __init__(self, image_processor=None, tokenizer=None, processor_att... class ProcessorTest (line 334) | class ProcessorTest(unittest.TestCase): method prepare_processor_dict (line 337) | def prepare_processor_dict(self): method get_processor (line 340) | def get_processor(self): method test_processor_to_json_string (line 347) | def test_processor_to_json_string(self): method test_processor_from_and_save_pretrained (line 354) | def test_processor_from_and_save_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/test_sequence_feature_extraction_common.py class SequenceFeatureExtractionTestMixin (line 25) | class SequenceFeatureExtractionTestMixin(FeatureExtractionSavingTestMixin): method feat_extract_dict (line 31) | def feat_extract_dict(self): method test_feat_extract_common_properties (line 34) | def test_feat_extract_common_properties(self): method test_batch_feature (line 40) | def test_batch_feature(self): method test_batch_feature_pt (line 63) | def test_batch_feature_pt(self): method test_batch_feature_tf (line 81) | def test_batch_feature_tf(self): method _check_padding (line 98) | def _check_padding(self, numpify=False): method _check_truncation (line 220) | def _check_truncation(self, numpify=False): method test_padding_from_list (line 351) | def test_padding_from_list(self): method test_padding_from_array (line 354) | def test_padding_from_array(self): method test_truncation_from_list (line 357) | def test_truncation_from_list(self): method test_truncation_from_array (line 360) | def test_truncation_from_array(self): method test_padding_accepts_tensors_pt (line 364) | def test_padding_accepts_tensors_pt(self): method test_padding_accepts_tensors_tf (line 377) | def test_padding_accepts_tensors_tf(self): method test_attention_mask (line 389) | def test_attention_mask(self): method test_attention_mask_with_truncation (line 404) | def test_attention_mask_with_truncation(self): FILE: mplsandbox_for_rl/transformers/tests/test_tokenization_common.py function filter_non_english (line 81) | def filter_non_english(_, pretrained_name: str): function filter_roberta_detectors (line 86) | def filter_roberta_detectors(_, pretrained_name: str): function merge_model_tokenizer_mappings (line 90) | def merge_model_tokenizer_mappings( function _test_subword_regularization_tokenizer (line 116) | def _test_subword_regularization_tokenizer(in_queue, out_queue, timeout): function check_subword_sampling (line 139) | def check_subword_sampling( class TokenizerTesterMixin (line 181) | class TokenizerTesterMixin: method setUp (line 200) | def setUp(self) -> None: method tearDown (line 224) | def tearDown(self): method get_input_output_texts (line 227) | def get_input_output_texts(self, tokenizer): method get_clean_sequence (line 231) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method get_tokenizers (line 259) | def get_tokenizers(self, fast=True, **kwargs) -> List[PreTrainedTokeni... method get_tokenizer (line 269) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 272) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method tokenizer_integration_test_util (line 275) | def tokenizer_integration_test_util( method assert_padded_input_match (line 347) | def assert_padded_input_match(self, input_r: list, input_p: list, max_... method assert_batch_padded_input_match (line 357) | def assert_batch_padded_input_match( method convert_batch_encode_plus_format_to_encode_plus (line 384) | def convert_batch_encode_plus_format_to_encode_plus(batch_encode_plus_... method test_tokenize_special_tokens (line 393) | def test_tokenize_special_tokens(self): method test_sentencepiece_tokenize_and_convert_tokens_to_string (line 417) | def test_sentencepiece_tokenize_and_convert_tokens_to_string(self): method test_sentencepiece_tokenize_and_decode (line 450) | def test_sentencepiece_tokenize_and_decode(self): method test_subword_regularization_tokenizer (line 467) | def test_subword_regularization_tokenizer(self) -> None: method test_pickle_subword_regularization_tokenizer (line 485) | def test_pickle_subword_regularization_tokenizer(self) -> None: method test_save_sentencepiece_tokenizer (line 507) | def test_save_sentencepiece_tokenizer(self) -> None: method test_model_input_names_signature (line 534) | def test_model_input_names_signature(self): method test_rust_tokenizer_signature (line 546) | def test_rust_tokenizer_signature(self): method test_tokenizer_slow_store_full_signature (line 555) | def test_tokenizer_slow_store_full_signature(self): method test_tokenizer_fast_store_full_signature (line 566) | def test_tokenizer_fast_store_full_signature(self): method test_rust_and_python_full_tokenizers (line 581) | def test_rust_and_python_full_tokenizers(self): method test_tokenizers_common_properties (line 608) | def test_tokenizers_common_properties(self): method test_tokenizers_common_ids_setters (line 641) | def test_tokenizers_common_ids_setters(self): method test_tokenizers_special_tokens_properties_unset (line 679) | def test_tokenizers_special_tokens_properties_unset(self, verbose): method test_save_and_load_tokenizer (line 697) | def test_save_and_load_tokenizer(self): method test_pickle_tokenizer (line 792) | def test_pickle_tokenizer(self): method test_pickle_added_tokens (line 814) | def test_pickle_added_tokens(self): method test_added_tokens_do_lower_case (line 820) | def test_added_tokens_do_lower_case(self): method test_add_tokens_tokenizer (line 888) | def test_add_tokens_tokenizer(self): method test_add_special_tokens (line 946) | def test_add_special_tokens(self): method test_internal_consistency (line 969) | def test_internal_consistency(self): method test_encode_decode_with_spaces (line 988) | def test_encode_decode_with_spaces(self): method test_mask_output (line 1025) | def test_mask_output(self): method test_token_type_ids (line 1039) | def test_token_type_ids(self): method test_sequence_ids (line 1052) | def test_sequence_ids(self): method test_chat_template (line 1076) | def test_chat_template(self): method test_chat_template_batched (line 1119) | def test_chat_template_batched(self): method test_chat_template_return_assistant_tokens_mask (line 1157) | def test_chat_template_return_assistant_tokens_mask(self): method test_chat_template_dict (line 1286) | def test_chat_template_dict(self): method test_chat_template_dict_saving (line 1312) | def test_chat_template_dict_saving(self): method test_number_of_added_tokens (line 1331) | def test_number_of_added_tokens(self): method test_maximum_encoding_length_single_input (line 1347) | def test_maximum_encoding_length_single_input(self): method test_maximum_encoding_length_pair_input (line 1446) | def test_maximum_encoding_length_pair_input(self): method test_encode_decode_fast_slow_all_tokens (line 1717) | def test_encode_decode_fast_slow_all_tokens(self): method test_special_tokens_mask (line 1823) | def test_special_tokens_mask(self): method test_special_tokens_mask_input_pairs (line 1842) | def test_special_tokens_mask_input_pairs(self): method test_padding_side_in_kwargs (line 1867) | def test_padding_side_in_kwargs(self): method test_truncation_side_in_kwargs (line 1904) | def test_truncation_side_in_kwargs(self): method test_right_and_left_padding (line 1945) | def test_right_and_left_padding(self): method test_right_and_left_truncation (line 2007) | def test_right_and_left_truncation(self): method test_padding_to_max_length (line 2065) | def test_padding_to_max_length(self): method test_padding_to_multiple_of (line 2100) | def test_padding_to_multiple_of(self): method test_padding_with_attention_mask (line 2134) | def test_padding_with_attention_mask(self): method test_encode_plus_with_padding (line 2153) | def test_encode_plus_with_padding(self): method test_padding_warning_message_fast_tokenizer (line 2256) | def test_padding_warning_message_fast_tokenizer(self): method test_separate_tokenizers (line 2297) | def test_separate_tokenizers(self): method test_get_vocab (line 2310) | def test_get_vocab(self): method test_conversion_reversible (line 2325) | def test_conversion_reversible(self): method test_call (line 2336) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 2367) | def test_batch_encode_plus_batch_sequence_length(self): method test_added_token_are_matched_longest_first (line 2425) | def test_added_token_are_matched_longest_first(self): method test_added_token_serializable (line 2453) | def test_added_token_serializable(self): method test_batch_encode_plus_padding (line 2465) | def test_batch_encode_plus_padding(self): method test_pretokenized_inputs (line 2521) | def test_pretokenized_inputs(self): method test_prepare_for_model (line 2629) | def test_prepare_for_model(self): method test_batch_encode_plus_overflowing_tokens (line 2641) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_tensors (line 2654) | def test_batch_encode_plus_tensors(self): method _check_no_pad_token_padding (line 2695) | def _check_no_pad_token_padding(self, tokenizer, sequences): method test_torch_encode_plus_sent_to_model (line 2709) | def test_torch_encode_plus_sent_to_model(self): method test_tf_encode_plus_sent_to_model (line 2760) | def test_tf_encode_plus_sent_to_model(self): method test_np_encode_plus_sent_to_model (line 2795) | def test_np_encode_plus_sent_to_model(self): method test_prepare_seq2seq_batch (line 2842) | def test_prepare_seq2seq_batch(self): method test_is_fast (line 2889) | def test_is_fast(self): method test_fast_only_inputs (line 2900) | def test_fast_only_inputs(self): method test_alignement_methods (line 2911) | def test_alignement_methods(self): method test_tokenization_python_rust_equals (line 3137) | def test_tokenization_python_rust_equals(self): method test_num_special_tokens_to_add_equal (line 3178) | def test_num_special_tokens_to_add_equal(self): method test_max_length_equal (line 3196) | def test_max_length_equal(self): method test_special_tokens_map_equal (line 3210) | def test_special_tokens_map_equal(self): method test_add_tokens (line 3227) | def test_add_tokens(self): method test_offsets_mapping (line 3253) | def test_offsets_mapping(self): method test_batch_encode_dynamic_overflowing (line 3287) | def test_batch_encode_dynamic_overflowing(self): method test_compare_pretokenized_inputs (line 3354) | def test_compare_pretokenized_inputs(self): method test_create_token_type_ids (line 3436) | def test_create_token_type_ids(self): method test_build_inputs_with_special_tokens (line 3458) | def test_build_inputs_with_special_tokens(self): method test_padding (line 3503) | def test_padding(self, max_length=50): method test_padding_different_model_input_name (line 3729) | def test_padding_different_model_input_name(self): method test_save_pretrained (line 3767) | def test_save_pretrained(self): method test_embeded_special_tokens (line 3842) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 3871) | def test_compare_add_special_tokens(self): method test_compare_prepare_for_model (line 3910) | def test_compare_prepare_for_model(self): method test_special_tokens_initialization (line 3929) | def test_special_tokens_initialization(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 3960) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_training_new_tokenizer (line 4013) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 4048) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_tokenizer_mismatch_warning (line 4146) | def test_tokenizer_mismatch_warning(self): method test_saving_tokenizer_trainer (line 4192) | def test_saving_tokenizer_trainer(self): method test_convert_tokens_to_string_format (line 4212) | def test_convert_tokens_to_string_format(self): method test_save_slow_from_fast_and_reload_fast (line 4221) | def test_save_slow_from_fast_and_reload_fast(self): method test_split_special_tokens (line 4250) | def test_split_special_tokens(self): method test_added_tokens_serialization (line 4307) | def test_added_tokens_serialization(self): method test_special_token_addition (line 4387) | def test_special_token_addition(self): method test_tokenizer_initialization_with_conflicting_key (line 4412) | def test_tokenizer_initialization_with_conflicting_key(self): FILE: mplsandbox_for_rl/transformers/tests/tokenization/test_tokenization_fast.py class PreTrainedTokenizationFastTest (line 30) | class PreTrainedTokenizationFastTest(TokenizerTesterMixin, unittest.Test... method setUp (line 36) | def setUp(self): method test_tokenizer_mismatch_warning (line 53) | def test_tokenizer_mismatch_warning(self): method test_encode_decode_with_spaces (line 59) | def test_encode_decode_with_spaces(self): method test_added_tokens_serialization (line 65) | def test_added_tokens_serialization(self): method test_additional_special_tokens_serialization (line 71) | def test_additional_special_tokens_serialization(self): method test_prepare_for_model (line 75) | def test_prepare_for_model(self): method test_rust_tokenizer_signature (line 79) | def test_rust_tokenizer_signature(self): method test_training_new_tokenizer (line 82) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 99) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_training_new_tokenizer_with_bytelevel (line 116) | def test_training_new_tokenizer_with_bytelevel(self): method test_init_from_tokenizers_model (line 125) | def test_init_from_tokenizers_model(self): class TokenizerVersioningTest (line 175) | class TokenizerVersioningTest(unittest.TestCase): method test_local_versioning (line 176) | def test_local_versioning(self): method test_repo_versioning (line 203) | def test_repo_versioning(self): class ReduceMutableBorrowTests (line 224) | class ReduceMutableBorrowTests(unittest.TestCase): method test_async_share_tokenizer (line 225) | def test_async_share_tokenizer(self): method fetch (line 236) | def fetch(self, tokenizer, text): FILE: mplsandbox_for_rl/transformers/tests/tokenization/test_tokenization_utils.py class TokenizerUtilsTest (line 46) | class TokenizerUtilsTest(unittest.TestCase): method check_tokenizer_from_pretrained (line 47) | def check_tokenizer_from_pretrained(self, tokenizer_class): method assert_dump_and_restore (line 60) | def assert_dump_and_restore(self, be_original: BatchEncoding, equal_op... method test_pretrained_tokenizers (line 83) | def test_pretrained_tokenizers(self): method test_tensor_type_from_str (line 86) | def test_tensor_type_from_str(self): method test_batch_encoding_pickle (line 92) | def test_batch_encoding_pickle(self): method test_batch_encoding_pickle_tf (line 117) | def test_batch_encoding_pickle_tf(self): method test_batch_encoding_pickle_pt (line 138) | def test_batch_encoding_pickle_pt(self): method test_batch_encoding_is_fast (line 155) | def test_batch_encoding_is_fast(self): method test_batch_encoding_word_to_tokens (line 166) | def test_batch_encoding_word_to_tokens(self): method test_batch_encoding_with_labels (line 174) | def test_batch_encoding_with_labels(self): method test_batch_encoding_with_labels_pt (line 190) | def test_batch_encoding_with_labels_pt(self): method test_batch_encoding_with_labels_tf (line 206) | def test_batch_encoding_with_labels_tf(self): method test_batch_encoding_with_labels_jax (line 222) | def test_batch_encoding_with_labels_jax(self): method test_padding_accepts_tensors (line 237) | def test_padding_accepts_tensors(self): method test_padding_accepts_tensors_pt (line 249) | def test_padding_accepts_tensors_pt(self): method test_padding_accepts_tensors_tf (line 263) | def test_padding_accepts_tensors_tf(self): method test_instantiation_from_tokenizers (line 277) | def test_instantiation_from_tokenizers(self): method test_instantiation_from_tokenizers_json_file (line 282) | def test_instantiation_from_tokenizers_json_file(self): method test_len_tokenizer (line 288) | def test_len_tokenizer(self): FILE: mplsandbox_for_rl/transformers/tests/trainer/test_data_collator.py class DataCollatorIntegrationTest (line 48) | class DataCollatorIntegrationTest(unittest.TestCase): method setUp (line 49) | def setUp(self): method tearDown (line 57) | def tearDown(self): method test_default_with_dict (line 60) | def test_default_with_dict(self): method test_default_classification_and_regression (line 89) | def test_default_classification_and_regression(self): method test_default_with_no_labels (line 100) | def test_default_with_no_labels(self): method test_data_collator_with_padding (line 112) | def test_data_collator_with_padding(self): method test_data_collator_for_token_classification (line 129) | def test_data_collator_for_token_classification(self): method test_data_collator_for_token_classification_works_with_pt_tensors (line 167) | def test_data_collator_for_token_classification_works_with_pt_tensors(... method _test_data_collator_for_seq2seq (line 205) | def _test_data_collator_for_seq2seq(self, to_torch): method test_data_collator_for_seq2seq_with_lists (line 276) | def test_data_collator_for_seq2seq_with_lists(self): method test_data_collator_for_seq2seq_with_pt (line 279) | def test_data_collator_for_seq2seq_with_pt(self): method _test_no_pad_and_pad (line 282) | def _test_no_pad_and_pad(self, no_pad_features, pad_features): method test_data_collator_for_language_modeling (line 344) | def test_data_collator_for_language_modeling(self): method test_data_collator_for_whole_word_mask (line 353) | def test_data_collator_for_whole_word_mask(self): method test_plm (line 368) | def test_plm(self): method test_nsp (line 394) | def test_nsp(self): method test_sop (line 416) | def test_sop(self): class DataCollatorImmutabilityTest (line 444) | class DataCollatorImmutabilityTest(unittest.TestCase): method setUp (line 445) | def setUp(self): method tearDown (line 453) | def tearDown(self): method _turn_to_none (line 456) | def _turn_to_none(self, item): method _validate_original_data_against_collated_data (line 460) | def _validate_original_data_against_collated_data(self, collator, orig... method _validate_original_data_against_collated_data_on_specified_keys_and_datatypes (line 473) | def _validate_original_data_against_collated_data_on_specified_keys_an... method test_default_collator_immutability (line 496) | def test_default_collator_immutability(self): method test_with_padding_collator_immutability (line 536) | def test_with_padding_collator_immutability(self): method test_for_token_classification_collator_immutability (line 552) | def test_for_token_classification_collator_immutability(self): method test_seq2seq_collator_immutability (line 587) | def test_seq2seq_collator_immutability(self): method test_language_modelling_collator_immutability (line 637) | def test_language_modelling_collator_immutability(self): method test_whole_world_masking_collator_immutability (line 677) | def test_whole_world_masking_collator_immutability(self): method test_permutation_language_modelling_collator_immutability (line 697) | def test_permutation_language_modelling_collator_immutability(self): method test_next_sentence_prediction_collator_immutability (line 714) | def test_next_sentence_prediction_collator_immutability(self): method test_sentence_order_prediction_collator_immutability (line 736) | def test_sentence_order_prediction_collator_immutability(self): class TFDataCollatorIntegrationTest (line 768) | class TFDataCollatorIntegrationTest(unittest.TestCase): method setUp (line 769) | def setUp(self): method tearDown (line 778) | def tearDown(self): method test_default_with_dict (line 781) | def test_default_with_dict(self): method test_numpy_dtype_preservation (line 810) | def test_numpy_dtype_preservation(self): method test_default_classification_and_regression (line 818) | def test_default_classification_and_regression(self): method test_default_with_no_labels (line 829) | def test_default_with_no_labels(self): method test_data_collator_with_padding (line 841) | def test_data_collator_with_padding(self): method test_data_collator_for_token_classification (line 858) | def test_data_collator_for_token_classification(self): method test_data_collator_for_seq2seq (line 891) | def test_data_collator_for_seq2seq(self): method _test_no_pad_and_pad (line 959) | def _test_no_pad_and_pad(self, no_pad_features, pad_features): method test_data_collator_for_language_modeling (line 1023) | def test_data_collator_for_language_modeling(self): method test_data_collator_for_whole_word_mask (line 1032) | def test_data_collator_for_whole_word_mask(self): method test_plm (line 1047) | def test_plm(self): method test_nsp (line 1073) | def test_nsp(self): method test_sop (line 1095) | def test_sop(self): class TFDataCollatorImmutabilityTest (line 1123) | class TFDataCollatorImmutabilityTest(unittest.TestCase): method setUp (line 1124) | def setUp(self): method tearDown (line 1132) | def tearDown(self): method _turn_to_none (line 1135) | def _turn_to_none(self, item): method _validate_original_data_against_collated_data (line 1139) | def _validate_original_data_against_collated_data(self, collator, orig... method _validate_original_data_against_collated_data_on_specified_keys_and_datatypes (line 1154) | def _validate_original_data_against_collated_data_on_specified_keys_an... method test_default_collator_immutability (line 1177) | def test_default_collator_immutability(self): method test_with_padding_collator_immutability (line 1217) | def test_with_padding_collator_immutability(self): method test_for_token_classification_collator_immutability (line 1233) | def test_for_token_classification_collator_immutability(self): method test_seq2seq_collator_immutability (line 1268) | def test_seq2seq_collator_immutability(self): method test_language_modelling_collator_immutability (line 1324) | def test_language_modelling_collator_immutability(self): method test_whole_world_masking_collator_immutability (line 1364) | def test_whole_world_masking_collator_immutability(self): method test_permutation_language_modelling_collator_immutability (line 1384) | def test_permutation_language_modelling_collator_immutability(self): method test_next_sentence_prediction_collator_immutability (line 1401) | def test_next_sentence_prediction_collator_immutability(self): method test_sentence_order_prediction_collator_immutability (line 1423) | def test_sentence_order_prediction_collator_immutability(self): class NumpyDataCollatorIntegrationTest (line 1454) | class NumpyDataCollatorIntegrationTest(unittest.TestCase): method setUp (line 1455) | def setUp(self): method tearDown (line 1463) | def tearDown(self): method test_default_with_dict (line 1466) | def test_default_with_dict(self): method test_default_classification_and_regression (line 1495) | def test_default_classification_and_regression(self): method test_default_with_no_labels (line 1506) | def test_default_with_no_labels(self): method test_data_collator_with_padding (line 1518) | def test_data_collator_with_padding(self): method test_data_collator_with_flattening (line 1535) | def test_data_collator_with_flattening(self): method test_data_collator_for_token_classification (line 1553) | def test_data_collator_for_token_classification(self): method test_data_collator_for_seq2seq (line 1586) | def test_data_collator_for_seq2seq(self): method _test_no_pad_and_pad (line 1654) | def _test_no_pad_and_pad(self, no_pad_features, pad_features): method test_data_collator_for_language_modeling (line 1718) | def test_data_collator_for_language_modeling(self): method test_data_collator_for_whole_word_mask (line 1727) | def test_data_collator_for_whole_word_mask(self): method test_plm (line 1742) | def test_plm(self): method test_nsp (line 1768) | def test_nsp(self): method test_sop (line 1790) | def test_sop(self): class NumpyDataCollatorImmutabilityTest (line 1817) | class NumpyDataCollatorImmutabilityTest(unittest.TestCase): method setUp (line 1818) | def setUp(self): method tearDown (line 1826) | def tearDown(self): method _turn_to_none (line 1829) | def _turn_to_none(self, item): method _validate_original_data_against_collated_data (line 1833) | def _validate_original_data_against_collated_data(self, collator, orig... method _validate_original_data_against_collated_data_on_specified_keys_and_datatypes (line 1846) | def _validate_original_data_against_collated_data_on_specified_keys_an... method test_default_collator_immutability (line 1869) | def test_default_collator_immutability(self): method test_with_padding_collator_immutability (line 1909) | def test_with_padding_collator_immutability(self): method test_for_token_classification_collator_immutability (line 1925) | def test_for_token_classification_collator_immutability(self): method test_seq2seq_collator_immutability (line 1960) | def test_seq2seq_collator_immutability(self): method test_language_modelling_collator_immutability (line 2016) | def test_language_modelling_collator_immutability(self): method test_whole_world_masking_collator_immutability (line 2056) | def test_whole_world_masking_collator_immutability(self): method test_permutation_language_modelling_collator_immutability (line 2076) | def test_permutation_language_modelling_collator_immutability(self): method test_next_sentence_prediction_collator_immutability (line 2093) | def test_next_sentence_prediction_collator_immutability(self): method test_sentence_order_prediction_collator_immutability (line 2115) | def test_sentence_order_prediction_collator_immutability(self): FILE: mplsandbox_for_rl/transformers/tests/trainer/test_trainer.py class RegressionDataset (line 146) | class RegressionDataset: method __init__ (line 147) | def __init__(self, a=2, b=3, length=64, seed=42, label_names=None): method __len__ (line 155) | def __len__(self): method __getitem__ (line 158) | def __getitem__(self, i): function bytes2megabytes (line 165) | def bytes2megabytes(x): class TorchTracemalloc (line 170) | class TorchTracemalloc: method __enter__ (line 171) | def __enter__(self): method __exit__ (line 179) | def __exit__(self, *exc): class RegressionTrainingArguments (line 190) | class RegressionTrainingArguments(TrainingArguments): method __post_init__ (line 195) | def __post_init__(self): class RepeatDataset (line 203) | class RepeatDataset: method __init__ (line 204) | def __init__(self, x, length=64): method __len__ (line 208) | def __len__(self): method __getitem__ (line 211) | def __getitem__(self, i): class DynamicShapesDataset (line 215) | class DynamicShapesDataset: method __init__ (line 216) | def __init__(self, length=64, seed=42, batch_size=8): method __len__ (line 224) | def __len__(self): method __getitem__ (line 227) | def __getitem__(self, i): class AlmostAccuracy (line 231) | class AlmostAccuracy: method __init__ (line 232) | def __init__(self, thresh=0.25): method __call__ (line 235) | def __call__(self, eval_pred): class AlmostAccuracyBatched (line 241) | class AlmostAccuracyBatched: method __init__ (line 242) | def __init__(self, thresh=0.25): method __call__ (line 246) | def __call__(self, eval_pred, compute_result): class RegressionModelConfig (line 262) | class RegressionModelConfig(PretrainedConfig): method __init__ (line 263) | def __init__(self, a=0, b=0, double_output=False, random_torch=True, *... class SampleIterableDataset (line 274) | class SampleIterableDataset(IterableDataset): method __init__ (line 275) | def __init__(self, a=2, b=3, length=64, seed=42, label_names=None): method __iter__ (line 278) | def __iter__(self): class FiniteIterableDataset (line 282) | class FiniteIterableDataset(SampleIterableDataset): method __init__ (line 283) | def __init__(self, a=2, b=3, length=64, seed=42, label_names=None): method __iter__ (line 287) | def __iter__(self): class MultiLoader (line 292) | class MultiLoader: method __init__ (line 293) | def __init__(self, loaders): method __len__ (line 296) | def __len__(self): method __iter__ (line 299) | def __iter__(self): class CustomDataloaderTrainer (line 303) | class CustomDataloaderTrainer(Trainer): method get_train_dataloader (line 304) | def get_train_dataloader(self): method get_eval_dataloader (line 308) | def get_eval_dataloader(self, eval_dataset): class RegressionModel (line 312) | class RegressionModel(nn.Module): method __init__ (line 313) | def __init__(self, a=0, b=0, double_output=False): method forward (line 320) | def forward(self, input_x, labels=None, **kwargs): class RegressionDictModel (line 327) | class RegressionDictModel(nn.Module): method __init__ (line 328) | def __init__(self, a=0, b=0): method forward (line 334) | def forward(self, input_x, labels=None, **kwargs): class RegressionPreTrainedModel (line 341) | class RegressionPreTrainedModel(PreTrainedModel): method __init__ (line 345) | def __init__(self, config): method forward (line 351) | def forward(self, input_x, labels=None, **kwargs): class RegressionPreTrainedModelWithGradientCheckpointing (line 358) | class RegressionPreTrainedModelWithGradientCheckpointing(PreTrainedModel): method __init__ (line 363) | def __init__(self, config): method forward (line 370) | def forward(self, input_x, labels=None, **kwargs): class RegressionRandomPreTrainedModel (line 390) | class RegressionRandomPreTrainedModel(PreTrainedModel): method __init__ (line 394) | def __init__(self, config): method forward (line 400) | def forward(self, input_x, labels=None, **kwargs): class TstLayer (line 416) | class TstLayer(nn.Module): method __init__ (line 417) | def __init__(self, hidden_size): method forward (line 425) | def forward(self, x): function get_regression_trainer (line 430) | def get_regression_trainer( class TrainerIntegrationCommon (line 474) | class TrainerIntegrationCommon: method check_saved_checkpoints (line 475) | def check_saved_checkpoints(self, output_dir, freq, total, is_pretrain... method check_best_model_has_been_loaded (line 486) | def check_best_model_has_been_loaded( method check_trainer_state_are_the_same (line 513) | def check_trainer_state_are_the_same(self, trainer_state, trainer_stat... method convert_to_sharded_checkpoint (line 528) | def convert_to_sharded_checkpoint(self, folder, save_safe=True, load_s... class TrainerIntegrationPrerunTest (line 570) | class TrainerIntegrationPrerunTest(TestCasePlus, TrainerIntegrationCommon): method setUp (line 578) | def setUp(self): method check_trained_model (line 591) | def check_trained_model(self, model, alternate_seed=False): method test_reproducible_training (line 597) | def test_reproducible_training(self): method test_trainer_with_datasets (line 608) | def test_trainer_with_datasets(self): method test_model_init (line 638) | def test_model_init(self): method test_gradient_accumulation (line 654) | def test_gradient_accumulation(self): method test_gradient_checkpointing (line 662) | def test_gradient_checkpointing(self): method test_training_loss (line 680) | def test_training_loss(self): method test_custom_optimizer (line 701) | def test_custom_optimizer(self): method test_lr_scheduler_kwargs (line 715) | def test_lr_scheduler_kwargs(self): method test_cosine_with_min_lr_scheduler (line 743) | def test_cosine_with_min_lr_scheduler(self): method test_reduce_lr_on_plateau_args (line 767) | def test_reduce_lr_on_plateau_args(self): method test_reduce_lr_on_plateau (line 790) | def test_reduce_lr_on_plateau(self): method test_adafactor_lr_none (line 837) | def test_adafactor_lr_none(self): method test_mixed_bf16 (line 857) | def test_mixed_bf16(self): method test_tf32 (line 871) | def test_tf32(self): class TrainerIntegrationTest (line 881) | class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon): method setUp (line 882) | def setUp(self): method test_trainer_works_with_dict (line 888) | def test_trainer_works_with_dict(self): method test_evaluation_with_keys_to_drop (line 900) | def test_evaluation_with_keys_to_drop(self): method test_training_arguments_are_left_untouched (line 915) | def test_training_arguments_are_left_untouched(self): method test_number_of_steps_in_training (line 925) | def test_number_of_steps_in_training(self): method test_number_of_steps_in_training_with_ipex (line 943) | def test_number_of_steps_in_training_with_ipex(self): method test_bnb_compile (line 966) | def test_bnb_compile(self): method test_multiple_peft_adapters (line 1001) | def test_multiple_peft_adapters(self): method test_rmsprop_bnb (line 1058) | def test_rmsprop_bnb(self): method test_rmsprop_bnb_8bit (line 1075) | def test_rmsprop_bnb_8bit(self): method test_rmsprop_bnb_32bit (line 1092) | def test_rmsprop_bnb_32bit(self): method test_neftune (line 1107) | def test_neftune(self): method test_logging_inf_nan_filter (line 1161) | def test_logging_inf_nan_filter(self): method test_train_and_eval_dataloaders (line 1190) | def test_train_and_eval_dataloaders(self): method test_dataloader_without_dataset (line 1223) | def test_dataloader_without_dataset(self): method test_get_eval_dataloader_without_persistent_workers (line 1236) | def test_get_eval_dataloader_without_persistent_workers(self): method test_get_eval_dataloader_with_persistent_workers (line 1279) | def test_get_eval_dataloader_with_persistent_workers(self): method test_lomo (line 1329) | def test_lomo(self): method test_adalomo (line 1351) | def test_adalomo(self): method test_grokadamw (line 1372) | def test_grokadamw(): method test_galore_matched_modules (line 1392) | def test_galore_matched_modules(self): method test_galore (line 1475) | def test_galore(self): method test_galore_extra_args (line 1497) | def test_galore_extra_args(self): method test_galore_layerwise (line 1520) | def test_galore_layerwise(self): method test_galore_layerwise_with_scheduler (line 1542) | def test_galore_layerwise_with_scheduler(self): method test_galore_adamw_8bit (line 1565) | def test_galore_adamw_8bit(self): method test_galore_adafactor (line 1587) | def test_galore_adafactor(self): method test_galore_adafactor_attention_only (line 1619) | def test_galore_adafactor_attention_only(self): method test_galore_adafactor_all_linear (line 1650) | def test_galore_adafactor_all_linear(self): method test_galore_lr_display_without_scheduler (line 1681) | def test_galore_lr_display_without_scheduler(self): method test_galore_lr_display_with_scheduler (line 1707) | def test_galore_lr_display_with_scheduler(self): method test_data_is_not_parallelized_when_model_is_parallel (line 1758) | def test_data_is_not_parallelized_when_model_is_parallel(self): method test_evaluate (line 1777) | def test_evaluate(self): method test_evaluate_with_batch_eval_metrics (line 1815) | def test_evaluate_with_batch_eval_metrics(self): method test_evaluate_with_jit (line 1858) | def test_evaluate_with_jit(self): method test_evaluate_with_ipex (line 1901) | def test_evaluate_with_ipex(self): method test_predict (line 1953) | def test_predict(self): method test_predict_with_batch_eval_metrics (line 1985) | def test_predict_with_batch_eval_metrics(self): method test_predict_with_jit (line 2037) | def test_predict_with_jit(self): method test_predict_with_ipex (line 2073) | def test_predict_with_ipex(self): method test_dynamic_shapes (line 2116) | def test_dynamic_shapes(self): method test_log_level (line 2152) | def test_log_level(self): method test_save_checkpoints (line 2181) | def test_save_checkpoints(self): method test_safe_checkpoints (line 2194) | def test_safe_checkpoints(self): method test_load_best_model_with_save (line 2213) | def test_load_best_model_with_save(self): method test_run_seq2seq_double_train_wrap_once (line 2264) | def test_run_seq2seq_double_train_wrap_once(self): method test_can_resume_training (line 2277) | def test_can_resume_training(self): method test_resume_training_with_randomness (line 2378) | def test_resume_training_with_randomness(self): method test_auto_batch_size_finder (line 2436) | def test_auto_batch_size_finder(self): method test_auto_batch_size_with_resume_from_checkpoint_with_deepspeed (line 2469) | def test_auto_batch_size_with_resume_from_checkpoint_with_deepspeed(se... method test_auto_batch_size_with_resume_from_checkpoint (line 2505) | def test_auto_batch_size_with_resume_from_checkpoint(self): method test_training_with_resume_from_checkpoint_false (line 2541) | def test_training_with_resume_from_checkpoint_false(self): method test_resume_training_with_shard_checkpoint (line 2555) | def test_resume_training_with_shard_checkpoint(self): method test_resume_training_with_safe_checkpoint (line 2581) | def test_resume_training_with_safe_checkpoint(self): method test_resume_training_with_gradient_accumulation (line 2616) | def test_resume_training_with_gradient_accumulation(self): method test_resume_training_with_frozen_params (line 2654) | def test_resume_training_with_frozen_params(self): method test_load_best_model_at_end (line 2693) | def test_load_best_model_at_end(self): method test_load_best_model_from_safetensors (line 2765) | def test_load_best_model_from_safetensors(self): method test_trainer_eval_mrpc (line 2789) | def test_trainer_eval_mrpc(self): method test_trainer_eval_multiple (line 2804) | def test_trainer_eval_multiple(self): method test_trainer_eval_lm (line 2834) | def test_trainer_eval_lm(self): method test_training_iterable_dataset (line 2844) | def test_training_iterable_dataset(self): method test_evaluation_iterable_dataset (line 2859) | def test_evaluation_iterable_dataset(self): method test_predict_iterable_dataset (line 2887) | def test_predict_iterable_dataset(self): method test_num_train_epochs_in_training (line 2906) | def test_num_train_epochs_in_training(self): method test_early_stopping_callback (line 2921) | def test_early_stopping_callback(self): method test_flos_extraction (line 2957) | def test_flos_extraction(self): method check_checkpoint_deletion (line 2975) | def check_checkpoint_deletion(self, trainer, output_dir, expected): method test_checkpoint_rotation (line 2984) | def test_checkpoint_rotation(self): method test_compare_trainer_and_checkpoint_args_logging (line 3008) | def test_compare_trainer_and_checkpoint_args_logging(self): method check_mem_metrics (line 3046) | def check_mem_metrics(self, trainer, check_func): method test_mem_metrics (line 3064) | def test_mem_metrics(self): method test_fp16_full_eval (line 3074) | def test_fp16_full_eval(self): method test_torchdynamo_full_eval (line 3133) | def test_torchdynamo_full_eval(self): method test_torchdynamo_memory (line 3174) | def test_torchdynamo_memory(self): method test_bf16_full_eval (line 3245) | def test_bf16_full_eval(self): method test_no_wd_param_group (line 3303) | def test_no_wd_param_group(self): method test_end_to_end_example (line 3316) | def test_end_to_end_example(self): method test_accelerator_config_empty (line 3361) | def test_accelerator_config_empty(self): method test_accelerator_config_from_dict (line 3382) | def test_accelerator_config_from_dict(self): method test_accelerator_config_from_yaml (line 3413) | def test_accelerator_config_from_yaml(self): method test_accelerator_config_from_dataclass (line 3443) | def test_accelerator_config_from_dataclass(self): method test_accelerate_config_from_dataclass_grad_accum (line 3465) | def test_accelerate_config_from_dataclass_grad_accum(self): method test_accelerator_config_from_partial (line 3493) | def test_accelerator_config_from_partial(self): method test_accelerator_config_from_dict_with_deprecated_args (line 3514) | def test_accelerator_config_from_dict_with_deprecated_args(self): method test_accelerator_config_only_deprecated_args (line 3550) | def test_accelerator_config_only_deprecated_args(self): method test_accelerator_custom_state (line 3564) | def test_accelerator_custom_state(self): method test_accelerator_config_from_dict_grad_accum_num_steps (line 3575) | def test_accelerator_config_from_dict_grad_accum_num_steps(self): method test_accelerator_config_not_instantiated (line 3612) | def test_accelerator_config_not_instantiated(self): method test_torch_dtype_to_json (line 3641) | def test_torch_dtype_to_json(self): method test_eval_use_gather_object (line 3671) | def test_eval_use_gather_object(self): class TrainerIntegrationWithHubTester (line 3684) | class TrainerIntegrationWithHubTester(unittest.TestCase): method setUpClass (line 3686) | def setUpClass(cls): method tearDownClass (line 3691) | def tearDownClass(cls): method test_push_to_hub (line 3709) | def test_push_to_hub(self): method test_push_to_hub_in_organization (line 3729) | def test_push_to_hub_in_organization(self): method get_commit_history (line 3751) | def get_commit_history(self, repo): method test_push_to_hub_with_saves_each_epoch (line 3763) | def test_push_to_hub_with_saves_each_epoch(self): method test_push_to_hub_with_saves_each_n_steps (line 3784) | def test_push_to_hub_with_saves_each_n_steps(self): method test_push_to_hub_with_tensorboard_logs (line 3821) | def test_push_to_hub_with_tensorboard_logs(self): method test_push_to_hub_tags (line 3842) | def test_push_to_hub_tags(self): class TrainerHyperParameterOptunaIntegrationTest (line 3870) | class TrainerHyperParameterOptunaIntegrationTest(unittest.TestCase): method setUp (line 3871) | def setUp(self): method test_hyperparameter_search (line 3876) | def test_hyperparameter_search(self): class TrainerHyperParameterMultiObjectOptunaIntegrationTest (line 3916) | class TrainerHyperParameterMultiObjectOptunaIntegrationTest(unittest.Tes... method setUp (line 3917) | def setUp(self): method test_hyperparameter_search (line 3922) | def test_hyperparameter_search(self): class TrainerHyperParameterRayIntegrationTest (line 3972) | class TrainerHyperParameterRayIntegrationTest(unittest.TestCase): method setUp (line 3973) | def setUp(self): method ray_hyperparameter_search (line 3978) | def ray_hyperparameter_search(self): method test_hyperparameter_search (line 4022) | def test_hyperparameter_search(self): method test_hyperparameter_search_ray_client (line 4025) | def test_hyperparameter_search_ray_client(self): class TrainerHyperParameterSigOptIntegrationTest (line 4037) | class TrainerHyperParameterSigOptIntegrationTest(unittest.TestCase): method setUp (line 4038) | def setUp(self): method test_hyperparameter_search (line 4043) | def test_hyperparameter_search(self): class TrainerOptimizerChoiceTest (line 4216) | class TrainerOptimizerChoiceTest(unittest.TestCase): method check_optim_and_kwargs (line 4217) | def check_optim_and_kwargs(self, training_args: TrainingArguments, exp... method test_optim_supported (line 4228) | def test_optim_supported(self, training_args: TrainingArguments, expec... method test_fused_adam (line 4235) | def test_fused_adam(self): method test_fused_adam_no_apex (line 4253) | def test_fused_adam_no_apex(self): method test_bnb_adam8bit (line 4262) | def test_bnb_adam8bit(self): method test_bnb_paged_adam8bit_alias (line 4280) | def test_bnb_paged_adam8bit_alias(self): method test_bnb_paged_adam (line 4294) | def test_bnb_paged_adam(self): method test_bnb_paged_adam8bit (line 4308) | def test_bnb_paged_adam8bit(self): method test_bnb_lion (line 4322) | def test_bnb_lion(self): method test_bnb_lion8bit (line 4336) | def test_bnb_lion8bit(self): method test_bnb_paged_lion8bit (line 4350) | def test_bnb_paged_lion8bit(self): method test_bnb_paged_lion (line 4364) | def test_bnb_paged_lion(self): method test_bnb_adam8bit_no_bnb (line 4378) | def test_bnb_adam8bit_no_bnb(self): method test_bnb_paged_adam_no_bnb (line 4387) | def test_bnb_paged_adam_no_bnb(self): method test_bnb_paged_adam8bit_no_bnb (line 4396) | def test_bnb_paged_adam8bit_no_bnb(self): method test_bnb_paged_lion_no_bnb (line 4405) | def test_bnb_paged_lion_no_bnb(self): method test_bnb_paged_lion8bit_no_bnb (line 4414) | def test_bnb_paged_lion8bit_no_bnb(self): method test_anyprecision_adamw (line 4423) | def test_anyprecision_adamw(self): method test_no_torchdistx_anyprecision_adamw (line 4441) | def test_no_torchdistx_anyprecision_adamw(self): class TrainerHyperParameterWandbIntegrationTest (line 4453) | class TrainerHyperParameterWandbIntegrationTest(unittest.TestCase): method setUp (line 4454) | def setUp(self): method test_hyperparameter_search (line 4459) | def test_hyperparameter_search(self): class HyperParameterSearchBackendsTest (line 4506) | class HyperParameterSearchBackendsTest(unittest.TestCase): method test_hyperparameter_search_backends (line 4507) | def test_hyperparameter_search_backends(self): class OptimizerAndModelInspectionTest (line 4515) | class OptimizerAndModelInspectionTest(unittest.TestCase): method test_get_num_trainable_parameters (line 4516) | def test_get_num_trainable_parameters(self): method test_get_learning_rates (line 4529) | def test_get_learning_rates(self): method test_get_optimizer_group (line 4538) | def test_get_optimizer_group(self): FILE: mplsandbox_for_rl/transformers/tests/trainer/test_trainer_callback.py class MyTestExportableCallback (line 44) | class MyTestExportableCallback(TrainerCallback, ExportableState): method __init__ (line 45) | def __init__(self, my_test_state="test"): method state (line 48) | def state(self): class MyTestTrainerCallback (line 56) | class MyTestTrainerCallback(TrainerCallback): method __init__ (line 59) | def __init__(self, my_test_state="test"): method on_init_end (line 63) | def on_init_end(self, args, state, control, **kwargs): method on_train_begin (line 66) | def on_train_begin(self, args, state, control, **kwargs): method on_train_end (line 69) | def on_train_end(self, args, state, control, **kwargs): method on_epoch_begin (line 72) | def on_epoch_begin(self, args, state, control, **kwargs): method on_epoch_end (line 75) | def on_epoch_end(self, args, state, control, **kwargs): method on_step_begin (line 78) | def on_step_begin(self, args, state, control, **kwargs): method on_optimizer_step (line 81) | def on_optimizer_step(self, args, state, control, **kwargs): method on_step_end (line 84) | def on_step_end(self, args, state, control, **kwargs): method on_evaluate (line 87) | def on_evaluate(self, args, state, control, **kwargs): method on_predict (line 90) | def on_predict(self, args, state, control, **kwargs): method on_save (line 93) | def on_save(self, args, state, control, **kwargs): method on_log (line 96) | def on_log(self, args, state, control, **kwargs): method on_prediction_step (line 99) | def on_prediction_step(self, args, state, control, **kwargs): class TrainerCallbackTest (line 104) | class TrainerCallbackTest(unittest.TestCase): method setUp (line 105) | def setUp(self): method tearDown (line 108) | def tearDown(self): method get_trainer (line 111) | def get_trainer(self, a=0, b=0, train_len=64, eval_len=64, callbacks=N... method check_callbacks_equality (line 128) | def check_callbacks_equality(self, cbs1, cbs2): method get_expected_events (line 145) | def get_expected_events(self, trainer): method test_init_callback (line 167) | def test_init_callback(self): method test_add_remove_callback (line 182) | def test_add_remove_callback(self): method test_event_flow (line 217) | def test_event_flow(self): method test_stateful_callbacks (line 269) | def test_stateful_callbacks(self): method test_stateful_mixed_callbacks (line 303) | def test_stateful_mixed_callbacks(self): method test_stateful_duplicate_callbacks (line 346) | def test_stateful_duplicate_callbacks(self): method test_missing_stateful_callback (line 383) | def test_missing_stateful_callback(self): method test_stateful_control (line 412) | def test_stateful_control(self): FILE: mplsandbox_for_rl/transformers/tests/trainer/test_trainer_distributed.py class DummyDataset (line 43) | class DummyDataset(Dataset): method __init__ (line 44) | def __init__(self, length: int = 101): method __len__ (line 47) | def __len__(self): method __getitem__ (line 50) | def __getitem__(self, i) -> int: class DummyDataCollator (line 53) | class DummyDataCollator: method __call__ (line 54) | def __call__(self, features): class DummyModel (line 57) | class DummyModel(nn.Module): method __init__ (line 58) | def __init__(self): method forward (line 63) | def forward(self, input_ids, labels=None): class RegressionModel (line 69) | class RegressionModel(nn.Module): method __init__ (line 70) | def __init__(self, a=0, b=0, double_output=False): method forward (line 77) | def forward(self, input_x, labels=None, **kwargs): class SampleIterableDataset (line 84) | class SampleIterableDataset(IterableDataset): method __init__ (line 85) | def __init__(self, a=2, b=3, length=64, seed=42, label_names=None): method __iter__ (line 88) | def __iter__(self): class FiniteIterableDataset (line 92) | class FiniteIterableDataset(SampleIterableDataset): method __init__ (line 93) | def __init__(self, a=2, b=3, length=64, seed=42, label_names=None): method __iter__ (line 97) | def __iter__(self): class RegressionDataset (line 102) | class RegressionDataset: method __init__ (line 103) | def __init__(self, a=2, b=3, length=64, seed=42, label_names=None): method __len__ (line 111) | def __len__(self): method __getitem__ (line 114) | def __getitem__(self, i): class TestTrainerDistributedNeuronCore (line 120) | class TestTrainerDistributedNeuronCore(TestCasePlus): method test_trainer (line 122) | def test_trainer(self): class TestTrainerDistributedNPU (line 134) | class TestTrainerDistributedNPU(TestCasePlus): method test_trainer (line 136) | def test_trainer(self): class TestTrainerDistributed (line 148) | class TestTrainerDistributed(TestCasePlus): method test_trainer (line 150) | def test_trainer(self): class TestTrainerDistributedXPU (line 163) | class TestTrainerDistributedXPU(TestCasePlus): method test_trainer (line 164) | def test_trainer(self): function compute_metrics (line 194) | def compute_metrics(p: EvalPrediction) -> Dict: FILE: mplsandbox_for_rl/transformers/tests/trainer/test_trainer_seq2seq.py class Seq2seqTrainerTester (line 34) | class Seq2seqTrainerTester(TestCasePlus): method test_finetune_bert2bert (line 37) | def test_finetune_bert2bert(self): method test_return_sequences (line 140) | def test_return_sequences(self): method test_bad_generation_config_fail_early (line 188) | def test_bad_generation_config_fail_early(self): FILE: mplsandbox_for_rl/transformers/tests/trainer/test_trainer_tpu.py class DummyDataset (line 39) | class DummyDataset(Dataset): method __init__ (line 40) | def __init__(self, length: int = 101): method __len__ (line 43) | def __len__(self): method __getitem__ (line 46) | def __getitem__(self, i) -> int: class DummyDataCollator (line 49) | class DummyDataCollator: method __call__ (line 50) | def __call__(self, features): class DummyModel (line 53) | class DummyModel(nn.Module): method __init__ (line 54) | def __init__(self): method forward (line 59) | def forward(self, input_ids, labels=None): function main (line 66) | def main(): function _mp_fn (line 125) | def _mp_fn(index): FILE: mplsandbox_for_rl/transformers/tests/trainer/test_trainer_utils.py class TstLayer (line 49) | class TstLayer(nn.Module): method __init__ (line 50) | def __init__(self, hidden_size): method forward (line 58) | def forward(self, x): class RandomIterableDataset (line 63) | class RandomIterableDataset(IterableDataset): method __init__ (line 65) | def __init__(self, p_stop=0.01, max_length=1000): method __iter__ (line 70) | def __iter__(self): class TrainerUtilsTest (line 81) | class TrainerUtilsTest(unittest.TestCase): method test_distributed_tensor_gatherer (line 82) | def test_distributed_tensor_gatherer(self): method test_distributed_tensor_gatherer_different_shapes (line 112) | def test_distributed_tensor_gatherer_different_shapes(self): method test_label_smoothing (line 155) | def test_label_smoothing(self): method test_group_by_length (line 183) | def test_group_by_length(self): method test_group_by_length_with_dict (line 195) | def test_group_by_length_with_dict(self): method test_group_by_length_with_batch_encoding (line 210) | def test_group_by_length_with_batch_encoding(self): method test_distributed_length_grouped (line 225) | def test_distributed_length_grouped(self): method test_get_parameter_names (line 238) | def test_get_parameter_names(self): method test_distributed_sampler_with_loop (line 247) | def test_distributed_sampler_with_loop(self): method test_sequential_distributed_sampler (line 272) | def test_sequential_distributed_sampler(self): method check_iterable_dataset_shard (line 304) | def check_iterable_dataset_shard(self, dataset, batch_size, drop_last,... method test_iterable_dataset_shard (line 354) | def test_iterable_dataset_shard(self): method test_iterable_dataset_shard_with_length (line 363) | def test_iterable_dataset_shard_with_length(self): method check_shard_sampler (line 391) | def check_shard_sampler(self, dataset, batch_size, drop_last, num_proc... method test_shard_sampler (line 419) | def test_shard_sampler(self): method test_executable_batch_size (line 430) | def test_executable_batch_size(self): method test_executable_batch_size_no_search (line 444) | def test_executable_batch_size_no_search(self): method test_executable_batch_size_with_error (line 456) | def test_executable_batch_size_with_error(self): method test_pad_and_concatenate_with_1d (line 465) | def test_pad_and_concatenate_with_1d(self): method test_remove_columns_collator (line 477) | def test_remove_columns_collator(self): method test_eval_loop_container (line 502) | def test_eval_loop_container(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_activations.py class TestActivations (line 28) | class TestActivations(unittest.TestCase): method test_gelu_versions (line 29) | def test_gelu_versions(self): method test_gelu_10 (line 35) | def test_gelu_10(self): method test_get_activation (line 48) | def test_get_activation(self): method test_activations_are_distinct_objects (line 68) | def test_activations_are_distinct_objects(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_activations_tf.py class TestTFActivations (line 30) | class TestTFActivations(unittest.TestCase): method test_gelu_10 (line 31) | def test_gelu_10(self): method test_get_activation (line 44) | def test_get_activation(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_add_new_model_like.py class TestAddNewModelLike (line 89) | class TestAddNewModelLike(unittest.TestCase): method init_file (line 90) | def init_file(self, file_name, content): method check_result (line 94) | def check_result(self, file_name, expected_result): method test_re_class_func (line 99) | def test_re_class_func(self): method test_model_patterns_defaults (line 104) | def test_model_patterns_defaults(self): method test_parse_module_content (line 116) | def test_parse_module_content(self): method test_add_content_to_text (line 141) | def test_add_content_to_text(self): method test_add_content_to_file (line 170) | def test_add_content_to_file(self): method test_simplify_replacements (line 220) | def test_simplify_replacements(self): method test_replace_model_patterns (line 231) | def test_replace_model_patterns(self): method test_get_module_from_file (line 337) | def test_get_module_from_file(self): method test_duplicate_module (line 349) | def test_duplicate_module(self): method test_duplicate_module_with_copied_from (line 398) | def test_duplicate_module_with_copied_from(self): method test_filter_framework_files (line 446) | def test_filter_framework_files(self): method test_get_model_files (line 470) | def test_get_model_files(self): method test_get_model_files_only_pt (line 531) | def test_get_model_files_only_pt(self): method test_get_model_files_tf_and_flax (line 598) | def test_get_model_files_tf_and_flax(self): method test_find_base_model_checkpoint (line 659) | def test_find_base_model_checkpoint(self): method test_retrieve_model_classes (line 663) | def test_retrieve_model_classes(self): method test_retrieve_info_for_model_with_bert (line 686) | def test_retrieve_info_for_model_with_bert(self): method test_retrieve_info_for_model_pt_tf_with_bert (line 739) | def test_retrieve_info_for_model_pt_tf_with_bert(self): method test_retrieve_info_for_model_with_vit (line 788) | def test_retrieve_info_for_model_with_vit(self): method test_retrieve_info_for_model_with_wav2vec2 (line 833) | def test_retrieve_info_for_model_with_wav2vec2(self): method test_clean_frameworks_in_init_with_gpt (line 886) | def test_clean_frameworks_in_init_with_gpt(self): method test_clean_frameworks_in_init_with_vit (line 1138) | def test_clean_frameworks_in_init_with_vit(self): method test_duplicate_doc_file (line 1386) | def test_duplicate_doc_file(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_audio_utils.py class AudioUtilsFunctionTester (line 41) | class AudioUtilsFunctionTester(unittest.TestCase): method test_hertz_to_mel (line 42) | def test_hertz_to_mel(self): method test_mel_to_hertz (line 64) | def test_mel_to_hertz(self): method test_mel_filter_bank_shape (line 86) | def test_mel_filter_bank_shape(self): method test_mel_filter_bank_htk (line 121) | def test_mel_filter_bank_htk(self): method test_mel_filter_bank_slaney (line 153) | def test_mel_filter_bank_slaney(self): method test_mel_filter_bank_kaldi (line 185) | def test_mel_filter_bank_kaldi(self): method test_mel_filter_bank_slaney_norm (line 218) | def test_mel_filter_bank_slaney_norm(self): method test_window_function (line 250) | def test_window_function(self): method _load_datasamples (line 262) | def _load_datasamples(self, num_samples): method test_spectrogram_impulse (line 269) | def test_spectrogram_impulse(self): method test_spectrogram_batch_impulse (line 288) | def test_spectrogram_batch_impulse(self): method test_spectrogram_integration_test (line 323) | def test_spectrogram_integration_test(self): method test_spectrogram_batch_integration_test (line 423) | def test_spectrogram_batch_integration_test(self): method test_spectrogram_center_padding (line 596) | def test_spectrogram_center_padding(self): method test_spectrogram_batch_center_padding (line 685) | def test_spectrogram_batch_center_padding(self): method test_spectrogram_shapes (line 879) | def test_spectrogram_shapes(self): method test_spectrogram_batch_shapes (line 955) | def test_spectrogram_batch_shapes(self): method test_mel_spectrogram (line 1043) | def test_mel_spectrogram(self): method test_mel_spectrogram_batch (line 1086) | def test_mel_spectrogram_batch(self): method test_spectrogram_power (line 1147) | def test_spectrogram_power(self): method test_spectrogram_batch_power (line 1243) | def test_spectrogram_batch_power(self): method test_power_to_db (line 1456) | def test_power_to_db(self): method test_power_to_db_batch (line 1494) | def test_power_to_db_batch(self): method test_amplitude_to_db (line 1572) | def test_amplitude_to_db(self): method test_amplitude_to_db_batch (line 1610) | def test_amplitude_to_db_batch(self): method test_chroma_equivalence (line 1689) | def test_chroma_equivalence(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_backbone_utils.py class BackboneUtilsTester (line 36) | class BackboneUtilsTester(unittest.TestCase): method test_get_aligned_output_features_output_indices (line 37) | def test_get_aligned_output_features_output_indices(self): method test_verify_out_features_out_indices (line 60) | def test_verify_out_features_out_indices(self): method test_backbone_mixin (line 123) | def test_backbone_mixin(self): method test_load_backbone_from_config (line 145) | def test_load_backbone_from_config(self): method test_load_backbone_from_checkpoint (line 157) | def test_load_backbone_from_checkpoint(self): method test_load_backbone_backbone_kwargs (line 180) | def test_load_backbone_backbone_kwargs(self): method test_load_backbone_in_new_model (line 204) | def test_load_backbone_in_new_model(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_cache_utils.py class CacheTest (line 50) | class CacheTest(unittest.TestCase): method test_dynamic_cache_retrocompatibility (line 51) | def test_dynamic_cache_retrocompatibility(self): method test_reorder_cache_retrocompatibility (line 99) | def test_reorder_cache_retrocompatibility(self): method test_static_cache_mha_mqa_gqa (line 129) | def test_static_cache_mha_mqa_gqa(self): method test_static_cache_exportability (line 173) | def test_static_cache_exportability(self): class CacheIntegrationTest (line 236) | class CacheIntegrationTest(unittest.TestCase): method test_dynamic_cache_hard (line 237) | def test_dynamic_cache_hard(self): method test_dynamic_cache_batched (line 266) | def test_dynamic_cache_batched(self): method test_dynamic_cache_beam_search (line 281) | def test_dynamic_cache_beam_search(self): method test_hybrid_cache_n_sequences (line 302) | def test_hybrid_cache_n_sequences(self): method test_sink_cache_hard (line 327) | def test_sink_cache_hard(self): method test_sink_cache_iterative_prompts (line 340) | def test_sink_cache_iterative_prompts(self): method test_static_cache_greedy_decoding_pad_left (line 384) | def test_static_cache_greedy_decoding_pad_left(self, attn_implementati... method test_static_cache_greedy_decoding_pad_right (line 424) | def test_static_cache_greedy_decoding_pad_right(self, attn_implementat... method test_dynamic_cache_extra_left_padding (line 475) | def test_dynamic_cache_extra_left_padding(self): method test_static_cache_extra_left_padding (line 509) | def test_static_cache_extra_left_padding(self): method test_static_cache_beam_search (line 546) | def test_static_cache_beam_search(self): method test_offloaded_cache_equivalent_to_dynamic_cache (line 550) | def test_offloaded_cache_equivalent_to_dynamic_cache(self): method test_offloaded_cache_uses_less_memory_than_dynamic_cache (line 574) | def test_offloaded_cache_uses_less_memory_than_dynamic_cache(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_chat_template_utils.py class JsonSchemaGeneratorTest (line 21) | class JsonSchemaGeneratorTest(unittest.TestCase): method test_simple_function (line 22) | def test_simple_function(self): method test_no_arguments (line 44) | def test_no_arguments(self): method test_union (line 59) | def test_union(self): method test_optional (line 81) | def test_optional(self): method test_default_arg (line 103) | def test_default_arg(self): method test_nested_list (line 121) | def test_nested_list(self): method test_multiple_arguments (line 149) | def test_multiple_arguments(self): method test_multiple_complex_arguments (line 175) | def test_multiple_complex_arguments(self): method test_missing_docstring (line 205) | def test_missing_docstring(self): method test_missing_param_docstring (line 212) | def test_missing_param_docstring(self): method test_missing_type_hint (line 222) | def test_missing_type_hint(self): method test_return_value (line 235) | def test_return_value(self): method test_return_value_docstring (line 258) | def test_return_value_docstring(self): method test_tuple (line 285) | def test_tuple(self): method test_single_element_tuple_fails (line 317) | def test_single_element_tuple_fails(self): method test_ellipsis_type_fails (line 335) | def test_ellipsis_type_fails(self): method test_enum_extraction (line 353) | def test_enum_extraction(self): method test_multiline_docstring_with_types (line 387) | def test_multiline_docstring_with_types(self): method test_everything_all_at_once (line 422) | def test_everything_all_at_once(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_cli.py class CLITest (line 24) | class CLITest(unittest.TestCase): method test_cli_env (line 26) | def test_cli_env(self): method test_cli_pt_to_tf (line 40) | def test_cli_pt_to_tf(self): method test_cli_download (line 50) | def test_cli_download(self): method test_cli_download_trust_remote (line 76) | def test_cli_download_trust_remote(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_configuration_utils.py class ConfigPushToHubTester (line 95) | class ConfigPushToHubTester(unittest.TestCase): method setUpClass (line 97) | def setUpClass(cls): method _try_delete_repo (line 102) | def _try_delete_repo(repo_id, token): method test_push_to_hub (line 109) | def test_push_to_hub(self): method test_push_to_hub_via_save_pretrained (line 127) | def test_push_to_hub_via_save_pretrained(self): method test_push_to_hub_in_organization (line 146) | def test_push_to_hub_in_organization(self): method test_push_to_hub_in_organization_via_save_pretrained (line 163) | def test_push_to_hub_in_organization_via_save_pretrained(self): method test_push_to_hub_dynamic_config (line 181) | def test_push_to_hub_dynamic_config(self): class ConfigTestUtils (line 203) | class ConfigTestUtils(unittest.TestCase): method test_config_from_string (line 204) | def test_config_from_string(self): method test_config_common_kwargs_is_complete (line 220) | def test_config_common_kwargs_is_complete(self): method test_nested_config_load_from_dict (line 242) | def test_nested_config_load_from_dict(self): method test_from_pretrained_subfolder (line 249) | def test_from_pretrained_subfolder(self): method test_cached_files_are_used_when_internet_is_down (line 258) | def test_cached_files_are_used_when_internet_is_down(self): method test_local_versioning (line 275) | def test_local_versioning(self): method test_repo_versioning_before (line 297) | def test_repo_versioning_before(self): method test_saving_config_with_custom_generation_kwargs_raises_warning (line 318) | def test_saving_config_with_custom_generation_kwargs_raises_warning(se... method test_has_non_default_generation_parameters (line 326) | def test_has_non_default_generation_parameters(self): method test_loading_config_do_not_raise_future_warnings (line 334) | def test_loading_config_do_not_raise_future_warnings(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_convert_slow_tokenizer.py class FakeOriginalTokenizer (line 10) | class FakeOriginalTokenizer: class ConvertSlowTokenizerTest (line 14) | class ConvertSlowTokenizerTest(unittest.TestCase): method test_spm_converter_bytefallback_warning (line 15) | def test_spm_converter_bytefallback_warning(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_deprecation.py class DeprecationDecoratorTester (line 27) | class DeprecationDecoratorTester(unittest.TestCase): method test_rename_kwarg (line 28) | def test_rename_kwarg(self): method test_rename_multiple_kwargs (line 56) | def test_rename_multiple_kwargs(self): method test_warnings (line 83) | def test_warnings(self): method test_raises (line 124) | def test_raises(self): method test_additional_message (line 149) | def test_additional_message(self): method test_warning_for_both_names (line 162) | def test_warning_for_both_names(self, version): FILE: mplsandbox_for_rl/transformers/tests/utils/test_doc_samples.py class TestCodeExamples (line 33) | class TestCodeExamples(unittest.TestCase): method analyze_directory (line 34) | def analyze_directory( method test_modeling_examples (line 86) | def test_modeling_examples(self): method test_tokenization_examples (line 95) | def test_tokenization_examples(self): method test_configuration_examples (line 100) | def test_configuration_examples(self): method test_remaining_examples (line 105) | def test_remaining_examples(self): method test_doc_sources (line 110) | def test_doc_sources(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_dynamic_module_utils.py function test_import_parsing (line 123) | def test_import_parsing(tmp_path, case): FILE: mplsandbox_for_rl/transformers/tests/utils/test_feature_extraction_utils.py class FeatureExtractorUtilTester (line 38) | class FeatureExtractorUtilTester(unittest.TestCase): method test_cached_files_are_used_when_internet_is_down (line 39) | def test_cached_files_are_used_when_internet_is_down(self): class FeatureExtractorPushToHubTester (line 57) | class FeatureExtractorPushToHubTester(unittest.TestCase): method setUpClass (line 59) | def setUpClass(cls): method _try_delete_repo (line 64) | def _try_delete_repo(repo_id, token): method test_push_to_hub (line 71) | def test_push_to_hub(self): method test_push_to_hub_via_save_pretrained (line 86) | def test_push_to_hub_via_save_pretrained(self): method test_push_to_hub_in_organization (line 101) | def test_push_to_hub_in_organization(self): method test_push_to_hub_in_organization_via_save_pretrained (line 115) | def test_push_to_hub_in_organization_via_save_pretrained(self): method test_push_to_hub_dynamic_feature_extractor (line 130) | def test_push_to_hub_dynamic_feature_extractor(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_file_utils.py function context_en (line 56) | def context_en(): function context_fr (line 63) | def context_fr(): class TestImportMechanisms (line 69) | class TestImportMechanisms(unittest.TestCase): method test_module_spec_available (line 70) | def test_module_spec_available(self): class GenericUtilTests (line 76) | class GenericUtilTests(unittest.TestCase): method test_context_managers_no_context (line 78) | def test_context_managers_no_context(self, mock_stdout): method test_context_managers_one_context (line 85) | def test_context_managers_one_context(self, mock_stdout): method test_context_managers_two_context (line 92) | def test_context_managers_two_context(self, mock_stdout): method test_find_labels_pt (line 99) | def test_find_labels_pt(self): method test_find_labels_tf (line 111) | def test_find_labels_tf(self): method test_find_labels_flax (line 123) | def test_find_labels_flax(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_generic.py class GenericTester (line 45) | class GenericTester(unittest.TestCase): method test_flatten_dict (line 46) | def test_flatten_dict(self): method test_transpose_numpy (line 71) | def test_transpose_numpy(self): method test_transpose_torch (line 79) | def test_transpose_torch(self): method test_transpose_tf (line 89) | def test_transpose_tf(self): method test_transpose_flax (line 99) | def test_transpose_flax(self): method test_reshape_numpy (line 108) | def test_reshape_numpy(self): method test_reshape_torch (line 116) | def test_reshape_torch(self): method test_reshape_tf (line 126) | def test_reshape_tf(self): method test_reshape_flax (line 136) | def test_reshape_flax(self): method test_squeeze_numpy (line 145) | def test_squeeze_numpy(self): method test_squeeze_torch (line 153) | def test_squeeze_torch(self): method test_squeeze_tf (line 163) | def test_squeeze_tf(self): method test_squeeze_flax (line 173) | def test_squeeze_flax(self): method test_expand_dims_numpy (line 182) | def test_expand_dims_numpy(self): method test_expand_dims_torch (line 187) | def test_expand_dims_torch(self): method test_expand_dims_tf (line 193) | def test_expand_dims_tf(self): method test_expand_dims_flax (line 199) | def test_expand_dims_flax(self): class ValidationDecoratorTester (line 205) | class ValidationDecoratorTester(unittest.TestCase): method test_cases_no_warning (line 206) | def test_cases_no_warning(self): method test_cases_with_warnings (line 251) | def test_cases_with_warnings(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_hf_argparser.py function list_field (line 40) | def list_field(default=None, metadata=None): class BasicExample (line 45) | class BasicExample: class WithDefaultExample (line 53) | class WithDefaultExample: class WithDefaultBoolExample (line 59) | class WithDefaultBoolExample: class BasicEnum (line 65) | class BasicEnum(Enum): class MixedTypeEnum (line 70) | class MixedTypeEnum(Enum): class EnumExample (line 77) | class EnumExample: method __post_init__ (line 80) | def __post_init__(self): class MixedTypeEnumExample (line 85) | class MixedTypeEnumExample: method __post_init__ (line 88) | def __post_init__(self): class OptionalExample (line 93) | class OptionalExample: class ListExample (line 102) | class ListExample: class RequiredExample (line 110) | class RequiredExample: method __post_init__ (line 115) | def __post_init__(self): class StringLiteralAnnotationExample (line 120) | class StringLiteralAnnotationExample: class WithDefaultBoolExamplePep604 (line 131) | class WithDefaultBoolExamplePep604: class OptionalExamplePep604 (line 137) | class OptionalExamplePep604: class HfArgumentParserTest (line 145) | class HfArgumentParserTest(unittest.TestCase): method argparsersEqual (line 146) | def argparsersEqual(self, a: argparse.ArgumentParser, b: argparse.Argu... method test_basic (line 164) | def test_basic(self): method test_with_default (line 178) | def test_with_default(self): method test_with_default_bool (line 186) | def test_with_default_bool(self): method test_with_enum (line 218) | def test_with_enum(self): method test_with_literal (line 245) | def test_with_literal(self): method test_with_list (line 270) | def test_with_list(self): method test_with_optional (line 290) | def test_with_optional(self): method test_with_required (line 313) | def test_with_required(self): method test_with_string_literal_annotation (line 327) | def test_with_string_literal_annotation(self): method test_parse_dict (line 343) | def test_parse_dict(self): method test_parse_dict_extra_key (line 357) | def test_parse_dict_extra_key(self): method test_parse_json (line 370) | def test_parse_json(self): method test_parse_yaml (line 389) | def test_parse_yaml(self): method test_integration_training_args (line 407) | def test_integration_training_args(self): method test_valid_dict_annotation (line 411) | def test_valid_dict_annotation(self): method test_valid_dict_input_parsing (line 467) | def test_valid_dict_input_parsing(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_hub_utils.py class GetFromCacheTests (line 45) | class GetFromCacheTests(unittest.TestCase): method test_cached_file (line 46) | def test_cached_file(self): method test_cached_file_errors (line 66) | def test_cached_file_errors(self): method test_non_existence_is_cached (line 76) | def test_non_existence_is_cached(self): method test_has_file (line 103) | def test_has_file(self): method test_has_file_in_cache (line 108) | def test_has_file_in_cache(self): method test_get_file_from_repo_distant (line 119) | def test_get_file_from_repo_distant(self): method test_get_file_from_repo_local (line 136) | def test_get_file_from_repo_local(self): method test_get_file_gated_repo (line 144) | def test_get_file_gated_repo(self): method test_has_file_gated_repo (line 150) | def test_has_file_gated_repo(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_image_processing_utils.py class ImageProcessorUtilTester (line 38) | class ImageProcessorUtilTester(unittest.TestCase): method test_cached_files_are_used_when_internet_is_down (line 39) | def test_cached_files_are_used_when_internet_is_down(self): method test_image_processor_from_pretrained_subfolder (line 55) | def test_image_processor_from_pretrained_subfolder(self): class ImageProcessorPushToHubTester (line 68) | class ImageProcessorPushToHubTester(unittest.TestCase): method setUpClass (line 70) | def setUpClass(cls): method _try_delete_repo (line 75) | def _try_delete_repo(repo_id, token): method test_push_to_hub (line 82) | def test_push_to_hub(self): method test_push_to_hub_via_save_pretrained (line 96) | def test_push_to_hub_via_save_pretrained(self): method test_push_to_hub_in_organization (line 111) | def test_push_to_hub_in_organization(self): method test_push_to_hub_in_organization_via_save_pretrained (line 125) | def test_push_to_hub_in_organization_via_save_pretrained(self): method test_push_to_hub_dynamic_image_processor (line 140) | def test_push_to_hub_dynamic_image_processor(self): class ImageProcessingUtilsTester (line 163) | class ImageProcessingUtilsTester(unittest.TestCase): method test_get_size_dict (line 164) | def test_get_size_dict(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_image_utils.py function get_image_from_hub_dataset (line 45) | def get_image_from_hub_dataset(dataset_id: str, filename: str, revision:... function get_random_image (line 50) | def get_random_image(height, width): class ImageFeatureExtractionTester (line 56) | class ImageFeatureExtractionTester(unittest.TestCase): method test_conversion_image_to_array (line 57) | def test_conversion_image_to_array(self): method test_conversion_array_to_array (line 84) | def test_conversion_array_to_array(self): method test_make_list_of_images_numpy (line 118) | def test_make_list_of_images_numpy(self): method test_make_list_of_images_torch (line 148) | def test_make_list_of_images_torch(self): method test_conversion_torch_to_array (line 171) | def test_conversion_torch_to_array(self): method test_conversion_image_to_image (line 206) | def test_conversion_image_to_image(self): method test_conversion_array_to_image (line 215) | def test_conversion_array_to_image(self): method test_conversion_tensor_to_image (line 245) | def test_conversion_tensor_to_image(self): method test_resize_image_and_array (line 275) | def test_resize_image_and_array(self): method test_resize_image_and_array_non_default_to_square (line 300) | def test_resize_image_and_array_non_default_to_square(self): method test_resize_tensor (line 352) | def test_resize_tensor(self): method test_normalize_image (line 373) | def test_normalize_image(self): method test_normalize_array (line 392) | def test_normalize_array(self): method test_normalize_tensor (line 416) | def test_normalize_tensor(self): method test_center_crop_image (line 439) | def test_center_crop_image(self): method test_center_crop_array (line 453) | def test_center_crop_array(self): method test_center_crop_tensor (line 472) | def test_center_crop_tensor(self): class LoadImageTester (line 493) | class LoadImageTester(unittest.TestCase): method test_load_img_url (line 494) | def test_load_img_url(self): method test_load_img_url_timeout (line 501) | def test_load_img_url_timeout(self): method test_load_img_local (line 505) | def test_load_img_local(self): method test_load_img_base64_prefix (line 514) | def test_load_img_base64_prefix(self): method test_load_img_base64 (line 531) | def test_load_img_base64(self): method test_load_img_base64_encoded_bytes (line 548) | def test_load_img_base64_encoded_bytes(self): method test_load_img_rgba (line 565) | def test_load_img_rgba(self): method test_load_img_la (line 580) | def test_load_img_la(self): method test_load_img_l (line 595) | def test_load_img_l(self): method test_load_img_exif_transpose (line 610) | def test_load_img_exif_transpose(self): class UtilFunctionTester (line 633) | class UtilFunctionTester(unittest.TestCase): method test_get_image_size (line 634) | def test_get_image_size(self): method test_infer_channel_dimension (line 646) | def test_infer_channel_dimension(self): method test_get_channel_dimension_axis (line 684) | def test_get_channel_dimension_axis(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_logging.py class HfArgumentParserTest (line 26) | class HfArgumentParserTest(unittest.TestCase): method test_set_level (line 27) | def test_set_level(self): method test_integration (line 48) | def test_integration(self): method test_env_override (line 78) | def test_env_override(self): method test_env_invalid_override (line 99) | def test_env_invalid_override(self): method test_advisory_warnings (line 110) | def test_advisory_warnings(self): function test_set_progress_bar_enabled (line 130) | def test_set_progress_bar_enabled(): FILE: mplsandbox_for_rl/transformers/tests/utils/test_model_card.py class ModelCardTester (line 25) | class ModelCardTester(unittest.TestCase): method setUp (line 26) | def setUp(self): method test_model_card_common_properties (line 49) | def test_model_card_common_properties(self): method test_model_card_to_json_string (line 61) | def test_model_card_to_json_string(self): method test_model_card_to_json_file (line 67) | def test_model_card_to_json_file(self): method test_model_card_from_and_save_pretrained (line 77) | def test_model_card_from_and_save_pretrained(self): method test_model_summary_modelcard_base_metadata (line 86) | def test_model_summary_modelcard_base_metadata(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_model_output.py class ModelOutputTest (line 33) | class ModelOutputTest(ModelOutput): class ModelOutputTester (line 39) | class ModelOutputTester(unittest.TestCase): method test_get_attributes (line 40) | def test_get_attributes(self): method test_index_with_ints_and_slices (line 48) | def test_index_with_ints_and_slices(self): method test_index_with_strings (line 61) | def test_index_with_strings(self): method test_dict_like_properties (line 74) | def test_dict_like_properties(self): method test_set_attributes (line 102) | def test_set_attributes(self): method test_set_keys (line 108) | def test_set_keys(self): method test_instantiate_from_dict (line 114) | def test_instantiate_from_dict(self): method test_instantiate_from_iterator (line 120) | def test_instantiate_from_iterator(self): method test_torch_pytree (line 134) | def test_torch_pytree(self): method test_export_serialization (line 164) | def test_export_serialization(self): class ModelOutputTestNoDataclass (line 185) | class ModelOutputTestNoDataclass(ModelOutput): class ModelOutputSubclassTester (line 193) | class ModelOutputSubclassTester(unittest.TestCase): method test_direct_model_output (line 194) | def test_direct_model_output(self): method test_subclass_no_dataclass (line 198) | def test_subclass_no_dataclass(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_modeling_flax_utils.py class FlaxModelPushToHubTester (line 52) | class FlaxModelPushToHubTester(unittest.TestCase): method setUpClass (line 54) | def setUpClass(cls): method _try_delete_repo (line 59) | def _try_delete_repo(repo_id, token): method test_push_to_hub (line 66) | def test_push_to_hub(self): method test_push_to_hub_via_save_pretrained (line 88) | def test_push_to_hub_via_save_pretrained(self): method test_push_to_hub_in_organization (line 111) | def test_push_to_hub_in_organization(self): method test_push_to_hub_in_organization_via_save_pretrained (line 133) | def test_push_to_hub_in_organization_via_save_pretrained(self): function check_models_equal (line 157) | def check_models_equal(model1, model2): class FlaxModelUtilsTest (line 169) | class FlaxModelUtilsTest(unittest.TestCase): method test_model_from_pretrained_subfolder (line 170) | def test_model_from_pretrained_subfolder(self): method test_model_from_pretrained_subfolder_sharded (line 185) | def test_model_from_pretrained_subfolder_sharded(self): method test_model_from_pretrained_hub_subfolder (line 200) | def test_model_from_pretrained_hub_subfolder(self): method test_model_from_pretrained_hub_subfolder_sharded (line 211) | def test_model_from_pretrained_hub_subfolder_sharded(self): method test_safetensors_save_and_load (line 222) | def test_safetensors_save_and_load(self): method test_safetensors_save_and_load_pt_to_flax (line 238) | def test_safetensors_save_and_load_pt_to_flax(self): method test_safetensors_load_from_hub (line 253) | def test_safetensors_load_from_hub(self): method test_safetensors_load_from_local (line 264) | def test_safetensors_load_from_local(self): method test_safetensors_load_from_hub_from_safetensors_pt (line 280) | def test_safetensors_load_from_hub_from_safetensors_pt(self): method test_safetensors_load_from_hub_from_safetensors_pt_bf16 (line 294) | def test_safetensors_load_from_hub_from_safetensors_pt_bf16(self): method test_safetensors_load_from_local_from_safetensors_pt (line 314) | def test_safetensors_load_from_local_from_safetensors_pt(self): method test_safetensors_load_from_hub_msgpack_before_safetensors (line 331) | def test_safetensors_load_from_hub_msgpack_before_safetensors(self): method test_safetensors_load_from_local_msgpack_before_safetensors (line 339) | def test_safetensors_load_from_local_msgpack_before_safetensors(self): method test_safetensors_flax_from_flax (line 349) | def test_safetensors_flax_from_flax(self): method test_safetensors_flax_from_torch (line 361) | def test_safetensors_flax_from_torch(self): method test_safetensors_flax_from_sharded_msgpack_with_sharded_safetensors_local (line 372) | def test_safetensors_flax_from_sharded_msgpack_with_sharded_safetensor... method test_safetensors_flax_from_sharded_msgpack_with_sharded_safetensors_hub (line 382) | def test_safetensors_flax_from_sharded_msgpack_with_sharded_safetensor... method test_safetensors_from_pt_bf16 (line 388) | def test_safetensors_from_pt_bf16(self): method test_from_pt_bf16 (line 404) | def test_from_pt_bf16(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_modeling_rope_utils.py class RopeTest (line 32) | class RopeTest(unittest.TestCase): method test_rope_validation (line 33) | def test_rope_validation(self): method test_default_rope_function_bc (line 68) | def test_default_rope_function_bc(self): method test_linear_rope_function_bc (line 84) | def test_linear_rope_function_bc(self): method test_dynamic_rope_function_bc (line 102) | def test_dynamic_rope_function_bc(self): method test_default_rope_numerically (line 120) | def test_default_rope_numerically(self): method test_linear_rope_numerically (line 155) | def test_linear_rope_numerically(self): method test_dynamic_rope_numerically (line 169) | def test_dynamic_rope_numerically(self): method test_yarn_rope_numerically (line 220) | def test_yarn_rope_numerically(self): method test_longrope_rope_numerically (line 292) | def test_longrope_rope_numerically(self): method test_llama3_rope_numerically (line 355) | def test_llama3_rope_numerically(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_modeling_tf_core.py class TFCoreModelTesterMixin (line 67) | class TFCoreModelTesterMixin: method _prepare_for_class (line 76) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_graph_mode (line 113) | def test_graph_mode(self): method test_xla_mode (line 127) | def test_xla_mode(self): method test_xla_fit (line 141) | def test_xla_fit(self): method test_saved_model_creation_extended (line 207) | def test_saved_model_creation_extended(self): method test_mixed_precision (line 267) | def test_mixed_precision(self): method test_train_pipeline_custom_model (line 283) | def test_train_pipeline_custom_model(self): method test_graph_mode_with_inputs_embeds (line 353) | def test_graph_mode_with_inputs_embeds(self): method _generate_random_bad_tokens (line 385) | def _generate_random_bad_tokens(self, num_bad_tokens, model): method _check_generated_ids (line 403) | def _check_generated_ids(self, output_ids): method _check_match_tokens (line 408) | def _check_match_tokens(self, generated_ids, bad_words_ids): FILE: mplsandbox_for_rl/transformers/tests/utils/test_modeling_tf_utils.py class TFModelUtilsTest (line 98) | class TFModelUtilsTest(unittest.TestCase): method test_cached_files_are_used_when_internet_is_down (line 99) | def test_cached_files_are_used_when_internet_is_down(self): method test_unpack_inputs (line 117) | def test_unpack_inputs(self): method test_xla_stable_softmax (line 191) | def test_xla_stable_softmax(self): method test_checkpoint_sharding_from_hub (line 225) | def test_checkpoint_sharding_from_hub(self): method test_sharded_checkpoint_with_prefix (line 232) | def test_sharded_checkpoint_with_prefix(self): method test_sharded_checkpoint_transfer (line 240) | def test_sharded_checkpoint_transfer(self): method test_checkpoint_sharding_local_from_pt (line 245) | def test_checkpoint_sharding_local_from_pt(self): method test_checkpoint_loading_with_prefix_from_pt (line 255) | def test_checkpoint_loading_with_prefix_from_pt(self): method test_checkpoint_sharding_hub_from_pt (line 265) | def test_checkpoint_sharding_hub_from_pt(self): method test_shard_checkpoint (line 272) | def test_shard_checkpoint(self): method test_special_layer_name_sharding (line 340) | def test_special_layer_name_sharding(self): method test_checkpoint_sharding_local (line 352) | def test_checkpoint_sharding_local(self): method test_safetensors_checkpoint_sharding_local (line 401) | def test_safetensors_checkpoint_sharding_local(self): method test_bfloat16_torch_loading (line 442) | def test_bfloat16_torch_loading(self): method test_save_pretrained_signatures (line 451) | def test_save_pretrained_signatures(self): method test_safetensors_save_and_load (line 492) | def test_safetensors_save_and_load(self): method test_safetensors_sharded_save_and_load (line 509) | def test_safetensors_sharded_save_and_load(self): method test_safetensors_save_and_load_pt_to_tf (line 526) | def test_safetensors_save_and_load_pt_to_tf(self): method test_sharded_safetensors_save_and_load_pt_to_tf (line 541) | def test_sharded_safetensors_save_and_load_pt_to_tf(self): method test_safetensors_load_from_hub (line 556) | def test_safetensors_load_from_hub(self): method test_safetensors_tf_from_tf (line 574) | def test_safetensors_tf_from_tf(self): method test_safetensors_tf_from_torch (line 586) | def test_safetensors_tf_from_torch(self): method test_safetensors_tf_from_sharded_h5_with_sharded_safetensors_local (line 598) | def test_safetensors_tf_from_sharded_h5_with_sharded_safetensors_local... method test_safetensors_tf_from_sharded_h5_with_sharded_safetensors_hub (line 606) | def test_safetensors_tf_from_sharded_h5_with_sharded_safetensors_hub(s... method test_safetensors_load_from_local (line 613) | def test_safetensors_load_from_local(self): method test_safetensors_load_from_hub_from_safetensors_pt (line 629) | def test_safetensors_load_from_hub_from_safetensors_pt(self): method test_safetensors_load_from_local_from_safetensors_pt (line 642) | def test_safetensors_load_from_local_from_safetensors_pt(self): method test_safetensors_load_from_hub_h5_before_safetensors (line 660) | def test_safetensors_load_from_hub_h5_before_safetensors(self): method test_safetensors_load_from_local_h5_before_safetensors (line 668) | def test_safetensors_load_from_local_h5_before_safetensors(self): class TFModelPushToHubTester (line 680) | class TFModelPushToHubTester(unittest.TestCase): method setUpClass (line 682) | def setUpClass(cls): method _try_delete_repo (line 687) | def _try_delete_repo(repo_id, token): method test_push_to_hub (line 694) | def test_push_to_hub(self): method test_push_to_hub_via_save_pretrained (line 724) | def test_push_to_hub_via_save_pretrained(self): method test_push_to_hub_callback (line 750) | def test_push_to_hub_callback(self): method test_push_to_hub_in_organization (line 784) | def test_push_to_hub_in_organization(self): method test_push_to_hub_in_organization_via_save_pretrained (line 808) | def test_push_to_hub_in_organization_via_save_pretrained(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_modeling_utils.py class BaseModel (line 110) | class BaseModel(PreTrainedModel): method __init__ (line 114) | def __init__(self, config): method forward (line 119) | def forward(self, x): class BaseModelWithTiedWeights (line 122) | class BaseModelWithTiedWeights(PreTrainedModel): method __init__ (line 125) | def __init__(self, config): method forward (line 130) | def forward(self, x): method tie_weights (line 133) | def tie_weights(self): class ModelWithHead (line 136) | class ModelWithHead(PreTrainedModel): method _init_weights (line 140) | def _init_weights(self, module): method __init__ (line 143) | def __init__(self, config): method forward (line 150) | def forward(self, x): class ModelWithHeadAndTiedWeights (line 153) | class ModelWithHeadAndTiedWeights(PreTrainedModel): method _init_weights (line 157) | def _init_weights(self, module): method __init__ (line 160) | def __init__(self, config): method forward (line 165) | def forward(self, x): method tie_weights (line 168) | def tie_weights(self): class Prepare4dCausalAttentionMaskModel (line 171) | class Prepare4dCausalAttentionMaskModel(nn.Module): method forward (line 172) | def forward(self, inputs_embeds): class Create4dCausalAttentionMaskModel (line 180) | class Create4dCausalAttentionMaskModel(nn.Module): method forward (line 181) | def forward(self, inputs_embeds): class Prepare4dAttentionMaskModel (line 192) | class Prepare4dAttentionMaskModel(nn.Module): method forward (line 193) | def forward(self, mask, inputs_embeds): class TestOffline (line 197) | class TestOffline(unittest.TestCase): method test_offline (line 198) | def test_offline(self): method test_local_files_only (line 246) | def test_local_files_only(self): function check_models_equal (line 304) | def check_models_equal(model1, model2): class ModelUtilsTest (line 314) | class ModelUtilsTest(TestCasePlus): method test_model_from_pretrained (line 316) | def test_model_from_pretrained(self): method test_model_from_pretrained_subfolder (line 341) | def test_model_from_pretrained_subfolder(self): method test_model_manually_shared_disjointed_tensors_optimum (line 356) | def test_model_manually_shared_disjointed_tensors_optimum(self): method test_model_from_pretrained_subfolder_sharded (line 376) | def test_model_from_pretrained_subfolder_sharded(self): method test_model_from_pretrained_hub_subfolder (line 391) | def test_model_from_pretrained_hub_subfolder(self): method test_model_from_pretrained_hub_subfolder_sharded (line 401) | def test_model_from_pretrained_hub_subfolder_sharded(self): method test_model_from_pretrained_with_different_pretrained_model_name (line 411) | def test_model_from_pretrained_with_different_pretrained_model_name(se... method test_model_from_pretrained_with_none_quantization_config (line 422) | def test_model_from_pretrained_with_none_quantization_config(self): method test_model_from_config_torch_dtype (line 430) | def test_model_from_config_torch_dtype(self): method test_model_from_config_torch_dtype_str (line 448) | def test_model_from_config_torch_dtype_str(self): method test_model_from_pretrained_torch_dtype (line 460) | def test_model_from_pretrained_torch_dtype(self): method test_model_from_pretrained_attn_implementation (line 539) | def test_model_from_pretrained_attn_implementation(self): method test_model_from_config_attn_implementation (line 577) | def test_model_from_config_attn_implementation(self): method test_torch_dtype_byte_sizes (line 631) | def test_torch_dtype_byte_sizes(self): method test_no_super_init_config_and_model (line 656) | def test_no_super_init_config_and_model(self): method test_shard_checkpoint (line 668) | def test_shard_checkpoint(self): method test_checkpoint_sharding_local_bin (line 733) | def test_checkpoint_sharding_local_bin(self): method test_checkpoint_sharding_from_hub (line 775) | def test_checkpoint_sharding_from_hub(self): method test_checkpoint_variant_local_bin (line 782) | def test_checkpoint_variant_local_bin(self): method test_checkpoint_variant_local_sharded_bin (line 802) | def test_checkpoint_variant_local_sharded_bin(self): method test_checkpoint_variant_local_safe (line 827) | def test_checkpoint_variant_local_safe(self): method test_checkpoint_variant_local_sharded_safe (line 848) | def test_checkpoint_variant_local_sharded_safe(self): method test_checkpoint_loading_only_safetensors_available (line 872) | def test_checkpoint_loading_only_safetensors_available(self): method test_checkpoint_loading_only_pytorch_bin_available (line 905) | def test_checkpoint_loading_only_pytorch_bin_available(self): method test_checkpoint_variant_hub (line 938) | def test_checkpoint_variant_hub(self): method test_checkpoint_variant_hub_sharded (line 947) | def test_checkpoint_variant_hub_sharded(self): method test_checkpoint_variant_hub_safe (line 959) | def test_checkpoint_variant_hub_safe(self): method test_checkpoint_variant_hub_sharded_safe (line 969) | def test_checkpoint_variant_hub_sharded_safe(self): method test_checkpoint_variant_save_load_bin (line 980) | def test_checkpoint_variant_save_load_bin(self): method test_from_pretrained_low_cpu_mem_usage_functional (line 1003) | def test_from_pretrained_low_cpu_mem_usage_functional(self): method test_from_pretrained_low_cpu_mem_usage_equal (line 1017) | def test_from_pretrained_low_cpu_mem_usage_equal(self): method test_model_parallelism_gpt2 (line 1056) | def test_model_parallelism_gpt2(self): method test_from_pretrained_disk_offload_task_model (line 1073) | def test_from_pretrained_disk_offload_task_model(self): method test_from_pretrained_disk_offload_derived_to_base_model (line 1114) | def test_from_pretrained_disk_offload_derived_to_base_model(self): method test_from_pretrained_non_contiguous_checkpoint (line 1153) | def test_from_pretrained_non_contiguous_checkpoint(self): method test_cached_files_are_used_when_internet_is_down (line 1168) | def test_cached_files_are_used_when_internet_is_down(self): method test_save_model_with_device_map_cpu (line 1187) | def test_save_model_with_device_map_cpu(self): method test_save_offloaded_model (line 1205) | def test_save_offloaded_model(self): method test_use_safetensors (line 1240) | def test_use_safetensors(self): method test_safetensors_save_and_load (line 1297) | def test_safetensors_save_and_load(self): method test_safetensors_load_from_hub (line 1312) | def test_safetensors_load_from_hub(self): method test_safetensors_save_and_load_sharded (line 1321) | def test_safetensors_save_and_load_sharded(self): method test_safetensors_load_from_hub_sharded (line 1339) | def test_safetensors_load_from_hub_sharded(self): method test_base_model_to_head_model_load (line 1347) | def test_base_model_to_head_model_load(self): method test_tied_weights_reload (line 1369) | def test_tied_weights_reload(self): method test_unexpected_keys_warnings (line 1393) | def test_unexpected_keys_warnings(self): method test_warn_if_padding_and_no_attention_mask (line 1419) | def test_warn_if_padding_and_no_attention_mask(self): method test_pretrained_low_mem_new_config (line 1523) | def test_pretrained_low_mem_new_config(self): method test_generation_config_is_loaded_with_model (line 1543) | def test_generation_config_is_loaded_with_model(self): method test_safetensors_torch_from_torch (line 1555) | def test_safetensors_torch_from_torch(self): method test_safetensors_torch_from_flax (line 1567) | def test_safetensors_torch_from_flax(self): method test_safetensors_torch_from_tf (line 1580) | def test_safetensors_torch_from_tf(self): method test_safetensors_torch_from_torch_sharded (line 1592) | def test_safetensors_torch_from_torch_sharded(self): method test_modifying_model_config_causes_warning_saving_generation_config (line 1602) | def test_modifying_model_config_causes_warning_saving_generation_confi... method test_model_from_pretrained_from_mlx (line 1612) | def test_model_from_pretrained_from_mlx(self): method test_warning_for_beta_gamma_parameters (line 1631) | def test_warning_for_beta_gamma_parameters(self): class ModelOnTheFlyConversionTester (line 1687) | class ModelOnTheFlyConversionTester(unittest.TestCase): method setUpClass (line 1689) | def setUpClass(cls): method setUp (line 1698) | def setUp(self) -> None: method tearDown (line 1701) | def tearDown(self) -> None: method test_safetensors_on_the_fly_conversion (line 1704) | def test_safetensors_on_the_fly_conversion(self): method test_safetensors_on_the_fly_conversion_private (line 1723) | def test_safetensors_on_the_fly_conversion_private(self): method test_safetensors_on_the_fly_conversion_gated (line 1742) | def test_safetensors_on_the_fly_conversion_gated(self): method test_safetensors_on_the_fly_sharded_conversion (line 1765) | def test_safetensors_on_the_fly_sharded_conversion(self): method test_safetensors_on_the_fly_sharded_conversion_private (line 1784) | def test_safetensors_on_the_fly_sharded_conversion_private(self): method test_safetensors_on_the_fly_sharded_conversion_gated (line 1805) | def test_safetensors_on_the_fly_sharded_conversion_gated(self): method test_safetensors_on_the_fly_wrong_user_opened_pr (line 1829) | def test_safetensors_on_the_fly_wrong_user_opened_pr(self): method test_safetensors_on_the_fly_specific_revision (line 1865) | def test_safetensors_on_the_fly_specific_revision(self): method test_absence_of_safetensors_triggers_conversion (line 1881) | def test_absence_of_safetensors_triggers_conversion(self): method test_absence_of_safetensors_triggers_conversion_failed (line 1912) | def test_absence_of_safetensors_triggers_conversion_failed(self, spawn... class ModelPushToHubTester (line 1929) | class ModelPushToHubTester(unittest.TestCase): method setUpClass (line 1931) | def setUpClass(cls): method _try_delete_repo (line 1936) | def _try_delete_repo(repo_id, token): method test_push_to_hub (line 1944) | def test_push_to_hub(self): method test_push_to_hub_via_save_pretrained (line 1962) | def test_push_to_hub_via_save_pretrained(self): method test_push_to_hub_with_description (line 1980) | def test_push_to_hub_with_description(self): method test_push_to_hub_in_organization (line 2004) | def test_push_to_hub_in_organization(self): method test_push_to_hub_in_organization_via_save_pretrained (line 2022) | def test_push_to_hub_in_organization_via_save_pretrained(self): method test_push_to_hub_dynamic_model (line 2040) | def test_push_to_hub_dynamic_model(self): method test_push_to_hub_with_tags (line 2070) | def test_push_to_hub_with_tags(self): class AttentionMaskTester (line 2100) | class AttentionMaskTester(unittest.TestCase): method check_non_causal (line 2101) | def check_non_causal(self, bsz, q_len, kv_len, mask_2d, mask_4d): method check_to_4d (line 2108) | def check_to_4d(self, mask_converter, q_len, kv_len, additional_mask=N... method check_to_causal (line 2150) | def check_to_causal(self, mask_converter, q_len, kv_len, bsz=3): method compute_num_context_mask (line 2175) | def compute_num_context_mask(self, kv_len, context, q_len): method test_2d_to_4d_causal (line 2184) | def test_2d_to_4d_causal(self): method test_2d_to_4d (line 2202) | def test_2d_to_4d(self): method test_2d_to_4d_causal_sliding (line 2211) | def test_2d_to_4d_causal_sliding(self): method test_causal_mask (line 2226) | def test_causal_mask(self): method test_causal_mask_sliding (line 2236) | def test_causal_mask_sliding(self): method test_torch_compile_fullgraph (line 2246) | def test_torch_compile_fullgraph(self): method test_unmask_unattended_left_padding (line 2283) | def test_unmask_unattended_left_padding(self): method test_unmask_unattended_right_padding (line 2354) | def test_unmask_unattended_right_padding(self): method test_unmask_unattended_random_mask (line 2371) | def test_unmask_unattended_random_mask(self): class TestAttentionImplementation (line 2388) | class TestAttentionImplementation(unittest.TestCase): method test_error_no_sdpa_available (line 2389) | def test_error_no_sdpa_available(self): method test_error_no_flash_available (line 2400) | def test_error_no_flash_available(self): method test_error_no_flash_available_with_config (line 2408) | def test_error_no_flash_available_with_config(self): method test_error_wrong_attn_implementation (line 2418) | def test_error_wrong_attn_implementation(self): method test_not_available_flash (line 2424) | def test_not_available_flash(self): method test_not_available_flash_with_config (line 2434) | def test_not_available_flash_with_config(self): method test_not_available_sdpa (line 2449) | def test_not_available_sdpa(self): class TestTensorSharing (line 2462) | class TestTensorSharing(TestCasePlus): method test_disjoint (line 2463) | def test_disjoint(self): method test_identical (line 2481) | def test_identical(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_offline.py class OfflineTests (line 23) | class OfflineTests(TestCasePlus): method test_offline_mode (line 25) | def test_offline_mode(self): method test_offline_mode_no_internet (line 65) | def test_offline_mode_no_internet(self): method test_offline_mode_sharded_checkpoint (line 100) | def test_offline_mode_sharded_checkpoint(self): method test_offline_mode_pipeline_exception (line 139) | def test_offline_mode_pipeline_exception(self): method test_offline_model_dynamic_model (line 161) | def test_offline_model_dynamic_model(self): method test_is_offline_mode (line 180) | def test_is_offline_mode(self): method _execute_with_env (line 196) | def _execute_with_env(self, *commands: Tuple[str, ...], should_fail: b... FILE: mplsandbox_for_rl/transformers/tests/utils/test_skip_decorators.py function check_slow (line 46) | def check_slow(): function check_slow_torch_cuda (line 55) | def check_slow_torch_cuda(): class SkipTester (line 64) | class SkipTester(unittest.TestCase): method test_2_skips_slow_first (line 67) | def test_2_skips_slow_first(self): method test_2_skips_slow_last (line 72) | def test_2_skips_slow_last(self): method test_param_slow_last (line 91) | def test_param_slow_last(self, param=None): function test_pytest_2_skips_slow_first (line 101) | def test_pytest_2_skips_slow_first(): function test_pytest_2_skips_slow_last (line 107) | def test_pytest_2_skips_slow_last(): function test_pytest_param_slow_first (line 113) | def test_pytest_param_slow_first(param): function test_pytest_param_slow_last (line 119) | def test_pytest_param_slow_last(param): FILE: mplsandbox_for_rl/transformers/tests/utils/test_tokenization_utils.py class TokenizerUtilTester (line 48) | class TokenizerUtilTester(unittest.TestCase): method test_cached_files_are_used_when_internet_is_down (line 49) | def test_cached_files_are_used_when_internet_is_down(self): method test_cached_files_are_used_when_internet_is_down_missing_files (line 67) | def test_cached_files_are_used_when_internet_is_down_missing_files(self): method test_legacy_load_from_one_file (line 84) | def test_legacy_load_from_one_file(self): class TokenizerPushToHubTester (line 113) | class TokenizerPushToHubTester(unittest.TestCase): method setUpClass (line 117) | def setUpClass(cls): method _try_delete_repo (line 122) | def _try_delete_repo(repo_id, token): method test_push_to_hub (line 129) | def test_push_to_hub(self): method test_push_to_hub_via_save_pretrained (line 145) | def test_push_to_hub_via_save_pretrained(self): method test_push_to_hub_in_organization (line 163) | def test_push_to_hub_in_organization(self): method test_push_to_hub_in_organization_via_save_pretrained (line 179) | def test_push_to_hub_in_organization_via_save_pretrained(self): method test_push_to_hub_dynamic_tokenizer (line 198) | def test_push_to_hub_dynamic_tokenizer(self): method test_push_to_hub_dynamic_tokenizer_with_both_slow_and_fast_classes (line 220) | def test_push_to_hub_dynamic_tokenizer_with_both_slow_and_fast_classes... class TrieTest (line 250) | class TrieTest(unittest.TestCase): method test_trie (line 251) | def test_trie(self): method test_trie_split (line 258) | def test_trie_split(self): method test_trie_single (line 266) | def test_trie_single(self): method test_trie_final (line 272) | def test_trie_final(self): method test_trie_subtokens (line 278) | def test_trie_subtokens(self): method test_trie_suffix_tokens (line 285) | def test_trie_suffix_tokens(self): method test_trie_skip (line 292) | def test_trie_skip(self): method test_cut_text_hardening (line 299) | def test_cut_text_hardening(self): class ExtensionsTrieTest (line 307) | class ExtensionsTrieTest(unittest.TestCase): method test_extensions (line 308) | def test_extensions(self): method test_empty_prefix (line 318) | def test_empty_prefix(self): method test_no_extension_match (line 325) | def test_no_extension_match(self): method test_update_value (line 331) | def test_update_value(self): FILE: mplsandbox_for_rl/transformers/tests/utils/test_versions_utils.py class DependencyVersionCheckTest (line 26) | class DependencyVersionCheckTest(TestCasePlus): method test_core (line 27) | def test_core(self): method test_python (line 87) | def test_python(self): FILE: mplsandbox_for_rl/transformers/utils/add_pipeline_model_mapping_to_test.py function get_framework (line 50) | def get_framework(test_class): function get_mapping_for_task (line 63) | def get_mapping_for_task(task, framework): function get_model_for_pipeline_test (line 85) | def get_model_for_pipeline_test(test_class, task): function get_pipeline_model_mapping (line 106) | def get_pipeline_model_mapping(test_class): function get_pipeline_model_mapping_string (line 114) | def get_pipeline_model_mapping_string(test_class): function is_valid_test_class (line 143) | def is_valid_test_class(test_class): function find_test_class (line 151) | def find_test_class(test_file): function find_block_ending (line 168) | def find_block_ending(lines, start_idx, indent_level): function add_pipeline_model_mapping (line 181) | def add_pipeline_model_mapping(test_class, overwrite=False): function add_pipeline_model_mapping_to_test_file (line 293) | def add_pipeline_model_mapping_to_test_file(test_file, overwrite=False): FILE: mplsandbox_for_rl/transformers/utils/check_build.py function test_custom_files_are_present (line 30) | def test_custom_files_are_present(transformers_path): FILE: mplsandbox_for_rl/transformers/utils/check_config_attributes.py function check_attribute_being_used (line 175) | def check_attribute_being_used(config_class, attributes, default_value, ... function check_config_attributes_being_used (line 270) | def check_config_attributes_being_used(config_class): function check_config_attributes (line 316) | def check_config_attributes(): FILE: mplsandbox_for_rl/transformers/utils/check_config_docstrings.py function get_checkpoint_from_config_class (line 50) | def get_checkpoint_from_config_class(config_class): function check_config_docstrings_have_checkpoints (line 73) | def check_config_docstrings_have_checkpoints(): FILE: mplsandbox_for_rl/transformers/utils/check_copies.py function _is_definition_header_ending_line (line 176) | def _is_definition_header_ending_line(line: str) -> bool: function _should_continue (line 181) | def _should_continue(line: str, indent: str) -> bool: function _sanity_check_splits (line 187) | def _sanity_check_splits(splits_1, splits_2, is_class, filename): function find_block_end (line 256) | def find_block_end(lines: List[str], start_index: int, indent: int) -> int: function split_code_into_blocks (line 284) | def split_code_into_blocks( function find_code_in_transformers (line 392) | def find_code_in_transformers( function replace_code (line 469) | def replace_code(code: str, replace_pattern: str) -> str: function find_code_and_splits (line 494) | def find_code_and_splits(object_name: str, base_path: str, buffer: dict ... function get_indent (line 543) | def get_indent(code: str) -> str: function run_ruff (line 562) | def run_ruff(code, check=False): function stylify (line 572) | def stylify(code: str) -> str: function check_codes_match (line 590) | def check_codes_match(observed_code: str, theoretical_code: str) -> Opti... function is_copy_consistent (line 641) | def is_copy_consistent(filename: str, overwrite: bool = False, buffer: d... function check_copies (line 830) | def check_copies(overwrite: bool = False, file: str = None): function check_full_copies (line 863) | def check_full_copies(overwrite: bool = False): function get_model_list (line 894) | def get_model_list(filename: str, start_prompt: str, end_prompt: str) ->... function convert_to_localized_md (line 933) | def convert_to_localized_md(model_list: str, localized_model_list: str, ... function _find_text_in_file (line 1023) | def _find_text_in_file(filename: str, start_prompt: str, end_prompt: str... FILE: mplsandbox_for_rl/transformers/utils/check_doc_toc.py function clean_model_doc_toc (line 44) | def clean_model_doc_toc(model_doc: List[dict]) -> List[dict]: function check_model_doc (line 80) | def check_model_doc(overwrite: bool = False): FILE: mplsandbox_for_rl/transformers/utils/check_docstrings.py function find_indent (line 599) | def find_indent(line: str) -> int: function stringify_default (line 609) | def stringify_default(default: Any) -> str: function eval_math_expression (line 639) | def eval_math_expression(expression: str) -> Optional[Union[float, int]]: function eval_node (line 668) | def eval_node(node): function replace_default_in_arg_description (line 679) | def replace_default_in_arg_description(description: str, default: Any) -... function get_default_description (line 744) | def get_default_description(arg: inspect.Parameter) -> str: function find_source_file (line 770) | def find_source_file(obj: Any) -> Path: function match_docstring_with_signature (line 787) | def match_docstring_with_signature(obj: Any) -> Optional[Tuple[str, str]]: function fix_docstring (line 901) | def fix_docstring(obj: Any, old_doc_args: str, new_doc_args: str): function check_docstrings (line 956) | def check_docstrings(overwrite: bool = False, check_all: bool = False): FILE: mplsandbox_for_rl/transformers/utils/check_doctest_list.py function clean_doctest_list (line 44) | def clean_doctest_list(doctest_file: str, overwrite: bool = False): FILE: mplsandbox_for_rl/transformers/utils/check_dummies.py function find_backend (line 76) | def find_backend(line: str) -> Optional[str]: function read_init (line 95) | def read_init() -> Dict[str, List[str]]: function create_dummy_object (line 140) | def create_dummy_object(name: str, backend_name: str) -> str: function create_dummy_files (line 159) | def create_dummy_files(backend_specific_objects: Optional[Dict[str, List... function check_dummies (line 186) | def check_dummies(overwrite: bool = False): FILE: mplsandbox_for_rl/transformers/utils/check_inits.py function find_backend (line 73) | def find_backend(line: str) -> Optional[str]: function parse_init (line 92) | def parse_init(init_file) -> Optional[Tuple[Dict[str, List[str]], Dict[s... function analyze_results (line 235) | def analyze_results(import_dict_objects: Dict[str, List[str]], type_hint... function check_all_inits (line 282) | def check_all_inits(): function get_transformers_submodules (line 301) | def get_transformers_submodules() -> List[str]: function check_submodules (line 338) | def check_submodules(): FILE: mplsandbox_for_rl/transformers/utils/check_repo.py function check_missing_backends (line 357) | def check_missing_backends(): function check_model_list (line 385) | def check_model_list(): function get_model_modules (line 411) | def get_model_modules() -> List[str]: function get_models (line 451) | def get_models(module: types.ModuleType, include_pretrained: bool = Fals... function is_building_block (line 475) | def is_building_block(model: str) -> bool: function is_a_private_model (line 489) | def is_a_private_model(model: str) -> bool: function check_models_are_in_init (line 496) | def check_models_are_in_init(): function get_model_test_files (line 513) | def get_model_test_files() -> List[str]: function find_tested_models (line 554) | def find_tested_models(test_file: str) -> List[str]: function should_be_tested (line 580) | def should_be_tested(model_name: str) -> bool: function check_models_are_tested (line 589) | def check_models_are_tested(module: types.ModuleType, test_file: str) ->... function check_all_models_are_tested (line 622) | def check_all_models_are_tested(): function get_all_auto_configured_models (line 643) | def get_all_auto_configured_models() -> List[str]: function ignore_unautoclassed (line 661) | def ignore_unautoclassed(model_name: str) -> bool: function check_models_are_auto_configured (line 672) | def check_models_are_auto_configured(module: types.ModuleType, all_auto_... function check_all_models_are_auto_configured (line 697) | def check_all_models_are_auto_configured(): function check_all_auto_object_names_being_defined (line 712) | def check_all_auto_object_names_being_defined(): function check_all_auto_mapping_names_in_config_mapping_names (line 756) | def check_all_auto_mapping_names_in_config_mapping_names(): function check_all_auto_mappings_importable (line 789) | def check_all_auto_mappings_importable(): function check_objects_being_equally_in_main_init (line 813) | def check_objects_being_equally_in_main_init(): function check_decorator_order (line 861) | def check_decorator_order(filename: str) -> List[int]: function check_all_decorator_order (line 887) | def check_all_decorator_order(): function find_all_documented_objects (line 903) | def find_all_documented_objects() -> List[str]: function ignore_undocumented (line 1019) | def ignore_undocumented(name: str) -> bool: function check_all_objects_are_documented (line 1057) | def check_all_objects_are_documented(): function check_model_type_doc_match (line 1072) | def check_model_type_doc_match(): function is_rst_docstring (line 1107) | def is_rst_docstring(docstring: str) -> True: function check_docstrings_are_in_md (line 1120) | def check_docstrings_are_in_md(): function check_deprecated_constant_is_up_to_date (line 1143) | def check_deprecated_constant_is_up_to_date(): function check_repo_quality (line 1172) | def check_repo_quality(): FILE: mplsandbox_for_rl/transformers/utils/check_self_hosted_runner.py function get_runner_status (line 6) | def get_runner_status(target_runners, token): function list_str (line 34) | def list_str(values): FILE: mplsandbox_for_rl/transformers/utils/check_support_list.py function check_flash_support_list (line 38) | def check_flash_support_list(): function check_sdpa_support_list (line 65) | def check_sdpa_support_list(): FILE: mplsandbox_for_rl/transformers/utils/check_table.py function _find_text_in_file (line 51) | def _find_text_in_file(filename: str, start_prompt: str, end_prompt: str... function camel_case_split (line 97) | def camel_case_split(identifier: str) -> List[str]: function _center_text (line 119) | def _center_text(text: str, width: int) -> str: function get_model_table_from_auto_modules (line 179) | def get_model_table_from_auto_modules() -> str: function check_model_table (line 265) | def check_model_table(overwrite=False): FILE: mplsandbox_for_rl/transformers/utils/check_tf_ops.py function onnx_compliancy (line 44) | def onnx_compliancy(saved_model_path, strict, opset): FILE: mplsandbox_for_rl/transformers/utils/create_dummy_models.py function get_processor_types_from_config_class (line 150) | def get_processor_types_from_config_class(config_class, allowed_mappings... function get_architectures_from_config_class (line 192) | def get_architectures_from_config_class(config_class, arch_mappings, mod... function get_config_class_from_processor_class (line 222) | def get_config_class_from_processor_class(processor_class): function build_processor (line 246) | def build_processor(config_class, processor_class, allow_no_checkpoint=F... function get_tiny_config (line 376) | def get_tiny_config(config_class, model_class=None, **model_tester_kwargs): function convert_tokenizer (line 470) | def convert_tokenizer(tokenizer_fast: PreTrainedTokenizerFast): function convert_feature_extractor (line 482) | def convert_feature_extractor(feature_extractor, tiny_config): function convert_processors (line 510) | def convert_processors(processors, tiny_config, output_folder, result): function get_checkpoint_dir (line 740) | def get_checkpoint_dir(output_dir, model_arch): function build_model (line 752) | def build_model(model_arch, tiny_config, output_dir): function fill_result_with_error (line 778) | def fill_result_with_error(result, error, trace, models_to_create): function upload_model (line 791) | def upload_model(model_dir, organization, token): function build_composite_models (line 841) | def build_composite_models(config_class, output_dir): function get_token_id_from_tokenizer (line 982) | def get_token_id_from_tokenizer(token_id_name, tokenizer, original_token... function get_config_overrides (line 1004) | def get_config_overrides(config_class, processors): function build (line 1069) | def build(config_class, models_to_create, output_dir): function build_tiny_model_summary (line 1252) | def build_tiny_model_summary(results, organization=None, token=None): function build_failed_report (line 1307) | def build_failed_report(results, include_warning=True): function build_simple_report (line 1337) | def build_simple_report(results): function update_tiny_model_summary_file (line 1355) | def update_tiny_model_summary_file(report_path): function create_tiny_models (line 1382) | def create_tiny_models( function list_str (line 1504) | def list_str(values): FILE: mplsandbox_for_rl/transformers/utils/custom_init_isort.py function get_indent (line 59) | def get_indent(line: str) -> str: function split_code_in_indented_blocks (line 65) | def split_code_in_indented_blocks( function ignore_underscore_and_lowercase (line 132) | def ignore_underscore_and_lowercase(key: Callable[[Any], str]) -> Callab... function sort_objects (line 143) | def sort_objects(objects: List[Any], key: Optional[Callable[[Any], str]]... function sort_objects_in_import (line 177) | def sort_objects_in_import(import_statement: str) -> str: function sort_imports (line 235) | def sort_imports(file: str, check_only: bool = True): function sort_imports_in_all_inits (line 308) | def sort_imports_in_all_inits(check_only=True): FILE: mplsandbox_for_rl/transformers/utils/deprecate_models.py function get_last_stable_minor_release (line 29) | def get_last_stable_minor_release(): function build_tip_message (line 45) | def build_tip_message(last_stable_release): function insert_tip_to_model_doc (line 59) | def insert_tip_to_model_doc(model_doc_path, tip_message): function get_model_doc_path (line 80) | def get_model_doc_path(model: str) -> Tuple[Optional[str], Optional[str]]: function extract_model_info (line 93) | def extract_model_info(model): function update_relative_imports (line 112) | def update_relative_imports(filename, model): function remove_copied_from_statements (line 127) | def remove_copied_from_statements(model): function move_model_files_to_deprecated (line 146) | def move_model_files_to_deprecated(model): function delete_model_tests (line 162) | def delete_model_tests(model): function get_line_indent (line 169) | def get_line_indent(s): function update_main_init_file (line 173) | def update_main_init_file(models): function remove_model_references_from_file (line 196) | def remove_model_references_from_file(filename, models, condition): function remove_model_config_classes_from_config_check (line 219) | def remove_model_config_classes_from_config_check(model_config_classes): function add_models_to_deprecated_models_in_config_auto (line 269) | def add_models_to_deprecated_models_in_config_auto(models): function deprecate_models (line 303) | def deprecate_models(models): FILE: mplsandbox_for_rl/transformers/utils/diff_model_converter.py function get_module_source_from_name (line 42) | def get_module_source_from_name(module_name: str) -> str: class ClassFinder (line 53) | class ClassFinder(CSTVisitor): method __init__ (line 77) | def __init__(self, python_module: cst.Module): method _update_class_dependency (line 87) | def _update_class_dependency(self, name, value): method visit_ClassDef (line 95) | def visit_ClassDef(self, node: ClassDef) -> None: method visit_SimpleStatementLine (line 102) | def visit_SimpleStatementLine(self, node): method visit_FunctionDef (line 114) | def visit_FunctionDef(self, node): method leave_If (line 119) | def leave_If(self, node): method leave_Name (line 124) | def leave_Name(self, node): method leave_Arg (line 130) | def leave_Arg(self, node): method leave_Dict (line 136) | def leave_Dict(self, node): method leave_Decorator (line 146) | def leave_Decorator(self, node): method leave_Module (line 155) | def leave_Module(self, node): class ReplaceNameTransformer (line 166) | class ReplaceNameTransformer(m.MatcherDecoratableTransformer): method __init__ (line 176) | def __init__(self, old_name, new_name, given_old_name=None, given_new_... method preserve_case_replace (line 189) | def preserve_case_replace(self, text): method replace_name (line 201) | def replace_name(self, original_node, updated_node): function find_classes_in_file (line 206) | def find_classes_in_file(module: cst.Module, old_id="llama", new_id="gem... class SuperTransformer (line 230) | class SuperTransformer(cst.CSTTransformer): method __init__ (line 233) | def __init__(self, python_module: cst.Module, original_methods, update... method update_body (line 238) | def update_body(self, existing_body, new_statements): method replace_super_calls (line 261) | def replace_super_calls(self, node: cst.IndentedBlock, func_name: str)... method leave_FunctionDef (line 288) | def leave_FunctionDef(self, original_node: cst.Call, updated_node: cst... method leave_Return (line 295) | def leave_Return(self, original_node: cst.Return, updated_node: cst.Re... function replace_call_to_super (line 311) | def replace_call_to_super(class_finder: ClassFinder, updated_node: cst.C... class DiffConverterTransformer (line 366) | class DiffConverterTransformer(CSTTransformer): method __init__ (line 369) | def __init__(self, python_module, new_name, given_old_name=None, given... method visit_ImportFrom (line 387) | def visit_ImportFrom(self, node: cst.ImportFrom) -> None: method leave_FunctionDef (line 410) | def leave_FunctionDef(self, original_node, node): method leave_SimpleStatementLine (line 417) | def leave_SimpleStatementLine(self, original_node, updated_node): method leave_ClassDef (line 444) | def leave_ClassDef(self, original_node, updated_node): method leave_If (line 511) | def leave_If(self, original_node, node): method leave_Module (line 521) | def leave_Module(self, original_node: cst.Assign, node): function convert_file (line 551) | def convert_file(diff_file, old_model_name=None, new_model_name=None, cs... FILE: mplsandbox_for_rl/transformers/utils/download_glue_data.py function download_and_extract (line 47) | def download_and_extract(task, data_dir): function format_mrpc (line 57) | def format_mrpc(data_dir, path_to_data): function download_diagnostic (line 106) | def download_diagnostic(data_dir): function get_tasks (line 116) | def get_tasks(task_names): function main (line 129) | def main(arguments): FILE: mplsandbox_for_rl/transformers/utils/extract_warnings.py function extract_warnings_from_single_artifact (line 15) | def extract_warnings_from_single_artifact(artifact_path, targets): function extract_warnings (line 67) | def extract_warnings(artifact_dir, targets): function list_str (line 81) | def list_str(values): FILE: mplsandbox_for_rl/transformers/utils/get_ci_error_statistics.py function get_jobs (line 13) | def get_jobs(workflow_run_id, token=None): function get_job_links (line 39) | def get_job_links(workflow_run_id, token=None): function get_artifacts_links (line 65) | def get_artifacts_links(worflow_run_id, token=None): function download_artifact (line 91) | def download_artifact(artifact_name, artifact_url, output_dir, token): function get_errors_from_single_artifact (line 110) | def get_errors_from_single_artifact(artifact_zip_path, job_links=None): function get_all_errors (line 157) | def get_all_errors(artifact_dir, job_links=None): function reduce_by_error (line 169) | def reduce_by_error(logs, error_filter=None): function get_model (line 184) | def get_model(test): function reduce_by_model (line 195) | def reduce_by_model(logs, error_filter=None): function make_github_table (line 217) | def make_github_table(reduced_by_error): function make_github_table_per_model (line 229) | def make_github_table_per_model(reduced_by_model): FILE: mplsandbox_for_rl/transformers/utils/get_github_job_time.py function extract_time_from_single_job (line 9) | def extract_time_from_single_job(job): function get_job_time (line 29) | def get_job_time(workflow_run_id, token=None): FILE: mplsandbox_for_rl/transformers/utils/get_previous_daily_ci.py function get_daily_ci_runs (line 8) | def get_daily_ci_runs(token, num_runs=7): function get_last_daily_ci_runs (line 32) | def get_last_daily_ci_runs(token): function get_last_daily_ci_artifacts (line 44) | def get_last_daily_ci_artifacts(artifact_names, output_dir, token): function get_last_daily_ci_reports (line 57) | def get_last_daily_ci_reports(artifact_names, output_dir, token): FILE: mplsandbox_for_rl/transformers/utils/get_test_info.py function get_module_path (line 31) | def get_module_path(test_file): function get_test_module (line 53) | def get_test_module(test_file): function get_tester_classes (line 61) | def get_tester_classes(test_file): function get_test_classes (line 73) | def get_test_classes(test_file): function get_model_classes (line 94) | def get_model_classes(test_file): function get_model_tester_from_test_class (line 105) | def get_model_tester_from_test_class(test_class): function get_test_classes_for_model (line 120) | def get_test_classes_for_model(test_file, model_class): function get_tester_classes_for_model (line 133) | def get_tester_classes_for_model(test_file, model_class): function get_test_to_tester_mapping (line 147) | def get_test_to_tester_mapping(test_file): function get_model_to_test_mapping (line 157) | def get_model_to_test_mapping(test_file): function get_model_to_tester_mapping (line 166) | def get_model_to_tester_mapping(test_file): function to_json (line 175) | def to_json(o): FILE: mplsandbox_for_rl/transformers/utils/models_to_deprecate.py class HubModelLister (line 36) | class HubModelLister: method __init__ (line 41) | def __init__(self, tags): method __iter__ (line 45) | def __iter__(self): function _extract_commit_hash (line 53) | def _extract_commit_hash(commits): function get_list_of_repo_model_paths (line 60) | def get_list_of_repo_model_paths(models_dir): function get_list_of_models_to_deprecate (line 81) | def get_list_of_models_to_deprecate( FILE: mplsandbox_for_rl/transformers/utils/notification_service.py function handle_test_results (line 52) | def handle_test_results(test_results): function handle_stacktraces (line 71) | def handle_stacktraces(test_results): function dicts_to_sum (line 92) | def dicts_to_sum(objects: Union[Dict[str, Dict], List[dict]]): class Message (line 104) | class Message: method __init__ (line 105) | def __init__( method time (line 165) | def time(self) -> str: method header (line 184) | def header(self) -> Dict: method ci_title_section (line 188) | def ci_title_section(self) -> Dict: method no_failures (line 192) | def no_failures(self) -> Dict: method failures (line 208) | def failures(self) -> Dict: method warnings (line 228) | def warnings(self) -> Dict: method get_device_report (line 260) | def get_device_report(report, rjust=6): method category_failures (line 269) | def category_failures(self) -> Dict: method compute_diff_for_failure_reports (line 300) | def compute_diff_for_failure_reports(self, curr_failure_report, prev_f... method model_failures (line 338) | def model_failures(self) -> List[Dict]: method additional_failures (line 470) | def additional_failures(self) -> Dict: method payload (line 495) | def payload(self) -> str: method error_out (line 559) | def error_out(title, ci_title="", runner_not_available=False, runner_f... method post (line 620) | def post(self): method get_reply_blocks (line 633) | def get_reply_blocks(self, job_name, job_result, failures, device, text): method get_new_model_failure_blocks (line 675) | def get_new_model_failure_blocks(self, with_header=True, to_truncate=T... method post_reply (line 738) | def post_reply(self): function retrieve_artifact (line 802) | def retrieve_artifact(artifact_path: str, gpu: Optional[str]): function retrieve_available_artifacts (line 820) | def retrieve_available_artifacts(): function prepare_reports (line 872) | def prepare_reports(title, header, reports, to_truncate=True): FILE: mplsandbox_for_rl/transformers/utils/notification_service_doc_tests.py function handle_test_results (line 28) | def handle_test_results(test_results): function extract_first_line_failure (line 47) | def extract_first_line_failure(failures_short_lines): class Message (line 62) | class Message: method __init__ (line 63) | def __init__(self, title: str, doc_test_results: Dict): method time (line 74) | def time(self) -> str: method header (line 93) | def header(self) -> Dict: method no_failures (line 97) | def no_failures(self) -> Dict: method failures (line 113) | def failures(self) -> Dict: method category_failures (line 132) | def category_failures(self) -> List[Dict]: method payload (line 170) | def payload(self) -> str: method error_out (line 185) | def error_out(): method post (line 210) | def post(self): method get_reply_blocks (line 222) | def get_reply_blocks(self, job_name, job_link, failures, text): method post_reply (line 253) | def post_reply(self): function retrieve_artifact (line 277) | def retrieve_artifact(name: str): function retrieve_available_artifacts (line 292) | def retrieve_available_artifacts(): FILE: mplsandbox_for_rl/transformers/utils/notification_service_quantization.py class QuantizationMessage (line 40) | class QuantizationMessage(Message): method __init__ (line 41) | def __init__( method payload (line 59) | def payload(self) -> str: method time (line 72) | def time(self) -> str: method failures_overwiew (line 94) | def failures_overwiew(self) -> Dict: method failures_detailed (line 113) | def failures_detailed(self) -> Dict: method post (line 130) | def post(self): method post_reply (line 143) | def post_reply(self): FILE: mplsandbox_for_rl/transformers/utils/patch_helper.py function get_merge_commit (line 44) | def get_merge_commit(repo, pr_number, since_tag): function main (line 57) | def main(pr_numbers): FILE: mplsandbox_for_rl/transformers/utils/pr_slow_ci_models.py function get_new_python_files_between_commits (line 40) | def get_new_python_files_between_commits(base_commit: str, commits: List... function get_new_python_files (line 65) | def get_new_python_files() -> List[str]: function get_new_model (line 90) | def get_new_model(): function parse_commit_message (line 104) | def parse_commit_message(commit_message: str) -> str: function get_models (line 132) | def get_models(commit_message: str): FILE: mplsandbox_for_rl/transformers/utils/release.py function update_version_in_file (line 69) | def update_version_in_file(fname: str, version: str, file_type: str): function update_version_in_examples (line 87) | def update_version_in_examples(version: str): function global_version_update (line 105) | def global_version_update(version: str, patch: bool = False): function get_version (line 120) | def get_version() -> packaging.version.Version: function pre_release_work (line 130) | def pre_release_work(patch: bool = False): function post_release_work (line 160) | def post_release_work(): FILE: mplsandbox_for_rl/transformers/utils/sort_auto_mappings.py function sort_auto_mapping (line 50) | def sort_auto_mapping(fname: str, overwrite: bool = False) -> Optional[b... function sort_all_auto_mappings (line 102) | def sort_all_auto_mappings(overwrite: bool = False): FILE: mplsandbox_for_rl/transformers/utils/test_module/custom_configuration.py class CustomConfig (line 4) | class CustomConfig(PretrainedConfig): method __init__ (line 7) | def __init__(self, attribute=1, **kwargs): class NoSuperInitConfig (line 12) | class NoSuperInitConfig(PretrainedConfig): method __init__ (line 15) | def __init__(self, attribute=1, **kwargs): FILE: mplsandbox_for_rl/transformers/utils/test_module/custom_feature_extraction.py class CustomFeatureExtractor (line 4) | class CustomFeatureExtractor(Wav2Vec2FeatureExtractor): FILE: mplsandbox_for_rl/transformers/utils/test_module/custom_image_processing.py class CustomImageProcessor (line 4) | class CustomImageProcessor(CLIPImageProcessor): FILE: mplsandbox_for_rl/transformers/utils/test_module/custom_modeling.py class CustomModel (line 8) | class CustomModel(PreTrainedModel): method __init__ (line 11) | def __init__(self, config): method forward (line 15) | def forward(self, x): method _init_weights (line 18) | def _init_weights(self, module): class NoSuperInitModel (line 22) | class NoSuperInitModel(PreTrainedModel): method __init__ (line 25) | def __init__(self, config): method forward (line 29) | def forward(self, x): method _init_weights (line 32) | def _init_weights(self, module): FILE: mplsandbox_for_rl/transformers/utils/test_module/custom_pipeline.py function softmax (line 6) | def softmax(outputs): class PairClassificationPipeline (line 12) | class PairClassificationPipeline(Pipeline): method _sanitize_parameters (line 13) | def _sanitize_parameters(self, **kwargs): method preprocess (line 19) | def preprocess(self, text, second_text=None): method _forward (line 22) | def _forward(self, model_inputs): method postprocess (line 25) | def postprocess(self, model_outputs): FILE: mplsandbox_for_rl/transformers/utils/test_module/custom_processing.py class CustomProcessor (line 4) | class CustomProcessor(ProcessorMixin): FILE: mplsandbox_for_rl/transformers/utils/test_module/custom_tokenization.py class CustomTokenizer (line 4) | class CustomTokenizer(BertTokenizer): FILE: mplsandbox_for_rl/transformers/utils/test_module/custom_tokenization_fast.py class CustomTokenizerFast (line 6) | class CustomTokenizerFast(BertTokenizerFast): FILE: mplsandbox_for_rl/transformers/utils/tests_fetcher.py function checkout_commit (line 107) | def checkout_commit(repo: Repo, commit_id: str): function clean_code (line 125) | def clean_code(content: str) -> str: function keep_doc_examples_only (line 157) | def keep_doc_examples_only(content: str) -> str: function get_all_tests (line 184) | def get_all_tests() -> List[str]: function diff_is_docstring_only (line 213) | def diff_is_docstring_only(repo: Repo, branching_point: str, filename: s... function diff_contains_doc_examples (line 239) | def diff_contains_doc_examples(repo: Repo, branching_point: str, filenam... function get_impacted_files_from_tiny_model_summary (line 265) | def get_impacted_files_from_tiny_model_summary(diff_with_last_commit: bo... function get_diff (line 381) | def get_diff(repo: Repo, base_commit: str, commits: List[str]) -> List[s... function get_modified_python_files (line 423) | def get_modified_python_files(diff_with_last_commit: bool = False) -> Li... function get_diff_for_doctesting (line 453) | def get_diff_for_doctesting(repo: Repo, base_commit: str, commits: List[... function get_all_doctest_files (line 494) | def get_all_doctest_files() -> List[str]: function get_new_doctest_files (line 527) | def get_new_doctest_files(repo, base_commit, branching_commit) -> List[s... function get_doctest_files (line 554) | def get_doctest_files(diff_with_last_commit: bool = False) -> List[str]: function extract_imports (line 623) | def extract_imports(module_fname: str, cache: Dict[str, List[str]] = Non... function get_module_dependencies (line 705) | def get_module_dependencies(module_fname: str, cache: Dict[str, List[str... function create_reverse_dependency_tree (line 764) | def create_reverse_dependency_tree() -> List[Tuple[str, str]]: function get_tree_starting_at (line 776) | def get_tree_starting_at(module: str, edges: List[Tuple[str, str]]) -> L... function print_tree_deps_of (line 804) | def print_tree_deps_of(module, all_edges=None): function init_test_examples_dependencies (line 837) | def init_test_examples_dependencies() -> Tuple[Dict[str, List[str]], Lis... function create_reverse_dependency_map (line 873) | def create_reverse_dependency_map() -> Dict[str, List[str]]: function create_module_to_test_map (line 925) | def create_module_to_test_map( function check_imports_all_exist (line 987) | def check_imports_all_exist(): function _print_list (line 1003) | def _print_list(l) -> str: function create_json_map (line 1010) | def create_json_map(test_files_to_run: List[str], json_output_file: str): function infer_tests_to_run (line 1050) | def infer_tests_to_run( function filter_tests (line 1165) | def filter_tests(output_file: str, filters: List[str]): function parse_commit_message (line 1192) | def parse_commit_message(commit_message: str) -> Dict[str, bool]: FILE: mplsandbox_for_rl/transformers/utils/update_metadata.py function camel_case_split (line 126) | def camel_case_split(identifier: str) -> List[str]: function get_frameworks_table (line 148) | def get_frameworks_table() -> pd.DataFrame: function update_pipeline_and_auto_class_table (line 215) | def update_pipeline_and_auto_class_table(table: Dict[str, Tuple[str, str... function update_metadata (line 254) | def update_metadata(token: str, commit_sha: str): function check_pipeline_tags (line 337) | def check_pipeline_tags(): FILE: mplsandbox_for_rl/transformers/utils/update_tiny_models.py function get_all_model_names (line 38) | def get_all_model_names(): function get_tiny_model_names_from_repo (line 64) | def get_tiny_model_names_from_repo(): function get_tiny_model_summary_from_hub (line 85) | def get_tiny_model_summary_from_hub(output_path): FILE: mplsandbox_for_rl/utils.py function setup_accelerator (line 12) | def setup_accelerator(**kwargs): function setup_deepspeed_plugin (line 18) | def setup_deepspeed_plugin(opt): function setup_logging (line 23) | def setup_logging(): function setup_seed (line 36) | def setup_seed(seed=42): function setup_separate_prompt (line 42) | def setup_separate_prompt(opt): function setup_model (line 51) | def setup_model(opt): function synchronize_if_distributed (line 64) | def synchronize_if_distributed(): function synchronize_forward_on_stage3 (line 68) | def synchronize_forward_on_stage3(done: bool, fake_forward_fn: Callable,... function write_log_info_on_rank0 (line 81) | def write_log_info_on_rank0(msg: str, log_once=False, local=True): function total_parameters (line 90) | def total_parameters(model: torch.nn.Module) -> int: function to_cuda (line 93) | def to_cuda(batch: Dict[str, Any]): function to_half (line 98) | def to_half(state_dict): function get_eval_ds_config (line 104) | def get_eval_ds_config(offload=None, stage=3): function get_optimizer_grouped_parameters (line 127) | def get_optimizer_grouped_parameters(model, class MySplitSentence (line 155) | class MySplitSentence(SplitSentence): method _prepare (line 156) | def _prepare(self): method __call__ (line 162) | def __call__(self, *args: Any, **kwds: Any) -> Any: class MySplitSentence (line 161) | class MySplitSentence: method _prepare (line 156) | def _prepare(self): method __call__ (line 162) | def __call__(self, *args: Any, **kwds: Any) -> Any: function cut_uncomplete_sentence (line 167) | def cut_uncomplete_sentence(s: str, coarse=False): function setup_prompt (line 176) | def setup_prompt(prompt: str): function p1_prompt_ (line 182) | def p1_prompt_(): function p2_prompt_ (line 185) | def p2_prompt_(): function get_separate_prompt (line 190) | def get_separate_prompt(i: int): function build_prompt (line 195) | def build_prompt(code_description: str, starter_code: str,**kwargs): function _build_code_prompt (line 198) | def _build_code_prompt(code_description: str, starter_code: str, dialog_... function build_code_context (line 246) | def build_code_context(scope:List[List], level, golden_solution): function _build_chitchat_prompt (line 268) | def _build_chitchat_prompt(context: Union[List[str], str], openai_style=... function _build_rolechat_prompt (line 304) | def _build_rolechat_prompt(context: Union[List[str], str], init_prompt, ... function pad_sequences (line 324) | def pad_sequences(lst_seq: List[List[int]], pad_value, pad_left=False, p... function simple_retrieve (line 332) | def simple_retrieve(kv_pairs, s): class History (line 335) | class History(): method __init__ (line 336) | def __init__(self, opt) -> None: method add (line 340) | def add(self, sent): method reset (line 343) | def reset(self, keep_last=False): method get_full_context (line 349) | def get_full_context(self, as_str=True) -> Union[str, List[str]]: FILE: scripts/app.py function run_app (line 7) | def run_app():